PageSourceSearch

https://masterymind.co.uk/_next/static/chunks/app/layout-afa6c0c4c02dbf9b.js

js masterymind.co.uk collected 2026-10-07 01:58:09 UTC 24,556 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{3010:(e,t,r)=>{"use strict";r.d(t,{AnalyticsScripts:()=>c});var a=r(95155),n=r(20063),o=r(20687),s=r(68321),i=r(76784);let l=["/admin","/school-admin","/teacher"],d=["/assignments","/blurt","/dashboard","/exam","/exams","/friends","/interleaved-builder","/leaderboard","/learn","/mind-gym","/nea-coach","/onboarding","/podcasts","/profile","/quick-start","/quiz","/review","/settings","/stats","/subscription","/wrong-answers"];function c(e){let{gaMeasurementId:t}=e,r=(0,n.usePathname)(),c=function(){if("undefined"==typeof document)return;let e=document.querySelector("script[nonce]");return(null==e?void 0:e.nonce)||void 0}(),u=e=>!!r&&e.some(e=>r===e||r.startsWith("".concat(e,"/")));if(u(l))return null;let f=u(d);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("script",{"data-mm-consent-bootstrap":"",dangerouslySetInnerHTML:{__html:o.Sz}}),!f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.default,{src:"https://www.googletagmanager.com/gtag/js?id=AW-17890776600",strategy:"lazyOnload",nonce:c}),(0,a.jsx)(s.default,{id:"gtag-init",strategy:"lazyOnload",nonce:c,children:"".concat(o.Sz,"\n          (function () {\n            var h = window.location.hostname;\n            if (h === 'localhost' || h === '127.0.0.1' || h.endsWith('.local')) return;\n            var p = window.location.pathname;\n            if (p.startsWith('/admin') || p.startsWith('/school-admin') || p.startsWith('/teacher')) return;\n            window.dataLayer = window.dataLayer || [];\n            function gtag(){dataLayer.push(arguments);}\n            gtag('js', new Date());\n            gtag('config', 'AW-17890776600');\n          })();\n        ")})]}),t&&(0,a.jsx)(i.GoogleAnalytics,{gaId:t,nonce:c})]})}},4707:(e,t,r)=>{"use strict";r.d(t,{TD:()=>d,TK:()=>u,tH:()=>f});var a=r(95155),n=r(12115),o=r(3998),s=r(89559),i=r(67547),l=r(41444);function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(!function(e){var t;if(!e)return!1;let r=null!=(t=e.message)?t:"";return"ChunkLoadError"===e.name||r.includes("Failed to fetch dynamically imported module")||r.includes("Loading chunk")||r.includes("Loading CSS chunk")}(e))return!1;try{let e=Number(sessionStorage.getItem("chunk_reload_attempted_at")||0);if(e&&t-e<=6e4)return!1;sessionStorage.setItem("chunk_reload_attempted_at",String(t))}catch(e){return!1}return window.location.reload(),!0}let c=["/admin","/assignments","/blurt","/dashboard","/exam","/exams","/friends","/interleaved-builder","/leaderboard","/learn","/mind-gym","/nea-coach","/onboarding","/podcasts","/profile","/quick-start","/quiz","/review","/school-admin","/settings","/stats","/subscription","/teacher","/wrong-answers"];function u(e,t){let r=e||"/",a=c.some(e=>r===e||r.startsWith("".concat(e,"/")));return!0===t||void 0===t&&a?{href:"/dashboard",label:"Back to my dashboard"}:{href:"/",label:"Back to the home page"}}class f extends n.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){var r,a,n;if(d(e))return;let o=this.props.context?"ErrorBoundary:".concat(this.props.context):"ErrorBoundary";l.v.error("[".concat(o,"] Caught error:"),{error:e,componentStack:t.componentStack}),t.componentStack&&l.v.error("[".concat(o,"] Component stack:"),{componentStack:t.componentStack}),this.setState({componentStack:null!=(n=t.componentStack)?n:void 0}),null==(r=(a=this.props).onError)||r.call(a,e,t)}render(){var e;if(!this.state.hasError)return this.props.children;if(this.props.fallback)return this.props.fallback;let t=u(null==(e=window.location)?void 0:e.pathname);return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[200px] p-6 gap-4 rounded-lg border border-destructive/30 bg-destructive/5",children:[(0,a.jsx)(i.FoxMascot,{mood:"concerned",motion:"setback",size:72}),(0,a.jsxs)("div",{className:"text-center space-y-1",children:[(0,a.jsx)("h3",{className:"font-semibold text-lg",children:"Something went wrong"}),(0,a.jsxs)("p",{className:"text-sm text-muted-foreground max-w-md",children:[this.props.context?"Something went wrong in the ".concat(this.props.context," section."):"Something went wrong here."," ","Nothing you have already answered is lost."]})]}),!1,(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 justify-center",children:[(0,a.jsx)(o.$,{asChild:!0,children:(0,a.jsx)("a",{href:t.href,children:t.label})}),(0,a.jsxs)(o.$,{variant:"outline",onClick:this.handleRetry,children:[(0,a.jsx)(s.A,{className:"mr-2 h-4 w-4"}),"Try again"]}),(0,a.jsx)(o.$,{variant:"ghost",onClick:()=>window.location.reload(),children:"Reload the page"})]})]})}constructor(...e){super(...e),this.state={hasError:!1},this.handleRetry=()=>{this.setState({hasError:!1,error:void 0,componentStack:void 0})}}}},15894:(e,t,r)=>{"use strict";r.d(t,{dj:()=>u});var a=r(12115);let n=0,o=new Map,s=e=>{if(o.has(e))return;let t=setTimeout(()=>{o.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);o.set(e,t)},i=[],l={toasts:[]};function d(e){l=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;
1return r?s(r):e.toasts.forEach(e=>{s(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(l,e),i.forEach(e=>{e(l)})}function c(e){let{...t}=e,r=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:r});return d({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||a()}}}),{id:r,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function u(){let[e,t]=a.useState(l);return a.useEffect(()=>(i.push(t),()=>{let e=i.indexOf(t);e>-1&&i.splice(e,1)}),[e]),{...e,toast:c,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},20687:(e,t,r)=>{"use strict";r.d(t,{Sz:()=>i,rI:()=>l});var a=r(79950);a.p;let n=["ad_storage","ad_user_data","ad_personalization","analytics_storage"],o=n.map(e=>"".concat(e,": 'denied'")).join(", "),s=n.map(e=>"".concat(e,": 'granted'")).join(", "),i="\n(function () {\n  if (window.__mmConsentInitialised) return;\n  window.__mmConsentInitialised = true;\n  window.dataLayer = window.dataLayer || [];\n  function gtag() { window.dataLayer.push(arguments); }\n  if (typeof window.gtag !== 'function') { window.gtag = gtag; }\n  window.gtag('consent', 'default', { ".concat(o,", functionality_storage: 'granted', security_storage: 'granted', wait_for_update: 500 });\n  window.gtag('set', 'ads_data_redaction', true);\n  window.gtag('set', 'url_passthrough', true);\n  try {\n    if (window.localStorage.getItem('").concat(a.p,"') === 'granted') {\n      window.gtag('consent', 'update', { ").concat(s," });\n      window.gtag('set', 'ads_data_redaction', false);\n    }\n  } catch (e) { /* storage blocked — stay denied */ }\n})();\n"),l={attribute:"class",defaultTheme:"system",enableSystem:!0,storageKey:"theme"}},20748:(e,t,r)=>{"use strict";r.d(t,{Ci:()=>o,DE:()=>s,EH:()=>i,JT:()=>f,O_:()=>l,Se:()=>d,Wd:()=>u,eg:()=>a,lx:()=>c});let a={due_review:"Due for review",untouched:"Not started",stale:"Fading",weak:"Needs work",consolidate:"Almost there",prove_it:"Prove it",maintain:"Keep sharp"},n={due_review:"You're about to forget this",untouched:"A new learning point",stale:"You haven't practised this in a while",weak:"Your weakest topic right now",consolidate:"Nearly locked in",prove_it:"Time to prove you own this",maintain:"Keeping this sharp"};function o(e,t){return"stale"===e&&null!=t&&t>0?"You last saw this ".concat(t," ").concat(1===t?"day":"days"," ago"):n[e]}let s={review:"Review",quiz:"Quiz",blurt:"Blurt",exam_question:"Exam question",interleaved:"Mixed practice"};function i(e){return Math.max(1,Math.round(30*e/60))}let l=5,d=5,c=7,u="".concat(c," days Premium \xb7 Then free forever \xb7 No card, no charge"),f="".concat(c," days of Premium free \xb7 No card required")},27840:(e,t,r)=>{"use strict";r.d(t,{ConsentBanner:()=>d});var a=r(95155),n=r(12115),o=r(52619),s=r.n(o),i=r(3998),l=r(79950);function d(){let[e,t]=(0,n.useState)(null);if((0,n.useEffect)(()=>{t(null===function(){try{let e=window.localStorage.getItem(l.p);return"granted"===e||"denied"===e?e:null}catch(e){return null}}())},[]),!1===e)return null;let r=e=>{try{window.localStorage.setItem(l.p,e)}catch(e){}try{let t=window;t.dataLayer=t.dataLayer||[],"function"!=typeof t.gtag&&(t.gtag=function(){t.dataLayer.push(arguments)});let r="granted"===e?"granted":"denied";t.gtag("consent","update",{ad_storage:r,ad_user_data:r,ad_personalization:r,analytics_storage:r}),t.gtag("set","ads_data_redaction","granted"!==e)}catch(e){}t(!1)};return(0,a.jsx)("div",{role:"region","aria-label":"Cookies on MasteryMind","aria-describedby":"consent-banner-description",className:"consent-banner fixed inset-x-0 bottom-0 z-[60] max-h-dvh overflow-y-auto overscroll-contain [overflow-wrap:anywhere] border-t border-border bg-card px-4 pb-safe pt-4 shadow-lg sm:px-6",children:(0,a.jsxs)("div",{className:"mx-auto flex max-w-4xl flex-wrap items-center justify-between gap-4 pb-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 basis-72 space-y-1",children:[(0,a.jsx)("h2",{className:"text-xs font-semibold text-foreground",children:"Cookies on MasteryMind"}),(0,a.jsxs)("div",{id:"consent-banner-description",className:"space-y-0.5 text-xs text-muted-foreground",children:[(0,a.jsx)("p",{children:"Essential cookies keep you signed in."}),(0,a.jsx)("p",{children:"Analytics and advertising cookies stay off unless you accept."}),(0,a.jsxs)("p",{children:[(0,a.jsx)(s(),{href:"/privacy",className:"underline underline-offset-4 hover:text-foreground",children:"Read our Privacy Policy"}),"."]})]})]}),(0,a.jsxs)("div",{className:"flex w-full min-w-0 max-w-full flex-wrap gap-2 sm:w-auto",children:[(0,a.jsx)(i.$,{type:"button",variant:"outline",className:"h-auto min-h-11 min-w-0 flex-1 basis-4
10 whitespace-normal py-3 sm:flex-none sm:basis-auto sm:px-6",onClick:()=>r("denied"),children:"Only essential"}),(0,a.jsx)(i.$,{type:"button",className:"h-auto min-h-11 min-w-0 flex-1 basis-40 whitespace-normal py-3 sm:flex-none sm:basis-auto sm:px-6",onClick:()=>r("granted"),children:"Accept"})]})]})})}},46767:(e,t,r)=>{"use strict";r.d(t,{Bc:()=>i,ZI:()=>c,k$:()=>d,m_:()=>l});var a=r(95155),n=r(12115),o=r(47520),s=r(64269);let i=o.Kq,l=o.bL,d=o.l9,c=n.forwardRef((e,t)=>{let{className:r,sideOffset:n=4,...i}=e;return(0,a.jsx)(o.UC,{ref:t,sideOffset:n,className:(0,s.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r),...i})});c.displayName=o.UC.displayName},54984:(e,t,r)=>{"use strict";r.d(t,{uk:()=>p,XI:()=>h});var a=r(95155),n=r(16975),o=r(12115),s=r(52739),i=r(79156);function l(e,t){return t?e.abortSignal(t):e}let d={async getUserRolesAndSchool(e,t){var r,a,n,o;let[s,d,c]=await Promise.all([l(i.N.from("user_roles").select("role").eq("user_id",e),t),l(i.N.from("profiles").select("school_id").eq("id",e),t).maybeSingle(),l(i.N.from("schools").select("id").eq("admin_user_id",e).order("created_at",{ascending:!1}).limit(1),t)]);for(let e of[s,d,c])if(e.error)throw e.error;let u=(s.data||[]).map(e=>e.role),f=u.includes("teacher"),m=u.includes("admin"),p=null!=(o=null==(a=c.data)||null==(r=a[0])?void 0:r.id)?o:null,h=p||(null==(n=d.data)?void 0:n.school_id)||null;return{isTeacher:f||m,isAdmin:m,isSchoolAdmin:!!p,schoolId:h}}};var c=r(53120),u=r(98133);let f={isTeacher:!1,isAdmin:!1,isSchoolAdmin:!1,schoolId:null},m=(0,o.createContext)(void 0);function p(e){var t,r;let{children:i}=e,{user:l,session:p,loading:h}=(0,s.A)(),g=null!=(t=null==l?void 0:l.id)?t:null,v=null!=(r=null==p?void 0:p.access_token)?r:null,w=(0,o.useMemo)(()=>({userId:g,token:v}),[g,v]),x=(0,o.useRef)(w);x.current=w;let b=(0,o.useRef)(null),[y,_]=(0,o.useState)(null),j=(0,o.useCallback)(async()=>{var e;if(x.current!==w)return;null==(e=b.current)||e.abort();let t=new AbortController;if(b.current=t,_({owner:w,roles:f,loading:!!w.userId}),w.userId)try{let e=await (0,c.dK)(e=>d.getUserRolesAndSchool(w.userId,e),t.signal);if(x.current!==w||t.signal.aborted)return;_({owner:w,roles:e,loading:!1})}catch(e){if(x.current!==w||t.signal.aborted)return;(0,u.b)(e)?(0,n.cY)("Role","Transient error checking roles:",(0,u.M)(e)):(0,n.AO)("Role","Failed to check roles:",e),_({owner:w,roles:f,loading:!1})}},[w]);(0,o.useEffect)(()=>(h||j(),()=>{var e;null==(e=b.current)||e.abort()}),[h,j]);let S=(null==y?void 0:y.owner)===w?y:null,N=(0,o.useMemo)(()=>{var e,t;return{...null!=(e=null==S?void 0:S.roles)?e:f,loading:h||(null!=(t=null==S?void 0:S.loading)?t:!!g),refreshRoles:j}},[S,h,g,j]);return(0,a.jsx)(m.Provider,{value:N,children:i})}function h(){let e=(0,o.useContext)(m);if(void 0===e)throw Error("useRoleContext must be used within a RoleProvider");return e}},79950:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});let a="mm_cookie_consent"},84517:(e,t,r)=>{"use strict";r.d(t,{o:()=>p,s:()=>g});var a=r(95155),n=r(16975),o=r(12115),s=r(52739),i=r(79156);let l=(e,t)=>Object.entries(t).every(t=>{let[r,a]=t;return"trial_started_at"===r&&null!==a?"string"==typeof e.trial_started_at&&Number.isFinite(Date.parse(e.trial_started_at)):e[r]===a}),d=()=>({error:Error("We couldn’t confirm your save. Check its status before continuing."),outcome:"uncertain"});var c=r(50205),u=r(98133),f=r(53120);let m=(0,o.createContext)(void 0);function p(e){var t;let{children:r}=e,{user:n}=(0,s.A)();return(0,a.jsx)(h,{children:r},null!=(t=null==n?void 0:n.id)?t:"signed-out")}function h(e){let{children:t}=e,{user:r}=(0,s.A)(),[p,h]=(0,o.useState)(null),[g,v]=(0,o.useState)(!0),[w,x]=(0,o.useState)(!1),[b,y]=(0,o.useState)(!1),_=(0,o.useRef)(null),j=(0,o.useRef)(null),S=(0,o.useRef)(null),[N,k]=(0,o.useState)(!1),[E,A]=(0,o.useState)([]),C=(0,o.useRef)(null),P=(0,o.useRef)(!0),R=(0,o.useRef)(0);(0,o.useEffect)(()=>(P.current=!0,()=>{var e,t;P.current=!1,R.current+=1,null==(e=S.current)||e.abort(),null==(t=j.current)||t.abort()}),[]);let T=(0,o.useCallback)(async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;try{if(t.aborted)throw new DOMException("Read cancelled","AbortError");let{data:r,error:a}=await i.N.from("profiles").select("*").eq("id",e).abortSignal(t).maybeSingle();if(a)throw a;return{data:r,notFound:!r}}catch(a){if(t.aborted)throw new DOMException("Read cancelled","AbortError");
1if(r<3&&(0,u.b)(a))return(0,n.cY)("UserProfile","Transient error fetching profile (attempt ".concat(r+1,"/4), retrying..."),a),await new Promise(e=>setTimeout(e,1e3*(r+1))),T(e,t,r+1);return(0,u.b)(a)?(0,n.cY)("UserProfile","Network or transient auth state when fetching profile:",(0,u.M)(a)):(0,n.AO)("UserProfile","Error fetching profile:",a),{data:null,notFound:!1}}},[]),O=(0,o.useCallback)(async(e,t,r)=>{if(!e||!t)return!1;try{(0,n.cY)("UserProfile","Ensuring profile row exists for:",e);let a=(null==r?void 0:r.display_name)||(null==r?void 0:r.full_name)||(null==r?void 0:r.name)||t.split("@")[0],{error:o}=await i.N.from("profiles").upsert([{id:e,email:t,display_name:a}],{onConflict:"id",ignoreDuplicates:!0});if(o)return(0,u.b)(o)?(0,n.cY)("UserProfile","Transient state or RLS prevented profile row creation:",(0,u.M)(o)):(0,n.AO)("UserProfile","Error ensuring profile row:",o),!1;return!0}catch(e){return(0,u.b)(e)?(0,n.cY)("UserProfile","Profile row creation deferred or unavailable:",(0,u.M)(e)):(0,n.AO)("UserProfile","Failed to ensure profile row:",e),!1}},[]),M=(0,o.useCallback)(async(e,t)=>{if(null==t?void 0:t.year_group)try{let{data:a}=await i.N.from("user_subjects").select("subject_id, exam_board, subjects(name)").eq("user_id",e).order("created_at",{ascending:!0}).limit(1);if(a&&a.length>0){var r;let e=a[0],n=null==(r=e.subjects)?void 0:r.name;(0,c.fM)({subjectId:e.subject_id,primarySubject:n,examBoard:e.exam_board||void 0,yearGroup:t.year_group||void 0})}}catch(e){console.debug("[UserProfile] Prefetch tips skipped:",e)}},[]),I=g,Y=p;
1(null==r?void 0:r.id)!==C.current&&(null==r?void 0:r.id)&&(I=!0,Y=null);let q=(0,o.useCallback)(async e=>{var t;if(!P.current)return;let a=++R.current;null==(t=S.current)||t.abort();let n=new AbortController;S.current=n;let o=()=>P.current&&a===R.current;if(!r){h(null),x(!1),v(!1);return}y(!0);try{let{data:e,activeSubjects:t}=await (0,f.dK)(async e=>{let[t,a]=await Promise.all([T(r.id,e),i.N.from("user_subjects").select("subject_id, qualification_level").eq("user_id",r.id).eq("is_active",!0).abortSignal(e)]);if(e.aborted)throw new DOMException("Read cancelled","AbortError");if(a.error)throw Error("Could not refresh profile details");let n=t.data;if(!n&&t.notFound&&r.email){let t=await O(r.id,r.email,r.user_metadata);if(e.aborted)throw new DOMException("Read cancelled","AbortError");t&&(n=(await T(r.id,e)).data)}if(e.aborted)throw new DOMException("Read cancelled","AbortError");if(!n)throw Error("Could not refresh profile details");return{data:n,activeSubjects:a.data||[]}},n.signal);if(!o())return;h(e),x(!1),M(r.id,e),A(t),k(t.some(e=>"KS2"===e.qualification_level||["Year 1","Year 2","Year 3","Year 4","Year 5","Year 6","KS2"].includes(e.qualification_level||"")))}catch(t){if(!o())return;if(x(!0),null==e?void 0:e.throwOnError)throw t}finally{n.abort(),o()&&(v(!1),y(!1),S.current=null)}},[r,O,T,M]);(0,o.useEffect)(()=>{var e;let t=null!=(e=null==r?void 0:r.id)?e:null;t!==C.current&&(C.current=t,t&&(v(!0),h(null))),q()},[q,null==r?void 0:r.id]);let D=(0,o.useCallback)(async e=>{let t=e=>({error:Error(e),outcome:"failed"});if(!r||!P.current)return t("No user logged in");if(j.current)return t("A save is already in progress");let a=new AbortController;j.current=a;try{if(_.current){let n=_.current,{data:o,error:s}=await (0,f.dK)(e=>i.N.from("profiles").select("*").eq("id",r.id).abortSignal(e).single(),a.signal);if(!P.current)return t("Account changed");if(s||!o||o.id!==r.id||!l(o,n))return d();if(_.current=null,h(o),!l(o,e))return t("Your earlier changes were saved. Review your choices and try again.");return{error:null,outcome:"saved"}}_.current={...e};let{data:n,error:o,status:s}=await (0,f.dK)(t=>i.N.from("profiles").update(e).select("*").eq("id",r.id).abortSignal(t).single(),a.signal);if(!P.current)return t("Account changed");if(o){if([400,401,403,404,409,422].includes(s)&&"PGRST116"!==o.code)return _.current=null,t("We couldn’t save your profile. Please try again.");return d()}if(!n||n.id!==r.id||!l(n,e))return d();return _.current=null,h(n),{error:null,outcome:"saved"}}catch(e){return P.current?d():t("Account changed")}finally{a.abort(),j.current===a&&(j.current=null)}},[r]),L=N||(null==Y?void 0:Y.year_group)&&["Year 1","Year 2","Year 3","Year 4","Year 5","Year 6","KS2"].includes(Y.year_group)||!1,z=(0,o.useMemo)(()=>({profile:Y,loading:I,profileError:w,refreshing:b,isPrimaryMode:L,refreshProfile:q,updateProfile:D,userSubjects:E}),[Y,I,w,b,L,q,D,E]);return(0,a.jsx)(m.Provider,{value:z,children:t})}function g(){let e=(0,o.useContext)(m);if(void 0===e)throw Error("useUserProfile must be used within a UserProfileProvider");return e}},88045:(e,t,r)=>{"use strict";r.d(t,{Providers:()=>Y});var a=r(95155),n=r(12115),o=r(5379),s=r(99776),i=r(46767),l=r(15894),d=r(65476),c=r(83101),u=r(65229),f=r(64269);let m=d.Kq,p=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(d.LM,{ref:t,className:(0,f.cn)("fixed top-0 z-[100] flex max-h-dvh w-full flex-col-reverse p-4 pt-[calc(1rem+env(safe-area-inset-top))] sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col sm:pt-4 sm:pb-[calc(1rem+env(safe-area-inset-bottom))] md:max-w-[420px]",r),...n})});p.displayName=d.LM.displayName;let h=(0,c.F)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),g=n.forwardRef((e,t)=>
1{let{className:r,variant:n,...o}=e;return(0,a.jsx)(d.bL,{ref:t,className:(0,f.cn)(h({variant:n}),r),...o})});g.displayName=d.bL.displayName,n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(d.rc,{ref:t,className:(0,f.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",r),...n})}).displayName=d.rc.displayName;let v=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(d.bm,{ref:t,className:(0,f.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...n,children:(0,a.jsx)(u.A,{className:"h-4 w-4"})})});v.displayName=d.bm.displayName;let w=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(d.hE,{ref:t,className:(0,f.cn)("text-sm font-semibold",r),...n})});w.displayName=d.hE.displayName;let x=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(d.VY,{ref:t,className:(0,f.cn)("text-sm opacity-90",r),...n})});function b(){let{toasts:e}=(0,l.dj)();return(0,a.jsxs)(m,{children:[e.map(function(e){let{id:t,title:r,description:n,action:o,...s}=e;return(0,a.jsxs)(g,{...s,children:[(0,a.jsxs)("div",{className:"grid gap-1",children:[r&&(0,a.jsx)(w,{children:r}),n&&(0,a.jsx)(x,{children:n})]}),o,(0,a.jsx)(v,{})]},t)}),(0,a.jsx)(p,{})]})}x.displayName=d.VY.displayName;var y=r(18720);let _=e=>{let{...t}=e,{theme:r="system"}=(0,o.D)();return(0,a.jsx)(y.l$,{theme:r,className:"toaster group",position:"top-center",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var j=r(52739),S=r(54984),N=r(84517),k=r(51539),E=r(31606),A=r(4707),C=r(94412),P=r(29622),R=r(85445),T=r(20687),O=r(20063),M=r(40631);function I(){let e=(0,O.usePathname)(),t=(0,O.useSearchParams)();return(0,n.useEffect)(()=>{(0,M.Ym)("?".concat(t.toString()),{landing_path:e})},[e,t]),null}function Y(e){let{children:t}=e;return(0,n.useEffect)(()=>(0,P.VH)(),[]),(0,n.useEffect)(()=>{(0,R.Wu)()},[]),(0,a.jsx)(o.N,{...T.rI,children:(0,a.jsx)(s.QueryClientProvider,{client:C.q,children:(0,a.jsxs)(i.Bc,{children:[(0,a.jsx)(b,{}),(0,a.jsx)(_,{}),(0,a.jsx)(j.O,{children:(0,a.jsx)(S.uk,{children:(0,a.jsx)(N.o,{children:(0,a.jsx)(k.dW,{children:(0,a.jsx)(E._,{children:(0,a.jsxs)(A.tH,{children:[(0,a.jsx)(n.Suspense,{fallback:null,children:(0,a.jsx)(I,{})}),t]})})})})})})]})})})}},89853:(e,t,r)=>{Promise.resolve().then(r.bind(r,88045)),Promise.resolve().then(r.t.bind(r,75042,23)),Promise.resolve().then(r.t.bind(r,54208,23)),Promise.resolve().then(r.bind(r,3010)),Promise.resolve().then(r.bind(r,27840)),Promise.resolve().then(r.t.bind(r,97001,23))},97001:()=>{}},e=>{e.O(0,[6899,4410,5707,9167,2619,6630,8720,6093,9972,1668,6327,7520,2627,1592,2739,6661,1539,9039,1606,8441,1255,7358],()=>e(e.s=89853)),_N_E=e.O()}]);

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.