1import{r as e,j as s}from"./react-vendor.B75MsAI9.js";import{t as l,r as a,p as o,c_ as r,c$ as n,d0 as t,d1 as i,q as m,aO as c,U as d,Q as _,O as p,a0 as u,a1 as h,S as f,o as g,L as j,a2 as x,w as b,E as $,bE as N,H as v,d2 as M,d3 as k}from"./AuthModalContainer.D3JsQqnf.js";import{B as S}from"./Block.v-v90TCf.js";import{A as w}from"./Avatar.DudPqjKy.js";import{B as E,a as C}from"./main.DrmgIV4z.js";/* empty css */import{S as y}from"./StemMoocEnrollModal.jb7cbFmZ.js";import"./RTLProvider.Bmr48mpV.js";import"./LazyFontLoader.5DGfhuFK.js";import"./indianStatesDistricts.Dup4ED2A.js";const A=({parentClassName:A,program:L="stem"})=>{var D,F,H;const I=l(),[T]=a(),[B,R]=e.useState(!1),z=T.get("language")||"en",P=T.get("ps"),U=o(e=>e.viewport),O=o(e=>e.stem),Q=o(e=>e.user),q=o(e=>e.profile),V="stem"===L,W=V?O.moocData:O.flpMoocData,G=Q.isLoggedIn,J=null==(D=Q.profile)?void 0:D.profile_type,K=V?O.isStemEnrolling:O.isFlpMoocEnrolling,X=V?O.isStemEnrolled:O.isFlpMoocEnrolled,Y=null==(F=Q.profile)?void 0:F.id,Z=V?O.showSuccessAnimation:O.showFlpMoocSuccessAnimation,ee=(null==(H=null==q?void 0:q.profile)?void 0:H.user)&&q.profile.user.role?q.profile.user.role.profileType:"",se="pb-stem-home",le={[se]:!0,[A]:A,[`${se}__lang-based--styles`]:"en"!==z&&"flp"===L};e.useEffect(()=>{I(V?r({locale:z}):n({locale:z}))},[]),e.useEffect(()=>{G&&I(V?t({locale:z}):i({locale:z}))},[G]),e.useEffect(()=>{ee&&!X&&ae(ee)&&R(!0)},[ee]),e.useEffect(()=>{Z&&localStorage.setItem(V?"stem-enrol":"flp-enrol",V?"stem":"flpMooc"+Math.random())},[Z]);const ae=e=>e.toLowerCase()!==m[c.STUDENT],oe=e=>{const{gaAction:s,label:l,d3:a}=e;window.dataLayer.push({category:V?b.stemMooc:`${b.flpMooc}_${a}`,...l&&{label:l},...s&&{event:s},item_type:null,item_id:null,item_value:null,user_profile:J,user_id:Y||"00000"})};if(Object.keys(W).length<=0)return s.jsx(d,{});const{modulesHeading:re,bannerHeading:ne,bannerDescription:te,signInBtn:ie,enrolBtn:me,enrolledBtn:ce,enrolDescription:de,stemFooterDesc:_e,stemFooterLinks:pe,enrolNotAllowedNotif:ue,backToStem:he,brdcrumbFLP:fe,brdcrumbHome:ge,enrollModalData:je}=W,xe=V?W.module:W.flpModule,be=V?W.shareStemResources:W.shareFlpResources,$e=[{title:`< ${he}`,href:p.stemHome(z),isInternal:!0,isLast:!0,onClick:()=>oe({label:"module_page",gaAction:"clicked_back_modules",d3:z})}],Ne=[{title:ge,href:p.home(),isInternal:!0},{title:fe,href:p.flpHome(z,P),isInternal:!0,isLast:!0}];return s.jsxs("div",{className:_(le),id:L,children:[s.jsxs("div",{className:`${se}__header ${se}__hero-banner ${se}__top-banner`,children:[!V&&s.jsx(E,{paths:Ne,parentClassName:`${se}__brd-crumb`}),V&&s.jsx("img",{className:`${se}__banner-logo`,src:u.stemLogo,alt:"Stem Home"}),s.jsxs("div",{className:`${se}__section-title`,children:[V&&s.jsx(E,{paths:$e,parentClassName:`${se}--brd-crumb`}),s.jsx("div",{className:`${se}__section-flex`,children:ne}),s.jsx("p",{className:`${se}__section-flex-grade`,dangerouslySetInnerHTML:{__html:h(te)}}),s.jsxs("div",{className:`${se}__banner-enrol`,children:[s.jsxs("div",{className:`${se}__enrol-text`,children:[s.jsx(f,{size:U.medium?"l":"m-ml",pushRight:!0,name:"stemEnrol"}),s.jsx("p",{className:`${se}__enrol-desc`,children:de})]}),s.jsx(g,{parentClassName:X?`${se}__enrolled`:"",variant:"primary",size:"xxl",loading:K,rounded:!0,fullWidth:!0,label:G?X?ce:me:ie,onClick:()=>{G?J?!X&&ae(J)?(R(!0),oe({label:"main_content_top",gaAction:"clicked_enroll_now",d3:z})):I(v({type:"info",content:(null==W?void 0:W.enrolNotAllowedNotif)||"Enrollment not allowed"})):(I(N({mandatory:!0})),oe({label:"main_content_modal",gaAction:"nag_update_profile",d3:z})):(I($()),oe({label:"main_content_top",gaAction:"clicked_sign_in",d3:z}))}})]})]}),s.jsx("img",{className:`${se}__banner-img`,src:U.medium?V?u.stemMoocD:u.flpMoocD:V?u.stemMoocM:u.flpMoocM,alt:"stem"})]}),s.jsx("div",{className:`${se}__section`,children:s.jsxs(S,{background:"transparent",parentClassName:`${se}__centered`,noHorizontalPadding:U.medium,noVerticalPadding:U.medium,children:[s.jsx("p",{className:`${se}__title`,children:re}),xe&&xe.map(e=>s.jsx("div",{children:s.jsxs(j,{parentClassName:`${se}__module`,theme:"csf",href:V?p.stemResourcesModule(e.url,z):p.flpMo
1ocResourcesModule(e.url,z,P),onClick:()=>oe({label:`module_${e.id}`,gaAction:"clicked_module",d3:z}),children:[s.jsx(w,{parentClassName:`${se}__module-avatar`,url:e.image[0].url,name:e.name,variant:"circular",size:U.medium?"xxl":"xl",showBadge:!1}),s.jsxs("div",{className:`${se}__module-text`,children:[s.jsx("p",{className:`${se}__module-number`,children:e.moduleNumber}),s.jsx("p",{className:`${se}__module-title`,children:e.name}),s.jsx("ul",{className:`${se}__module-skill`,children:e.skills&&e.skills.map((e,l)=>s.jsx("li",{children:e.point},l))})]})]})},e.id)),s.jsx("div",{className:`${se}__share`,children:s.jsx(C,{noIcon:!0,href:window.location.href,viewport:U,title:ne,csfTitle:be,onClick:e=>oe({label:"share_resources_page",gaAction:`clicked_${e.slice(5).toLowerCase()}`,d3:z})})})]})}),V&&s.jsxs("div",{className:`${se}__header ${se}__hero-banner ${se}__bottom-banner`,children:[s.jsxs("div",{className:`${se}__section-title`,children:[s.jsx("p",{className:`${se}__section-flex-grade`,dangerouslySetInnerHTML:{__html:h(_e)}}),s.jsx(x,{variant:"2up",children:pe&&pe.map(e=>s.jsx(j,{href:e.url,onClick:()=>{oe({label:"more_about_stem",gaAction:"clicked_programme",d3:z})},children:e.displayName},e.displayName))})]}),s.jsx("img",{className:`${se}__banner-img`,src:U.medium?u.stemFooter:u.stemFooterM,alt:"stem-footer"})]}),B&&je?s.jsx(y,{viewport:U,isUserEnrolled:X,enrollModalData:je,onCloseModal:()=>{R(!1)},handleModalEnrol:e=>{I(V?M({data:e,locale:z}):k({data:e,locale:z}))},isUserEnrolling:K}):null]})};export{A as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.