1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return o}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});function i(e){let t={};for(let[r,s]of e.entries()){let e=t[r];void 0===e?t[r]=s:Array.isArray(e)?e.push(s):t[r]=[e,s]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,s]of Object.entries(e))if(Array.isArray(s))for(let e of s)t.append(r,a(e));else t.set(r,a(s));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,s]of r.entries())e.append(t,s)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let i=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",n=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||a.test(s))&&!1!==u?(u="//"+(u||""),n&&"/"!==n[0]&&(n="/"+n)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${s}${u}${n}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=e.r(71645);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=i(e,s)),t&&(n.current=i(t,s))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return h},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return R}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...s)=>(r||(r=!0,t=e(...s)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>o.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function h(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let s=await e.getInitialProps(t);if(r&&d(r))return s;if(!s)throw Object.defineProperty(Error(`"${h(e)}.getInitialProps()" should resolve to an object. But found "${s}
1" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return s}let m="undefined"!=typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function R(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let s=e.r(18967),n=e.r(52817);function i(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return b}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let i=e.r(90809),a=e.r(43476),o=i._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),h=e.r(18967),d=e.r(5550);e.r(33525);let f=e.r(91949),p=e.r(73668),m=e.r(9396);function y(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function g(t){var r;let s,n,i,[l,g]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),b=(0,o.useRef)(null),{href:x,as:S,children:R,prefetch:w=null,passHref:O,replace:T,shallow:j,scroll:E,onClick:P,onMouseEnter:I,onTouchStart:C,legacyBehavior:Q=!1,onNavigate:N,ref:_,unstable_dynamicOnHover:k,...F}=t;s=R,Q&&("string"==typeof s||"number"==typeof s)&&(s=(0,a.jsx)("a",{children:s}));let L=o.default.useContext(u.AppRouterContext),U=!1!==w,M=!1!==w?null===(r=w)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:D,as:q}=o.default.useMemo(()=>{let e=y(x);return{href:e,as:S?y(S):e}},[x,S]);if(Q){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=o.default.Children.only(s)}let A=Q?n&&"object"==typeof n&&n.ref:_,$=o.default.useCallback(e=>(null!==L&&(b.current=(0,f.mountLinkInstance)(e,D,L,M,U,g)),()=>{b.current&&((0,f.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,f.unmountPrefetchableInstance)(e)}),[U,D,L,M,g]),H={ref:(0,c.useMergedRef)($,A),onClick(t){Q||"function"!=typeof P||P(t),Q&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!L||t.defaultPrevented||function(t,r,s,n,i,a,l){if("undefined"!=typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);o.default.startTransition(()=>{h(s||r,i?"replace":"push",a??!0,n.current)})}}(t,D,q,b,T,E,N)},onMouseEnter(e){Q||"function"!=typeof I||I(e),Q&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),L&&U&&(0,f.onNavigationIntent)(e.currentTarget,!0===k)},onTouchStart:function(e){Q||"function"!=typeof C||C(e),Q&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),L&&U&&(0,f.onNavigationIntent)(e.currentTarget,!0===k)}};return(0,h.isAbsoluteUrl)(q)?H.href=q:Q&&!O&&("a"!==n.type||"href"in n.props)||(H.href=(0,d.addBasePath)(q)),i=Q?o.default.cloneElement(n,H):(0,a.jsx)("a",{...F,...H,children:s}),(0,a.jsx)(v.Provider,{value:l,children:i})}e.r(84508);let v=(0,o.createContext)(f.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},68834,79473,e=>{"use strict";var t=e.i(71645);let r=e=>{let t,r=new Set,s=(e,s)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=s?s:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach(r=>r(t,e))}},n=()=>t,i={setState:s,getState:n,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e))},a=t=e(s,n,i);return i},s=e=>{let s=e?r(e):r,n=e=>(function(e,r=e=>e){let s=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>r(e.getState()),[e,r]),t.default.useCallback(()=>r(e.getInitialState()),[e,r]));return t.default.useDebugValue(s),s})(s,e);return Object.assign(n,s),n},n=e=>e?s(e):s;function i(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var s;let n=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(s=r.getItem(e))?s:null;return i instanceof Promise?i.then(n):n(i)},setItem:(e,s)=>r.setItem(e,JSON.stringify(s,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}e.s(["create",()=>n],68834);let a=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>a(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}},o=(e,t)=>(r,s,n)=>{let o,l={storage:i(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,h=new Set,d=l.storage;if(!d)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},s,n);let f=()=>{let e=l.partialize({...s()});return d.setItem(l.name,{state:e,version:l.version})},p=n.setState;n.setState=(e,t)=>(p(e,t),f());let m=e((...e)=>(r(...e),f()),s,n);n.getInitialState=()=>m;let y=()=>{var e,t;if(!d)return;u=!1,c.forEach(e=>{var t;return e(null!=(t=s())?t:m)});let n=(null==(t=l.onRehydrateStorage)?void 0:t.call(l,null!=(e=s())?e:m))||void 0;return a(d.getItem.bind(d))(l.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return[!1,e.state];else{if(l.migrate){let t=l.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[n,i]=e;if(r(o=l.merge(i,null!=(t=s())?t:m),!0),n)return f()}).then(()=>{null==n||n(o,void 0),o=s(),u=!0,h.forEach(e=>e(o))}).catch(e=>{null==n||n(void 0,e)})};return n.persist={setOptions:e=>{l={...l,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>y(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(h.add(e),()=>{h.delete(e)})},l.skipHydration||y(),o||m};e.s(["createJSONStorage",()=>i,"persist",()=>o],79473)},49148,e=>{"use strict";var t=e.i(68834),r=e.i(79473);let s={codeforcesId:"",usernameVerified:!1,username:"",dailyLimit:null,rating:null,experiencedTopics:[],improveTopics:[],updatedSettings:{},hydrated:!1},n=(0,t.create)()((0,r.persist)((e,t)=>({...s,setCodeforcesId:t=>e({codeforcesId:t}),setUsernameVerified:t=>e({usernameVerified:t}),setUsername:t=>e({username:t}),setDailyLimit:t=>e({dailyLimit:t}),setRating:t=>e({rating:t}),setExperiencedTopics:t=>e({experiencedTopics:t}),setImproveTopics:t=>e({improveTopics:t}),setUpdatedSettings:t=>e({updatedSettings:t}),setHydrated:t=>e({hydrated:t}),reset:()=>e({...s}),hydrateFromServer:t=>e({...t,hydrated:!0}),validateStep:e=>{let r=t();if(0===e&&r.dailyLimit&&(r.dailyLimit<1||r.dailyLimit>10))return{valid:!1,message:"Daily limit must be between 1 and 10"};if(1===e){if(!r.rating||r.rating<=0)return{valid:!1,message:"Please enter a valid rating"};if(0===r.improveTopics.length)return{valid:!1,message:"Please select at least one topic to improve"};if(r.improveTopics.length>3)return{valid:!1,message:"You can select at most 3 improve topics"}}return{valid:!0}}}),{name:"profile-store",onRehydrateStorage:()=>e=>{e?.setHydrated(!0)},partialize:e=>({codeforcesId:e.codeforcesId,username:e.username,dailyLimit:e.dailyLimit,rating:e.rating,experiencedTopics:e.experiencedTopics,improveTopics:e.improveTopics,updatedSettings:e.updatedSettings,hydrated:e.hydrated}),storage:(0,r.createJSONStorage)(()=>sessionStorage)}));e.s(["profileStore",0,n])},66027,e=>{"use strict";let t;var r=e.i(75555),s=e.i(40143),n=e.i(86491),i=e.i(15823),a=e.i(93803),o=e.i(19273),l=e.i(80166),u=class extends i.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,a.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#n=void 0;#i=void 0;#a;#o;#r;#t;#l;#u;#c;#h;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),c(this.#s,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#v(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#s.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&d(this.#s,r,this.options,t)&&this.#m(),this.updateResult(),s&&(this.#s!==r||(0,o.resolveEnabled)(this.options.enabled,this.#s)!==(0,o.resolveEnabled)(t.enabled,this.#s)||(0,o.resolveStaleTime)(this.options.staleTime,this.#s)!==(0,o.resolveStaleTime)(t.staleTime,this.#s))&&this.#x();let n=this.#S();s&&(this.#s!==r||(0,o.resolveEnabled)(this.options.enabled,this.#s)!==(0,o.resolveEnabled)(t.enabled,this.#s)||n!==this.#f)&&this.#R(n)}getOptimisticResult(e){var t,r;let s=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(s,e);return t=this,r=n,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#i=n,this.#o=this.options,this.#a=this.#s.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"!==r||this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#m(e){this.#b();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#x(){this.#g();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#s);if(o.isServer||this.#i.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#i.dataUpdatedAt,e);this.#h=l.timeoutManager.setTimeout(()=>{this.#i.isStale||this.updateResult()},t+1)}#S(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#R(e){this.#v(),this.#f=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#s)&&(0,o.isValidTimeout)(this.#f)&&0!==this.#f&&(this.#d=l.timeoutManager.setInterval(()=>
1{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#m()},this.#f))}#y(){this.#x(),this.#R(this.#S())}#g(){this.#h&&(l.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#v(){this.#d&&(l.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r,s=this.#s,i=this.options,l=this.#i,u=this.#a,h=this.#o,p=e!==s?e.state:this.#n,{state:m}=e,y={...m},g=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&c(e,t),o=r&&d(e,s,t,i);(a||o)&&(y={...y,...(0,n.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:x}=y;r=y.data;let S=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===x){let e;l?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(e=l.data,S=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,void 0!==e&&(x="success",r=(0,o.replaceData)(l?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!S)if(l&&r===u?.data&&t.select===this.#l)r=this.#u;else try{this.#l=t.select,r=t.select(r),r=(0,o.replaceData)(l?.data,r,t),this.#u=r,this.#t=null}catch(e){this.#t=e}this.#t&&(v=this.#t,r=this.#u,b=Date.now(),x="error");let R="fetching"===y.fetchStatus,w="pending"===x,O="error"===x,T=w&&R,j=void 0!==r,E={status:x,fetchStatus:y.fetchStatus,isPending:w,isSuccess:"success"===x,isError:O,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:y.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!w,isLoadingError:O&&!j,isPaused:"paused"===y.fetchStatus,isPlaceholderData:g,isRefetchError:O&&j,isStale:f(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===E.status?e.reject(E.error):void 0!==E.data&&e.resolve(E.data)},r=()=>{t(this.#r=E.promise=(0,a.pendingThenable)())},n=this.#r;switch(n.status){case"pending":e.queryHash===s.queryHash&&t(n);break;case"fulfilled":("error"===E.status||E.data!==n.value)&&r();break;case"rejected":("error"!==E.status||E.error!==n.reason)&&r()}}return E}updateResult(){let e=this.#i,t=this.createResult(this.#s,this.options);if(this.#a=this.#s.state,this.#o=this.options,void 0!==this.#a.data&&(this.#c=this.#s),(0,o.shallowEqualObjects)(t,e))return;this.#i=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;let s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(t=>this.#i[t]!==e[t]&&s.has(t))};this.#w({listeners:r()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#w(e){s.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function c(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&f(e,t)}return!1}function d(e,t,r,s){return(e!==t||!1===(0,o.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(47167);var p=e.i(71645),m=e.i(12598);e.i(43476);var y=p.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),g=p.createContext(!1);g.Provider;var v=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function b(e,t){return function(e,t,r){let n=p.useContext(g),i=p.useContext(y),a=(0,m.useQueryClient)(r),l=a.defaultQueryOptions(e);if(a.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=n?"isRestoring":"optimistic",l.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=l.staleTime;l.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof l.gcTime&&(l.gcTime=Math.max(l.gcTime,1e3))}(l.suspense||l.throwOnError||l.experimental_prefetchInRender)&&!i.isReset()&&(l.retryOn
1Mount=!1),p.useEffect(()=>{i.clearReset()},[i]);let u=!a.getQueryCache().get(l.queryHash),[c]=p.useState(()=>new t(a,l)),h=c.getOptimisticResult(l),d=!n&&!1!==e.subscribed;if(p.useSyncExternalStore(p.useCallback(e=>{let t=d?c.subscribe(s.notifyManager.batchCalls(e)):o.noop;return c.updateResult(),t},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(l)},[l,c]),l?.suspense&&h.isPending)throw v(l,c,i);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,s])))({result:h,errorResetBoundary:i,throwOnError:l.throwOnError,query:a.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw h.error;if(a.getDefaultOptions().queries?._experimental_afterQuery?.(l,h),l.experimental_prefetchInRender&&!o.isServer&&h.isLoading&&h.isFetching&&!n){let e=u?v(l,c,i):a.getQueryCache().get(l.queryHash)?.promise;e?.catch(o.noop).finally(()=>{c.updateResult()})}return l.notifyOnChangeProps?h:c.trackResult(h)}(e,u,t)}e.s(["useQuery",()=>b],66027)},6081,e=>{"use strict";let t=async e=>{try{let t=await fetch("/api/verify",{method:"POST",body:JSON.stringify({codeforcesId:e}),cache:"no-store"}),r=await t.json();if(!t.ok)throw Error(r.message||"Verification failed");return{success:!0,message:r.message||"Verification successful"}}catch(e){return console.error("Verification failed:",e),{success:!1,message:e.message||"Verification failed"}}},r=async e=>{try{let t=await fetch("/api/profile/save-profile",{method:"POST",body:JSON.stringify({profileData:e})}),r=await t.json();if(!t.ok)throw Error(r.message||"Failed to save data");return{success:!0,data:r}}catch(e){return console.error("Could not save data:",e),{success:!1,message:e.message||"Failed to save data"}}},s=async()=>{try{let e=await fetch("/api/auth/logout"),t=await e.json();if(!e.ok)throw Error(t.message||"Logout failed");return{success:!0,data:t}}catch(e){return console.error("Logout failed:",e),{success:!1,message:e.message||"Logout failed"}}},n=async({ratingLow:e,ratingHigh:t})=>{try{let r=await fetch("/api/codeforces/get-questions",{method:"POST",body:JSON.stringify({ratingLow:e,ratingHigh:t})}),s=await r.json();if(!r.ok)throw Error(s.message||"Failed to fetch questions");return{success:!0,data:s}}catch(e){return console.error(e.message||"Failed to fetch questions"),{success:!1,message:e.message||"Failed to fetch questions"}}},i=async e=>{try{let t=await fetch("/api/user/prev-questions",{method:"POST",body:JSON.stringify({username:e})}),r=await t.json();if(!t.ok)throw Error(r.message||"Failed to fetch previous questions");return{success:!0,message:r.message||"Previous questions fetched successfully",data:r.data}}catch(e){return console.error("Failed to fetch previous questions:",e),{success:!1,message:e.message||"Failed to fetch previous questions"}}},a=async e=>{try{let t=await fetch("/api/codeforces/get-user-submissions",{method:"POST",body:JSON.stringify({codeforcesId:e})}),r=await t.json();if(!t.ok)throw Error(r.message||"Failed to fetch user submissions");return console.log("Fetched user submissions:",r),{success:!0,submissions:r.submissions}}catch(e){return console.error("Failed to fetch user submissions:",e),{success:!1,message:e.message||"Failed to fetch user submissions"}}},o=async e=>{try{let t=await fetch("/api/user/completed-setup",{method:"PUT",body:JSON.stringify({username:e})}),r=await t.json();if(!t.ok)throw Error(r.message||"Failed to mark setup as completed");return{success:!0,message:r.message||"Setup marked as completed"}}catch(e){return console.error("Failed to mark setup as completed:",e),{success:!1,message:"Failed to mark setup as completed"}}},l=async(e,t)=>{try{let r=await fetch("/api/profile/save-changes",{method:"PUT",body:JSON.stringify({username:e,updatedChanges:t})}),s=await r.json();if(!r.ok)throw Error(s.message||"Failed to save user changes");return{success:!0,message:s.message||"User changes saved successfully"}}catch(e){return console.error("Failed to save user changes:",e),{success:!1,message:e.message||"Failed to save user changes"}}},u=async()=>{let e=await fetch("/api/profile/token",{credentials:"include"}),t=await e.json();if(!e.ok)throw Error(t.message||"Failed to fetch profile token");return t};
1e.s(["fetchProfileToken",0,u,"getQuestions",0,n,"getUserSubmissions",0,a,"markSetupCompleted",0,o,"saveProfile",0,r,"saveUserChanges",0,l,"userLogout",0,s,"userPrevQuestions",0,i,"verifyCodeforcesId",0,t])},95089,e=>{"use strict";var t=e.i(43476);let r=(0,e.i(75254).default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var s=e.i(22016),n=e.i(67881);let i=()=>(0,t.jsx)("footer",{className:"w-full py-5 font-sans text-white mt-15",children:(0,t.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("h1",{className:"text-lg text-primary",children:"CodeCoach"}),(0,t.jsxs)("p",{className:"max-w-md text-gray-400 text-sm mt-2",children:["An ",(0,t.jsx)("span",{className:"text-blue-500",children:"open source"}
1)," platform for improving your coding skills. Why solve random, irrelevant problems when you can focus on what matters?"]}),(0,t.jsxs)("div",{className:"flex items-center gap-5 mt-2",children:[(0,t.jsx)(s.default,{href:"https://github.com/KushalXCoder/codecoach",target:"_blank",children:(0,t.jsxs)(n.Button,{className:"bg-gray-500 text-white w-fit group cursor-pointer",children:[(0,t.jsx)(r,{className:"group-hover:fill-white"})," Give us a star"]})}),(0,t.jsx)("a",{href:"https://www.producthunt.com/products/codecoach-3?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-codecoach-3",target:"_blank",rel:"noopener noreferrer",children:(0,t.jsx)("img",{alt:"CodeCoach - Practice personal curated codeforces questions | Product Hunt",width:"180",src:"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1063902&theme=light&t=1768919030689"})})]})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("h1",{className:"text-lg",children:"Product"}),(0,t.jsx)("div",{className:"flex flex-col text-gray-500 mt-1",children:(0,t.jsx)(s.default,{href:"https://github.com/KushalXCoder/codecoach",target:"_blank",className:"hover:underline",children:"GitHub"})})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("h1",{className:"text-lg",children:"Useful Links"}),(0,t.jsxs)("div",{className:"flex flex-col text-gray-500 mt-1",children:[(0,t.jsx)(s.default,{href:"/",className:"hover:underline",children:"Home"}),(0,t.jsx)(s.default,{href:"/problems",className:"hover:underline",children:"Problems"}),(0,t.jsx)(s.default,{href:"/profile",className:"hover:underline",children:"Profile"})]})]})]}),(0,t.jsx)("div",{className:"h-[0.5px] w-full bg-gray-500 my-3"}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-gray-500 text-sm",children:[(0,t.jsx)("p",{children:"© 2026 CodeCoach. All rights reserved."}),(0,t.jsxs)("p",{children:["Created by ","",(0,t.jsx)(s.default,{href:"https://kushalxcoder.vercel.app",className:"text-primary underline",children:"TheCodster"})]})]})]})}),a=()=>(0,t.jsx)("nav",{className:"w-full sticky top-0 py-5 z-10 backdrop-blur-2xl",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto flex justify-between items-center px-12",children:[(0,t.jsx)("h1",{className:"font-display text-3xl text-primary",children:"CodeCoach"}),(0,t.jsx)("ul",{className:"flex items-center gap-8 font-sans text-white",children:[{name:"Home",href:"/"},{name:"Problems",href:"/problems"},{name:"Contests",href:"/contests"},{name:"Profile",href:"/profile"}].map((e,r)=>(0,t.jsx)(s.default,{href:e.href,className:"hover:text-blue-500",children:e.name},r))})]})});var o=e.i(49148),l=e.i(66027),u=e.i(71645),c=e.i(18566),h=e.i(6081);let d=({children:e})=>{let{setUsername:t,setRating:r,setDailyLimit:s,setExperiencedTopics:n,setImproveTopics:i,setUpdatedSettings:a}=(0,o.profileStore)(),d=(0,c.useRouter)(),{data:f,isLoading:p,isError:m}=(0,l.useQuery)({queryKey:["profile"],queryFn:h.fetchProfileToken,retry:!1});return(0,u.useEffect)(()=>{if(!p){if(m||!f||null===f.decoded)return void d.push("/profile-setup");if(f){let e=f.decoded.data;t(e.username),r(e.rating),s(e.dailyLimit),i(e.improveTopics),n(e.experiencedTopics),a(e.updatedSettings)}}},[f,p,m]),e};var f=e.i(17751),p=e.i(12598);function m({children:e}){let[r]=(0,u.useState)(()=>new f.QueryClient);return(0,t.jsx)(p.QueryClientProvider,{client:r,children:(0,t.jsx)(d,{children:(0,t.jsxs)("div",{className:"min-h-screen flex flex-col w-full",children:[(0,t.jsx)(a,{}),(0,t.jsx)("main",{className:"flex-1 container max-w-7xl mx-auto px-28",children:e}),(0,t.jsx)(i,{})]})})})}e.s(["default",()=>m],95089)}]);
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.