(window.webpackJsonp=window.webpackJsonp||[]).push([["6rxO"],{AcGU:function(e,t,n){"use strict";var r=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("pVnL")),l=r(n("Pwnf")),i=n("JimW"),o=n("JasB"),d=r(n("gE8/")),c=n("Vxy9"),s=n("mR6N"),u=W(n("q1tI")),f=r(n("x+rD")),p=r(n("SY2B")),m=n("VrWj"),g=n("nX5L"),y=W(n("zbaY")),b=r(n("K5Ur")),v=n("NXn8"),w=r(n("mXPZ")),P=r(n("Q8Wn")),E=n("0UwG"),h=r(n("nTsq")),A=n("VxSq"),S=n("y1SX"),_=r(n("lvGP")),C=r(n("n7sV")),T=n("ISIN"),I=r(n("1TAv")),O=n("A/6e"),V=r(n("CHVS")),k=n("UNGa");function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function W(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var i=a?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(r,l,i):r[l]=e[l]}return r.default=e,n&&n.set(e,r),r}const j=`1px solid ${l.default.offBlack32}`,x={descriptionWrapper:(0,a.default)({},y.contentPadding,{borderBottom:j,borderTop:j,fontStyle:"italic",marginBottom:40,maxWidth:(y.contentPadding.maxWidth||0)-2*d.default.large_24,minHeight:"initial",paddingBottom:d.default.medium_16,paddingLeft:d.default.large_24,paddingRight:d.default.large_24,paddingTop:d.default.medium_16,textAlign:"center",width:"100%"}),mobileDescriptionWrapper:{marginBottom:-24}};var N=e=>{const{contentPath:t,header:n,isSmallScreen:r=!1,onComplete:l,onLoad:y}=e,M=(0,m.usePublishAnalyticsEvent)(),W=(0,O.useCommonContentLibraryAnalyticsFields)(),j=(0,_.default)(t.learnableNodeId),{gqlClient:N}=(0,v.useApolloGqlClient)(),B=(0,C.default)(t),L=u.useRef(null),R=u.useRef(),G=u.useRef(!1),q=u.useCallback(((e,t)=>{if(G.current&&j&&B){const n=(0,T.mapToLegacyTutorialPageTopic)(B);(0,A.updateArticleProgress)(N,e,j.id,j.slug,n.id,t),f.default.sendToGA("event","Learning-Action","Article-View",n.slug),(0,S.sendAnEventToGA4)({event:"learningAction",actionType:"Article-View",slug:n.slug})}}),[j,N,B]),D=u.useCallback((e=>{const t=document.documentElement;if(L.current&&t){const n=t.clientHeight,r=L.current.getBoundingClientRect(),a=r.top,l=r.bottom-a,i=a+e,o=(0,g.computeArticleScrollParams)(e,n-i,l,R.current);null!=o&&(R.current=o,q("article_scroll",{scrollInfo:o}))}}),[q]),K=!!P.default.isMobile,U=u.useMemo((()=>({customKeypad:K,isMobile:r,trackInteraction:({id:e,status:t,type:n})=>{q("article_widget",{widgetInfo:{widgetId:e,widgetStatus:t,widgetType:n}})}})),[K,r,q]);if(u.useEffect((()=>{G.current=!0,q("article_view")}),[q]),(0,i.useOnMountEffect)((()=>{M((0,a.default)({eventType:"ContentLibraryArticlePageViewed",eventSchemaVersion:1},W))})),u.useEffect((()=>{j?null==l||l():null==y||y()}),[j,l,y]),null==j)return u.createElement(I.default,{header:n,spinnerTestId:"article-renderer-loading-spinner"});const z=w.default.hasProfile?j.translatedPerseusContent:j.translatedPerseusContent.map((e=>(0,a.default)({},e,{problemNum:1})));return u.createElement(i.View,{testId:"article-renderer"},u.createElement(h.default,{debounce:!0,delayMs:2e3,onScroll:D},u.createElement("div",{className:(0,s.css)(k.sharedStyles.rendererScrollContainer),"data-test-id":"article-renderer-scroll-container"},u.createElement(i.View,{style:k.sharedStyles.rendererContainer},u.createElement(b.default,{contentKind:"Article",learnableContentId:j.id},(({loading:e,error:t,standards:r})=>u.createElement(n,{standards:r}))),j.translatedDescription&&u.createElement(i.View,{style:[x.descriptionWrapper,k.sharedStyles.horizontalPadding,r&&x.mobileDescriptionWrapper]},u.createElement(c.Body,null,j.translatedDescription)),u.createElement("div",{className:(0,s.css)(k.sharedStyles.horizontalPadding),ref:L},u.createElement(E.ArticleRenderer,{apiOptions:U,json:z,useNewStyles:!0})),u.createElement(o.Strut,{size:d.default.xxLarge_48}),u.createElement(V.default,{clarificationsEnabled:j.clarificationsEnabled,contentId:j.id,contentKind:"Article",contentPath:t})))),u.createElement(p.default,{key:j.id,markFullyInteractiveOnMount:!0,markSufficientlyUsable:"markup",pageName:"article_page"}))};t.default=N},lvGP:function(e,t,n){"use strict";var r=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("mIVp"));var l=e=>{const t=(0,a.default)(e);return"Article"===(null==t?void 0:t.contentKind)?t:null};t.default=l}}]);
//# sourceMappingURL=../../sourcemaps/en/6rxO.5c6d824c62c8ea9a1ff5.js.map