1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7262],{9923:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(20148),n=s(16527);let r=(0,s(26732).UG)("\n query MySubscriptions {\n myProducts {\n entries {\n id\n code\n }\n }\n mySubscriptions {\n pageNumber\n pageSize\n totalEntries\n totalPages\n\n entries {\n id\n startAt\n endAt\n subscriber {\n id\n schoolId\n }\n product {\n id\n code\n }\n }\n }\n }\n"),l={FLUENCY:"fluency"},i=function(){var e,t,s,i;arguments.length>0&&void 0!==arguments[0]&&arguments[0];let{data:o,previousData:d,loading:c,refetch:u}=(0,a.I)(r),m=o||d,x=!!(null==m||null==(t=m.myProducts)||null==(e=t.entries)?void 0:e.find(e=>(null==e?void 0:e.code)===l.FLUENCY)),h=!!(null==m||null==(i=m.mySubscriptions)||null==(s=i.entries)?void 0:s.find(e=>{var t;return(null==e||null==(t=e.product)?void 0:t.code)===l.FLUENCY}));return{fluencySubscriptionStatus:x?n.y.FLUENCY_SEAT:h?n.y.FLUENCY_SUBSCRIPTION:n.y.NONE,loading:c,refetch:u}}},16527:(e,t,s)=>{s.d(t,{y:()=>a});let a={FLUENCY_SEAT:"FLUENCY_SEAT",FLUENCY_SUBSCRIPTION:"FLUENCY_SUBSCRIPTION",NONE:"NONE"}},46460:(e,t,s)=>{s.d(t,{A:()=>a});let a={src:"/_next/static/media/clean-slate-character.f3b24b7f.svg",height:105,width:100,blurWidth:0,blurHeight:0}},66077:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(6029),n=s(20148),r=s(26751),l=s(31810),i=s(55729),o=s(69961),d=s(77509);let c=()=>{var e;let{t}=(0,r.Bd)("teachers"),[s,c]=(0,i.useState)(!1),{data:u,loading:m,refetch:x}=(0,n.I)(d.w,{fetchPolicy:"network-only",pollInterval:6e4}),h=(0,i.useRef)(null),[p,g]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{if(!(null==u?void 0:u.impersonationInfo))return;let e=(e=>{var t,s;return JSON.stringify({isImpersonating:e.isImpersonating,adminEmail:null!=(t=e.adminEmail)?t:null,impersonatedEmail:null!=(s=e.impersonatedEmail)?s:null})})(u.impersonationInfo);if(null===h.current){h.current=e;return}e!==h.current&&g(!0)},[u]),(0,i.useEffect)(()=>{if(p)return;let e=()=>{"visible"===document.visibilityState&&x()};return window.addEventListener("focus",e),window.addEventListener("pageshow",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("pageshow",e),document.removeEventListener("visibilitychange",e)}},[p,x]),p)return(0,a.jsx)("div",{className:"fixed inset-0 z-[100] flex items-start justify-center bg-gray-900/70 px-4 pt-24 print:hidden",children:(0,a.jsxs)("div",{className:"max-w-md rounded-lg bg-white p-6 text-center shadow-xl",children:[(0,a.jsx)("p",{className:"mb-2 font-semibold text-gray-900",children:t("banners.staleSession.title","Your session changed")}),(0,a.jsx)("p",{className:"mb-4 text-sm text-gray-600",children:t("banners.staleSession.body","This browser is now acting as someone else. Reload this tab to continue.")}),(0,a.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded bg-indigo-600 px-4 py-2 font-medium text-white hover:bg-indigo-700",children:t("banners.staleSession.reload","Reload")})]})});if(m||!(null==u||null==(e=u.impersonationInfo)?void 0:e.isImpersonating))return null;let{adminName:f,impersonatedName:b,impersonatedEmail:v,expiresAt:y}=u.impersonationInfo,j=y?new Date(y):null,N=j?Math.max(0,Math.round((j.getTime()-Date.now())/6e4)):null;return(0,a.jsx)("div",{className:"sticky top-0 z-50 w-full bg-amber-500 text-white px-4 py-2 shadow-lg print:hidden",children:(0,a.jsxs)("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("i",{className:"fas fa-user-secret text-lg"}),(0,a.jsx)("span",{className:"font-medium",children:t("banners.impersonation.active","Impersonation Active")}
1)]}),(0,a.jsx)("div",{className:"text-sm opacity-90",children:(0,a.jsx)(r.x6,{t:t,i18nKey:"banners.impersonation.viewingAs",defaults:"<0>{admin}</0> is viewing as <1>{name} ({email})</1>",values:{admin:f,name:b,email:v},components:[(0,a.jsx)("span",{className:"font-medium"},"0"),(0,a.jsx)("span",{className:"font-medium"},"1")]})}),null!==N&&(0,a.jsx)("div",{className:"text-xs bg-amber-600 px-2 py-1 rounded",children:t("banners.impersonation.timeRemaining","{minutes, plural, one {# minute remaining} other {# minutes remaining}}",{minutes:N})})]}),(0,a.jsx)("button",{onClick:()=>{c(!0),console.log("[Impersonation] Ending impersonation, returning to admin");let e=o.H$||"http://localhost:4000",t=(0,l.aT)(o._k),s=(0,l.Un)(t,o.kY||"http://localhost:3002","/v2/manage/teachers");window.location.href="".concat(e,"/api2/admins/impersonation/end?return_url=").concat(encodeURIComponent(s))},disabled:s,className:"bg-white text-amber-600 px-4 py-1 rounded font-medium hover:bg-amber-50 transition-colors disabled:opacity-50",children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("i",{className:"fas fa-spinner fa-spin mr-2"}),t("banners.impersonation.returning","Returning...")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("i",{className:"fas fa-arrow-left mr-2"}),t("banners.impersonation.returnToAdmin","Return to Admin")]})})]})})}},67262:(e,t,s)=>{s.d(t,{O:()=>eN});var a=s(6029),n=s(26751),r=s(55729),l=s(95099),i=s(31810);let o={src:"/_next/static/media/avatar.1ca5a439.svg",height:28,width:28,blurWidth:0,blurHeight:0};var d=s(69961),c=s(63777),u=s(97204),m=s(78048);function x(e){var t,s,r,l,x,h;let{t:p}=(0,n.Bd)("teachers"),{userData:g,setQueryParams:f,queryParams:b}=e,v=()=>{f({headerPopup:void 0},"replaceIn")};return(0,a.jsx)(u.A,{open:"avatar"===b.headerPopup,width:"42rem",onClose:v,height:"28rem",children:(0,a.jsx)(m.A,{svgIcon:o,title:p("header.avatarPopup.title","Your Teacher Avatar"),cancelText:p("header.avatarPopup.cancel","Cancel"),confirmText:p("header.avatarPopup.confirm","Customize your teacher avatar and classroom"),onClose:v,onConfirm:()=>{window.open("".concat(d.eE,"?experience=teacher"),"_blank")},children:(0,a.jsxs)("div",{className:"flex p-8 gap-8",children:[(0,a.jsx)(c.e,{alt:p("header.avatarAlt","Avatar"),imageUrl:(0,i.QY)(null==g||null==(s=g.currentTeacher)||null==(t=s.playerAvatar)?void 0:t.headshotUrl)||"",size:"xl"}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("p",{className:"text-medium-grey header-sm mb-4 uppercase",children:(null==(r=g.currentUser)?void 0:r.displayName)||(null==(l=g.currentUser)?void 0:l.username)}),(0,a.jsxs)("p",{className:"text-universal h3 mb-6",children:[null==(x=g.currentUser)?void 0:x.firstName," ",null==(h=g.currentUser)?void 0:h.lastName]}),(0,a.jsx)("p",{className:"text-dark-grey main-bold mb-1",children:p("header.avatarPopup.editPrompt","Want to edit your Teacher Avatar?")}),(0,a.jsx)("p",{className:"text-dark-grey main mb-2",children:p("header.avatarPopup.editHint","Click the button below to launch Awakening.")})]})]})})})}var h=s(54148),p=s(33701),g=s(11062),f=s(83353),b=s(72981),v=s(93923),y=s(64476),j=s(76264);s(29072);var N=s(28515),w=s(17072),S=s(69933),A=s(30554),k=s(24266),C=s(80059);function E(e){let{name:t}=e,s=t.split(/\s+/).slice(0,2).map(e=>{var t,s;return null!=(s=null==(t=e[0])?void 0:t.toUpperCase())?s:""}).join("");return(0,a.jsx)("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary-100 text-xs font-semibold text-primary-950",children:s||"?"})}function P(e){let{children:t}=e;return(0,a.jsx)("span",{className:"inline-flex items-center rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-600",children:t})}function L(e){let{shown:t,total:s,noun:n}=e;return s?(0,a.jsx)("p",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-gray-400",children:s>t?"Showing ".concat(t," of ").concat(s," ").concat(n):"".concat(s," ").concat(n)}):null}let _={LIVE:"bg-green-100 text-green-700",DRAFT:"bg-gray-100 text-gray-600",SCHEDULED:"bg-blue-100 text-blue-700",COMPLETED:"bg-primary-100 text-primary-950",STOPPED:"bg-red-100 text-red-700",PAUSED:"bg-amber-100 text-amber-700"};function D(e){var t;let{status:s}=e;if(!s)return null;let n=null!=(t=_[s.toUpperCase()])?t:"bg-gray-100 text-gray-600";return(0,a.jsx)("span",{className:"inline-flex items-center rounded-full px-2 py-0.5 text-xs font-semibold ".concat(n),children:s})}function T(e){var t,s;let{src:n,label:l}=e,[i,o]=(0,r.useState)(!1);return n&&n.startsWith("http")&&!i?(0,a.jsx)("img",{src:n,alt:l,onError:()=>o(!0),className:"h-24 w-full rounded-t-lg object-cover"}):(0,a.jsx)("div",{className:"flex h-24 w-full items-center justify-center rounded-t-lg bg-gradient-to-br from-primary-100 to-primary-300 text-lg font-bold text-primary-950",children:null!=(s=null==(t=l[0])?void 0:t.toUpperCase())?s:"?"})}function U(e){let{children:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm transition-shadow hover:shadow-md",children:t})}function I(e){var t;let{output:s}=e,n=null!=(t=null==s?void 0:s.message)?t:"Done.",r=!!(null==s?void 0:s.error);return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border px-3 py-2 text-sm ".concat(r?"border-red-200 bg-red-50 text-red-700":"border-green-200 bg-green-50 text-green-800"),children:[(0,a.jsx)("span",{children:r?"â ï¸":"â"}),(0,a.jsx)("span",{children:r?s.error:n})]})}function R(e){let{label:t}=e;return(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-gray-200 bg-gray-50 px-3 py-4 text-center text-sm text-gray-500",children:t})}function F(e){let{output:t}=e,[s,n]=(0,r.useState)(!1);return(0,a.jsxs)("details",{open:s,onToggle:e=>n(e.target.open),className:"rounded-lg border border-gray-200 bg-gray-50 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer select-none px-3 py-1.5 text-gray-500",children:s?"Hide raw data":"View raw data"}),(0,a.jsx)("pre",{className:"max-h-64 overflow-auto px-3 pb-3 text-gray-600",children:JSON.stringify(t,null,2)})]})}let O={searchContent:function(e){var t,s;let{output:n}=e,r=null!=(t=null==n?void 0:n.results)?t:[];return r.length?(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{shown:r.length,total:null!=(s=n.total)?
1s:r.length,noun:"results"}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:r.map(e=>{var t,s,n;return(0,a.jsxs)(U,{children:[(0,a.jsx)(T,{src:e.image?"standard"===e.type?(0,C._d)(e.image,400,200):(0,C.F)(e.image,400,200):null,label:null!=(t=e.name)?t:"?"}),(0,a.jsxs)("div",{className:"p-2.5",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[(0,a.jsx)(P,{children:null!=(s=e.type)?s:"content"}),"number"==typeof e.teacherRating&&e.teacherRating>0&&(0,a.jsxs)("span",{className:"text-xs text-amber-500",children:["â
",e.teacherRating.toFixed(1)]})]}),(0,a.jsx)("p",{className:"line-clamp-1 text-sm font-semibold text-gray-900",children:e.name}),e.description&&(0,a.jsx)("p",{className:"mt-0.5 line-clamp-2 text-xs leading-snug text-gray-500",children:e.description}),(0,a.jsxs)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:[(null!=(n=e.grades)?n:[]).slice(0,4).map(e=>(0,a.jsxs)(P,{children:["Gr ",e]},e)),e.durationMinutes?(0,a.jsxs)(P,{children:[e.durationMinutes," min"]}):null]})]})]},e.id)})})]}):(0,a.jsx)(R,{label:"No matching content found."})},listStudents:function(e){var t,s;let{output:n}=e,r=null!=(t=null==n?void 0:n.students)?t:[];return r.length?(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{shown:r.length,total:null!=(s=n.total)?s:r.length,noun:"students"}),(0,a.jsx)("ul",{className:"divide-y divide-gray-100 overflow-hidden rounded-lg border border-gray-200 bg-white",children:r.map(e=>{var t,s,n,r,l;return(0,a.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2",children:[(0,a.jsx)(E,{name:"".concat(null!=(s=e.firstName)?s:""," ").concat(null!=(n=e.lastName)?n:"")}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"truncate text-sm font-medium text-gray-900",children:[e.firstName," ",e.lastName]}),(0,a.jsxs)("p",{className:"truncate text-xs text-gray-500",children:["@",e.username]})]}),(0,a.jsxs)("div",{className:"hidden flex-wrap justify-end gap-1 sm:flex",children:[(null!=(r=e.groups)?r:[]).slice(0,2).map(e=>(0,a.jsx)(P,{children:e},e)),(null!=(l=null==(t=e.groups)?void 0:t.length)?l:0)>2&&(0,a.jsxs)(P,{children:["+",e.groups.length-2]})]})]},e.id)})})]}):(0,a.jsx)(R,{label:"No students found."})},listGroups:function(e){var t,s;let{output:n}=e,r=null!=(t=null==n?void 0:n.groups)?t:[];return r.length?(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{shown:r.length,total:null!=(s=n.total)?s:r.length,noun:"groups"}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:r.map(e=>{var t;return(0,a.jsx)(U,{children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5 p-3",children:[(0,a.jsx)("span",{className:"h-8 w-8 shrink-0 rounded-lg bg-primary"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-semibold text-gray-900",children:e.name}),(0,a.jsxs)("p",{className:"text-xs text-gray-500",children:[null!=(t=e.studentCount)?t:0," student",1===e.studentCount?"":"s"]})]})]})},e.id)})})]}):(0,a.jsx)(R,{label:"No groups yet."})},listAssignments:function(e){var t,s;let{output:n}=e,r=null!=(t=null==n?void 0:n.assignments)?t:[];return r.length?(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{shown:r.length,total:null!=(s=n.total)?s:r.length,noun:"assignments"}),(0,a.jsx)("ul",{className:"divide-y divide-gray-100 overflow-hidden rounded-lg border border-gray-200 bg-white",children:r.map(e=>{var t,s;return(0,a.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(D,{status:e.status}),(0,a.jsx)("p",{className:"truncate text-sm font-medium text-gray-900",children:e.name})]}),(0,a.jsxs)("p",{className:"mt-0.5 truncate text-xs text-gray-500",children:[[e.startDate,e.endDate].filter(Boolean).join(" â "),(null!=(s=null==(t=e.groups)?void 0:t.length)?s:0)>0&&" \xb7 ".concat(e.groups.join(", "))]})]}),"number"==typeof e.numPlayers&&(0,a.jsxs)("span",{className:"shrink-0 text-xs text-gray-500",children:[e.numPlayers," players"]})]},e.id)})})]}):(0,a.jsx)(R,{label:"No assignments found."})},getAssignmentDetails:function(e){var t,s,n,r;let{output:l}=e;return(null==l?void 0:l.error)?(0,a.jsx)(R,{label:l.error}):(0,a.jsx)(U,{children:(0,a.jsxs)("div",{className:"p-3",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,a.jsx)(D,{status:l.status}),(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:l.name})]}),(0,a.jsx)("p",{className:"mb-2 text-xs text-gray-500",children:[l.startDate,l.endD
1ate].filter(Boolean).join(" â ")}),(null!=(n=null==(t=l.groups)?void 0:t.length)?n:0)>0&&(0,a.jsx)("div",{className:"mb-2 flex flex-wrap gap-1",children:l.groups.map(e=>(0,a.jsx)(P,{children:e.name},e.id))}),(null!=(r=null==(s=l.activities)?void 0:s.length)?r:0)>0&&(0,a.jsx)("ol",{className:"mt-2 space-y-1",children:l.activities.map((e,t)=>{var s,n;return(0,a.jsxs)("li",{className:"flex items-baseline gap-2 text-sm text-gray-700",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-primary-950",children:[t+1,"."]}),(0,a.jsx)("span",{className:"truncate",children:null!=(s=e.name)?s:e.type})]},null!=(n=e.id)?n:t)})})]})})},getGameDetails:function(e){var t;let{output:s}=e;if(null==s?void 0:s.error)return(0,a.jsx)(R,{label:s.error});let n=[s.supportsIpad&&"iPad",s.supportsTts&&"Text-to-speech",s.supportsSpanish&&"Spanish"].filter(Boolean);return(0,a.jsx)(U,{children:(0,a.jsxs)("div",{className:"p-3",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:s.name}),s.description&&(0,a.jsx)("p",{className:"mt-1 line-clamp-3 text-sm text-gray-600",children:s.description}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1",children:[s.contentType&&(0,a.jsx)(P,{children:s.contentType}),s.estimatedDuration&&(0,a.jsxs)(P,{children:[s.estimatedDuration," min"]}),n.map(e=>(0,a.jsx)(P,{children:e},e)),(null==(t=s.ratings)?void 0:t.teacher)?(0,a.jsxs)("span",{className:"text-xs text-amber-500",children:["â
",Number(s.ratings.teacher).toFixed(1)," teacher"]}):null]})]})})},createStudent:I,editStudent:I,deleteStudent:I,bulkDeleteStudents:I,setStudentGroups:I,addStudentToGroup:I,createGroup:I,editGroup:I,deleteGroup:I,createAssignment:I,updateAssignment:I,deleteAssignment:I,duplicateAssignment:I,stopAssignment:I,pauseAssignment:I};class G extends r.Component{static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-gray-200 bg-white px-3 py-1 text-xs text-gray-500",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-green-400"}),(0,a.jsx)("span",{children:"Done"})]}):this.props.children}constructor(...e){super(...e),this.state={failed:!1}}}function B(e){let{tool:t,output:s}=e;if(null==s)return null;let n=O[t],r=n?(0,a.jsx)(n,{output:s}):"executeGraphql"===t?(0,a.jsx)(F,{output:s}):null;return null==r?null:(0,a.jsx)(G,{children:r})}let M=["Search for 5th grade photosynthesis games","Create an assignment for my Period 1 group","Show me my students","List my live assignments","How are my students doing this week?",'Create a new group called "Honors Science"'],Q={searchContent:"Searching content",getGameDetails:"Looking up game details",listStudents:"Loading students",createStudent:"Creating student",editStudent:"Updating student",deleteStudent:"Deleting student",setStudentGroups:"Updating student groups",bulkDeleteStudents:"Deleting students",listGroups:"Loading groups",createGroup:"Creating group",editGroup:"Updating group",deleteGroup:"Deleting group",addStudentToGroup:"Adding student to group",listAssignments:"Loading assignments",createAssignment:"Creating assignment",updateAssignment:"Updating assignment",deleteAssignment:"Deleting assignment",duplicateAssignment:"Duplicating assignment",stopAssignment:"Updating assignment",pauseAssignment:"Updating assignment",getAssignmentDetails:"Loading assignment details",listGraphqlOperations:"Checking platform capabilities",describeGraphqlOperation:"Checking platform capabilities",executeGraphql:"Working with platform data"};function H(){var e,t,s,n;let l,{onClose:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{messages:o,setMessages:d,sendMessage:c,status:u,stop:m,error:x}=(0,N.Y_)({id:"teacher-ai-chat",transport:new w.rL({api:"/api/ai/chat"})}),{userData:h}=(0,g.L)(),p=(l=null!=(n=null!=(s=null==h||null==(e=h.currentTeacher)?void 0:e.id)?s:null==h||null==(t=h.currentUser)?void 0:t.id)?n:null)?"".concat("teacher-ai-chat:messages",":").concat(l):null,[f,b]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[j,S]=(0,r.useState)(!1),A=(0,r.useRef)(null),k=(0,r.useRef)(m);k.current=m;let C=(0,r.useRef)(o);C.current=o;let E=(0,r.useRef)(!1);(0,r.useEffect)(()=>
1{if(p&&!E.current){E.current=!0;try{let e=window.localStorage.getItem(p);if(e&&0===C.current.length){let t=JSON.parse(e);Array.isArray(t)&&t.length>0&&d(t)}}catch(e){}S(!0)}},[p,d]),(0,r.useEffect)(()=>{if(j&&p&&"ready"===u)try{o.length>0&&window.localStorage.setItem(p,JSON.stringify(o))}catch(e){}},[o,u,j,p]),(0,r.useEffect)(()=>()=>{k.current()},[]),(0,r.useEffect)(()=>{let e=A.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[o,u]),(0,r.useEffect)(()=>{x&&y(!0)},[x]);let P=async e=>{e.preventDefault(),f.trim()&&"ready"===u&&(b(""),await c({text:f}))},L="submitted"===u||"streaming"===u;return(0,a.jsxs)("div",{className:"flex h-full w-full flex-col bg-white",children:[(0,a.jsxs)("header",{className:"flex shrink-0 items-center justify-between border-b border-gray-200 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"h-5 w-5 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Legends Assistant"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[o.length>0&&(0,a.jsx)("button",{type:"button",onClick:()=>{m(),d([]);try{p&&window.localStorage.removeItem(p)}catch(e){}},className:"rounded-md px-2 py-1 text-xs font-medium text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",children:"New chat"}),i&&(0,a.jsx)("button",{type:"button",onClick:i,"aria-label":"Close assistant",className:"rounded-md p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700",children:(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),(0,a.jsxs)("div",{className:"mx-auto flex min-h-0 w-full max-w-4xl flex-1 flex-col px-4",children:[(0,a.jsxs)("div",{ref:A,className:"min-h-0 flex-1 space-y-4 overflow-y-auto py-6",children:[0===o.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Y,{children:(0,a.jsx)(W,{children:"Hi! I can help you with:\n\n**SEARCH** â Find grade-aligned games, videos, and standards\n**BUILD** â Create and manage assignments\n**STUDENTS** â Manage rosters and groups\n**DATA** â View student progress and results\n\nI can also handle reports, rewards, co-teachers, account settings, and anything else you can do on the platform. What would you like to do?"})}),(0,a.jsx)("div",{className:"mb-4 flex flex-wrap gap-2",children:M.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>b(e),disabled:L,className:"rounded-full border border-gray-200 bg-white px-4 py-2 text-sm text-gray-700 shadow-sm transition-colors hover:border-primary-300 hover:bg-primary-100 hover:text-primary-950 disabled:cursor-not-allowed disabled:opacity-60",children:e},e))})]}),v&&x&&(0,a.jsxs)("div",{className:"relative rounded-md bg-red-50 p-4 text-sm text-red-800",children:[(0,a.jsx)("p",{className:"font-medium",children:x.message||"Something went wrong. Please try again."}),(0,a.jsx)("button",{type:"button","aria-label":"Dismiss error",className:"absolute right-2 top-2 rounded-full p-1 text-red-800 hover:bg-red-100",onClick:()=>y(!1),children:"\xd7"})]}),o.map(e=>(0,a.jsx)(z,{message:e},e.id)),"submitted"===u&&(0,a.jsx)(K,{})]}),(0,a.jsx)("form",{onSubmit:P,className:"shrink-0 border-t border-gray-200 py-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{className:"flex-1 rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40",placeholder:"Ask me anything...",value:f,onChange:e=>b(e.target.value),disabled:L}),(0,a.jsx)("button",{className:"rounded-lg bg-primary px-6 py-2 text-sm font-medium text-white hover:bg-primary-950 disabled:cursor-not-allowed disabled:bg-primary-300",type:"submit",disabled:L||!f.trim(),children:L?"Thinking...":"Send"}),L&&(0,a.jsx)("button",{className:"rounded-lg border border-gray-300 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50",type:"button",onClick:m,children:"Stop"})]})})]})]})}let q={p:e=>(0,a.jsx)("p",{className:"my-1.5 leading-relaxed first:mt-0 last:mb-0",...e}),h1:e=>(0,a.jsx)("h1",{className:"mb-1.5 mt-3 text-base font-bold text-gray-900 first:mt-0",...e}),h2:e=>(0,a.jsx)("h2",{className:"mb-1.5 mt-3 text-sm font-bold text-gray-900 first:mt-0",...e}
1),h3:e=>(0,a.jsx)("h3",{className:"mb-1 mt-2.5 text-sm font-semibold text-gray-900 first:mt-0",...e}),ul:e=>(0,a.jsx)("ul",{className:"my-1.5 list-disc space-y-0.5 pl-5",...e}),ol:e=>(0,a.jsx)("ol",{className:"my-1.5 list-decimal space-y-0.5 pl-5",...e}),li:e=>(0,a.jsx)("li",{className:"leading-relaxed",...e}),a:e=>(0,a.jsx)("a",{className:"font-medium text-primary-950 underline",...e}),strong:e=>(0,a.jsx)("strong",{className:"font-semibold text-gray-900",...e}),code:e=>(0,a.jsx)("code",{className:"rounded bg-gray-100 px-1 py-0.5 font-mono text-[0.85em] text-primary-950",...e}),pre:e=>(0,a.jsx)("pre",{className:"my-2 overflow-x-auto rounded-lg bg-gray-900 p-3 text-xs text-gray-100",...e}),blockquote:e=>(0,a.jsx)("blockquote",{className:"my-2 border-l-2 border-primary-200 pl-3 text-gray-600",...e}),table:e=>(0,a.jsx)("div",{className:"my-2 overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full border-collapse text-left text-sm",...e})}),thead:e=>(0,a.jsx)("thead",{className:"border-b border-gray-200",...e}),th:e=>(0,a.jsx)("th",{className:"px-2 py-1 font-semibold text-gray-700",...e}),td:e=>(0,a.jsx)("td",{className:"border-b border-gray-100 px-2 py-1 align-top text-gray-700",...e}),hr:()=>(0,a.jsx)("hr",{className:"my-3 border-gray-200"})};function W(e){let{children:t}=e;return(0,a.jsx)("div",{className:"text-sm text-gray-800",children:(0,a.jsx)(S.oz,{remarkPlugins:[k.A],rehypePlugins:[A.A],components:q,children:t})})}function Y(e){let{children:t}=e;return(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsx)("div",{className:"max-w-2xl rounded-2xl rounded-bl-sm border border-gray-200 bg-white px-4 py-3 text-sm text-gray-900 shadow-sm",children:t})})}function z(e){let{message:t}=e;if("user"===t.role){let e=t.parts.map(e=>"text"===e.type?e.text:"").join("");return(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("div",{className:"max-w-2xl rounded-2xl rounded-br-sm bg-primary px-4 py-2.5 text-sm text-white shadow-sm",children:(0,a.jsx)("div",{className:"whitespace-pre-wrap leading-relaxed",children:e})})})}return(0,a.jsx)("div",{className:"space-y-2",children:t.parts.map((e,s)=>{if("text"===e.type&&e.text)return(0,a.jsx)(Y,{children:(0,a.jsx)(W,{children:e.text})},"".concat(t.id,"-").concat(s));if((0,w.Y)(e)){var n,r;let l=(0,w.GG)(e),i="".concat(t.id,"-").concat(s);if("output-available"===e.state){let t=(0,a.jsx)(B,{tool:l,output:e.output});return null!=t.props.output&&(l in O||"executeGraphql"===l)?(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsx)("div",{className:"w-full max-w-2xl",children:t})},i):(0,a.jsx)(J,{label:Q[l]},i)}return"output-error"===e.state?(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-red-200 bg-red-50 px-3 py-1 text-xs text-red-600",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-red-400"}),(0,a.jsxs)("span",{children:[null!=(n=Q[l])?n:"Working"," failed"]})]})},i):(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-gray-200 bg-white px-3 py-1 text-xs text-gray-500",children:[(0,a.jsx)("span",{className:"h-2 w-2 animate-pulse rounded-full bg-primary-500"}),(0,a.jsx)("span",{children:null!=(r=Q[l])?r:"Working"})]})},i)}return null})})}function J(e){let{label:t}=e;return(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-gray-200 bg-white px-3 py-1 text-xs text-gray-500",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-green-400"}),(0,a.jsx)("span",{children:null!=t?t:"Done"})]})})}function K(){return(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-3 text-sm text-gray-600",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("span",{className:"h-2 w-2 animate-bounce rounded-full bg-gray-400 [animation-delay:-200ms]"}),(0,a.jsx)("span",{className:"h-2 w-2 animate-bounce rounded-full bg-gray-400 [animation-delay:-100ms]"}),(0,a.jsx)("span",{className:"h-2 w-2 animate-bounce rounded-full bg-gray-400"})]}),(0,a.jsx)("span",{children:"Thinking..."})]})})})}function V(e){var t;let{className:s}=e,{t:l}=(0,n.Bd)("teachers"),i=null!=(t=(0,y.u)("ai_assistant_enabled"))&&t,[o,d]=(0,r.useState)(!1),c=(0,r.useRef)(null);return i?(0,a.jsxs)("div",{className:s,children:[(0,a.jsx)("button",{ref:c,type:"button",onClick:()=>d(!0),className:"flex items-center justify-center rounded-full bg-primary p-2.5 text-white shadow-sm transition-colors hover:bg-primary-950 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",title:l("header.aiAssistant.name","Legends Assistant"),"aria-label":l("header.aiAssistant.open","Open the Legends Assistant"),"data-analytics-id":"layout:ai-assistant",children:(0,a.jsx)(X,{className:"h-5 w-5"})}),(0,a.jsx)($,{open:o,onClose:()=>d(!1),launcherRef:c})]}):null}function $(e){let{open:t,onClose:s,launcherRef:l}=e,{t:i}=(0,n.Bd)("teachers"),[o,d]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),m=(0,r.useRef)(null),x=(0,r.useRef)(!1);(0,r.useEffect)(()=>
1{if(t){x.current=!0,d(!0);let e=requestAnimationFrame(()=>u(!0));return()=>cancelAnimationFrame(e)}if(u(!1),x.current){var e;x.current=!1,null==(e=l.current)||e.focus()}let s=setTimeout(()=>d(!1),300);return()=>clearTimeout(s)},[t,l]),(0,r.useEffect)(()=>{if(o)return(0,v.E_)(!0),()=>(0,v.E_)(!1)},[o]),(0,r.useEffect)(()=>{var e;if(!c)return;let t=m.current,s=null!=(e=null==t?void 0:t.querySelector("input, textarea"))?e:null==t?void 0:t.querySelector('button, a[href], select, [tabindex]:not([tabindex="-1"])');null==s||s.focus()},[c]);let h=(0,r.useCallback)(e=>{if("Escape"===e.key)return void s();if("Tab"!==e.key)return;let t=m.current;if(!t)return;let a=Array.from(t.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(e=>null!==e.offsetParent);if(0===a.length)return;let n=a[0],r=a[a.length-1],l=document.activeElement;e.shiftKey&&l===n?(e.preventDefault(),r.focus()):e.shiftKey||l!==r||(e.preventDefault(),n.focus())},[s]);return o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,j.QP)("fixed inset-0 z-[55] bg-black/20 transition-opacity duration-200 motion-reduce:transition-none",c?"opacity-100":"opacity-0"),onClick:s,"aria-hidden":"true"}),(0,a.jsx)("aside",{ref:m,role:"dialog","aria-modal":"true","aria-label":i("header.aiAssistant.name","Legends Assistant"),onKeyDown:h,className:(0,j.QP)("fixed right-0 top-0 z-[60] flex h-full w-full flex-col bg-white shadow-2xl transition-transform duration-300 ease-out motion-reduce:transition-none sm:w-[420px]",c?"translate-x-0":"translate-x-full"),children:(0,a.jsx)(H,{onClose:s})})]}):null}function X(e){let{className:t}=e;return(0,a.jsx)("svg",{className:t,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}var Z=s(20148),ee=s(7234),et=s(8588),es=s.n(et),ea=s(46460),en=s(64144),er=s(35319);function el(){var e;let{t}=(0,n.Bd)("teachers"),{data:s}=(0,Z.I)(en.Bf),[r,l]=(0,ee.n)(en.wE),{userData:i,refetchUserData:o}=(0,g.L)(),d=(null==i||null==(e=i.currentTeacher)?void 0:e.ftue)&&i.currentTeacher.ftue.archiveStudentsDismissedAt,c=s&&s.myStudents&&s.myStudents.totalEntries||0,u=(null==i?void 0:i.currentTeacher)&&(i.currentTeacher.rosteringHasClever||i.currentTeacher.rosteringHasOneRoster);return!d&&u&&c?(0,a.jsxs)("div",{className:"bg-[#DB275D] text-white flex w-full min-h-[6.25rem] relative",children:[(0,a.jsx)("i",{className:"far fa-circle-xmark absolute top-4 right-4 text-2xl cursor-pointer",onClick:()=>{r({variables:{archiveStudentsDismissedAt:new Date}}).then(o)}}),(0,a.jsxs)("div",{className:"mx-auto flex max-w-screen-xl gap-4",children:[(0,a.jsx)("div",{className:"w-[6.875rem] h-full relative",children:(0,a.jsx)(es(),{className:"object-contain",src:ea.A,alt:t("banners.cleanSlate.imageAlt","Clean slate character"),fill:!0})}),(0,a.jsx)("p",{className:"my-auto mr-16 main",children:(0,a.jsx)(n.x6,{t:t,i18nKey:"banners.cleanSlate.body",defaults:"<0>Start the year off with a clean slate.</0> Archive last years students to start fresh.",components:[(0,a.jsx)("b",{className:"main-lg-bold"},"0")]})}),(0,a.jsx)("div",{className:"my-auto ml-auto min-w-[12.5rem] justify-end text-right",children:(0,a.jsx)(er.A,{icon:"paper-plane",text:t("banners.cleanSlate.getStarted","Get Started"),href:"/my-students?popup=archive",className:"mb-1 text-white hover:text-white hover:border-b-white",dataAnalyticsId:"clean-slate-banner:get-started"})})]})]}):null}var ei=s(66077),eo=s(82203),ed=s.n(eo),ec=s(81278),eu=s(9923),em=s(16527),ex=s(81297),eh=s(85712);"".concat(d.A0,"?query=").concat(encodeURIComponent("{myFeatureFlags}"));var ep=s(82959),eg=s(90558);let ef=e=>{let{href:t,iconClass:s,text:n,isOpen:r,target:l="_self"}=e,{pathname:i}=(0,ec.useRouter)();return(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)(ed(),{target:l,href:t,className:(0,j.QP)("flex h-10 items-left px-4 hover:bg-primary-800 nav-main text-nav rounded-r-full gap-3 transition-all",r?"mr-4":"mr-2",i===t?"bg-primary-800":"bg-primary-900"),children:[(0,a.jsx)("i",{className:(0,j.QP)("my-auto ml-2 text-center align-middle transition-all",s)}),(0,a.jsx)("span",{className:(0,j.QP)("my-auto text-nowrap",r?"opacity-100":"opacity-0"),children:n})]})})},eb=e=>{let{text:t,isOpen:s}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"mt-8 mb-2 ml-6 h-4 text-xs text-nav-text-secondary font-semibold uppercase",children:(0,a.jsx)("span",{className:(0,j.QP)("transition-all overflow-hidden text-nowrap",s?"opacity-100":"opacity-0"),children:t})})})};function ev(){return window.innerWidth}function ey(){let e=ev();return e<=640?"sm":e<=1024?"md":"lg"}let ej=e=>{var t;let{initialOpen:s}=e,{t:l}=(0,n.Bd)("teachers"),{navBarOpen:i,setNavBarOpen:o,userData:d}=(0,g.L)(),c=(0,ec.useRouter)();(0,r.useEffect)(()=>{s&&o(!0)},[s,o]);let u=(0,r.useRef)(ey()),m=(0,r.useRef)(i),[x,h]=(0,r.useState)(ev()),p=(0,r.useCallback)(e=>{m.current=e,o(e)},[o]);(0,r.useEffect)(()=>{let e=()=>{let e=ey();e!==u.current&&(u.current=e,h(ev()))};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[p]);
1let f=window.innerWidth<640?"screen":"[15rem]",b=ey(),{fluencySubscriptionStatus:v,refetch:N}=(0,eu.A)(),w=v===em.y.FLUENCY_SEAT,S=(0,y.u)("partner_banner_enabled"),A=(0,y.u)("cookieyes_product_enabled"),k=null==d||null==(t=d.currentUser)?void 0:t.sessionLinkedApplication,C=(null==k?void 0:k.returnUrl)||void 0,E=(null==k?void 0:k.displayName)||(null==k?void 0:k.name)||l("nav.partnerFallback","Partner"),P=S&&!!(null==k?void 0:k.returnUrl);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,j.QP)("print:hidden w-full max-w-0","sm"===b&&"max-w-16",i&&("lg"===b||"md"===b)&&"max-w-[15rem]",!i&&("lg"===b||"md"===b)&&"max-w-16")}),(0,a.jsxs)("div",{id:"sidebar",className:(0,j.QP)("print:hidden bg-primary-900 absolute text-white h-screen w-full flex flex-col overflow-y-auto overflow-x-hidden transition-all z-50",i?"max-w-".concat(f):"max-w-".concat("16")),children:[(0,a.jsx)("div",{className:(0,j.QP)("h-12 min-h-12 max-w-32 w-full relative flex flex-col my-4 transition-all",i?"mx-4":"mx-3"),children:(0,a.jsxs)("div",{className:"w-32 h-12 flex relative",children:[(0,a.jsx)(es(),{className:(0,j.QP)("transition-all absolute",i?"opacity-100":"opacity-0"),src:eh.A,alt:l("nav.logoAlt","Legends of Learning logo"),height:0,width:0}),(0,a.jsx)(es(),{className:(0,j.QP)("transition-all absolute",i?"opacity-0":"opacity-100"),src:ex.A,alt:l("nav.logoAlt","Legends of Learning logo"),height:0,width:40})]})}),(0,a.jsxs)("div",{className:"flex flex-col mt-4 mb-auto",children:[(0,a.jsx)(ef,{isOpen:i,href:"/",iconClass:"fas fa-home",text:l("nav.home","Home")}),P&&(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsx)(eg.A,{title:l("nav.backToPartner","Back to {partner}",{partner:E}),placement:"right",zIndex:100,appendTo:()=>document.body,children:(0,a.jsxs)("a",{href:C,"data-analytics-id":"return-to-partner",className:(0,j.QP)("flex h-10 items-left px-4 hover:bg-primary-800 nav-main text-nav rounded-r-full gap-3 transition-all",i?"mr-4":"mr-2","bg-primary-900"),children:[(0,a.jsx)("i",{className:(0,j.QP)("my-auto ml-2 text-center align-middle transition-all","fas fa-arrow-left")}),(0,a.jsx)("span",{className:(0,j.QP)("my-auto text-nowrap",i?"opacity-100":"opacity-0"),children:E})]})})}),(0,a.jsx)(eb,{isOpen:i,text:l("nav.sections.myClassroom","My Classroom")}),(0,a.jsx)(ef,{isOpen:i,href:"/my-students",iconClass:"fas fa-user-graduate",text:l("nav.myStudents","My Students")}),(0,a.jsx)(ef,{isOpen:i,href:"/my-assignments",iconClass:"fas fa-tasks",text:l("nav.myAssignments","My Assignments")}),(0,a.jsx)(ef,{isOpen:i,href:"/reports",iconClass:"fas fa-chart-bar",text:l("nav.reports","Reports")}),(0,a.jsx)(eb,{isOpen:i,text:l("nav.sections.content","Content")}),(0,a.jsx)(ef,{isOpen:i,href:(0,ep.J4)("/explore",(0,ep.Cq)(c)),iconClass:"fas fa-book",text:l("nav.library","Library")}),(0,a.jsx)(ef,{isOpen:i,href:"/awakening/overview",iconClass:"fas fa-trees",text:l("nav.awakening","Awakening")}),w&&(0,a.jsx)(ef,{isOpen:i,href:"/basecamp/overview",iconClass:"fas fa-mountain",text:l("nav.mathBasecamp","Math Basecamp")})]}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b mb-4 mx-4 border-primary-800"}),(0,a.jsx)(ef,{isOpen:i,href:"https://help.legendsoflearning.com",iconClass:"fas fa-question-circle",target:"_blank",text:l("nav.help","Help")}),i&&(0,a.jsx)("div",{className:"mx-4 mb-2",children:(0,a.jsx)(n.c5,{className:"w-full bg-transparent text-sm text-nav-text-secondary hover:text-nav cursor-pointer disabled:cursor-default focus:outline-none"})}),i&&A&&(0,a.jsx)("a",{href:"#",onClick:e=>e.preventDefault(),className:"cky-banner-element mx-4 mb-2 text-xs text-nav-text-secondary hover:text-nav",children:l("nav.doNotSellOrShare","Do Not Sell or Share My Personal Information")}),(0,a.jsx)("div",{className:(0,j.QP)("border border-primary-800 rounded-sm cursor-pointer w-6 h-6 flex m-2 ",i?"ml-auto":"mx-auto"),onClick:()=>p(!i),children:(0,a.jsx)("i",{className:(0,j.QP)("fas fa-chevron-right m-auto transition-all",i?"rotate-180":"rotate-0")})})]})]})]})},eN=e=>{var t;let{children:s,pageKey:i}=e,[o,d]=(0,f.useQueryParams)({search:f.StringParam,headerPopup:f.StringParam}),[c,u]=(0,r.useState)(!1),{t:m}=(0,n.Bd)("teachers"),{userData:v}=(0,g.L)();(0,r.useEffect)(()=>{u(!0)},[]);let y=null==v||null==(t=v.currentTeacher)?void 0:t.isPaid;return(0,a.jsxs)("div",{className:"flex flex-col h-full min-h-screen max-h-screen",children:[(0,a.jsx)(ei.A,{}),(0,a.jsxs)("div",{className:"flex w-full flex-1 overflow-hidden bg-main-base",children:[c&&(0,a.jsx)(l.l$,{}),(0,a.jsx)(ej,{}),(0,a.jsxs)("main",{id:"content-wrapper",className:"h-full w-full max-h-screen flex flex-col overflow-y-auto",children:[(0,a.jsx)(el,{}),(0,a.jsxs)("div",{id:"content",className:"flex flex-col max-w-screen-xl w-full mx-auto px-2",children:[(0,a.jsx)("div",{className:"print:hidden sticky top-0 z-40 bg-main-base border-b border-gray-200",children:(0,a.jsxs)("div",{className:"flex justify-between w-full my-4",children:[(0,a.jsx)(h.A,{setQueryParams:d,value:o.search||void 0}),(0,a.jsx)(V,{className:"mr-2 ml-auto my-auto"}),y?null:(0,a.jsx)("div",{className:"mr-2 ml-auto my-auto",children:(0,a.jsx)(b.$n,{text:m("header.upgrade","Upgrade"),link:"href",href:"/subscription/plans",dataAnalyticsId:"main-layout:upgrade"})}),(0,a.jsx)(p.A,{onAvatarClick:()=>d({headerPopup:"avatar"})}),v?(0,a.jsx)(x,{userData:v,setQueryParams:d,queryParams:o}):null]})}),(0,a.jsx)("div",{className:"pb-16 w-full pt-4 min-h-screen",children:s})]})]})]})]},i)}},80059:(e,t,s)=>{s.d(t,{F:()=>r,Th:()=>i,_d:()=>l,cF:()=>o});let a="https://releases-cdn.legendsoflearning.com/legends/image/upload",n=e=>e.startsWith(a),r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;return"".concat(a,"/c_fill,h_").concat(s,",w_").concat(t,"/").concat(e)},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:274,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:134,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e?n(e)?e:"".concat(a,"/c_fill,").concat(r?"g_".concat(r):"g_auto",",h_").concat(s,",w_").concat(t,"/learning-objectives/").concat(e):""},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:274,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:134;return e?n(e)?e:"".concat(a,"/c_fill,g_auto,h_").concat(s,",w_").concat(t,"/").concat(e):""},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;return n(e)?e:"".concat(a,"/c_fit,h_").concat(s,",w_").concat(t,"/").concat(e)}},81297:(e,t,s)=>{s.d(t,{A:()=>a});let a={src:"/_next/static/media/legends-of-learning-logo.987d9ea2.svg",height:295,width:251,blurWidth:0,blurHeight:0}},85712:(e,t,s)=>{s.d(t,{A:()=>a});let a={src:"/_next/static/media/legends-of-learning-title.061c1ede.svg",height:295,width:810,blurWidth:0,blurHeight:0}},90558:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(6029),n=s(62563),r=s(76264);function l(e){let{title:t,className:s,children:l,...i}=e;return(0,a.jsx)(n.Ay,{theme:"secondary-tip-sm",interactive:!0,arrow:!0,animation:"scale-subtle",placement:e.placement||"top",...i,content:(0,a.jsx)("div",{className:(0,r.QP)("min-w-[6.25rem] bg-secondary border-none text-white main-sm overflow-hidden rounded-md flex justify-center shadow-lg p-2 px-3",s),children:t}),children:l})}}}]);
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.