1import{y as pl,s as we,n as ae,d as _,a as pe,q as k,i as D,b as v,w as he,c as E,e as M,f as F,x as re,h as S,t as Y,k as ue,r as $e,K as Ze,g as P,l as z,L as et,j as V,M as ce,A as He,a0 as Ye,a6 as Ke,V as Ie,I as Ae,J as Pe,$ as rt,S as Oe,B as Xe,a7 as bl,m as fl,u as ul,o as cl,p as dl,T as gl}from"../chunks/lJGyfUpT.js";import{S as ve,i as ke,t as y,a as p,g as O,c as U,k as fe,d as X,m as Q,b as Z,e as ee,f as Ve,h as Ue,j as Te}from"../chunks/DtEKhg4c.js";/* empty css *//* empty css */import{l as wl,d as vl}from"../chunks/D_S5FikC.js";import{u as ge}from"../chunks/Blt4otpC.js";import{f as Me,s as Ge}from"../chunks/BZ6bC0yE.js";import{g as tt,h as We,d as nt,s as Le,o as ot}from"../chunks/DHzvdz9D.js";import{p as kl}from"../chunks/BFSpaX6o.js";import{l as Qe}from"../chunks/BzP-x6t8.js";import{p as ye}from"../chunks/CY0JXN4L.js";import{a as qe,t as yl}from"../chunks/D0mx0CKj.js";import{w as Cl}from"../chunks/BQupqwzW.js";import{s as ml}from"../chunks/C7HFuLPy.js";import{d as _e}from"../chunks/BjBkdkzj.js";import{o as ze}from"../chunks/B6XvOdoK.js";import{s as de,a as Ne,f as De}from"../chunks/BgQPj13r.js";import{t as Je}from"../chunks/BI6AJ5eW.js";import{s as El,T as be}from"../chunks/CYqEYmt8.js";import{a as at}from"../chunks/8eqD00Ab.js";import{h as Sl}from"../chunks/BxTuhEp9.js";import{e as Se}from"../chunks/CzFCWYRG.js";import{a as ft}from"../chunks/C3cWXnDQ.js";import{g as Dl}from"../chunks/ByqIsvAR.js";import{c as $l}from"../chunks/Dhg3bUNl.js";const Tl=async r=>{var s;const e=await Me(pl(ge),{action:"poll",...r});(s=e.response)!=null&&s.user&&ge.update(()=>e.response.user)},Il={1:11,2:12,3:402,4:1004,5:1006};function Ll(){const{subscribe:r,set:e,update:s}=Cl(null);let t=!1;return{subscribe:r,set:e,update:s,reset:()=>{t=!1,e(null)},async checkForUser(l){var u;if(t||(l==null?void 0:l.userRole)!=="student"||(t=!0,wl("-> checking for extension"),!((u=l.courses)!=null&&u.length)))return;const i=ze(l.courses.filter(m=>m.courseActive),"courseLimitDate","asc")[0];if(!i)return;const n=i.courseLimitDate,o=_e(n).diff(_e(),"day"),a=i.courseId!==4&&Il[i.courseId]===i.progressLevel;if(!n||o>31||a)return;const g=(await Me(l,{action:"get_courses",withModules:!1})).response.find(m=>m.courseId===i.courseId),d=(g==null?void 0:g.progressMeta)&&ml(g.progressMeta);d!=null&&d.override&&_e().isBefore(_e(d.override.date))||e({extensionBell:!0,extensionData:{daysUntilLimit:o,earliestLimitDate:n,earliestCourse:i}})}}}const xe=Ll();function Nl(r){let e,s=JSON.stringify(r[1])+"",t,l,i,n="Reset",o,a,f;return{c(){e=S("div"),t=Y(s),l=Y(" - "),i=S("button"),i.textContent=n,this.h()},l(c){e=E(c,"DIV",{class:!0});var g=M(e);t=F(g,s),l=F(g," - "),i=E(g,"BUTTON",{class:!0,"data-svelte-h":!0}),re(i)!=="svelte-1fyjwqa"&&(i.textContent=n),g.forEach(_),this.h()},h(){k(i,"class","px-2 py-1 bg-tgds-blue-400 text-white my-1 rounded font-semibold"),k(e,"class",o="tgds-tour bg-tgds-yellow-500 z-20 top-2 left-64 text-xs font-semibold px-2 "+(r[0].userId===20010?"":"hidden")+" svelte-1ejkra")},m(c,g){D(c,e,g),v(e,t),v(e,l),v(e,i),a||(f=he(i,"click",r[2]),a=!0)},p(c,[g]){g&2&&s!==(s=JSON.stringify(c[1])+"")&&pe(t,s),g&1&&o!==(o="tgds-tour bg-tgds-yellow-500 z-20 top-2 left-64 text-xs font-semibold px-2 "+(c[0].userId===20010?"":"hidden")+" svelte-1ejkra")&&k(e,"class",o)},i:ae,o:ae,d(c){c&&_(e),a=!1,f()}}}function Ml(r,e,s){let t,l;ue(r,ge,n=>s(0,t=n)),ue(r,Je,n=>s(1,l=n));const i=()=>{tt();let n=l;n&&(n.step=0,Je.update(()=>n),Qe.setItem("tgds-tour",JSON.stringify(l)))};return $e(async()=>{let n;const o=await Me(t,{action:"get_user_meta",metaKey:"tgds-intro-tour"}).catch(console.log);let a=o==null?void 0:o.response;if(!a){const f=await Qe.getItem("tgds-tour").catch(()=>null);try{a=typeof f=="string"?JSON.parse(f):f}catch{a=null}}a&&typeof a=="object"&&a.init?n=a:n={display:(t.userRole!=="admin"||t.userRole!=="webmaster")&&!0,step:0,init:!0},n&&(El(n,!0),Je.update(()=>({...n})))}),[t,l,i]}class Bl extends ve{constructor(e){super(),ke(this,e,Ml,Nl,we,{})}}function Wl(r){let e,s="There is a 30 day grace period for you to purchase an extension after your expiry.",t,l,i,n,o=We(_e(r[0].extensionData.earliestLimitDate).add(31,"days"))+"",a,f,c,g=31+r[0].extensionData.daysUntilLimit+"",d,u,m;return{c(){e=S("p"),e.textContent=s,t=V(),l=S("p"),i=Y("You have until "),n=new et(!1),a=V(),f=S("span"),c=Y("("),d=Y(g),u=Y(" days remaining)"),m=Y(`, to purchase an 2 extension, thereafter you will need to re-enrol.`),this.h()},l(h){e=E(h,"P",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-l8jo2b"&&(e.textContent=s),t=P(h),l=E(h,"P",{class:!0});var b=M(l);i=F(b,"You have until "),n=Ze(b,!1),a=P(b),f=E(b,"SPAN",{class:!0});var I=M(f);c=F(I,"("),d=F(I,g),u=F(I," days remaining)"),I.forEach(_),m=F(b,`, to purchase an 3 extension, thereafter you will need to re-enrol.`),b.forEach(_),this.h()},h(){k(e,"class","text-base"),n.a=a,k(f,"class","italic"),k(l,"class","text-base")},m(h,b){D(h,e,b),D(h,t,b),D(h,l,b),v(l,i),n.m(o,l),v(l,a),v(l,f),v(f,c),v(f,d),v(f,u),v(l,m)},p(h,b){b&1&&o!==(o=We(_e(h[0].extensionData.earliestLimitDate).add(31,"days"))+"")&&n.p(o),b&1&&g!==(g=31+h[0].extensionData.daysUntilLimit+"")&&pe(d,g)},d(h){h&&(_(e),_(t),_(l))}}}
3function xl(r){let e,s="You have exceeded the 30 day grace period, you will need to re-enrol to continue your studies.",t,l,i='<span>Contact <a class="font-bold" href="mailto:[email protected]">[email protected]</a> for re-enrolment</span>';return{c(){e=S("p"),e.textContent=s,t=V(),l=S("p"),l.innerHTML=i,this.h()},l(n){e=E(n,"P",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-117b4fh"&&(e.textContent=s),t=P(n),l=E(n,"P",{"data-svelte-h":!0}),re(l)!=="svelte-jz54ux"&&(l.innerHTML=i),this.h()},h(){k(e,"class","text-base")},m(n,o){D(n,e,o),D(n,t,o),D(n,l,o)},p:ae,d(n){n&&(_(e),_(t),_(l))}}}function ut(r){let e,s='<a href="/accounts/purchase-extension" class="hover:shadow bg-tgds-blue-200 text-white font-normal hover:bg-black cursor-pointer hover:text-tgds-yellow-500 transition-all px-4 py-2 inline-block">Go To Extension Page</a>';return{c(){e=S("div"),e.innerHTML=s,this.h()},l(t){e=E(t,"DIV",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-14ap0cc"&&(e.innerHTML=s),this.h()},h(){k(e,"class","flex shadow justify-end p-12 bg-tgds-yellow-500")},m(t,l){D(t,e,l)},d(t){t&&_(e)}}}function Al(r){let e,s,t,l,i,n=We(_e(r[0].extensionData.earliestLimitDate))+"",o,a,f,c="Don't panic life gets busy for all of us at times, you may continue your studies by purchasing an extension.",g,d,u="Please Note",m,h,b,I='See our <a href="https://www.thegraphicdesignschool.com/student-handbook/fees#student-re-enrolment" class="font-semibold hover:text-tgds-yellow-500">Re-Enrolment Policy</a>',w,T;function W(L,N){return L[1]?xl:Wl}let B=W(r),x=B(r),C=!r[1]&&ut();return{c(){e=S("div"),s=S("p"),t=Y(`Oh no. Your Schoolyard expired on 4 `),l=S("strong"),i=new et(!1),o=Y("."),a=V(),f=S("p"),f.textContent=c,g=V(),d=S("h4"),d.textContent=u,m=V(),x.c(),h=V(),b=S("p"),b.innerHTML=I,w=V(),C&&C.c(),T=z(),this.h()},l(L){e=E(L,"DIV",{class:!0});var N=M(e);s=E(N,"P",{class:!0});var G=M(s);t=F(G,`Oh no. Your Schoolyard expired on 5 `),l=E(G,"STRONG",{});var A=M(l);i=Ze(A,!1),A.forEach(_),o=F(G,"."),G.forEach(_),a=P(N),f=E(N,"P",{class:!0,"data-svelte-h":!0}),re(f)!=="svelte-n9ss7d"&&(f.textContent=c),g=P(N),d=E(N,"H4",{class:!0,"data-svelte-h":!0}),re(d)!=="svelte-s1zre4"&&(d.textContent=u),m=P(N),x.l(N),h=P(N),b=E(N,"P",{class:!0,"data-svelte-h":!0}),re(b)!=="svelte-15v8qhd"&&(b.innerHTML=I),N.forEach(_),w=P(L),C&&C.l(L),T=z(),this.h()},h(){i.a=null,k(s,"class","text-base"),k(f,"class","text-base"),k(d,"class","text-base uppercase "),k(b,"class","text-sm font-normal italic"),k(e,"class","p-12 flex-1 shadow-inner overflow-auto")},m(L,N){D(L,e,N),v(e,s),v(s,t),v(s,l),i.m(n,l),v(s,o),v(e,a),v(e,f),v(e,g),v(e,d),v(e,m),x.m(e,null),v(e,h),v(e,b),D(L,w,N),C&&C.m(L,N),D(L,T,N)},p(L,[N]){N&1&&n!==(n=We(_e(L[0].extensionData.earliestLimitDate))+"")&&i.p(n),B===(B=W(L))&&x?x.p(L,N):(x.d(1),x=B(L),x&&(x.c(),x.m(e,h))),L[1]?C&&(C.d(1),C=null):C||(C=ut(),C.c(),C.m(T.parentNode,T))},i:ae,o:ae,d(L){L&&(_(e),_(w),_(T)),x.d(),C&&C.d(L)}}}function Pl(r,e,s){let t;ue(r,xe,i=>s(0,t=i));let l=!1;return r.$$.update=()=>{r.$$.dirty&1&&s(1,l=31+t.extensionData.daysUntilLimit<0)},[t,l]}class Vl extends ve{constructor(e){super(),ke(this,e,Pl,Al,we,{})}}function Rl(r){let e,s,t,l,i,n,o,a,f=We(r[3].extensionData.earliestLimitDate)+"",c,g,d,u,m,h=r[3].extensionData.earliestCourse.progressLevel+"",b,I,w,T,W,B,x=r[3].extensionData.earliestCourse.progressLevel+"",C,L,N,G,A,R,$,le,j,q,H,J,te,Ee,Ce,me,Be,Re,se=r[0].initialized&&ct(r),ne=r[0].initialized&&dt(r);return{c(){e=S("div"),s=S("p"),t=Y(`Lovely to see you around The Schoolyard. 6 `),l=S("br"),i=V(),n=S("br"),o=Y(` 7 Our records show that your course expired on the `),a=new et(!1),c=Y(`. 8 `),g=S("br"),d=V(),u=S("br"),m=Y(` 9 It looks like you were working on Module `),b=Y(h),I=Y(`, let's get the Support Angels to look into your eligibility to purchase an extension. 10 `),w=S("br"),T=V(),W=S("br"),B=Y(` 11 Have you started Module `),C=Y(x),L=Y("?"),N=V(),G=S("div"),A=S("button"),R=Y("Yes"),le=V(),j=S("button"),q=Y("No"),J=V(),se&&se.c(),Ee=V(),ne&&ne.c(),Ce=z(),this.h()},l(K){e=E(K,"DIV",{class:!0});var ie=M(e);
11s=E(ie,"P",{class:!0});var oe=M(s);t=F(oe,`Lovely to see you around The Schoolyard. 12 `),l=E(oe,"BR",{}),i=P(oe),n=E(oe,"BR",{}),o=F(oe,` 13 Our records show that your course expired on the `),a=Ze(oe,!1),c=F(oe,`. 14 `),g=E(oe,"BR",{}),d=P(oe),u=E(oe,"BR",{}),m=F(oe,` 15 It looks like you were working on Module `),b=F(oe,h),I=F(oe,`, let's get the Support Angels to look into your eligibility to purchase an extension. 16 `),w=E(oe,"BR",{}),T=P(oe),W=E(oe,"BR",{}),B=F(oe,` 17 Have you started Module `),C=F(oe,x),L=F(oe,"?"),oe.forEach(_),N=P(ie),G=E(ie,"DIV",{class:!0});var Fe=M(G);A=E(Fe,"BUTTON",{class:!0});var st=M(A);R=F(st,"Yes"),st.forEach(_),le=P(Fe),j=E(Fe,"BUTTON",{class:!0});var it=M(j);q=F(it,"No"),it.forEach(_),Fe.forEach(_),J=P(ie),se&&se.l(ie),ie.forEach(_),Ee=P(K),ne&&ne.l(K),Ce=z(),this.h()},h(){a.a=c,k(s,"class","text-base"),k(A,"class",$=je+" mr-2 "+(r[0].initialized&&r[0].started?"bg-tgds-blue-400 text-white":"bg-gray-300 hover:bg-gray-400 hover:text-white")),k(j,"class",H=je+" "+(r[0].initialized?r[0].started?"bg-gray-300 hover:bg-gray-400 hover:text-white":"bg-tgds-blue-400 text-white":"bg-gray-300 hover:bg-gray-400 hover:text-white")),k(G,"class","flex mb-4"),k(e,"class","p-4 flex-1 bg-gray-100 overflow-auto")},m(K,ie){D(K,e,ie),v(e,s),v(s,t),v(s,l),v(s,i),v(s,n),v(s,o),a.m(f,s),v(s,c),v(s,g),v(s,d),v(s,u),v(s,m),v(s,b),v(s,I),v(s,w),v(s,T),v(s,W),v(s,B),v(s,C),v(s,L),v(e,N),v(e,G),v(G,A),v(A,R),v(G,le),v(G,j),v(j,q),v(e,J),se&&se.m(e,null),D(K,Ee,ie),ne&&ne.m(K,ie),D(K,Ce,ie),me=!0,Be||(Re=[he(A,"click",r[7]),he(j,"click",r[8])],Be=!0)},p(K,ie){(!me||ie&8)&&f!==(f=We(K[3].extensionData.earliestLimitDate)+"")&&a.p(f),(!me||ie&8)&&h!==(h=K[3].extensionData.earliestCourse.progressLevel+"")&&pe(b,h),(!me||ie&8)&&x!==(x=K[3].extensionData.earliestCourse.progressLevel+"")&&pe(C,x),(!me||ie&1&&$!==($=je+" mr-2 "+(K[0].initialized&&K[0].started?"bg-tgds-blue-400 text-white":"bg-gray-300 hover:bg-gray-400 hover:text-white")))&&k(A,"class",$),(!me||ie&1&&H!==(H=je+" "+(K[0].initialized?K[0].started?"bg-gray-300 hover:bg-gray-400 hover:text-white":"bg-tgds-blue-400 text-white":"bg-gray-300 hover:bg-gray-400 hover:text-white")))&&k(j,"class",H),K[0].initialized?se?(se.p(K,ie),ie&1&&p(se,1)):(se=ct(K),se.c(),p(se,1),se.m(e,null)):se&&(O(),y(se,1,1,()=>{se=null}),U()),K[0].initialized?ne?(ne.p(K,ie),ie&1&&p(ne,1)):(ne=dt(K),ne.c(),p(ne,1),ne.m(Ce.parentNode,Ce)):ne&&(O(),y(ne,1,1,()=>{ne=null}),U())},i(K){me||(p(se),K&&ce(()=>{me&&(te||(te=fe(e,de,{},!0)),te.run(1))}),p(ne),me=!0)},o(K){y(se),K&&(te||(te=fe(e,de,{},!1)),te.run(0)),y(ne),me=!1},d(K){K&&(_(e),_(Ee),_(Ce)),se&&se.d(),K&&te&&te.end(),ne&&ne.d(K),Be=!1,He(Re)}}}function jl(r){let e,s="A Support Angel will review your eligibility for an extension and get back to your shortly.";return{c(){e=S("div"),e.textContent=s,this.h()},l(t){e=E(t,"DIV",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-5e4eda"&&(e.textContent=s),this.h()},h(){k(e,"class","absolute h-full w-full bg-tgds-yellow-500 font-normal flex items-center px-4")},m(t,l){D(t,e,l)},p:ae,i:ae,o:ae,d(t){t&&_(e)}}}function zl(r){let e,s='<div class=""><p>Thank you for filling out the Extension Eligibility Form. A Support Angel will email you shortly to discuss progressing in your course.</p></div>',t,l;return{c(){e=S("div"),e.innerHTML=s,this.h()},l(i){e=E(i,"DIV",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-pd1myx"&&(e.innerHTML=s),this.h()},h(){k(e,"class","p-4")},m(i,n){D(i,e,n),l=!0},p:ae,i(i){l||(i&&ce(()=>{l&&(t||(t=fe(e,de,{},!0)),t.run(1))}),l=!0)},o(i){i&&(t||(t=fe(e,de,{},!1)),t.run(0)),l=!1},d(i){i&&_(e),i&&t&&t.end()}}}function ct(r){let e,s,t,l,i,n,o,a,f,c="If you have any circumstances holding you back from studying please also let us know.",g,d,u,m,h,b,I=r[2].userFirstName+"",w,T,W,B,x,C,L="",N,G,A;const R=[Ol,Hl],$=[];function le(j,q){return j[0].started?0:1}return s=le(r),t=$[s]=R[s](r),{c(){e=S("div"),t.c(),i=V(),n=S("div"),o=S("textarea"),a=V(),f=S("p"),f.textContent=c,g=V(),d=S("div"),u=S("textarea"),m=V(),h=S("p"),b=Y("Thanks "),w=Y(I),T=Y(`, this helps. 18 `),W=S("br"),B=Y(` 19 Click Submit to send your responses to an Angel.`),x=V(),C=S("div"),C.innerHTML=L,this.h()},l(j){e=E(j,"DIV",{});var q=M(e);t.l(q),q.forEach(_),i=P(j),n=E(j,"DIV",{class:!0});var H=M(n);o=E(H,"TEXTAREA",{class:!0,placeholder:!0}
19),M(o).forEach(_),H.forEach(_),a=P(j),f=E(j,"P",{"data-svelte-h":!0}),re(f)!=="svelte-1j4ecdb"&&(f.textContent=c),g=P(j),d=E(j,"DIV",{class:!0});var J=M(d);u=E(J,"TEXTAREA",{class:!0,placeholder:!0}),M(u).forEach(_),J.forEach(_),m=P(j),h=E(j,"P",{});var te=M(h);b=F(te,"Thanks "),w=F(te,I),T=F(te,`, this helps. 20 `),W=E(te,"BR",{}),B=F(te,` 21 Click Submit to send your responses to an Angel.`),te.forEach(_),x=P(j),C=E(j,"DIV",{"data-svelte-h":!0}),re(C)!=="svelte-1bp0gto"&&(C.innerHTML=L),this.h()},h(){k(o,"class","shadow p-4"),k(o,"placeholder","Your Response Here"),k(n,"class","mb-4"),k(u,"class","shadow p-4"),k(u,"placeholder","Your Response Here"),k(d,"class","mb-4")},m(j,q){D(j,e,q),$[s].m(e,null),D(j,i,q),D(j,n,q),v(n,o),Ye(o,r[0].progress),D(j,a,q),D(j,f,q),D(j,g,q),D(j,d,q),v(d,u),Ye(u,r[0].holdingBack),D(j,m,q),D(j,h,q),v(h,b),v(h,w),v(h,T),v(h,W),v(h,B),D(j,x,q),D(j,C,q),N=!0,G||(A=[he(o,"input",r[9]),Ke(at.call(null,o)),he(u,"input",r[10]),Ke(at.call(null,u))],G=!0)},p(j,q){let H=s;s=le(j),s===H?$[s].p(j,q):(O(),y($[H],1,1,()=>{$[H]=null}),U(),t=$[s],t?t.p(j,q):(t=$[s]=R[s](j),t.c()),p(t,1),t.m(e,null)),q&1&&Ye(o,j[0].progress),q&1&&Ye(u,j[0].holdingBack),(!N||q&4)&&I!==(I=j[2].userFirstName+"")&&pe(w,I)},i(j){N||(p(t),j&&ce(()=>{N&&(l||(l=fe(e,de,{},!0)),l.run(1))}),N=!0)},o(j){y(t),j&&(l||(l=fe(e,de,{},!1)),l.run(0)),N=!1},d(j){j&&(_(e),_(i),_(n),_(a),_(f),_(g),_(d),_(m),_(h),_(x),_(C)),$[s].d(),j&&l&&l.end(),G=!1,He(A)}}}function Hl(r){let e,s,t=r[3].extensionData.earliestCourse.progressLevel+"",l,i,n,o;return{c(){e=S("p"),s=Y("We know life is hectic! Would you mind please letting the Support Angels know when you will have your Module "),l=Y(t),i=Y(" in?")},l(a){e=E(a,"P",{});var f=M(e);s=F(f,"We know life is hectic! Would you mind please letting the Support Angels know when you will have your Module "),l=F(f,t),i=F(f," in?"),f.forEach(_)},m(a,f){D(a,e,f),v(e,s),v(e,l),v(e,i),o=!0},p(a,f){(!o||f&8)&&t!==(t=a[3].extensionData.earliestCourse.progressLevel+"")&&pe(l,t)},i(a){o||(a&&ce(()=>{o&&(n||(n=fe(e,de,{},!0)),n.run(1))}),o=!0)},o(a){a&&(n||(n=fe(e,de,{},!1)),n.run(0)),o=!1},d(a){a&&_(e),a&&n&&n.end()}}}function Ol(r){let e,s="That's great news! Can you please let us know how far you are off finishing the Module?",t,l;return{c(){e=S("p"),e.textContent=s},l(i){e=E(i,"P",{"data-svelte-h":!0}),re(e)!=="svelte-6vqtmx"&&(e.textContent=s)},m(i,n){D(i,e,n),l=!0},p:ae,i(i){l||(i&&ce(()=>{l&&(t||(t=fe(e,de,{},!0)),t.run(1))}),l=!0)},o(i){i&&(t||(t=fe(e,de,{},!1)),t.run(0)),l=!1},d(i){i&&_(e),i&&t&&t.end()}}}function dt(r){let e,s,t,l,i,n,o;return{c(){e=S("div"),s=S("button"),t=Y("Submit"),this.h()},l(a){e=E(a,"DIV",{class:!0});var f=M(e);s=E(f,"BUTTON",{class:!0});var c=M(s);t=F(c,"Submit"),c.forEach(_),f.forEach(_),this.h()},h(){k(s,"class","bg-tgds-blue-400 text-white "+je+" hover:bg-gray-900 hover:text-tgds-yellow-500"),k(e,"class","bg-tgds-yellow-500 p-4 flex justify-end")},m(a,f){D(a,e,f),v(e,s),v(s,t),i=!0,n||(o=he(s,"click",r[6]),n=!0)},p:ae,i(a){i||(a&&ce(()=>{i&&(l||(l=fe(e,de,{},!0)),l.run(1))}),i=!0)},o(a){a&&(l||(l=fe(e,de,{},!1)),l.run(0)),i=!1},d(a){a&&_(e),a&&l&&l.end(),n=!1,o()}}}function Ul(r){let e,s,t;const l=[zl,jl,Rl],i=[];function n(o,a){return o[4]?0:o[1]?1:2}return e=n(r),s=i[e]=l[e](r),{c(){s.c(),t=z()},l(o){s.l(o),t=z()},m(o,a){i[e].m(o,a),D(o,t,a)},p(o,[a]){let f=e;e=n(o),e===f?i[e].p(o,a):(O(),y(i[f],1,1,()=>{i[f]=null}),U(),s=i[e],s?s.p(o,a):(s=i[e]=l[e](o),s.c()),p(s,1),s.m(t.parentNode,t))},i(o){p(s)},o(o){y(s)},d(o){o&&_(t),i[e].d(o)}}}const je="px-4 py-2 font-normal transition-all block ";function Fl(r,e,s){let t,l;ue(r,ge,h=>s(2,t=h)),ue(r,xe,h=>s(3,l=h));let{formData:i}=e,n,o;const a=h=>{s(0,i.initialized=!0,i),s(0,i.started=h,i)},f=async()=>{await Sl(t,i),s(1,n=!0)},c=async()=>{var h;if(l.extensionData){const b=await Me(t,{action:"get_all_user_meta",metaKey:"nonEligibleFormData"});if((h=b.response)!=null&&h.length){const I=b.response.pop();log(I)}}};$e(()=>{c()});const g=()=>a(!0),d=()=>a(!1);function u(){i.progress=this.value,s(0,i)}function m(){i.holdingBack=this.value,s(0,i)}return r.$$set=h=>{"formData"in h&&s(0,i=h.formData)},[i,n,t,l,o,a,f,g,d,u,m]}class Yl extends ve{constructor(e){super(),ke(this,e,Fl,Ul,we,{formData:0})}}const hl=(r,e)=>{switch(r){case 1:return e===11&&!0;case 2:return e===12&&!0;case 3:return e===1006&&!0;case 4:return e===402&&!0;case 5:return e===503&&!0;default:return!1}};function mt(r){let e,s,t,l,i,n,o,a,f,c,g=r[5].extensionData&&ht(r),d=window.location.host==="tgds-schoolyard.lan"&&Gl(r);const u=[Jl,ql],m=[];function h(b,I){return b[0]?0:1}return o=h(r),a=m[o]=u[o](r),{c(){e=S("div"),s=S("div"),t=S("div"),l=S("h4"),g&&g.c(),i=V(),d&&d.c(),n=V(),a.c(),this.h()},l(b){e=E(b,"DIV",{class:!0,style:!0});var I=M(e);s=E(I,"DIV",{class:!0});var w=M(s);t=E(w,"DIV",{class:!0,style:!0});var T=M(t);l=E(T,"H4",{class:!0});var W=M(l);g&&g.l(W),i=P(W),d&&d.l(W),W.forEach(_),n=P(T),a.l(T),T.forEach(_),w.forEac
21h(_),I.forEach(_),this.h()},h(){k(l,"class","bg-gray-300 p-4 mb-0 shadow text-gray-800 text-base uppercase flex items-center justify-between"),k(t,"class","p-12 overflow-hidden rounded bg-white shadow-lg flex flex-col relative"),Ie(t,"max-width","65%"),Ie(t,"max-height","80%"),k(s,"class","flex items-center justify-center h-full w-full"),k(e,"class","fixed bg-tgds-blue-700 bg-opacity-80 h-full w-full top-0"),Ie(e,"z-index","99999")},m(b,I){D(b,e,I),v(e,s),v(s,t),v(t,l),g&&g.m(l,null),v(l,i),d&&d.m(l,null),v(t,n),m[o].m(t,null),c=!0},p(b,I){b[5].extensionData?g?g.p(b,I):(g=ht(b),g.c(),g.m(l,i)):g&&(g.d(1),g=null),window.location.host==="tgds-schoolyard.lan"&&d.p(b,I);let w=o;o=h(b),o===w?m[o].p(b,I):(O(),y(m[w],1,1,()=>{m[w]=null}),U(),a=m[o],a?a.p(b,I):(a=m[o]=u[o](b),a.c()),p(a,1),a.m(t,null))},i(b){c||(p(a),b&&ce(()=>{c&&(f||(f=fe(e,de,{},!0)),f.run(1))}),c=!0)},o(b){y(a),b&&(f||(f=fe(e,de,{},!1)),f.run(0)),c=!1},d(b){b&&_(e),g&&g.d(),d&&d.d(),m[o].d(),b&&f&&f.end()}}}function ht(r){let e,s=r[4].userFirstName+"",t,l;return{c(){e=Y("Hi "),t=Y(s),l=Y("!")},l(i){e=F(i,"Hi "),t=F(i,s),l=F(i,"!")},m(i,n){D(i,e,n),D(i,t,n),D(i,l,n)},p(i,n){n&16&&s!==(s=i[4].userFirstName+"")&&pe(t,s)},d(i){i&&(_(e),_(t),_(l))}}}function Gl(r){let e,s='<i class="fa fa-times"></i>',t,l;return{c(){e=S("span"),e.innerHTML=s,this.h()},l(i){e=E(i,"SPAN",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-j8siu0"&&(e.innerHTML=s),this.h()},h(){k(e,"class","cursor-pointer text-white hover:shadow flex items-center justify-center hover:bg-gray-900 transition-all rounded-full h-5 w-5 bg-gray-700")},m(i,n){D(i,e,n),t||(l=he(e,"click",r[6]),t=!0)},p:ae,d(i){i&&_(e),t=!1,l()}}}function ql(r){let e,s,t;function l(n){r[7](n)}let i={};return r[2]!==void 0&&(i.formData=r[2]),e=new Yl({props:i}),Ae.push(()=>Ve(e,"formData",l)),{c(){ee(e.$$.fragment)},l(n){Z(e.$$.fragment,n)},m(n,o){Q(e,n,o),t=!0},p(n,o){const a={};!s&&o&4&&(s=!0,a.formData=n[2],Pe(()=>s=!1)),e.$set(a)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){y(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Jl(r){let e,s;return e=new Vl({}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p:ae,i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Kl(r){let e,s,t=r[1]&&!r[3]&&mt(r);return{c(){t&&t.c(),e=z()},l(l){t&&t.l(l),e=z()},m(l,i){t&&t.m(l,i),D(l,e,i),s=!0},p(l,[i]){l[1]&&!l[3]?t?(t.p(l,i),i&10&&p(t,1)):(t=mt(l),t.c(),p(t,1),t.m(e.parentNode,e)):t&&(O(),y(t,1,1,()=>{t=null}),U())},i(l){s||(p(t),s=!0)},o(l){y(t),s=!1},d(l){l&&_(e),t&&t.d(l)}}}function Xl(r,e,s){let t,l;ue(r,ge,d=>s(4,t=d)),ue(r,xe,d=>s(5,l=d));let i,n,o={},a;const f=async()=>{var h,b,I;const d=t.userRole==="student"?t:{userId:20005},u=await Me(d,{action:"get_calendar_data"}),m=u.response?(h=u.response)==null?void 0:h.filter(w=>w.courseActive):[];if(m!=null&&m.length){for(let w=0;w<m.length;w++)m[w].grades=m[w].modules.filter(T=>{var W;return(W=T==null?void 0:T.grade)==null?void 0:W.submissionValid}).map(T=>T.grade);for(let w of m){if(!w.extensions||w.extensions.length===0)s(0,i=!0);else if(w.courseId===4)s(0,i=!0);else{const W=w.progressMeta?ml(w.progressMeta):{};if(W.manualEligible&&W.manualEligible.progressLevel===w.progressLevel)s(0,i=!0);else{s(0,i=!1);const B=ze(w.extensions,"extensionDate","desc"),x=ze(w.grades,"moduleId","desc");i||s(0,i=_e(x[0].submissionDate).isAfter(_e(B[0].extensionDate)))}}const T=((I=(b=w.modules)==null?void 0:b.filter(W=>{var B;return(B=W.grade)==null?void 0:B.gradeId}))==null?void 0:I.length)&&ze(w.modules.filter(W=>{var B;return(B=W.grade)==null?void 0:B.gradeId}),"moduleId","desc")[0];T&&hl(w.courseId,T.moduleId)&&(T.submissionValid||T.gradeValue)&&s(3,a=!0)}s(1,n=!0)}};$e(async()=>{await f()});const c=()=>s(1,n=null);function g(d){o=d,s(2,o)}return[i,n,o,a,t,l,c,g]}class Ql extends ve{constructor(e){super(),ke(this,e,Xl,Kl,we,{})}}const Zl=[{label:"Support Page",url:"/support"},{label:"Email Support",outbound:!0,url:"mailto:[email protected]"},{label:"My Profile",url:"/profile"},{label:"Logout",rel:"external",url:"/logout",force:!0}],_t={user:Zl};function pt(r,e,s){const t=r.slice();return t[10]=e[s],t}function es(r){let e,s='<i class="fas fa-user-circle w-full rounded-full top-1 left-0 fa-1.5x text-gray-700 text-center black inline-block absolute"></i>',t,l,i;return{c(){e=S("span"),e.innerHTML=s,this.h()},l(n){e=E(n,"SPAN",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-3tq9wm"&&(e.innerHTML=s),this.h()},h(){k(e,"class","rounded-full align-middle border-none shadow-lg relative bg-gray-200 w-8 h-8")},m(n,o){D(n,e,o),i=!0},p:ae,i(n){i||(n&&ce(()=>
21{i&&(l&&l.end(1),t=Te(e,Ne,{}),t.start())}),i=!0)},o(n){t&&t.invalidate(),n&&(l=Ue(e,Ne,{})),i=!1},d(n){n&&_(e),n&&l&&l.end()}}}function ts(r){let e,s,t,l,i;return{c(){e=S("img"),this.h()},l(n){e=E(n,"IMG",{alt:!0,class:!0,src:!0}),this.h()},h(){var n;k(e,"alt","..."),k(e,"class","object-cover min-w-full min-h-full m-auto top-0 absolute h-auto w-auto rounded-full align-middle border-none shadow-lg"),rt(e.src,s="data:"+((n=r[3])==null?void 0:n.type)+";base64, "+r[3].data)||k(e,"src",s)},m(n,o){D(n,e,o),i=!0},p(n,o){var a;(!i||o&8&&!rt(e.src,s="data:"+((a=n[3])==null?void 0:a.type)+";base64, "+n[3].data))&&k(e,"src",s)},i(n){i||(n&&ce(()=>{i&&(l&&l.end(1),t=Te(e,Ne,{}),t.start())}),i=!0)},o(n){t&&t.invalidate(),n&&(l=Ue(e,Ne,{})),i=!1},d(n){n&&_(e),n&&l&&l.end()}}}function bt(r){let e,s,t,l,i=Se(_t.user),n=[];for(let o=0;o<i.length;o+=1)n[o]=vt(pt(r,i,o));return{c(){e=S("div");for(let o=0;o<n.length;o+=1)n[o].c();this.h()},l(o){e=E(o,"DIV",{style:!0,class:!0});var a=M(e);for(let f=0;f<n.length;f+=1)n[f].l(a);a.forEach(_),this.h()},h(){Ie(e,"z-index","9999"),k(e,"class","text-base z-50 float-left list-none text-left shadow-lg min-w-48 absolute right-0 font-semibold user-dropdown pt-0.5 svelte-2z42ua")},m(o,a){D(o,e,a);for(let f=0;f<n.length;f+=1)n[f]&&n[f].m(e,null);l=!0},p(o,a){if(a&54){i=Se(_t.user);let f;for(f=0;f<i.length;f+=1){const c=pt(o,i,f);n[f]?n[f].p(c,a):(n[f]=vt(c),n[f].c(),n[f].m(e,null))}for(;f<n.length;f+=1)n[f].d(1);n.length=i.length}},i(o){l||(o&&ce(()=>{l&&(t&&t.end(1),s=Te(e,de,{}),s.start())}),l=!0)},o(o){s&&s.invalidate(),o&&(t=Ue(e,de,{})),l=!1},d(o){o&&_(e),Oe(n,o),o&&t&&t.end()}}}function gt(r){let e=!r[10].course||r[5](r[1],r[10].course),s,t=e&&wt(r);return{c(){t&&t.c(),s=z()},l(l){t&&t.l(l),s=z()},m(l,i){t&&t.m(l,i),D(l,s,i)},p(l,i){i&2&&(e=!l[10].course||l[5](l[1],l[10].course)),e?t?t.p(l,i):(t=wt(l),t.c(),t.m(s.parentNode,s)):t&&(t.d(1),t=null)},d(l){l&&_(s),t&&t.d(l)}}}function wt(r){let e,s=r[10].label+"",t,l,i,n;function o(){return r[7](r[10])}return{c(){e=S("a"),t=Y(s),l=V(),this.h()},l(a){e=E(a,"A",{href:!0,target:!0,class:!0});var f=M(e);t=F(f,s),l=P(f),f.forEach(_),this.h()},h(){k(e,"href",Le(r[10].url)),k(e,"target",r[10].target),k(e,"class","py-3 px-4 block whitespace-nowrap border-red-300 svelte-2z42ua")},m(a,f){D(a,e,f),v(e,t),v(e,l),i||(n=he(e,"click",o),i=!0)},p(a,f){r=a},d(a){a&&_(e),i=!1,n()}}}function vt(r){let e=!r[10].role||r[10].role.includes(r[2].userRole),s,t=e&>(r);return{c(){t&&t.c(),s=z()},l(l){t&&t.l(l),s=z()},m(l,i){t&&t.m(l,i),D(l,s,i)},p(l,i){i&4&&(e=!l[10].role||l[10].role.includes(l[2].userRole)),e?t?t.p(l,i):(t=gt(l),t.c(),t.m(s.parentNode,s)):t&&(t.d(1),t=null)},d(l){l&&_(s),t&&t.d(l)}}}function ls(r){var x;let e,s,t,l,i=nt(r[2],!1)+"",n,o,a=((x=r[2])==null?void 0:x.userLastName)+"",f,c,g,d,u,m,h,b,I;const w=[ts,es],T=[];function W(C,L){var N;return(N=C[3])!=null&&N.type?0:1}d=W(r),u=T[d]=w[d](r);let B=r[0]&&bt(r);return{c(){e=S("div"),s=S("button"),t=S("span"),l=S("span"),n=Y(i),o=V(),f=Y(a),c=V(),g=S("span"),u.c(),h=V(),B&&B.c(),this.h()},l(C){e=E(C,"DIV",{class:!0});var L=M(e);s=E(L,"BUTTON",{class:!0});var N=M(s);t=E(N,"SPAN",{class:!0});var G=M(t);l=E(G,"SPAN",{class:!0});var A=M(l);n=F(A,i),o=P(A),f=F(A,a),A.forEach(_),c=P(G),g=E(G,"SPAN",{class:!0});var R=M(g);u.l(R),R.forEach(_),G.forEach(_),N.forEach(_),h=P(L),B&&B.l(L),L.forEach(_),this.h()},h(){k(l,"class","text-white font-semibold uppercase text-xs pr-2"),k(g,"class","w-8 h-8 overflow-hidden text-sm text-white bg-tgds-blue-200 inline-flex items-center justify-center rounded-full relative"),k(t,"class","items-center flex"),k(s,"class",m="block px-12 py-2 hover:bg-tgds-blue-700 "+(r[0]?"bg-tgds-blue-700":"")+" transition-all"),k(e,"class","relative")},m(C,L){D(C,e,L),v(e,s),v(s,t),v(t,l),v(l,n),v(l,o),v(l,f),v(t,c),v(t,g),T[d].m(g,null),v(e,h),B&&B.m(e,null),b||(I=[he(s,"click",r[6]),Ke($l.call(null,e)),he(e,"click_outside",r[8])],b=!0)},p(C,[L]){var G;L&4&&i!==(i=nt(C[2],!1)+"")&&pe(n,i),L&4&&a!==(a=((G=C[2])==null?void 0:G.userLastName)+"")&&pe(f,a);let N=d;d=W(C),d===N?T[d].p(C,L):(O(),y(T[N],1,1,()=>{T[N]=null}),U(),u=T[d],u?u.p(C,L):(u=T[d]=w[d](C),u.c()),p(u,1),u.m(g,null)),L&1&&m!==(m="block px-12 py-2 hover:bg-tgds-blue-700 "+(C[0]?"bg-tgds-blue-700":"")+" transition-all")&&k(s,"class",m),C[0]?B?(B.p(C,L),L&1&&p(B,1)):(B=bt(C),B.c(),p(B,1),B.m(e,null)):B&&(O(),y(B,1,1,()=>{B=null}),U())},i(C){p(u),p(B)},o(C){y(u),y(B)},d(C){C&&_(e),T[d].d(),B&&B.d(),b=!1,He(I)}}}function ss(r,e,s){let t,l;ue(r,ge,u=>s(2,t=u)),ue(r,ft,u=>s(3,l=u));let i,n;const o=async()=>
21{if(!l){const u=await Me(t,{action:"get_user_avatar"});u.response&&ft.update(()=>u.response)}};$e(async()=>{!(l!=null&&l.type)&&await o(),s(1,n=t.courses.map(u=>Dl(u.courseId)))});const a=u=>window.location.href=u;return[i,n,t,l,a,(u,m)=>u.filter(b=>m.includes(b)).length,()=>s(0,i=!i),u=>a(Le(u.url)),()=>s(0,i=!1)]}class is extends ve{constructor(e){super(),ke(this,e,ss,ls,we,{})}}const rs=[{label:"Groups",items:[{url:"/",icon:"fa-smile",label:"Start Here"}]},{label:"Courses",items:[{url:"/courses",label:"My Course",selector:"courses",icon:"fa-graduation-cap"},{url:"/wip/course",label:"WIP Course",selector:"courses",icon:"fa-cog",role:["webmaster","admin"]},{url:"/videos",label:"My Videos",icon:"fa-video"},{url:"/wip/videos/?v=figma--navigating-the-figma-interface",label:"Videos WIP",icon:"fa-video-plus",role:["webmaster","admin"]},{url:"/my-tutor",icon:"fa-chalkboard",label:"My Tutor",role:["student"]},{url:"/calendar",label:"My Calendar",icon:"fa-calendar"},{label:"My Progress",url:"/progress",icon:"fa-tasks"}]},{label:"Accounts",items:[{url:"/accounts/purchase-upgrade",label:"Upgrade Course",selector:"upgrade",icon:"fa-arrow-up",role:["student"]},{url:"/accounts/purchase-extension",label:"Extend Studies",selector:"extension",bell:"extensionBell",icon:"fa-money-check",role:["student"]}]},{label:"Docs",items:[{url:"/news",icon:"fa-newspaper",label:"The News",selector:"news",subs:[{url:"/news/announcements",label:"Announcements"},{url:"/news/schoolyard",label:"Schoolyard"},{url:"/news/modules",label:"Versioning"},{url:"/news/tutors",label:"Tutors",role:["webmaster"]}]},{url:"/school",icon:"fa-university",label:"The School",selector:"school"}]},{label:"Tutors",role:["tutor","head-tutor"],items:[{icon:"fa-list",label:"Assignments",subs:[{url:"/tutor/current-submissions",label:"Submissions"},{url:"/tutor/latest-grades",label:"Latest Grades"}]},{icon:"fa-users",label:"Students",subs:[{url:"/tutor/active-students",label:"Active Students"},{url:"/tutor/graduates",label:"Graduates"}]},{url:"/news/tutors",icon:"fa-chalkboard-teacher",label:"Tutor News",bell:"newsBell",role:["tutor","head-tutor","admin","webmaster"]}]},{label:"Moderation",items:[{url:"/moderation",icon:"fa-user-graduate",label:"Moderation",bell:"moderationBell",role:["tutor","head-tutor","admin","webmaster"]}]},{label:"Tools",items:[{url:"/library",icon:"fa-book",label:"The Library"},{url:"/companions",icon:"fa-file",label:"The Companions",role:["admin","tutor","head-tutor","webmaster"]}]},{label:"Content",items:[{icon:"fa-blender",label:"Edit",selector:"content-editors",role:["webmaster","head-tutor","tutor","admin"],subs:[{url:"/inspiration/editor/",icon:"fa-sparkles",label:"Inspiration",role:["webmaster","admin"]},{url:"/governance",icon:"fa-cog",label:"Governance",role:["webmaster","head-tutor","admin"]},{url:"/companions/editor",icon:"fa-file",label:"Companions",role:["admin","tutor","head-tutor","webmaster"]},{"url-hold":"/sample/1998",icon:"fa-cat",label:"Sample Render",role:["webmaster"]},{url:"/mapping",icon:"fa-retweet",label:"Mapping",role:["admin","tutor","head-tutor","webmaster"]},{url:"/emails",icon:"fa-envelope",label:"Emails",role:["webmaster","head-tutor","admin"]}]}]},{label:"Meta",items:[{url:"/profile",icon:"fa-user",label:"My Profile"},{url:"/survey",icon:"fa-user",label:"Learner Survey",role:["student"],progressLevel:12},{url:"/survey",icon:"fa-user",label:"Learner Survey",role:["student"],progressLevel:402},{url:"/tour",icon:"fas fa-directions ",label:"The Tour"},{url:"/support",icon:"fas fa-ticket ",label:"Support"},{url:"https://www.thegraphicdesignschool.com/dex",icon:"fas fa-play-circle ",external:!0,label:"Free DEX"}]},{label:"RTO Tools",role:["admin","webmaster","tutor","head-tutor"],items:[{url:"/training",icon:"fa-clapperboard",label:"Training"}]}],kt={groups:rs};function ns(r){let e,s;return{c(){e=S("i"),this.h()},l(t){e=E(t,"I",{class:!0}),M(e).forEach(_),this.h()},h(){k(e,"class",s=`fa fa-bell text-orange-600 absolute centered text-xs transition-all z-30 ${r[0]?"right-5 top-4":"right-1 top-1"}`)},m(t,l){D(t,e,l)},p(t,[l]){l&1&&s!==(s=`fa fa-bell text-orange-600 absolute centered text-xs transition-all z-30 ${t[0]?"right-5 top-4":"right-1 top-1"}`)&&k(e,"class",s)},i:ae,o:ae,d(t){t&&_(e)}}}function os(r,e,s){let{sideWidth:t}=e;return r.$$set=l=>{"sideWidth"in l&&s(0,t=l.sideWidth)},[t]}class lt extends ve{constructor(e){super(),ke(this,e,os,ns,we,{sideWidth:0})}}function yt(r){let e,s,t="It looks like your course is about to expire. Click here to see if you are eligible to extend.",l,i,n;return{c(){e=S("div"),s=S("div"),s.textContent=t,this.h()},l(o){e=E(o,"DIV",{class:!0});var a=M(e);s=E(a,"DIV",{class:!0,"data-svelte-h":!0}),re(s)!=="svelte-dpim8c"&&(s.textContent=t),a.forEach(_),this.h()},h(){k(s,"class","p-8 flex-1 text-sm bg-tgds-blue-400"),k(e,"class",l="hideExtPopup shadow fixed flex -mt-4 "+(r[0]?"left-48":"left-12")+" transition-all z-20 w-80 font-normal normal-case")},m(o,a){D(o,e,a),v(e,s),n=!0},p(o,a){(!n||a&1&&l!==(l="hideExtPopup shadow fixed flex -mt-4 "+(o[0]?"left-48":"left-12")+" transition-all z-20 w-80 font-normal normal-case"))&&k(e,"class",l)},i(o){n||(o&&ce(()=>{n&&(i||(i=fe(e,De,{},!0)),i.run(1))}),n=!0)},o(o){o&&(i||(i=fe(e,De,{},!1)),i.run(0)),n=!1},d(o){o&&_(e),o&&i&&i.end()}}}function as(r){let e,s=!r[1]&&yt(r);return{c(){s&&s.c(),e=z()},l(t){s&&s.l(t),e=z()},m(t,l){s&&s.m(t,l),D(t,e,l)},p(t,[l]){t[1]?s&&(O(),y(s,1,1,()=>{s=null}),U()):s?(s.p(t,l),l&2&&p(s,1)):(s=yt(t),s.c(),p(s,1),s.m(e.parentNode,e))},i(t){p(s)},o(t){y(s)},d(t){t&&_(e),s&&s.d(t)}}}function fs(r,e,s){let t;ue(r,ge,o=>s(2,t=o));let{sideWidth:l}=e,i;const n=async()=>{var c,g,d;const o=t.userRole==="student"?t:{userId:20005},a=await Me(o,{action:"get_calendar_data"}),f=a.response?(c=a.response)==null?void 0:c.filter(u=>u.courseActive):[];if(f!=null&&f.length){for(let u=0;u<f.length;u++)f[u].grades=f[u].modules.filter(m=>{var h;
21return(h=m==null?void 0:m.grade)==null?void 0:h.submissionValid}).map(m=>m.grade);for(let u of f){const m=((d=(g=u.modules)==null?void 0:g.filter(h=>{var b;return(b=h.grade)==null?void 0:b.gradeId}))==null?void 0:d.length)&&ze(u.modules.filter(h=>{var b;return(b=h.grade)==null?void 0:b.gradeId}),"moduleId","desc")[0];m&&hl(u.courseId,m.moduleId)&&(m.submissionValid||m.gradeValue)&&s(1,i=!0)}}};return $e(async()=>{await n()}),r.$$set=o=>{"sideWidth"in o&&s(0,l=o.sideWidth)},[l,i]}class us extends ve{constructor(e){super(),ke(this,e,fs,as,we,{sideWidth:0})}}function Ct(r){let e,s;return e=new be({props:{customCn:"-mt-6 w-80 "+(r[0]?"left-48":"left-12")+" fixed",goToUrl:r[4].userRole==="student"?"/courses":"/courses/certiv",step:1}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),l&16&&(i.goToUrl=t[4].userRole==="student"?"/courses":"/courses/certiv"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Et(r){let e,s;return e=new be({props:{customCn:"-mt-6 w-80 "+(r[0]?"left-48":"left-12")+" fixed",step:4}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function St(r){let e,s;return e=new be({props:{customCn:"-mt-6 mt-2 w-80 "+(r[0]?"left-48":"left-12")+" fixed",step:6}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 mt-2 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Dt(r){let e,s;return e=new be({props:{customCn:"-mt-6 mt-2 w-80 "+(r[0]?"left-48":"left-12")+" fixed",customFn:r[1],step:8}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 mt-2 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),l&2&&(i.customFn=t[1]),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function $t(r){let e,s;return e=new be({props:{customCn:"-mt-6 w-80 "+(r[0]?"left-48":"left-12")+" fixed",step:15}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Tt(r){let e,s;return e=new be({props:{customCn:"-mt-6 w-80 "+(r[0]?"left-48":"left-12")+" fixed",step:17}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function It(r){let e,s;return e=new be({props:{customCn:"-mt-6 w-80 "+(r[0]?"left-48":"left-12")+" fixed",step:19}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Lt(r){let e,s;return e=new be({props:{customCn:"-mt-6 w-80 "+(r[0]?"left-48":"left-12")+" fixed",step:21}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.customCn="-mt-6 w-80 "+(t[0]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function cs(r){let e,s,t,l,i,n,o,a,f,c=r[2]==="/courses"&&Ct(r),g=r[2]==="/videos"&&Et(r),d=r[2]==="/calendar"&&St(r),u=r[3]==="The News"&&Dt(r),m=r[2]==="/library"&&$t(r),h=r[2]==="/profile"&&Tt(r),b=r[2]==="/support"&&It(r),I=r[2]==="/tour"&&Lt(r);return{c(){c&&c.c(),e=V(),g&&g.c(),s=V(),d&&d.c(),t=V(),u&&u.c(),l=V(),m&&m.c(),i=V(),h&&h.c(),n=V(),b&&b.c(),o=V(),I&&I.c(),a=z()},l(w){c&&c.l(w),e=P(w),g&&g.l(w),s=P(w),d&&d.l(w),t=P(w),u&&u.l(w),l=P(w),m&&m.l(w),i=P(w),h&&h.l(w),n=P(w),b&&b.l(w),o=P(w),I&&I.l(w),a=z()}
21,m(w,T){c&&c.m(w,T),D(w,e,T),g&&g.m(w,T),D(w,s,T),d&&d.m(w,T),D(w,t,T),u&&u.m(w,T),D(w,l,T),m&&m.m(w,T),D(w,i,T),h&&h.m(w,T),D(w,n,T),b&&b.m(w,T),D(w,o,T),I&&I.m(w,T),D(w,a,T),f=!0},p(w,[T]){w[2]==="/courses"?c?(c.p(w,T),T&4&&p(c,1)):(c=Ct(w),c.c(),p(c,1),c.m(e.parentNode,e)):c&&(O(),y(c,1,1,()=>{c=null}),U()),w[2]==="/videos"?g?(g.p(w,T),T&4&&p(g,1)):(g=Et(w),g.c(),p(g,1),g.m(s.parentNode,s)):g&&(O(),y(g,1,1,()=>{g=null}),U()),w[2]==="/calendar"?d?(d.p(w,T),T&4&&p(d,1)):(d=St(w),d.c(),p(d,1),d.m(t.parentNode,t)):d&&(O(),y(d,1,1,()=>{d=null}),U()),w[3]==="The News"?u?(u.p(w,T),T&8&&p(u,1)):(u=Dt(w),u.c(),p(u,1),u.m(l.parentNode,l)):u&&(O(),y(u,1,1,()=>{u=null}),U()),w[2]==="/library"?m?(m.p(w,T),T&4&&p(m,1)):(m=$t(w),m.c(),p(m,1),m.m(i.parentNode,i)):m&&(O(),y(m,1,1,()=>{m=null}),U()),w[2]==="/profile"?h?(h.p(w,T),T&4&&p(h,1)):(h=Tt(w),h.c(),p(h,1),h.m(n.parentNode,n)):h&&(O(),y(h,1,1,()=>{h=null}),U()),w[2]==="/support"?b?(b.p(w,T),T&4&&p(b,1)):(b=It(w),b.c(),p(b,1),b.m(o.parentNode,o)):b&&(O(),y(b,1,1,()=>{b=null}),U()),w[2]==="/tour"?I?(I.p(w,T),T&4&&p(I,1)):(I=Lt(w),I.c(),p(I,1),I.m(a.parentNode,a)):I&&(O(),y(I,1,1,()=>{I=null}),U())},i(w){f||(p(c),p(g),p(d),p(u),p(m),p(h),p(b),p(I),f=!0)},o(w){y(c),y(g),y(d),y(u),y(m),y(h),y(b),y(I),f=!1},d(w){w&&(_(e),_(s),_(t),_(l),_(i),_(n),_(o),_(a)),c&&c.d(w),g&&g.d(w),d&&d.d(w),u&&u.d(w),m&&m.d(w),h&&h.d(w),b&&b.d(w),I&&I.d(w)}}}function ds(r,e,s){let t;ue(r,ge,a=>s(4,t=a));let{sideWidth:l}=e,{showTrue:i}=e,{url:n}=e,{label:o}=e;return r.$$set=a=>{"sideWidth"in a&&s(0,l=a.sideWidth),"showTrue"in a&&s(1,i=a.showTrue),"url"in a&&s(2,n=a.url),"label"in a&&s(3,o=a.label)},[l,i,n,o,t]}class ms extends ve{constructor(e){super(),ke(this,e,ds,cs,we,{sideWidth:0,showTrue:1,url:2,label:3})}}function Nt(r){var i,n;let e=!r[13]||((n=(i=r[16].courses)==null?void 0:i.filter(At))==null?void 0:n.find(r[23])),s,t,l=e&&Mt(r);return{c(){l&&l.c(),s=z()},l(o){l&&l.l(o),s=z()},m(o,a){l&&l.m(o,a),D(o,s,a),t=!0},p(o,a){var f,c;a&73728&&(e=!o[13]||((c=(f=o[16].courses)==null?void 0:f.filter(At))==null?void 0:c.find(o[23]))),e?l?(l.p(o,a),a&73728&&p(l,1)):(l=Mt(o),l.c(),p(l,1),l.m(s.parentNode,s)):l&&(O(),y(l,1,1,()=>{l=null}),U())},i(o){t||(p(l),t=!0)},o(o){y(l),t=!1},d(o){o&&_(s),l&&l.d(o)}}}function Mt(r){let e,s,t=r[11]&&r[12]==="extensionBell"&&!ye.url.pathname.includes("/accounts/purchase-extension")&&!r[14],l,i,n,o,a,f,c,g,d,u,m,h=t&&Bt(r);const b=[ps,_s,hs],I=[];function w(x,C){return x[9]&&x[12]==="newsBell"?0:x[10]&&x[12]==="moderationBell"?1:x[11]&&x[12]==="extensionBell"?2:-1}~(n=w(r))&&(o=I[n]=b[n](r));function T(x,C){return x[0]?ws:gs}let W=T(r),B=W(r);return g=new ms({props:{sideWidth:r[0],url:r[1],showTrue:r[8],label:r[3]}}),{c(){e=S("li"),s=S("div"),h&&h.c(),l=V(),i=S("button"),o&&o.c(),a=V(),B.c(),c=V(),ee(g.$$.fragment),this.h()},l(x){e=E(x,"LI",{class:!0});var C=M(e);s=E(C,"DIV",{class:!0});var L=M(s);h&&h.l(L),l=P(L),i=E(L,"BUTTON",{class:!0});var N=M(i);o&&o.l(N),a=P(N),B.l(N),N.forEach(_),c=P(L),Z(g.$$.fragment,L),L.forEach(_),C.forEach(_),this.h()},h(){k(i,"class",f="hover-me-side-item text-xs text-left "+(r[18](ye.url.pathname)?`isOpen ${r[0]?"text-tgds-yellow-500 bg-tgds-blue-700 ":"text-tgds-yellow-500 no-yellow-hover isClosed"} `:`${r[0]?"hover:text-tgds-yellow-500 hover:bg-tgds-blue-700 ":"text-white hover:bg-tgds-yellow-500 no-yellow-hover hover:text-black"} `)+" uppercase py-3 relative flex-1 "+(r[4]?"flex justify-between":"block")+" text-white font-semibold transition-all svelte-8c46gu"),k(s,"class","flex"),k(e,"class","items-center relative svelte-8c46gu")},m(x,C){D(x,e,C),v(e,s),h&&h.m(s,null),v(s,l),v(s,i),~n&&I[n].m(i,null),v(i,a),B.m(i,null),v(s,c),Q(g,s,null),d=!0,u||(m=[he(i,"click",r[17]),he(i,"mouseenter",function(){Xe(r[5])&&r[5].apply(this,arguments)}),he(i,"mouseleave",function(){Xe(r[6])&&r[6].apply(this,arguments)})],u=!0)},p(x,C){r=x,C&22528&&(t=r[11]&&r[12]==="extensionBell"&&!ye.url.pathname.includes("/accounts/purchase-extension")&&!r[14]),t?h?(h.p(r,C),C&22528&&p(h,1)):(h=Bt(r),h.c(),p(h,1),h.m(s,l)):h&&(O(),y(h,1,1,()=>{h=null}),U());let L=n;n=w(r),n===L?~n&&I[n].p(r,C):(o&&(O(),y(I[L],1,1,()=>{I[L]=null}),U()),~n?(o=I[n],o?o.p(r,C):(o=I[n]=b[n](r),o.c()),p(o,1),o.m(i,a)):o=null),W===(W=T(r))&&B?B.p(r,C):(B.d(1),B=W(r),B&&(B.c(),p(B,1),B.m(i,null))),(!d||C&17&&f!==(f="hover-me-side-item text-xs text-left "+(r[18](ye.url.pathname)?`isOpen ${r[0]?"text-tgds-yellow-500 bg-tgds-blue-700 ":"text-tgds-yellow-500 no-yellow-hover isClosed"} `:`${r[0]?"hover:text-tgds-yellow-500 hover:bg-tgds-blue-700 ":"text-white hover:bg-tgds-yellow-500 no-yellow-hover hover:text-black"} `)+" uppercase py-3 relative flex-1 "+(r[4]?"flex justify-between":"block")+" text-white font-semibold transition-all svelte-8c46gu"))&&k(i,"class",f);const N={};C&1&&(N.sideWidth=r[0]),C&2&&(N.url=r[1]),C&256&&(N.showTrue=r[8]),C&8&&(N.label=r[3]),g.$set(N)},i(x){d||(p(h),p(o),p(B),p(g.$$.fragment,x),d=!0)},o(x){y(h),y(o),y(g.$$.fragment,x),d=!1},d(x){x&&_(e),h&&h.d(),~n&&I[n].d(),B.d(),X(g),u=!1,He(m)}}}function Bt(r){let e,s,t,l,i,n,o;return{c(){e=S("div"),s=S("i"),this.h()},l(a){e=E(a,"DIV",{class:!0,style:!0});var f=M(e);
21s=E(f,"I",{class:!0}),M(s).forEach(_),f.forEach(_),this.h()},h(){k(s,"class","fa fa-times"),k(e,"class","cursor-pointer shadow bg-tgds-blue-700 flex z-30 fixed text-white h-6 w-6 mt-1 items-center justify-center hover:bg-gray-900 hover:text-tgds-yellow-500 transition-all"),k(e,"style",t=r[0]?"left:30rem":"left:21rem")},m(a,f){D(a,e,f),v(e,s),i=!0,n||(o=he(e,"click",r[19]),n=!0)},p(a,f){(!i||f&1&&t!==(t=a[0]?"left:30rem":"left:21rem"))&&k(e,"style",t)},i(a){i||(a&&ce(()=>{i&&(l||(l=fe(e,De,{},!0)),l.run(1))}),i=!0)},o(a){a&&(l||(l=fe(e,De,{},!1)),l.run(0)),i=!1},d(a){a&&_(e),a&&l&&l.end(),n=!1,o()}}}function hs(r){let e,s,t=!ye.url.pathname.includes("/accounts/purchase-extension"),l,i;e=new lt({props:{sideWidth:r[0]}});let n=t&&bs(r);return{c(){ee(e.$$.fragment),s=V(),n&&n.c(),l=z()},l(o){Z(e.$$.fragment,o),s=P(o),n&&n.l(o),l=z()},m(o,a){Q(e,o,a),D(o,s,a),n&&n.m(o,a),D(o,l,a),i=!0},p(o,a){const f={};a&1&&(f.sideWidth=o[0]),e.$set(f),t&&n.p(o,a)},i(o){i||(p(e.$$.fragment,o),p(n),i=!0)},o(o){y(e.$$.fragment,o),y(n),i=!1},d(o){o&&(_(s),_(l)),X(e,o),n&&n.d(o)}}}function _s(r){let e,s;return e=new lt({props:{sideWidth:r[0]}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.sideWidth=t[0]),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function ps(r){let e,s;return e=new lt({props:{sideWidth:r[0]}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&1&&(i.sideWidth=t[0]),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function bs(r){let e,s,t=!r[14]&&Wt(r);return{c(){t&&t.c(),e=z()},l(l){t&&t.l(l),e=z()},m(l,i){t&&t.m(l,i),D(l,e,i),s=!0},p(l,i){l[14]?t&&(O(),y(t,1,1,()=>{t=null}),U()):t?(t.p(l,i),i&16384&&p(t,1)):(t=Wt(l),t.c(),p(t,1),t.m(e.parentNode,e))},i(l){s||(p(t),s=!0)},o(l){y(t),s=!1},d(l){l&&_(e),t&&t.d(l)}}}function Wt(r){let e,s,t;function l(n){r[24](n)}let i={};return r[0]!==void 0&&(i.sideWidth=r[0]),e=new us({props:i}),Ae.push(()=>Ve(e,"sideWidth",l)),{c(){ee(e.$$.fragment)},l(n){Z(e.$$.fragment,n)},m(n,o){Q(e,n,o),t=!0},p(n,o){const a={};!s&&o&1&&(s=!0,a.sideWidth=n[0],Pe(()=>s=!1)),e.$set(a)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){y(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function gs(r){let e,s,t,l,i,n=(r[3]==="My Progress"&&r[16].userRole!=="student"?"Progress":r[3])+"",o;return{c(){e=S("i"),l=V(),i=S("span"),o=Y(n),this.h()},l(a){e=E(a,"I",{class:!0}),M(e).forEach(_),l=P(a),i=E(a,"SPAN",{class:!0});var f=M(i);o=F(f,n),f.forEach(_),this.h()},h(){k(e,"class",s="fas mx-4 "+r[2]+" text-sm "+(r[0]?`${r[18](ye.url.pathname)?"opacity-90":"text-tgds-yellow-500"}`:" ")+" svelte-8c46gu"),k(i,"class","absolute transition-all hover-text bg-tgds-yellow-500 px-3 py-3 whitespace-nowrap text-black "+(r[18](ye.url.pathname)?"hidden":"")+" svelte-8c46gu")},m(a,f){D(a,e,f),D(a,l,f),D(a,i,f),v(i,o)},p(a,f){f&5&&s!==(s="fas mx-4 "+a[2]+" text-sm "+(a[0]?`${a[18](ye.url.pathname)?"opacity-90":"text-tgds-yellow-500"}`:" ")+" svelte-8c46gu")&&k(e,"class",s),f&65544&&n!==(n=(a[3]==="My Progress"&&a[16].userRole!=="student"?"Progress":a[3])+"")&&pe(o,n)},i(a){a&&(t||ce(()=>{t=Te(e,Ne,{}),t.start()}))},o:ae,d(a){a&&(_(e),_(l),_(i))}}}function ws(r){let e,s=(r[3]==="My Progress"&&r[16].userRole!=="student"?"Progress":r[3])+"",t,l,i,n,o=r[4]&&xt(r);return{c(){e=S("span"),t=Y(s),i=V(),o&&o.c(),n=z(),this.h()},l(a){e=E(a,"SPAN",{class:!0});var f=M(e);t=F(f,s),f.forEach(_),i=P(a),o&&o.l(a),n=z(),this.h()},h(){k(e,"class","transition-all pl-8")},m(a,f){D(a,e,f),v(e,t),D(a,i,f),o&&o.m(a,f),D(a,n,f)},p(a,f){f&65544&&s!==(s=(a[3]==="My Progress"&&a[16].userRole!=="student"?"Progress":a[3])+"")&&pe(t,s),a[4]?o?o.p(a,f):(o=xt(a),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},i(a){a&&(l||ce(()=>{l=Te(e,Ne,{}),l.start()}))},o:ae,d(a){a&&(_(e),_(i),_(n)),o&&o.d(a)}}}function xt(r){let e,s,t;return{c(){e=S("span"),s=S("i"),this.h()},l(l){e=E(l,"SPAN",{class:!0});var i=M(e);s=E(i,"I",{class:!0}),M(s).forEach(_),i.forEach(_),this.h()},h(){k(s,"class",t="fas fa-chevron-down "+(r[7]?"rotate-180":"")+" mr-3 text-xs transition-all"),k(e,"class","text-xs px-2 uppercase font-bold block hover:text-tgds-yellow-500 transition-all text-white")},m(l,i){D(l,e,i),v(e,s)},p(l,i){i&128&&t!==(t="fas fa-chevron-down "+(l[7]?"rotate-180":"")+" mr-3 text-xs transition-all")&&k(s,"class",t)},d(l){l&&_(e)}}}function vs(r){let e,s,t=!r[15]&&Nt(r);return{c(){t&&t.c(),e=z()},l(l){t&&t.l(l),e=z()},m(l,i){t&&t.m(l,i),D(l,e,i),s=!0},p(l,[i]){l[15]?t&&(O(),y(t,1,1,()=>{t=null}),U()):t?(t.p(l,i),i&32768&&p(t,1)):(t=Nt(l),t.c(),p(t,1),t.m(e.parentNode,e))},i(l){s||(p(t),s=!0)},o(l){y(t),s=!1},d(l){l&&_(e),t&&t.d(l)}}}const At=r=>r.courseActive;function ks(r,e,s){let t;ue(r,ge,$=>s(16,t=$));let{external:l,url:i,icon:n,label:o,onClick:a,onMouseEnter:f,onMouseLeave:c,show:g,mobShow:d,showTrue:u,sideWidth:m,newsBell:h,moderationBell:b,extensionBell:I,bell:w,progressLevel:T,selector:W}=e,B,x;const C=()=>{s(20,d=!1),a?a():l?window.open(i,"_blank"):tt(i)},L=$=>i==="/"||$.includes("news")?$===(i==null?void 0:i.split("#").shift()):$.includes(i==null?void 0:i.split("#").shift()),N=$=>{$.preventDefault(),s(14,B=!0)},G=()=>{switch(W){case"upgrade":{s(15,x=!t.courses.filter($=>$.courseActive).find($=>$.courseId===1));break}}};
21$e(()=>{setTimeout(()=>G(),1e3)});const A=$=>$.progressLevel===T;function R($){m=$,s(0,m)}return r.$$set=$=>{"external"in $&&s(21,l=$.external),"url"in $&&s(1,i=$.url),"icon"in $&&s(2,n=$.icon),"label"in $&&s(3,o=$.label),"onClick"in $&&s(4,a=$.onClick),"onMouseEnter"in $&&s(5,f=$.onMouseEnter),"onMouseLeave"in $&&s(6,c=$.onMouseLeave),"show"in $&&s(7,g=$.show),"mobShow"in $&&s(20,d=$.mobShow),"showTrue"in $&&s(8,u=$.showTrue),"sideWidth"in $&&s(0,m=$.sideWidth),"newsBell"in $&&s(9,h=$.newsBell),"moderationBell"in $&&s(10,b=$.moderationBell),"extensionBell"in $&&s(11,I=$.extensionBell),"bell"in $&&s(12,w=$.bell),"progressLevel"in $&&s(13,T=$.progressLevel),"selector"in $&&s(22,W=$.selector)},[m,i,n,o,a,f,c,g,u,h,b,I,w,T,B,x,t,C,L,N,d,l,W,A,R]}class _l extends ve{constructor(e){super(),ke(this,e,ks,vs,we,{external:21,url:1,icon:2,label:3,onClick:4,onMouseEnter:5,onMouseLeave:6,show:7,mobShow:20,showTrue:8,sideWidth:0,newsBell:9,moderationBell:10,extensionBell:11,bell:12,progressLevel:13,selector:22})}}function Pt(r,e,s){const t=r.slice();return t[13]=e[s],t}function Vt(r,e,s){const t=r.slice();return t[13]=e[s],t}function ys(r){let e,s,t,l,i,n,o,a,f=Se(r[4]),c=[];for(let d=0;d<f.length;d+=1)c[d]=Ot(Pt(r,f,d));const g=d=>y(c[d],1,1,()=>{c[d]=null});return{c(){e=S("ul"),s=S("li"),t=S("a"),l=S("span"),i=Y(r[3]),o=V();for(let d=0;d<c.length;d+=1)c[d].c();this.h()},l(d){e=E(d,"UL",{class:!0});var u=M(e);s=E(u,"LI",{});var m=M(s);
21t=E(m,"A",{class:!0,href:!0});var h=M(t);l=E(h,"SPAN",{});var b=M(l);i=F(b,r[3]),b.forEach(_),h.forEach(_),m.forEach(_),o=P(u);for(let I=0;I<c.length;I+=1)c[I].l(u);u.forEach(_),this.h()},h(){k(t,"class",n="text-xs uppercase py-3.5 px-3 font-bold block transition-all bg-tgds-yellow-500 text-black "+(r[1]?"hover:text-tgds-yellow-500 hover:bg-gray-900":"")),k(t,"href",r[1]),k(e,"class","absolute hover-me-dropdown-list transition-all whitespace-nowrap shadow-md svelte-ebdwvx")},m(d,u){D(d,e,u),v(e,s),v(s,t),v(t,l),v(l,i),v(e,o);for(let m=0;m<c.length;m+=1)c[m]&&c[m].m(e,null);a=!0},p(d,u){if((!a||u&8)&&pe(i,d[3]),(!a||u&2&&n!==(n="text-xs uppercase py-3.5 px-3 font-bold block transition-all bg-tgds-yellow-500 text-black "+(d[1]?"hover:text-tgds-yellow-500 hover:bg-gray-900":"")))&&k(t,"class",n),(!a||u&2)&&k(t,"href",d[1]),u&176){f=Se(d[4]);let m;for(m=0;m<f.length;m+=1){const h=Pt(d,f,m);c[m]?(c[m].p(h,u),p(c[m],1)):(c[m]=Ot(h),c[m].c(),p(c[m],1),c[m].m(e,null))}for(O(),m=f.length;m<c.length;m+=1)g(m);U()}},i(d){if(!a){for(let u=0;u<f.length;u+=1)p(c[u]);a=!0}},o(d){c=c.filter(Boolean);for(let u=0;u<c.length;u+=1)y(c[u]);a=!1},d(d){d&&_(e),Oe(c,d)}}}function Cs(r){let e,s,t=r[6]&&Ut(r);return{c(){t&&t.c(),e=z()},l(l){t&&t.l(l),e=z()},m(l,i){t&&t.m(l,i),D(l,e,i),s=!0},p(l,i){l[6]?t?(t.p(l,i),i&64&&p(t,1)):(t=Ut(l),t.c(),p(t,1),t.m(e.parentNode,e)):t&&(O(),y(t,1,1,()=>{t=null}),U())},i(l){s||(p(t),s=!0)},o(l){y(t),s=!1},d(l){l&&_(e),t&&t.d(l)}}}function Rt(r){let e,s,t,l=r[13].label+"",i,n,o,a,f,c,g,d=r[13].url==="/news/announcements"&&jt(r),u=r[13].url==="/news/schoolyard"&&zt(r),m=r[13].url==="/news/modules"&&Ht(r);return{c(){e=S("li"),s=S("a"),t=S("span"),i=Y(l),o=V(),d&&d.c(),a=V(),u&&u.c(),f=V(),m&&m.c(),c=V(),this.h()},l(h){e=E(h,"LI",{});var b=M(e);s=E(b,"A",{class:!0,href:!0});var I=M(s);t=E(I,"SPAN",{});var w=M(t);i=F(w,l),w.forEach(_),I.forEach(_),o=P(b),d&&d.l(b),a=P(b),u&&u.l(b),f=P(b),m&&m.l(b),c=P(b),b.forEach(_),this.h()},h(){k(s,"class","text-xs uppercase py-3.5 px-3 font-bold block transition-all bg-tgds-yellow-500 text-black hover:text-tgds-yellow-500 hover:bg-gray-900"),k(s,"href",n=r[13].url)},m(h,b){D(h,e,b),v(e,s),v(s,t),v(t,i),v(e,o),d&&d.m(e,null),v(e,a),u&&u.m(e,null),v(e,f),m&&m.m(e,null),v(e,c),g=!0},p(h,b){(!g||b&16)&&l!==(l=h[13].label+"")&&pe(i,l),(!g||b&16&&n!==(n=h[13].url))&&k(s,"href",n),h[13].url==="/news/announcements"?d?(d.p(h,b),b&16&&p(d,1)):(d=jt(h),d.c(),p(d,1),d.m(e,a)):d&&(O(),y(d,1,1,()=>{d=null}),U()),h[13].url==="/news/schoolyard"?u?(u.p(h,b),b&16&&p(u,1)):(u=zt(h),u.c(),p(u,1),u.m(e,f)):u&&(O(),y(u,1,1,()=>{u=null}),U()),h[13].url==="/news/modules"?m?(m.p(h,b),b&16&&p(m,1)):(m=Ht(h),m.c(),p(m,1),m.m(e,c)):m&&(O(),y(m,1,1,()=>{m=null}),U())},i(h){g||(p(d),p(u),p(m),g=!0)},o(h){y(d),y(u),y(m),g=!1},d(h){h&&_(e),d&&d.d(),u&&u.d(),m&&m.d()}}}function jt(r){let e,s;return e=new be({props:{customCn:"-mt-16 w-80 "+(r[5]?"left-48":"left-12")+" fixed",step:9}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&32&&(i.customCn="-mt-16 w-80 "+(t[5]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function zt(r){let e,s;return e=new be({props:{customCn:"-mt-16 w-80 "+(r[5]?"left-48":"left-12")+" fixed",step:11}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&32&&(i.customCn="-mt-16 w-80 "+(t[5]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Ht(r){let e,s;return e=new be({props:{customCn:"-mt-16 w-80 "+(r[5]?"left-48":"left-12")+" fixed",step:13}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&32&&(i.customCn="-mt-16 w-80 "+(t[5]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Ot(r){let e=!r[13].role||r[13].role.includes(r[7].userRole),s,t,l=e&&Rt(r);return{c(){l&&l.c(),s=z()},l(i){l&&l.l(i),s=z()},m(i,n){l&&l.m(i,n),D(i,s,n),t=!0},p(i,n){n&144&&(e=!i[13].role||i[13].role.includes(i[7].userRole)),e?l?(l.p(i,n),n&144&&p(l,1)):(l=Rt(i),l.c(),p(l,1),l.m(s.parentNode,s)):l&&(O(
21),y(l,1,1,()=>{l=null}),U())},i(i){t||(p(l),t=!0)},o(i){y(l),t=!1},d(i){i&&_(s),l&&l.d(i)}}}function Ut(r){let e,s,t,l,i=Se(r[4]),n=[];for(let a=0;a<i.length;a+=1)n[a]=Kt(Vt(r,i,a));const o=a=>y(n[a],1,1,()=>{n[a]=null});return{c(){e=S("ul");for(let a=0;a<n.length;a+=1)n[a].c();this.h()},l(a){e=E(a,"UL",{class:!0});var f=M(e);for(let c=0;c<n.length;c+=1)n[c].l(f);f.forEach(_),this.h()},h(){k(e,"class",bl("lg:flex-col lg:min-w-full flex flex-col list-none")+" svelte-ebdwvx")},m(a,f){D(a,e,f);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(e,null);l=!0},p(a,f){if(f&176){i=Se(a[4]);let c;for(c=0;c<i.length;c+=1){const g=Vt(a,i,c);n[c]?(n[c].p(g,f),p(n[c],1)):(n[c]=Kt(g),n[c].c(),p(n[c],1),n[c].m(e,null))}for(O(),c=i.length;c<n.length;c+=1)o(c);U()}},i(a){if(!l){for(let f=0;f<i.length;f+=1)p(n[f]);a&&ce(()=>{l&&(t&&t.end(1),s=Te(e,de,{}),s.start())}),l=!0}},o(a){n=n.filter(Boolean);for(let f=0;f<n.length;f+=1)y(n[f]);s&&s.invalidate(),a&&(t=Ue(e,de,{})),l=!1},d(a){a&&_(e),Oe(n,a),a&&t&&t.end()}}}function Ft(r){let e,s,t,l,i,n,o,a,f,c=r[5]&&Yt(r),g=r[13].url==="/news/announcements"&&Gt(r),d=r[13].url==="/news/schoolyard"&&qt(r),u=r[13].url==="/news/modules"&&Jt(r);return{c(){e=S("li"),s=S("a"),c&&c.c(),i=V(),g&&g.c(),n=V(),d&&d.c(),o=V(),u&&u.c(),a=V(),this.h()},l(m){e=E(m,"LI",{class:!0});var h=M(e);s=E(h,"A",{href:!0,class:!0});var b=M(s);c&&c.l(b),b.forEach(_),i=P(h),g&&g.l(h),n=P(h),d&&d.l(h),o=P(h),u&&u.l(h),a=P(h),h.forEach(_),this.h()},h(){var m;k(s,"href",t=Le(r[13].url)),k(s,"class",l="text-xs relative uppercase py-3 pl-10 block text-white transition-all "+(ye.url.pathname===((m=r[13].url)==null?void 0:m.split("#").shift())?"isOpen text-tgds-yellow-500 bg-tgds-blue-700 ":"hover:text-tgds-yellow-500 hover:bg-tgds-blue-700 ")+" font-semibold svelte-ebdwvx"),k(e,"class","items-center svelte-ebdwvx")},m(m,h){D(m,e,h),v(e,s),c&&c.m(s,null),v(e,i),g&&g.m(e,null),v(e,n),d&&d.m(e,null),v(e,o),u&&u.m(e,null),v(e,a),f=!0},p(m,h){var b;m[5]?c?c.p(m,h):(c=Yt(m),c.c(),c.m(s,null)):c&&(c.d(1),c=null),(!f||h&16&&t!==(t=Le(m[13].url)))&&k(s,"href",t),(!f||h&16&&l!==(l="text-xs relative uppercase py-3 pl-10 block text-white transition-all "+(ye.url.pathname===((b=m[13].url)==null?void 0:b.split("#").shift())?"isOpen text-tgds-yellow-500 bg-tgds-blue-700 ":"hover:text-tgds-yellow-500 hover:bg-tgds-blue-700 ")+" font-semibold svelte-ebdwvx"))&&k(s,"class",l),m[13].url==="/news/announcements"?g?(g.p(m,h),h&16&&p(g,1)):(g=Gt(m),g.c(),p(g,1),g.m(e,n)):g&&(O(),y(g,1,1,()=>{g=null}),U()),m[13].url==="/news/schoolyard"?d?(d.p(m,h),h&16&&p(d,1)):(d=qt(m),d.c(),p(d,1),d.m(e,o)):d&&(O(),y(d,1,1,()=>{d=null}),U()),m[13].url==="/news/modules"?u?(u.p(m,h),h&16&&p(u,1)):(u=Jt(m),u.c(),p(u,1),u.m(e,a)):u&&(O(),y(u,1,1,()=>{u=null}),U())},i(m){f||(p(g),p(d),p(u),f=!0)},o(m){y(g),y(d),y(u),f=!1},d(m){m&&_(e),c&&c.d(),g&&g.d(),d&&d.d(),u&&u.d()}}}function Yt(r){let e,s=r[13].label+"",t;return{c(){e=S("span"),t=Y(s)},l(l){e=E(l,"SPAN",{});var i=M(e);
21t=F(i,s),i.forEach(_)},m(l,i){D(l,e,i),v(e,t)},p(l,i){i&16&&s!==(s=l[13].label+"")&&pe(t,s)},d(l){l&&_(e)}}}function Gt(r){let e,s;return e=new be({props:{customCn:"-mt-16 w-80 "+(r[5]?"left-48":"left-12")+" fixed",step:9}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&32&&(i.customCn="-mt-16 w-80 "+(t[5]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function qt(r){let e,s;return e=new be({props:{customCn:"-mt-16 w-80 "+(r[5]?"left-48":"left-12")+" fixed",step:11}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&32&&(i.customCn="-mt-16 w-80 "+(t[5]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Jt(r){let e,s;return e=new be({props:{customCn:"-mt-16 w-80 "+(r[5]?"left-48":"left-12")+" fixed",step:13}}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},p(t,l){const i={};l&32&&(i.customCn="-mt-16 w-80 "+(t[5]?"left-48":"left-12")+" fixed"),e.$set(i)},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function Kt(r){let e=!r[13].role||r[13].role.includes(r[7].userRole),s,t,l=e&&Ft(r);return{c(){l&&l.c(),s=z()},l(i){l&&l.l(i),s=z()},m(i,n){l&&l.m(i,n),D(i,s,n),t=!0},p(i,n){n&144&&(e=!i[13].role||i[13].role.includes(i[7].userRole)),e?l?(l.p(i,n),n&144&&p(l,1)):(l=Ft(i),l.c(),p(l,1),l.m(s.parentNode,s)):l&&(O(),y(l,1,1,()=>{l=null}),U())},i(i){t||(p(l),t=!0)},o(i){y(l),t=!1},d(i){i&&_(s),l&&l.d(i)}}}function Es(r){let e,s,t,l,i,n,o;function a(u){r[12](u)}let f={label:r[3],showTrue:r[8],icon:r[2],url:r[1],sideWidth:r[5],onClick:r[9],onMouseEnter:r[10],onMouseLeave:r[11],extensionBell:!1,show:r[6],external:!1,bell:!1,moderationBell:!1,newsBell:!1,progressLevel:!1};r[0]!==void 0&&(f.mobShow=r[0]),s=new _l({props:f}),Ae.push(()=>Ve(s,"mobShow",a));const c=[Cs,ys],g=[];function d(u,m){return u[5]?0:1}return i=d(r),n=g[i]=c[i](r),{c(){e=S("div"),ee(s.$$.fragment),l=V(),n.c(),this.h()},l(u){e=E(u,"DIV",{class:!0});var m=M(e);Z(s.$$.fragment,m),l=P(m),n.l(m),m.forEach(_),this.h()},h(){k(e,"class","relative hover-me-dropdown-side-item svelte-ebdwvx")},m(u,m){D(u,e,m),Q(s,e,null),v(e,l),g[i].m(e,null),o=!0},p(u,[m]){const h={};m&8&&(h.label=u[3]),m&4&&(h.icon=u[2]),m&2&&(h.url=u[1]),m&32&&(h.sideWidth=u[5]),m&64&&(h.show=u[6]),!t&&m&1&&(t=!0,h.mobShow=u[0],Pe(()=>t=!1)),s.$set(h);let b=i;i=d(u),i===b?g[i].p(u,m):(O(),y(g[b],1,1,()=>{g[b]=null}),U(),n=g[i],n?n.p(u,m):(n=g[i]=c[i](u),n.c()),p(n,1),n.m(e,null))},i(u){o||(p(s.$$.fragment,u),p(n),o=!0)},o(u){y(s.$$.fragment,u),y(n),o=!1},d(u){u&&_(e),X(s),g[i].d()}}}function Ss(r,e,s){let t;ue(r,ge,b=>s(7,t=b));let{url:l,icon:i,label:n,subs:o,sideWidth:a,mobShow:f}=e,c=!1;const g=()=>s(6,c=!0),d=()=>{s(6,c=!c)},u=()=>{a||s(6,c=!0)},m=()=>{a||s(6,c=!1)};function h(b){f=b,s(0,f)}return r.$$set=b=>{"url"in b&&s(1,l=b.url),"icon"in b&&s(2,i=b.icon),"label"in b&&s(3,n=b.label),"subs"in b&&s(4,o=b.subs),"sideWidth"in b&&s(5,a=b.sideWidth),"mobShow"in b&&s(0,f=b.mobShow)},[f,l,i,n,o,a,c,t,g,d,u,m,h]}class Ds extends ve{constructor(e){super(),ke(this,e,Ss,Es,we,{url:1,icon:2,label:3,subs:4,sideWidth:5,mobShow:0})}}function Xt(r,e,s){const t=r.slice();return t[17]=e[s],t}function Qt(r,e,s){const t=r.slice();return t[20]=e[s],t}function Zt(r){let e,s=`<span class="text-left flex "><img class="h-6 pr-.5" src="${Le("/the-1.svg")}" alt="--"/> <span class="my-1 text-white text-xs ml-1">Schoolyard</span></span>`,t,l,i;return{c(){e=S("a"),e.innerHTML=s,this.h()},l(n){e=E(n,"A",{class:!0,href:!0,"data-svelte-h":!0}),re(e)!=="svelte-59zprm"&&(e.innerHTML=s),this.h()},h(){k(e,"class","px-8 flex flex-col justify-center lg:pb-2 text-tgds-blue-300 mr-0 whitespace-nowrap text-sm uppercase font-bold py-2 h-full lg:hover:bg-gray-900 transition-all"),k(e,"href","/")},m(n,o){D(n,e,o),i=!0},i(n){i||(n&&ce(()=>{i&&(l&&l.end(1),t=Te(e,De,{}),t.start())}),i=!0)},o(n){t&&t.invalidate(),n&&(l=Ue(e,De,{})),i=!1},d(n){n&&_(e),n&&l&&l.end()}}}function el(r){var l;let e,s,t=((l=r[17].items)==null?void 0:l.length)&&$s(r);return{c(){t&&t.c(),e=z()},l(i){t&&t.l(i),e=z()},m(i,n){t&&t.m(i,n),D(i,e,n),s=!0},p(i,n){var o;(o=i[17].items)!=null&&o.length&&t.p(i,n)},i(i){s||(p(t),s=!0)},o(i){y(t),s=!1},d(i){i&&_(e),t&&t.d(i)}}}function $s(r){let e,s,t=Se(r[17].items),l=[];for(let n=0;n<t.length;n+=1)l[n]=sl(Qt(r,t,n));const i=n=>y(l[n],1,1,()=>{l[n]=null});return{c(){for(let n=0;n<l.length;n+=1)l[n].c();e=z()},l(n){for(let o=0;o<l.length;o+=1)l[o].l(n);e=z()},m(n,o){for(let a=0;a<l.length;
21a+=1)l[a]&&l[a].m(n,o);D(n,e,o),s=!0},p(n,o){if(o&123){t=Se(n[17].items);let a;for(a=0;a<t.length;a+=1){const f=Qt(n,t,a);l[a]?(l[a].p(f,o),p(l[a],1)):(l[a]=sl(f),l[a].c(),p(l[a],1),l[a].m(e.parentNode,e))}for(O(),a=t.length;a<l.length;a+=1)i(a);U()}},i(n){if(!s){for(let o=0;o<t.length;o+=1)p(l[o]);s=!0}},o(n){l=l.filter(Boolean);for(let o=0;o<l.length;o+=1)y(l[o]);s=!1},d(n){n&&_(e),Oe(l,n)}}}function tl(r){let e=r[20].url!=="/progress"||ot(r[5]),s,t,l=e&&ll(r);return{c(){l&&l.c(),s=z()},l(i){l&&l.l(i),s=z()},m(i,n){l&&l.m(i,n),D(i,s,n),t=!0},p(i,n){n&32&&(e=i[20].url!=="/progress"||ot(i[5])),e?l?(l.p(i,n),n&32&&p(l,1)):(l=ll(i),l.c(),p(l,1),l.m(s.parentNode,s)):l&&(O(),y(l,1,1,()=>{l=null}),U())},i(i){t||(p(l),t=!0)},o(i){y(l),t=!1},d(i){i&&_(s),l&&l.d(i)}}}function ll(r){let e,s,t,l;const i=[Is,Ts],n=[];function o(a,f){return a[20].subs?0:a[20].url?1:-1}return~(e=o(r))&&(s=n[e]=i[e](r)),{c(){s&&s.c(),t=z()},l(a){s&&s.l(a),t=z()},m(a,f){~e&&n[e].m(a,f),D(a,t,f),l=!0},p(a,f){s&&s.p(a,f)},i(a){l||(p(s),l=!0)},o(a){y(s),l=!1},d(a){a&&_(t),~e&&n[e].d(a)}}}function Ts(r){var n;let e,s,t;function l(o){r[9](o)}let i={sideWidth:r[0],newsBell:r[3],moderationBell:r[4],extensionBell:(n=r[6])==null?void 0:n.extensionBell,external:r[20].external,onClick:r[20].onClick,onMouseEnter:r[20].onMouseEnter,onMouseLeave:r[20].onMouseLeave,show:r[20].show,showTrue:r[20].showTrue,bell:r[20].bell,progressLevel:r[20].progressLevel,url:r[20].url,icon:r[20].icon,selector:r[20].selector,label:r[20].label};return r[1]!==void 0&&(i.mobShow=r[1]),e=new _l({props:i}),Ae.push(()=>Ve(e,"mobShow",l)),{c(){ee(e.$$.fragment)},l(o){Z(e.$$.fragment,o)},m(o,a){Q(e,o,a),t=!0},p(o,a){var c;const f={};a&1&&(f.sideWidth=o[0]),a&8&&(f.newsBell=o[3]),a&16&&(f.moderationBell=o[4]),a&64&&(f.extensionBell=(c=o[6])==null?void 0:c.extensionBell),!s&&a&2&&(s=!0,f.mobShow=o[1],Pe(()=>s=!1)),e.$set(f)},i(o){t||(p(e.$$.fragment,o),t=!0)},o(o){y(e.$$.fragment,o),t=!1},d(o){X(e,o)}}}function Is(r){let e,s,t;function l(n){r[8](n)}let i={sideWidth:r[0],url:r[20].url,icon:r[20].icon,label:r[20].label,subs:r[20].subs};return r[1]!==void 0&&(i.mobShow=r[1]),e=new Ds({props:i}),Ae.push(()=>Ve(e,"mobShow",l)),{c(){ee(e.$$.fragment)},l(n){Z(e.$$.fragment,n)},m(n,o){Q(e,n,o),t=!0},p(n,o){const a={};o&1&&(a.sideWidth=n[0]),!s&&o&2&&(s=!0,a.mobShow=n[1],Pe(()=>s=!1)),e.$set(a)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){y(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function sl(r){let e=!r[20].role||r[20].role.includes(r[5].userRole),s,t,l=e&&tl(r);return{c(){l&&l.c(),s=z()},l(i){l&&l.l(i),s=z()},m(i,n){l&&l.m(i,n),D(i,s,n),t=!0},p(i,n){n&32&&(e=!i[20].role||i[20].role.includes(i[5].userRole)),e?l?(l.p(i,n),n&32&&p(l,1)):(l=tl(i),l.c(),p(l,1),l.m(s.parentNode,s)):l&&(O(),y(l,1,1,()=>{l=null}),U())},i(i){t||(p(l),t=!0)},o(i){y(l),t=!1},d(i){i&&_(s),l&&l.d(i)}}}function il(r){let e=!r[17].role||r[17].role.includes(r[5].userRole),s,t,l=e&&el(r);return{c(){l&&l.c(),s=z()},l(i){l&&l.l(i),s=z()},m(i,n){l&&l.m(i,n),D(i,s,n),t=!0},p(i,n){n&32&&(e=!i[17].role||i[17].role.includes(i[5].userRole)),e?l?(l.p(i,n),n&32&&p(l,1)):(l=el(i),l.c(),p(l,1),l.m(s.parentNode,s)):l&&(O(),y(l,1,1,()=>{l=null}),U())},i(i){t||(p(l),t=!0)},o(i){y(l),t=!1},d(i){i&&_(s),l&&l.d(i)}}}function Ls(r){let e,s,t,l,i="RTO No: 91706",n,o,a,f,c,g,d,u,m,h,b,I,w,T,W,B,x,C=r[0]&&Zt(),L=Se(kt.groups),N=[];for(let A=0;A<L.length;A+=1)N[A]=il(Xt(r,L,A));const G=A=>y(N[A],1,1,()=>{N[A]=null});return{c(){e=S("div"),C&&C.c(),s=V(),t=S("div"),l=S("div"),l.textContent=i,n=V(),o=S("div"),a=S("button"),f=S("i"),g=V(),d=S("div"),u=S("button"),m=S("i"),I=V(),w=S("ul");for(let A=0;A<N.length;A+=1)N[A].c();this.h()},l(A){e=E(A,"DIV",{class:!0});var R=M(e);C&&C.l(R),R.forEach(_),s=P(A),t=E(A,"DIV",{class:!0});var $=M(t);l=E($,"DIV",{class:!0,"data-svelte-h":!0}),re(l)!=="svelte-1kdzccc"&&(l.textContent=i),n=P($),o=E($,"DIV",{class:!0});var le=M(o);a=E(le,"BUTTON",{class:!0,type:!0});var j=M(a);f=E(j,"I",{class:!0}),M(f).forEach(_),j.forEach(_),le.forEach(_),$.forEach(_),g=P(A),d=E(A,"DIV",{class:!0,style:!0});var q=M(d);u=E(q,"BUTTON",{type:!0,class:!0});var H=M(u);m=E(H,"I",{class:!0}),M(m).forEach(_),H.forEach(_),I=P(q),w=E(q,"UL",{class:!0});var J=M(w);for(let te=0;te<N.length;te+=1)N[te].l(J);J.forEach(_),q.forEach(_),this.h()},h(){k(e,"class","lg:w-full lg:h-12 lg:bg-tgds-blue-500"),k(l,"class","text-xs text-white text-center font-normal lg:hidden transition-all"),k(f,"class",c="fas "+(r[1]?"fa-times":"fa-bars")),k(a,"class","cursor-pointer text-white text-sm lg:hidden px-3 py-2 text-l leading-none lg:bg-tgds-blue-500 transparent roun
21ded bg-gray-900 mx-4 my-2.5 w-10 "),k(a,"type","button"),k(o,"class",""),k(t,"class","flex items-center"),k(m,"class",h="fas "+(r[0]?"fa-chevron-left":"fa-chevron-right")+" my-1.5"),k(u,"type","button"),k(u,"class",b="cursor-pointer text-white "+(r[0]?"text-right":"")+" text-xs px-3 transition-all py-3 hover:text-tgds-yellow-500 leading-none bg-transparent bg-tgds-blue-700 hidden lg:block"),k(w,"class","lg:flex-col lg:min-w-full flex flex-col list-none"),k(d,"class",T="lg:flex lg:flex-col lg:items-stretch lg:opacity-100 lg:relative fixed top-0 left-0 right-0 h-auto items-center flex-1 transition-all mob-menu-set "+(r[1]?"mob-menu-show":"")+" svelte-p0jhli"),Ie(d,"z-index","9999")},m(A,R){D(A,e,R),C&&C.m(e,null),D(A,s,R),D(A,t,R),v(t,l),v(t,n),v(t,o),v(o,a),v(a,f),D(A,g,R),D(A,d,R),v(d,u),v(u,m),v(d,I),v(d,w);for(let $=0;$<N.length;$+=1)N[$]&&N[$].m(w,null);W=!0,B||(x=[he(a,"click",r[7]),he(u,"click",function(){Xe(r[2])&&r[2].apply(this,arguments)})],B=!0)},p(A,[R]){if(r=A,r[0]?C?R&1&&p(C,1):(C=Zt(),C.c(),p(C,1),C.m(e,null)):C&&(O(),y(C,1,1,()=>{C=null}),U()),(!W||R&2&&c!==(c="fas "+(r[1]?"fa-times":"fa-bars")))&&k(f,"class",c),(!W||R&1&&h!==(h="fas "+(r[0]?"fa-chevron-left":"fa-chevron-right")+" my-1.5"))&&k(m,"class",h),(!W||R&1&&b!==(b="cursor-pointer text-white "+(r[0]?"text-right":"")+" text-xs px-3 transition-all py-3 hover:text-tgds-yellow-500 leading-none bg-transparent bg-tgds-blue-700 hidden lg:block"))&&k(u,"class",b),R&123){L=Se(kt.groups);let $;for($=0;$<L.length;$+=1){const le=Xt(r,L,$);N[$]?(N[$].p(le,R),p(N[$],1)):(N[$]=il(le),N[$].c(),p(N[$],1),N[$].m(w,null))}for(O(),$=L.length;$<N.length;$+=1)G($);U()}(!W||R&2&&T!==(T="lg:flex lg:flex-col lg:items-stretch lg:opacity-100 lg:relative fixed top-0 left-0 right-0 h-auto items-center flex-1 transition-all mob-menu-set "+(r[1]?"mob-menu-show":"")+" svelte-p0jhli"))&&k(d,"class",T)},i(A){if(!W){p(C);for(let R=0;R<L.length;R+=1)p(N[R]);W=!0}},o(A){y(C),N=N.filter(Boolean);for(let R=0;R<N.length;R+=1)y(N[R]);W=!1},d(A){A&&(_(e),_(s),_(t),_(g),_(d)),C&&C.d(),Oe(N,A),B=!1,He(x)}}}function Ns(r,e,s){let t,l;ue(r,ge,W=>s(5,t=W)),ue(r,xe,W=>s(6,l=W));let{sideWidth:i,toggleDesktopSideWidth:n,mobShow:o}=e;const a=["head-tutor","tutor","webmaster"];let f,c,g,d,u,m;const h=()=>{o?s(1,o=!1):(s(1,o=!0),s(0,i=!0))},b=async()=>{const W=await Ge(t,{action:"get_user_meta",metaKey:"has-viewed-news"});W.response?f=W.response:(f=new Date(new Date().getFullYear(),0,1),window.location.href.includes("/news/tutors")&&setTimeout(()=>{f=new Date},5e3)),c=(await Ge(t,{action:"get_news"},[])).response||[],c=c.filter(x=>x.tutorImportant&&(f?_e(x.newsDate)>_e(f):!0)),c.length&&s(3,g=!0)},I=async()=>{const W=await Ge(t,{action:"get_user_meta",metaKey:"last-viewed-moderation"});W.response?d=W.response:(d=new Date(new Date().getFullYear(),0,1),window.location.href.includes("/moderation")&&setTimeout(()=>{d=new Date},5e3)),u=(await Ge(t,{action:"get_moderation_list"},[])).response||[],u=u.filter(x=>d?_e(x.mint)>_e(d):!0),u.length&&s(4,m=!0)};$e(()=>{a.includes(t.userRole)&&b()&&I()});function w(W){o=W,s(1,o)}function T(W){o=W,s(1,o)}return r.$$set=W=>{"sideWidth"in W&&s(0,i=W.sideWidth),"toggleDesktopSideWidth"in W&&s(2,n=W.toggleDesktopSideWidth),"mobShow"in W&&s(1,o=W.mobShow)},[i,o,n,g,m,t,l,h,w,T]}class Ms extends ve{constructor(e){super(),ke(this,e,Ns,Ls,we,{sideWidth:0,toggleDesktopSideWidth:2,mobShow:1})}}function rl(r){let e,s;return e=new Ql({}),{c(){ee(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,l){Q(e,t,l),s=!0},i(t){s||(p(e.$$.fragment,t),s=!0)},o(t){y(e.$$.fragment,t),s=!1},d(t){X(e,t)}}}function nl(r){let e,s,t;function l(n){r[6](n)}let i={sideWidth:r[3],toggleDesktopSideWidth:yl};return r[1]!==void 0&&(i.mobShow=r[1]),e=new Ms({props:i}),Ae.push(()=>Ve(e,"mobShow",l)),{c(){ee(e.$$.fragment)},l(n){Z(e.$$.fragment,n)},m(n,o){Q(e,n,o),t=!0},p(n,o){const a={};o&8&&(a.sideWidth=n[3]),!s&&o&2&&(s=!0,a.mobShow=n[1],Pe(()=>s=!1)),e.$set(a)},i(n){t||(p(e.$$.fragment,n),t=!0)},o(n){y(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Bs(r){let e,s="RTO No: 91706",t;return{c(){e=S("div"),e.textContent=s,this.h()},l(l){e=E(l,"DIV",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-1fka5r1"&&(e.textContent=s),this.h()},h(){k(e,"class","check-height text-xs text-tgds-yellow-500 text-center hidden lg:block absolute font-normal transition-all origin-center -left-1/2 bottom-12 w-24 rotate-90 svelte-m1kfw2")},m(l,i){D(l,e,i)},i(l){l&&(t||ce(()=>{t=Te(e,De,{}),t.start()}))},o:ae,d(l){l&&_(e)}}}function Ws(r){let e,s="RTO No: 91706",t;return{c(){e=S("div"),e.textContent=s,this.h()},l(l){e=E(l,"DIV",{class:!0,"data-svelte-h":!0}),re(e)!=="svelte-kjiyzj"&&(e.textContent=s),this.h()},h(){k(e,"class","text-xs text-white w-full py-2 text-center hidden lg:block font-normal transition-all origin-center")},m(l,i){D(l,e,i)},i(l){l&&(t||ce(()=>{t=Te(e,Ne,{}),t.start()}))},o:ae,d(l){l&&_(e)}}}function ol(r){let e,s,t=`<span class="flex "><img class="h-5 pr-.5" src="${Le("/the-1.svg")}" alt="--"/> <span class="my-0.5 text-white text-xs ml-1">Schoolyard</span></span>`,l,i;return{c(){e=S("div"),s=S("a"),s.innerHTML=t,this.h()},l(n){e=E(n,"DIV",{class:!0});var o=M(e);s=E(o,"A",{class:!0,style:!0,href:!0,"data-svelte-h":!0}),re(s)!=="svelte-11jjp8"&&(s.innerHTML=t),o.forEach(_),this.h()},h(){k(s,"class","px-4 whitespace-nowrap text-sm uppercase font-bold py-1.5 hover:bg-gray-900 transition-all"),Ie(s,"transform","translateX(-3rem)"),k(s,"href",Le()),k(e,"class","lg:flex lg:flex-col lg:justify-center hidden items-center")},m(n,o){D(n,e,o),v(e,s),i=!0},i(n){i||(n&&ce(()=>
21{i&&(l||(l=fe(s,De,{},!0)),l.run(1))}),i=!0)},o(n){n&&(l||(l=fe(s,De,{},!1)),l.run(0)),i=!1},d(n){n&&_(e),n&&l&&l.end()}}}function xs(r){var j,q;let e,s=((j=r[2])==null?void 0:j.extensionBell)&&((q=r[2].extensionData)==null?void 0:q.daysUntilLimit)<0&&!ye.url.pathname.includes("/accounts/purchase-extension"),t,l,i,n,o,a,f,c,g,d,u,m,h,b,I,w,T,W,B,x,C=s&&rl(),L=r[0]&&nl(r);function N(H,J){return H[3]?Ws:Bs}let G=N(r),A=G(r),R=!r[3]&&ol();b=new is({});const $=r[5].default,le=fl($,r,r[4],null);return B=new Bl({}),{c(){e=S("main"),C&&C.c(),t=V(),l=S("nav"),i=S("div"),L&&L.c(),o=V(),A.c(),a=V(),f=S("section"),c=S("nav"),R&&R.c(),g=V(),d=S("div"),u=V(),m=S("div"),h=S("div"),ee(b.$$.fragment),I=V(),w=S("div"),le&&le.c(),W=V(),ee(B.$$.fragment),this.h()},l(H){e=E(H,"MAIN",{id:!0,class:!0});var J=M(e);C&&C.l(J),t=P(J),l=E(J,"NAV",{id:!0,class:!0});var te=M(l);i=E(te,"DIV",{class:!0});var Ee=M(i);L&&L.l(Ee),Ee.forEach(_),o=P(te),A.l(te),te.forEach(_),a=P(J),f=E(J,"SECTION",{id:!0,class:!0,style:!0});var Ce=M(f);c=E(Ce,"NAV",{id:!0,class:!0});var me=M(c);R&&R.l(me),g=P(me),d=E(me,"DIV",{class:!0}),M(d).forEach(_),u=P(me),m=E(me,"DIV",{class:!0});var Be=M(m);h=E(Be,"DIV",{class:!0});var Re=M(h);Z(b.$$.fragment,Re),Re.forEach(_),Be.forEach(_),me.forEach(_),I=P(Ce),w=E(Ce,"DIV",{id:!0,class:!0,style:!0});var se=M(w);le&&le.l(se),se.forEach(_),Ce.forEach(_),W=P(J),Z(B.$$.fragment,J),J.forEach(_),this.h()},h(){k(i,"class",n=(r[3]?"lg:w-48 overflow-x-hidden":"lg:w-12 ")+" flex lg:block justify-between flex-1"),k(l,"id","sidebar"),k(l,"class","top-0 bg-tgds-blue-600 lg:left-0 lg:flex lg:flex-col lg:fixed lg:top-0 lg:bottom-0 flex-row lg:flex-nowrap shadow-xl flex flex-wrap items-center justify-between transition-all z-10 svelte-m1kfw2"),k(d,"class","flex-1"),k(h,"class","flex-row items-center hidden lg:flex"),k(m,"class","mx-auto items-center flex justify-end lg:flex-nowrap flex-wrap "),k(c,"id","desktop-header"),k(c,"class","hidden lg:flex lg:sticky top-0 left-0 w-full z-10 lg:flex-row lg:flex-nowrap lg:justify-start items-center bg-tgds-blue-500"),k(w,"id","page-body"),k(w,"class","flex flex-col min-h-full "),Ie(w,"flex","1"),k(f,"id","page-container"),k(f,"class",T="relative "+(r[3]?"lg:ml-48":"lg:ml-12")+" flex flex-col transition-all "+(r[1]?"-translate-x-full lg:transform-none":"")),Ie(f,"flex","1"),k(e,"id","main"),k(e,"class","relative ")},m(H,J){D(H,e,J),C&&C.m(e,null),v(e,t),v(e,l),v(l,i),L&&L.m(i,null),v(l,o),A.m(l,null),v(e,a),v(e,f),v(f,c),R&&R.m(c,null),v(c,g),v(c,d),v(c,u),v(c,m),v(m,h),Q(b,h,null),v(f,I),v(f,w),le&&le.m(w,null),v(e,W),Q(B,e,null),x=!0},p(H,[J]){var te,Ee;J&4&&(s=((te=H[2])==null?void 0:te.extensionBell)&&((Ee=H[2].extensionData)==null?void 0:Ee.daysUntilLimit)<0&&!ye.url.pathname.includes("/accounts/purchase-extension")),s?C?J&4&&p(C,1):(C=rl(),C.c(),p(C,1),C.m(e,t)):C&&(O(),y(C,1,1,()=>{C=null}),U()),H[0]?L?(L.p(H,J),J&1&&p(L,1)):(L=nl(H),L.c(),p(L,1),L.m(i,null)):L&&(O(),y(L,1,1,()=>{L=null}),U()),(!x||J&8&&n!==(n=(H[3]?"lg:w-48 overflow-x-hidden":"lg:w-12 ")+" flex lg:block justify-between flex-1"))&&k(i,"class",n),G!==(G=N(H))&&(A.d(1),A=G(H),A&&(A.c(),p(A,1),A.m(l,null))),H[3]?R&&(O(),y(R,1,1,()=>{R=null}),U()):R?J&8&&p(R,1):(R=ol(),R.c(),p(R,1),R.m(c,g)),le&&le.p&&(!x||J&16)&&ul(le,$,H,H[4],x?dl($,H[4],J,null):cl(H[4]),null),(!x||J&10&&T!==(T="relative "+(H[3]?"lg:ml-48":"lg:ml-12")+" flex flex-col transition-all "+(H[1]?"-translate-x-full lg:transform-none":"")))&&k(f,"class",T)},i(H){x||(p(C),p(L),p(A),p(R),p(b.$$.fragment,H),p(le,H),p(B.$$.fragment,H),x=!0)},o(H){y(C),y(L),y(R),y(b.$$.fragment,H),y(le,H),y(B.$$.fragment,H),x=!1},d(H){H&&_(e),C&&C.d(),L&&L.d(),A.d(),R&&R.d(),X(b),le&&le.d(H),X(B)}}}function As(r,e,s){let t,l,i;ue(r,ge,c=>s(0,t=c)),ue(r,xe,c=>s(2,l=c)),ue(r,qe,c=>s(3,i=c));let{$$slots:n={},$$scope:o}=e,a=!1;$e(async()=>{await Qe.getItem("sideWidth")==="true"?qe.update(()=>!0):qe.update(()=>!1)});function f(c){a=c,s(1,a)}return r.$$set=c=>{"$$scope"in c&&s(4,o=c.$$scope)},r.$$.update=()=>{r.$$.dirty&1&&t&&xe.checkForUser(t)},[t,a,l,i,o,n,f]}class Ps extends ve{constructor(e){super(),ke(this,e,As,xs,we,{})}}function al(r){let e,s,t,l;e=new Ps({props:{$$slots:{default:[Vs]},$$scope:{ctx:r}}});let i=vl;return{c(){ee(e.$$.fragment),s=V(),t=z()},l(n){Z(e.$$.fragment,n),s=P(n),t=z()},m(n,o){Q(e,n,o),D(n,s,o),D(n,t,o),l=!0},p(n,o){const a={};o&8&&(a.$$scope={dirty:o,ctx:n}
21),e.$set(a)},i(n){l||(p(e.$$.fragment,n),p(i),l=!0)},o(n){y(e.$$.fragment,n),y(i),l=!1},d(n){n&&(_(s),_(t)),X(e,n)}}}function Vs(r){let e;const s=r[2].default,t=fl(s,r,r[3],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,i){t&&t.m(l,i),e=!0},p(l,i){t&&t.p&&(!e||i&8)&&ul(t,s,l,l[3],e?dl(s,l[3],i,null):cl(l[3]),null)},i(l){e||(p(t,l),e=!0)},o(l){y(t,l),e=!1},d(l){t&&t.d(l)}}}function Rs(r){var n;let e,s,t,l,i=((n=r[0])==null?void 0:n.userId)&&al(r);return{c(){e=S("link"),s=V(),i&&i.c(),t=z(),this.h()},l(o){const a=gl("svelte-1i4u8in",document.head);e=E(a,"LINK",{rel:!0,href:!0}),a.forEach(_),s=P(o),i&&i.l(o),t=z(),this.h()},h(){k(e,"rel","icon"),k(e,"href",Le("/favicon.png"))},m(o,a){v(document.head,e),D(o,s,a),i&&i.m(o,a),D(o,t,a),l=!0},p(o,[a]){var f;(f=o[0])!=null&&f.userId?i?(i.p(o,a),a&1&&p(i,1)):(i=al(o),i.c(),p(i,1),i.m(t.parentNode,t)):i&&(O(),y(i,1,1,()=>{i=null}),U())},i(o){l||(p(i),l=!0)},o(o){y(i),l=!1},d(o){o&&(_(s),_(t)),_(e),i&&i.d(o)}}}function js(r,e,s){let t;ue(r,ge,o=>s(0,t=o));let{$$slots:l={},$$scope:i}=e,{params:n={}}=e;return $e(async()=>await kl()?Tl({}):tt("/login")),r.$$set=o=>{"params"in o&&s(1,n=o.params),"$$scope"in o&&s(3,i=o.$$scope)},[t,n,l,i]}class di extends ve{constructor(e){super(),ke(this,e,js,Rs,we,{params:1})}}export{di as component};
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.