1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="08d3d1b2-f543-0db9-e094-b407564380e6")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,589888,e=>{"use strict";var t=e.i(160183),r=e.i(181421),n=e.i(260219);let i=[{param:"coupon",cookie:"coupon",expires:7},{param:"affcode",cookie:"affcode",expires:30},{param:"audit_previewing",cookie:"audit_previewing",expires:30}];e.s(["StorefrontAttributionCapture",0,function(){return(0,t.useEffect)(()=>{try{let e=new URLSearchParams(window.location.search);for(let{param:t,cookie:a,expires:o}of i){let i=e.get(t);if(i&&(n.default.set(a,i,{expires:o,...r.secureCookieAttributes}),"affcode"===t)){let t=e.get("linkslug");t&&n.default.set("linkslug",t,{expires:o,...r.secureCookieAttributes})}}}catch{}},[]),null}])},769423,e=>{"use strict";var t=e.i(160183);let r=e=>{try{return Function(e),{valid:!0,error:null}}catch(e){return console.warn("Script syntax validation:","Invalid syntax detected"),{valid:!1,error:e}}},n=["text/javascript","application/javascript","module"],i=e=>{let t=e.match(/(?:^|\s)type\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/i);if(!t)return!0;let r=(t[1]??t[2]??t[3]??"").split(";")[0].trim();return""===r||n.includes(r.toLowerCase())},a=e=>{try{return btoa(e).substring(0,16)}catch{return""}},o=/<script([\s\S]*?)>([\s\S]*?)<\/script>/i,s=/<script([\s\S]*?)>([\s\S]*?)<\/script\b[^>]*>/i,l=(e,t,n)=>{try{let{inlineScripts:l,externalScripts:u,plainJSCode:c}=(e=>{let t,n=[],a=[],l=[],u=RegExp((o.test(e)?o:s).source,"gi"),c=0;for(;null!==(t=u.exec(e));){if(t.index>c){let r=e.substring(c,t.index);r.trim()&&l.push(r)}c=u.lastIndex;let[,o,s]=t;if(o.includes("src=")){let e=o.match(/src=["']([^"']+)["']/);e&&a.push({content:e[1],attributes:o,executable:!0})}else if(s.trim()){let e=i(o);!e||r(s).valid?n.push({content:s,attributes:o,executable:e}):console.info("Inline script skipped due to syntax validation")}}if(c<e.length){let t=e.substring(c);t.trim()&&l.push(t)}return{inlineScripts:n,externalScripts:a,plainJSCode:l}}
2)(e),d=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i.includes("src=")){if(document.querySelector(`script[src="${e}"][data-custom-script][data-script-version="${t}"]`))return}else{let r=a(e);if(document.querySelector(`script[data-custom-script][data-content-hash="${r}"][data-script-version="${t}"]`))return}let s=document.createElement("script");if(s.setAttribute("data-custom-script","true"),s.setAttribute("data-script-version",String(t)),i){let e=i.match(/[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:=(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?/g);e?.forEach(e=>{let t=e.indexOf("=");if(-1===t)s.setAttribute(e,"");else{let r=e.substring(0,t),n=e.substring(t+1).replace(/^["']|["']$/g,"");if(o&&"type"===r.toLowerCase())return;s.setAttribute(r,n)}})}if(i.includes("src="))s.src=e,s.onload=()=>{n.__kaikCustomScriptState?.version===t&&(n.__kaikCustomScriptState.status="loaded")},s.onerror=()=>{console.warn("External script loading issue:",e)};else{let t=a(e);if(s.setAttribute("data-content-hash",t),o){if(!r(e).valid)return void console.info("Script not appended due to syntax validation");s.textContent=` 3 try { 4 ${e} 5 } catch(error) { 6 console.warn('Custom script execution issue:', error.message || error); 7 } 8 `}else s.textContent=e}let l=()=>{document.body?document.body.appendChild(s):document.head&&document.head.appendChild(s),i.includes("src=")||n.__kaikCustomScriptState?.version!==t||(n.__kaikCustomScriptState.status="loaded")};"complete"===document.readyState?"requestIdleCallback"in window?window.requestIdleCallback(l):setTimeout(l,1):window.addEventListener("load",l,{once:!0})};u.forEach(e=>{let{content:t,attributes:r}=e;return d(t,r)}),l.forEach(e=>{let{content:t,attributes:r,executable:n}=e;return d(t,r,n)}),c.forEach(e=>{try{Function(e)}catch(e){console.warn("Custom script fragment skipped: invalid JavaScript syntax",e instanceof Error?e.message:e);return}d(e)}),n.__kaikCustomScriptState?.version===t&&(n.__kaikCustomScriptState.status="loaded")}catch{n.__kaikCustomScriptState={version:t,status:"failed"}}};e.s(["StorefrontCustomScript",0,function(e){let{enabled:n,version:i}=e;return(e=>{let{enabled:n,version:i}=e;(0,t.useEffect)(()=>{if(!n)return;let e=`/script.js?v=${i}`,t=window,s=t.__kaikCustomScriptState;if(!s||s.version!==i||"loaded"!==s.status&&"loading"!==s.status){if(document.querySelectorAll(`script[data-custom-script][data-script-version="${i}"]`).length>0){t.__kaikCustomScriptState={version:i,status:"loaded"};return}t.__kaikCustomScriptState={version:i,status:"loading"},fetch(e).then(e=>{if(!e.ok)throw Error(`HTTP error! status: ${e.status}`);return e.text()}).then(n=>{n.includes("<script")?n.trimStart().startsWith("<")&&o.test(n)?l(n,i,t):r(n).valid?((e,t,r)=>{try{let n=a(e);if(document.querySelector(`script[data-custom-script][data-content-hash="${n}"]`)){r.__kaikCustomScriptState={version:t,status:"loaded"};return}let i=document.createElement("script");i.setAttribute("data-custom-script","true"),i.setAttribute("data-script-version",String(t)),i.setAttribute("data-content-hash",n),i.textContent=e,document.body.appendChild(i),r.__kaikCustomScriptState={version:t,status:"loaded"}}catch{console.warn("Issue appending complete script"),r.__kaikCustomScriptState={version:t,status:"failed"}}})(n,i,t):l(n,i,t):((e,t,n,i)=>{try{if(!r(e).valid){console.info("Custom script not loaded due to syntax validation"),i.__kaikCustomScriptState={version:n,status:"failed"};return}if(document.querySelector(`script[src="${t}"][data-custom-script]`)){i.__kaikCustomScriptState={version:n,status:"loaded"};return}let a=document.createElement("script");a.setAttribute("data-custom-script","true"),a.setAttribute("data-script-version",String(n)),a.src=t,a.onload=()=>{i.__kaikCustomScriptState={version:n,status:"loaded"}},a.onerror=()=>{console.warn("Custom script loading failed:",t),i.__kaikCustomScriptState={version:n,status:"failed"}},document.body.appendChild(a)}catch{console.warn("Issue processing direct script"),i.__kaikCustomScriptState={ver
8sion:n,status:"failed"}}})(n,e,i,t)}).catch(e=>{console.warn("Issue loading custom script file:",e),t.__kaikCustomScriptState?.version===i&&(t.__kaikCustomScriptState.status="failed")})}},[n,i])})({enabled:n,version:Number(new URLSearchParams(window.location.search).get("_cb"))||i}),null}],769423)},574146,e=>{"use strict";var t=e.i(160183),r=e.i(69584);e.i(804875);var n=e.i(574416),i=e.i(770339);let a="loopwise:ready",o="loopwise:navigate",s=(e,t)=>{document.dispatchEvent(new CustomEvent(e,{detail:t}))},l=`[data-loopwise-slot]:not([${i.LOOPWISE_LIVE_ATTRIBUTE}]), [data-loopwise]:not([${i.LOOPWISE_LIVE_ATTRIBUTE}])`;e.s(["LOOPWISE_NAVIGATE_EVENT",0,o,"LOOPWISE_READY_EVENT",0,a,"READY_HYDRATION_TIMEOUT_MS",0,5e3,"StorefrontLifecycleEvents",0,function(){let e=(0,r.usePathname)(),u=(0,t.useRef)(e),c=(0,t.useRef)(!1),d=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!c.current)return(e=>{if(!document.querySelector(l))return e(),()=>{};let t=!1,r=()=>{t||(t=!0,n.disconnect(),clearTimeout(a),e())},n=new MutationObserver(()=>{document.querySelector(l)||r()});n.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[i.LOOPWISE_LIVE_ATTRIBUTE]});let a=setTimeout(r,5e3);return()=>{t=!0,n.disconnect(),clearTimeout(a)}})(()=>{c.current=!0,window.loopwise={ready:!0},s(a,{pathname:u.current})})},[]),(0,t.useEffect)(()=>{if(u.current=e,null===d.current){d.current=e;return}if(d.current!==e)return d.current=e,(0,n.afterTitleSettles)(()=>{s(o,{pathname:e})})},[e]),null}])},555923,e=>{"use strict";var t=e.i(160183),r=e.i(69584);e.i(804875);var n=e.i(574416),i=e.i(916894),a=e.i(82156);let o=null;function s(t){var r;let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!n)return Promise.resolve();let i={subdomain:t,url:window.location.href,title:document.title,page:window.location.pathname};return(r=i.url,o??=e.A(114837).then(e=>{let{default:t}=e;return t.configure({urlPrefix:"https://teachify.io",startOnReady:!1,visitParams:{landing_page:r}}),t.start(),window.ahoy=t,t}).catch(e=>{throw o=null,e})).then(e=>{e.configure({visitParams:{landing_page:i.url}}),e.trackView(i)}).catch(()=>void 0)}var l=e.i(815561);e.s(["StorefrontPageViewTracker",0,function(e){let{subdomain:o,facebookPixel:u,appierAppId:c}=e,d=(0,r.usePathname)(),f=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(null===f.current){f.current=d,s(o),(0,a.track)(i.events.pageViewed({initial:!0}),{appierAppId:c});return}if(f.current!==d)return f.current=d,u&&l.pageView(),(0,n.afterTitleSettles)(()=>{s(o),(0,a.track)(i.events.pageViewed({initial:!1}),{appierAppId:c})})},[d,o,u,c]),null}],555923)},373132,e=>{"use strict";var t=e.i(304886),r=e.i(160183),n=e.i(518341),i=e.i(484725),a=e.i(9733),o=e.i(260219),s=e.i(659190),l=e.i(971859),u=e.i(830437),c=e.i(398421),d=e.i(807021);let f=` 9 query UserForNavbar($subdomain: String!) { 10 user(subdomain: $subdomain) { 11 id 12 email 13 name 14 roles 15 identities { 16 # Persisted-user contract + Appier identify (TEACH-19906): identity 17 # trackers key CWG-linked users on the custom_oauth uid. 18 provider 19 uid 20 } 21 profile { 22 avatar 23 } 24 hiddenFields 25 # Drives the PaymentMethodPopup nudge. 26 actionRequired 27 } 28 } 29`,p=(0,r.createContext)({isAuthenticated:!1,resolvedAuthenticated:!1,user:null,userLoading:!1,userError:void 0,logout:()=>{},refreshAuth:()=>{},isHydrated:!1}),m=(0,r.createContext)(()=>{}),h={user:null,loading:!1,error:void 0};e.s(["AuthProvider",0,e=>{let{children:c}=e,d=(0,n.default)(),[f,g]=(0,r.useState)(!1),[v,S]=(0,r.useState)(null),[b,C]=(0,r.useState)(!1),[y,w]=(0,r.useState)(h),{user:k,loading:E,error:_}=y,A=()=>{let e=(0,u.isAuthenticated)();if(g(e),!e){S(null);try{localStorage.removeItem("user")}catch{}}};(0,r.useEffect)(()=>{if(C(!0),A(),(0,u.isAuthenticated)())try{let e=localStorage.getItem("user");e&&S((0,l.toStoredUser)(JSON.parse(e)))}catch(e){console.error("Failed to parse stored user:",e)}},[]),(0,r.useEffect)(()=>{if(k&&!E&&(S(k),d?.contactInformation?.appierAppId&&k.id&&(0,i.identifyUser)(k),(0,u.isAuthenticated)()))try{localStorage.setItem("user",JSON.stringify((0,l.toStoredUser)(k)))}catch{}},[k,E,d?.contactInformation?.appierAppId]);let x=(0,r.useCallback)(e=>{let{redirect:t=!0}=e??{};g(!1),S(null);try{localStorage.removeItem("user")}catch{}o.default.remove("token"),t&&window.location.replace("/")},[]);(0,r.useEffect)(()=>{_&&f&&!k&&x({redirect:!1})},[_,f,k,x]);let T=f&&b&&!E&&!_,I=(0,r.useMemo)(()=>({currentUser:v?(0,l.toStoredUser)(v):l.initialUserValue,persistUser:e=>{e&&S(t=>{let r=(0,l.toStoredUser)(e),n=t?(0,l.toStoredUser)(t):null;return n&&(0,a.deepEqualJson)(r,n)?t:r})}}),[v]);return(0,t.jsx)(p.Provider,{value:{isAuthenticated:f,resolvedAuthenticated:T,user:v,userLoading:E,userError:_,logout:x,refreshAuth:A,isHydrated:b},children:(0,t.jsx)(s.CurrentUserContext.Provider,{value:I,children:(0,t.jsx)(m.Provider,{value:w,children:c})})})},"AuthUserQuery",0,e=>{let{subdomain:t}=e,n=(0,r.useContext)(m),i=(e=>{let[t,n]=(0,r.useState)(()=>({user:null,loading:!!o.default.get("token"),error:void 0}));return(0,r.useEffect)(()=>
29{let t=o.default.get("token");if(!e||!t)return void n({user:null,loading:!1,error:void 0});let r=new AbortController;return(0,c.fetchGraphQLOperation)({operationName:"UserForNavbar",query:f,operationHash:d.UserForNavbarOperationHash,variables:{subdomain:e},signal:r.signal,sentrySource:"user-for-navbar-fetch"}).then(e=>{let{data:t,errors:i,authReset:a}=e;r.signal.aborted||n({user:t?.user??null,loading:!1,error:a?Error("Authentication token reset"):i.length?Error(i[0]?.message??"GraphQL error"):void 0})}).catch(e=>{r.signal.aborted||n({user:null,loading:!1,error:e})}),()=>r.abort()},[e]),t})(t);return(0,r.useEffect)(()=>{n(i)},[i,n]),null},"useAuthContext",0,()=>{let e=(0,r.useContext)(p);if(!e)throw Error("useAuthContext must be used within AuthProvider");return e}],373132)},121561,e=>{"use strict";var t=e.i(304886),r=e.i(160183),n=e.i(69584),i=e.i(943623),a=e.i(142054),o=e.i(832380),s=e.i(330172),l=e.i(413123),u=e.i(945420),c=e.i(473034),d=e.i(150886);let f="(?:\\/page\\/[1-9]\\d*)?";var p=e.i(638286);function m(e){let{children:n}=e,[i,a]=(0,r.useState)(null),[o,s]=(0,r.useState)("/"),l=(0,r.useMemo)(()=>null===i?null:new URLSearchParams(i),[i]);return(0,t.jsxs)(g,{searchParams:l,isReady:null!==i,pathname:o,children:[(0,t.jsx)(r.Suspense,{fallback:null,children:(0,t.jsx)(h,{onSearch:a,onPathname:s})}),n]})}function h(e){let{onSearch:t,onPathname:i}=e,a=(0,n.useSearchParams)(),o=(0,n.usePathname)()??"/",s=a?.toString()??"";return(0,r.useEffect)(()=>{t(s)},[s,t]),(0,r.useEffect)(()=>{i(o)},[o,i]),null}function g(e){let{children:i,searchParams:a,isReady:o,pathname:s}=e,l=(0,n.useRouter)(),u=(0,r.useCallback)((e,t,r)=>{let n=r?.scroll===void 0?void 0:{scroll:r.scroll},i=new URLSearchParams;for(let[e,r]of Object.entries(t??{}))void 0!==r&&(Array.isArray(r)?r.forEach(t=>i.append(e,t)):i.append(e,r));let a=i.toString(),o=a?`${e}?${a}`:e,[s,u]=e.split("?");if((a||u)&&(RegExp(`^\\/categories\\/[^/]+${f}$`).test(s)||RegExp(`^\\/lecturers${f}$`).test(s)||RegExp(`^\\/digital-downloads(?:\\/categories\\/[^/]+)?${f}$`).test(s)||"/"===s)){window.location.href=o;return}n?l.push(o,n):l.push(o)},[l]),c=(0,r.useCallback)(async e=>{let t=new URLSearchParams;for(let[r,n]of Object.entries(e))void 0!==n&&(Array.isArray(n)?n.forEach(e=>t.append(r,e)):t.append(r,n));let r=t.toString();window.history.replaceState(window.history.state,"",r?`${window.location.pathname}?${r}`:window.location.pathname)},[]),d=(0,r.useMemo)(()=>({resolvedPathname:s,searchParams:a,isReady:o,push:u,replaceQueryShallow:c}),[s,a,o,u,c]);return(0,t.jsx)(p.StorefrontRouterContext.Provider,{value:d,children:i})}var v=e.i(373132),S=e.i(906626),b=e.i(260219);function C(e){if(!e||"object"!=typeof e)return null;let{jid:t,token:r,url:n}=e;if("string"!=typeof n||!n)return null;let i="string"==typeof t&&t.length>0,a="string"==typeof r&&r.length>0;return i||a?{jid:i?t:null,token:a?r:null,url:n}:null}async function y(e){try{let t=await fetch("/api/presence-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subdomain:e})});if(!t.ok)return null;return C(await t.json())}catch{return null}}async function w(){let e=b.default.get("token");if(!e)return null;try{let t=S.default.env.NEXT_PUBLIC_API_HOST||"https://kaik.io",r=await fetch(`${t}/api/v1/cable_token`,{headers:{Authorization:`Bearer ${e}`}});if(!r.ok)return null;return C(await r.json())}catch{return null}}async function k(e){return await w()??await y(e)}function E(e){let{jid:t,token:r,url:n}=e,i=n.includes("?")?"&":"?",a=[t?`jid=${encodeURIComponent(t)}`:null,r?`token=${encodeURIComponent(r)}`:null].filter(Boolean).join("&");return`${n}${i}${a}`}function _(n){let{children:i,subdomain:a}=n;return!function(t){let{subdomain:n}=t,i=(0,p.useStorefrontPathname)(),a=(0,r.useRef)(null),o=(0,r.useRef)(null),s=(0,r.useRef)(!1),l=(0,r.useRef)(null),u=(0,r.useRef)(null),c=(0,r.useRef)(n);c.current=n;let d=(0,r.useCallback)(()=>{l.current||(l.current=setInterval(()=>{s.current&&o.current&&o.current.perform("heartbeat")},55e3))},[]),f=(0,r.useCallback)(()=>{l.current&&(clearInterval(l.current),l.current=null)},[]),m=(0,r.useCallback)(async t=>{if(!n)return;let r=await k(n);if(!r||t.aborted)return;let i=null;try{let{createConsumer:l}=await e.A(496056);if(t.aborted)return;
29if(i=l(E(r),{tokenRefresher:async e=>{let t=await k(c.current);if(!t)throw Error("cable credentials unavailable");e.setURL(E(t))}}),t.aborted)return void i.disconnect();a.current=i,o.current=i.subscriptions.create({channel:"PresenceChannel",school_id:n,page_path:window.location.pathname},{connected(){s.current=!0,d()},disconnected(){s.current=!1,f()},received(){}})}catch{i&&(i.disconnect(),a.current=null),o.current=null,s.current=!1,f()}},[n,d,f]),h=(0,r.useCallback)(()=>{u.current?.abort(),u.current=null,f(),o.current&&(o.current.unsubscribe(),o.current=null),a.current&&(a.current.disconnect(),a.current=null),s.current=!1},[f]),g=(0,r.useCallback)(()=>{u.current?.abort();let e=new AbortController;u.current=e,m(e.signal)},[m]);(0,r.useEffect)(()=>(g(),h),[g,h]),(0,r.useEffect)(()=>{let e=()=>h(),t=e=>{e.persisted&&g()};return window.addEventListener("pagehide",e),window.addEventListener("pageshow",t),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("pageshow",t)}},[h,g]),(0,r.useEffect)(()=>{s.current&&o.current&&o.current.perform("update_page",{page_path:window.location.pathname})},[i])}({subdomain:a}),(0,t.jsx)(t.Fragment,{children:i})}var A=e.i(314180);function x(e){let{onChange:t}=e,i=((0,n.usePathname)()??"").startsWith("/teaching/");return(0,r.useEffect)(()=>{t(i)},[i,t]),null}e.s(["Providers",0,function(e){let{children:n,locale:f,subdomain:p,site:h,host:g,resources:S}=e,b=(0,r.useMemo)(()=>{var e;let t=`${p}.${(e=h.regionCode,!u.isProd?"myteachify.test":e&&"TW"!==e?"myteachify.com":"kaik.io")}`;return{...h,host:g??`https://${t}`,siteFQDN:t}},[h,g,p]),[C,y]=(0,r.useState)(!1),w=h?.theme?.colors,k=h?.theme?.colorMode,E=(0,l.deriveEffectiveColorMode)(C,k),T=w?.primaryColor,I=w?.secondaryColor,P=w?.titleColor,L=w?.secondaryTitleColor;return((0,r.useEffect)(()=>{let{css:e,isDark:t}=(0,l.buildBrandStyleCss)({isTeachingPath:C,schoolThemeColors:{primaryColor:T,secondaryColor:I,titleColor:P,secondaryTitleColor:L},schoolColorMode:k,teachifyBrandDefaults:s.default}),r=document.documentElement;r.classList.toggle("dark",t),r.setAttribute("data-theme",t?"dark":"light");let n=document.getElementById("ssr-brand-vars");n&&(n.textContent=e)},[C,T,I,P,L,k]),h)?(0,t.jsx)(d.ColorModeProvider,{value:E,children:(0,t.jsxs)(c.ColorModeProvider,{value:E,children:[(0,t.jsx)(r.Suspense,{fallback:null,children:(0,t.jsx)(x,{onChange:y})}),(0,t.jsx)(A.TranslationsProvider,{locale:f,resources:S,children:(0,t.jsx)(m,{children:(0,t.jsx)(o.default,{value:b,children:(0,t.jsx)(v.AuthProvider,{children:(0,t.jsx)(_,{subdomain:p,children:(0,t.jsx)(i.CartProvider,{children:n})})})})})}),(0,t.jsx)(a.LazyToaster,{})]})}):(0,t.jsx)("div",{children:"Site data not available"})}],121561)},768438,e=>{"use strict";var t=e.i(160183),r=e.i(782755),n=e.i(585943);e.s(["WebMCPTools",0,function(){return(0,t.useEffect)(()=>{if(!(document.modelContext??navigator.modelContext))return;let t=new AbortController;return e.A(856639).then(e=>{let{registerWebmcpTools:i,WEBMCP_OUTPUT_MAX_LENGTH:a}=e;t.signal.aborted||i({queryMaxLength:r.SEARCH_QUERY_MAX_LENGTH,pageMax:n.GRAPHQL_INT_MAX,outputMaxLength:a,signal:t.signal})}).catch(()=>{}),()=>t.abort()},[]),null}])},473034,e=>{"use strict";var t=e.i(160183);let r=(0,t.createContext)(null);function n(){if("u"<typeof document)return null;let e=document.documentElement;return"dark"===e.dataset.theme||e.classList.contains("dark")?"dark":"light"===e.dataset.theme||e.classList.contains("light")?"light":null}e.s(["ColorModeProvider",0,function(e){let{value:n,children:i}=e;return t.default.createElement(r.Provider,{value:n},i)},"useColorModeValue",0,function(e,i){return"dark"===function(){let e=(0,t.useContext)(r),[i,a]=(0,t.useState)(()=>e??n()??"light");return(0,t.useEffect)(()=>{if("u"<typeof document)return;let e=document.documentElement,t=()=>{let e=n();null!==e&&a(e)};t();let r=new MutationObserver(t);return r.observe(e,{attributes:!0,attributeFilter:["data-theme","class"]}),()=>r.disconnect()},[]),i}()?i:e}])},628469,e=>{"use strict";var t=e.i(160183);e.s(["default",0,function(e,r){let[n,i]=(0,t.useState)(()=>{try{let t=localStorage.getItem(e);if(null!==t)try{return JSON.parse(t)}catch{}return localStorage.setItem(e,JSON.stringify(r)),r}catch{return r}});return[n,(0,t.useCallback)(t=>{i(t);try{localStorage.setItem(e,JSON.stringify(t))}catch{}},[e]),(0,t.useCallback)(()=>{i(void 0);try{localStorage.removeItem(e)}catch{}},[e])]}])},921576,(e,t,r)=>{let n="en-US";t.exports={cookieName:"i18next",fallbackLng:n,namespaces:["general","checkout","login","confirmation","course","product","event","lecturer","payment","plan","category","group_buy","comment","meeting","learning","custom"],languages:[n,"zh-TW"],storefrontLanguages:[n,"zh-TW","zh-CN","zh-HK","ja","ko","th","vi"],defaultNS:"general",debug:!1}},314180,e=>{"use strict";var t=e.i(304886),r=e.i(160183);e.i(161979);var n=e.i(906554),i=e.i(999362),a=e.i(431686),o=e.i(844789),s=e.i(884824),l=e.i(921576);e.s(["TranslationsProvider",0,function(e){let{children:u,locale:c,resources:d}=e,[f]=(0,r.useState)(()=>{let e=(0,o.createInstance)();return e.use(i.initReactI18next).use((0,s.default)(a.fetchLocaleBundle)).init({lng:c,fallbackLng:l.default.fallbackLng,supp
29ortedLngs:l.default.storefrontLanguages,defaultNS:l.default.defaultNS,ns:Object.keys(d[c]??{}),resources:d,partialBundledLanguages:!0,initAsync:!1,debug:l.default.debug,interpolation:{escapeValue:!1},react:{useSuspense:!1}}),e});return(0,t.jsx)(n.I18nextProvider,{i18n:f,children:u})}])},770339,e=>{"use strict";e.s(["CHROME_PARTS",0,{header:"header",footer:"footer",learningHeader:"learning-header",learningSidebar:"learning-sidebar"},"CHROME_SLOTS",0,{headerBefore:"header-before",headerAfter:"header-after",footerBefore:"footer-before",footerAfter:"footer-after",learningHeaderBefore:"learning-header-before",learningHeaderAfter:"learning-header-after",learningSidebarBefore:"learning-sidebar-before",learningSidebarAfter:"learning-sidebar-after"},"LOOPWISE_LIVE_ATTRIBUTE",0,"data-loopwise-live"])},574416,e=>{"use strict";let t={subtree:!0,childList:!0,characterData:!0};e.s(["afterTitleSettles",0,function(e){let r,n,i,a=()=>{i=function(e){if(""!==document.title)return e(),()=>{};let r=!1,n=()=>{r||(r=!0,i.disconnect(),clearTimeout(a),e())},i=new MutationObserver(()=>{""!==document.title&&n()});i.observe(document.head??document.documentElement,t);let a=setTimeout(n,5e3);return""!==document.title&&n(),()=>{r||(r=!0,i.disconnect(),clearTimeout(a))}}(e)},o="hidden"===document.visibilityState?(r=setTimeout(a,0),()=>clearTimeout(r)):(n=requestAnimationFrame(a),()=>cancelAnimationFrame(n));return()=>{o(),i?.()}}])},856585,e=>{"use strict";var t=e.i(160183),r=e.i(484725);let n="data-appier-sdk";e.s(["AppierSdkLoader",0,function(e){let{appId:i}=e;return(0,t.useEffect)(()=>{let e,t,a=(0,r.appierSdkUrl)(i);if(!a)return;let o=()=>{if(document.querySelector(`script[${n}]`))return;(0,r.installAppierStub)(window);let e=document.createElement("script");e.async=!0,e.src=a,e.setAttribute(n,""),document.head.appendChild(e)},s=()=>{"function"==typeof window.requestIdleCallback?e=window.requestIdleCallback(o,{timeout:3e3}):t=setTimeout(o,1500)},l=setTimeout(o,8e3);return"complete"!==document.readyState?window.addEventListener("load",s,{once:!0}):s(),()=>{clearTimeout(l),void 0!==t&&clearTimeout(t),void 0!==e&&window.cancelIdleCallback?.(e),window.removeEventListener("load",s)}},[i]),null}])},484725,e=>{"use strict";let t="appier_identified",r=/^[a-z0-9]+$/,n=null;e.s(["appierSdkUrl",0,e=>r.test(e)?`https://cdn-prd-gcp-jp0.aiqua.io/qgraph.${e}.js`:null,"identifyUser",0,e=>{let r=e.identities?.find(e=>"custom_oauth"===e.provider)?.uid||e.id;if(!r)return;try{if(sessionStorage.getItem(t)===r)return}catch{}n&&clearInterval(n);let i={userId:r,email:e.email},a=0,o=()=>{if(a+=1,"function"==typeof window.qg&&(window.qg("identify",{userId:i.userId,...i.email?{email:i.email}:{}}),1)){try{sessionStorage.setItem(t,r)}catch{}return!0}return a>=20};o()||(n=setInterval(()=>{o()&&n&&(clearInterval(n),n=null)},500))},"installAppierStub",0,function(e){if(e.appier=e.qg,e.qg)return;let t=function(){t.callmethod?t.callmethod.call(t,arguments):t.queue.push(arguments)};t.queue=[],e.appier=e.qg=t}])},659190,e=>{"use strict";e.i(304886);var t=e.i(160183);e.i(518341),e.i(628469),e.i(484725),e.i(815561),e.i(830437),e.i(9733);var r=e.i(971859);let n=(0,t.createContext)({currentUser:r.initialUserValue,persistUser:()=>{}});e.s(["CurrentUserContext",0,n,"useCurrentUserContext",0,()=>{let e=(0,t.useContext)(n);if(!e)throw Error("CurrentUserProvider must be initialized first");return e}])},971859,e=>{"use strict";var t=e.i(9733);let r=["id","name","email","roles","identities"];e.s(["initialUserValue",0,{id:"",name:"",email:"",roles:[]},"toStoredUser",0,e=>(0,t.pickPresent)(e,r)])},330172,e=>{"use strict";let t="#007bff";e.s(["DEFAULT_BLUE",0,t,"DEFAULT_BLUE_100",0,"#cce5ff","DEFAULT_GREEN",0,"#10B981","DEFAULT_GREEN_100",0,"#d1fae5","default",0,{primaryColor:t,titleColor:"#000",secondaryTitleColor:"#565B66",colorMode:"light"}])},413123,e=>{"use strict";let t=/^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,r=e=>"string"==typeof e&&t.test(e.trim())?e.trim():null;function n(e,t){return e?"light":t||"light"}e.s(["buildBrandStyleCss",0,function(e){let{isTeachingPath:t,schoolThemeColors:i,schoolColorMode:
29a,teachifyBrandDefaults:o}=e,s="dark"===n(t,a),l=t?o:i,u=r(l?.primaryColor),c=r(l?.secondaryColor),d=r(l?.titleColor),f=r(l?.secondaryTitleColor),p=[],m=(e,t)=>{p.push(`--color-brand-${e}: ${t};`),p.push(`--dt-color-brand-${e}: ${t};`)};return u&&m("primaryColor",u),c&&m("secondaryColor",c),d&&m("titleColor",d),f&&m("secondaryTitleColor",f),m("backgroundColor",s?"#000":"#fff"),{css:`:root[lang] { ${p.join(" ")} }${s?" :root[lang].dark body { background-color: var(--color-brand-backgroundColor); color: #f7fafc; }":""}`,isDark:s}},"deriveEffectiveColorMode",0,n,"safeHex",0,r])}]); 30 31//# debugId=08d3d1b2-f543-0db9-e094-b407564380e6 32//# sourceMappingURL=376xh_2berf_s.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.