PageSourceSearch

https://classroom.freckle.com/js/index-VJK174zM.js

js freckle.com collected 2026-09-24 10:30:39 UTC 5,126 bytes, 2 lines download raw bytes

1import{ae as e,af as r,j as s,d as a,u as t,_ as n,e as i,a as c,T as l,S as _,a1 as R,aO as o,L as d,aK as m,V as x,k as u,bG as E,bH as j,ai as f,X as h,Z as A}from"./index-B1wCbfWL.js";import{g as p}from"./referrals-BZbd8w9Q.js";import{c as b}from"./copy-link-to-clipboard-C0qIOcZE.js";import{T as g}from"./table-BrruizSd.js";import{c as L}from"./table-DqbDCvXI.js";import"/config.js";const N=()=>e.GET("/2/referrals").then(r),T=()=>{const{t:e}=t();return s.jsxs("div",{className:"_description_1w2ib_93",children:[s.jsx(n,{className:"_bannerTitle_1w2ib_85",children:e("REFERRAL_PROGRAM_BANNER_TITLE")}),s.jsx(i,{className:"_bannerSubTitle_1w2ib_89",children:e("REFERRAL_PROGRAM_BANNER_SUBTITLE")})]})},w=()=>s.jsx(a,{flexDirection:"column",justifyContent:"flex-end",children:s.jsx("img",{src:`${c.imageAssetsUrl}/teacher-dashboard/referral-program/elephants.svg`})}),C=()=>s.jsxs(a,{className:"_banner_1w2ib_80",children:[s.jsx(T,{}),s.jsx(w,{})]}),I=e=>{const{step:r,stepIdx:t}=e,n=(e=>{switch(e){case"share":return"REFERRAL_PROGRAM_CARD_SHARE_DESCRIPTION";case"create":return"REFERRAL_PROGRAM_CARD_CREATE_DESCRIPTION";case"earn":return"REFERRAL_PROGRAM_CARD_EARN_DESCRIPTION";default:return R.exhaustive(e)}})(r),i=(e=>{switch(e){case"share":return`${c.imageAssetsUrl}/teacher-dashboard/referral-program/share2.svg`;case"create":return`${c.imageAssetsUrl}/teacher-dashboard/referral-program/refer2.svg`;case"earn":return`${c.imageAssetsUrl}/teacher-dashboard/referral-program/premium2.svg`;default:return R.exhaustive(e)}})(r);return s.jsxs(a,{alignItems:"center",justifyContent:"center",flexDirection:"column",className:"_programDescriptionCard_1w2ib_166",children:[s.jsx("img",{className:"_cardImg_1w2ib_140",src:i}),s.jsxs(l,{className:"_cardText_1w2ib_145",children:[s.jsx("span",{children:`${t+1}. `}),s.jsx(_,{i18nKey:n})]})]})},D=()=>{const{t:e}=t();return s.jsxs(a,{flexDirection:"column",alignItems:"center",className:"_programDescriptionContainer_1w2ib_149",children:[s.jsx(i,{children:e("HOW_IT_WORKS")}),s.jsx(a,{flexDirection:"row",alignItems:"stretch",justifyContent:"center",className:"_programDescription_1w2ib_149",children:["share","create","earn"].map((e,r)=>s.jsx(I,{step:e,stepIdx:r},e))})]})},O=e=>{const{t:r}=t(),{referralLink:a}=e;return s.jsxs("div",{className:"_linkContent_1w2ib_112",children:[s.jsx("input",{type:"text",readOnly:!0,defaultValue:a}),s.jsx("button",{onClick:()=>{b(r,a)},children:r("REFERRAL_PROGRAM_REFERRAL_LINK_CTA")})]})},S=e=>{const{t:r}=t();return s.jsxs(a,{justifyContent:"center",alignItems:"center",flexDirection:"column",className:"_referralLink_1w2ib_98",children:[s.jsx(i,{children:r("REFERRAL_PROGRAM_REFERRAL_LINK_HEADER")}),s.jsx(O,{...e})]})},y=()=>{const{t:e}=t();return s.jsxs(a,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[s.jsx("img",{src:`${c.imageAssetsUrl}/teacher-dashboard/referral-program/class.svg`}),s.jsx(l,{style:"caption-2",children:e("REFERRAL_PROGRAM_REFERRALS_EMPTY")})]})},F=e=>{const{status:r}=e;switch(r){case"earned_referral":return s.jsx(u,{icon:j});case"awaiting_student_use":return s.jsx(u,{icon:E});default:R.exhaustive(r)}},P=e=>{switch(e){case"earned_referral":return"_statusEarned_1w2ib_188";case"awaiting_student_use":return"_statusWaiting_1w2ib_184";default:R.exhaustive(e)}},v=e=>{const{status:r}=e,{t:a}=t();return s.jsxs("div",{className:P(r),children:[s.jsx(F,{status:r}),s.jsx("p",{className:"_statusParagraph_1w2ib_192",children:a("REFERRAL_PROGRAM_REFERRALS_TABLE_STATUS",{status:r})})]})},G=e=>{const{referrals:r}=e,{t:a}=t();return s.jsx(g,{data:o.nonEmptyToArray(r),columns:[{Header:a("REFERRAL_PROGRAM_REFERRALS_TABLE_TEACHER_HEADER"),accessor:e=>e.referredTeacherName,Cell:L(e=>s.jsx(l,{style:"body-2",children:e.referredTeacherName})),id:"referredTeacherName",alignment:"left"},{Header:a("REFERRAL_PROGRAM_REFERRALS_TABLE_STATUS_HEADER"),accessor:e=>e.status,Cell:L(e=>s.jsx(v,{status:e.status})),id:"status",alignment:"left"}]})},M=e=>{const{children:r}=e;return s.jsx("div",{className:"_referralListContainer_1w2ib_176",children:r})},U=e=>{const{referrals:r}=e,{t:n}=t(),c=o.mkNonEmpty(r);return s.jsxs(a,{flexDirection:"column",alignItems:"center",children:[s.jsx(i,{children:n("REFERRAL_PROGRAM_REFERRALS_SUBTITLE")}),s.jsxs("div",{className:"_referralContainer_1w2ib_197",children:[s.jsx(a,{className:"_contactUs_1w2ib_172",flexDirection:"row",justifyContent:"flex-end",children:s.jsx(l,{style:"body-3",children:s.jsx(_,{i18nKey:"REFERRAL_QUESTIONS_LINK_CONTACT_US",components:{emailLink:s.jsx(d,{target:"_blank",rel:"noopener",href:"mailto:[email protected]",reactRouter:!1,leftIcon:m})}})})}),s.jsx(M,{children:x.maybe(()=>s.jsx(y,{}),e=>s.jsx(G,{referrals:e}),c)})]})]})},k=e=>{const{teacher:r,referrals:t}=e,n=p(r);return s.jsxs(a,{className:"_topLevelContainer_1w2ib_73",flexDirection:"column",children:[s.jsx(C,{}),s.jsx(S,{referralLink:n}),s.jsx(D,{}),s.jsx(U,{referrals:t})]})};function H(){const e=f(),r=h(N,"fetchReferrals",[]);return s.jsx(A,{resources:{teacher:e,referrals:r},render:e=>s.jsx(k,{...e})})}
1export{H as default};
2//# sourceMappingURL=index-VJK174zM.js.map

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.