const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./route.lazy-XfIqzMi4.js","./separator-ynTJIaNr.js","./button-CelbcUeQ.js","./utils-CBfrqCZ4.js","./icon-BlXji_cN.js","./theme-switch-BTjbva7m.js","./check-Cf1qvAeA.js","./index-iJdAfSEU.js","./index-CYlcUFEa.js","./Combination-COoKiHWy.js","./tslib.es6-DCIMiUBc.js","./index-4xFwHESw.js","./index-DN5rHhnO.js","./index-BbOj6V68.js","./avatar-VK2DhlGf.js","./navs-B9z4ZMdm.js","./index.lazy-BZDcVF23.js","./index-C495Dxve.js","./tabs-BnndXgZt.js","./area-code-select-Boba9aCr.js","./label-DCpq5UoB.js","./popover-DW05pwS9.js","./index-BMwrwpZP.js","./input-B99oFXor.js","./markdown-DlbNpOQL.js","./copy-3I-pAhdj.js","./extends-Bgw-VgKE.js","./oauth-B4VOHUuC.js","./index.lazy-D5v-z4Oj.js","./proxy-6pYyfnGX.js","./portal-CumWSinr.js","./card-IewHi5rT.js","./display-BzvmtheE.js","./formatting-0WZfFDNq.js","./detail-DXiRpoiy.js","./_platform.lazy-CozAJAvp.js","./spinner-B2i8FIi-.js","./_platform.lazy-Cz7XvF2l.js","./tos.lazy-DrNVytTa.js","./useQuery-BZydVEcj.js","./privacy-policy.lazy-DKUOGNXn.js","./payment.lazy-DdDGVY6h.js","./billing-DiydouPW.js","./order-DHIpx4WP.js","./stripe-JOYVyhAP.js","./index-CWB9t94w.js","./route.lazy-DB63iZj-.js","./dialog-LyR5xlck.js","./index-BTAOt3NI.js","./announcement-BcfP3fvT.js","./empty-BhZBQTjA.js","./announcement-Dct01dSO.js","./index-B-E9ONlk.js","./recharge-BLT30yQv.js","./enhanced-input-CMYyNdRS.js","./payment-methods-DqtZ_n4U.js","./index-qgw-Y51W.js","./index.lazy-Couxvjzq.js","./duration-selector-zX3LGMLB.js","./wallet.lazy-B-sULRGB.js","./pro-list-BX4y-2FH.js","./chevron-down-c5uPSuo9.js","./ticket.lazy-BngROJwU.js","./alert-dialog-DloEC5ln.js","./subscribe.lazy-CgulPHYy.js","./index-C2PDlBu_.js","./profile.lazy-BcCUu6LJ.js","./order.lazy-B9tA3FFq.js","./document.lazy-BdfQH5sO.js","./dashboard.lazy-oi8NHC50.js","./announcement.lazy-JZReVdSN.js","./affiliate.lazy-Cd_P-Aqp.js","./index.lazy-B2owfSzP.js"])))=>i.map(i=>d[i]); function _mergeNamespaces(e,n){for(var r=0;ri[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function r(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(l){if(l.ep)return;l.ep=!0;const u=r(l);fetch(l.href,u)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var r=function i(){var l=!1;try{l=this instanceof i}catch{}return l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var l=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,l.get?l:{enumerable:!0,get:function(){return e[i]}})}),r}var jsxRuntime={exports:{}},reactJsxRuntime_production={};var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(i,l,u){var f=null;if(u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),"key"in l){u={};for(var p in l)p!=="key"&&(u[p]=l[p])}else u=l;return l=u.ref,{$$typeof:e,type:i,key:f,ref:l!==void 0?l:null,props:u}}return reactJsxRuntime_production.Fragment=n,reactJsxRuntime_production.jsx=r,reactJsxRuntime_production.jsxs=r,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime();const __storeToDerived=new WeakMap,__derivedToStore=new WeakMap,__depsThatHaveWrittenThisTick={current:[]};let __isFlushing=!1,__batchDepth=0;const __pendingUpdates=new Set,__initialBatchValues=new Map;function __flush_internals(e){for(const n of e){if(__depsThatHaveWrittenThisTick.current.includes(n))continue;__depsThatHaveWrittenThisTick.current.push(n),n.recompute();const r=__derivedToStore.get(n);if(r)for(const i of r){const l=__storeToDerived.get(i);l?.length&&__flush_internals(l)}}}function __notifyListeners(e){const n={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(n)}function __notifyDerivedListeners(e){const n={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(n)}function __flush(e){if(__batchDepth>0&&!__initialBatchValues.has(e)&&__initialBatchValues.set(e,e.prevState),__pendingUpdates.add(e),!(__batchDepth>0)&&!__isFlushing)try{for(__isFlushing=!0;__pendingUpdates.size>0;){const n=Array.from(__pendingUpdates);__pendingUpdates.clear();for(const r of n){const i=__initialBatchValues.get(r)??r.prevState;r.prevState=i,__notifyListeners(r)}for(const r of n){const i=__storeToDerived.get(r);i&&(__depsThatHaveWrittenThisTick.current.push(r),__flush_internals(i))}for(const r of n){const i=__storeToDerived.get(r);if(i)for(const l of i)__notifyDerivedListeners(l)}}}finally{__isFlushing=!1,__depsThatHaveWrittenThisTick.current=[],__initialBatchValues.clear()}}function batch(e){__batchDepth++;try{e()}finally{if(__batchDepth--,__batchDepth===0){const n=__pendingUpdates.values().next().value;n&&__flush(n)}}}function isUpdaterFunction(e){return typeof e=="function"}class Store{constructor(n,r){this.listeners=new Set,this.subscribe=i=>{var l,u;this.listeners.add(i);const f=(u=(l=this.options)==null?void 0:l.onSubscribe)==null?void 0:u.call(l,i,this);return()=>{this.listeners.delete(i),f?.()}},this.prevState=n,this.state=n,this.options=r}setState(n){var r,i,l;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(n):isUpdaterFunction(n)?this.state=n(this.prevState):this.state=n,(l=(i=this.options)==null?void 0:i.onUpdate)==null||l.call(i),__flush(this)}}const stateIndexKey="__TSR_index",popStateEvent="popstate",beforeUnloadEvent="beforeunload";function createHistory(e){let n=e.getLocation();const r=new Set,i=f=>{n=e.getLocation(),r.forEach(p=>p({location:n,action:f}))},l=f=>{e.notifyOnIndexChange??!0?i(f):n=e.getLocation()},u=async({task:f,navigateOpts:p,...g})=>{if(p?.ignoreBlocker??!1){f();return}const v=e.getBlockers?.()??[],y=g.type==="PUSH"||g.type==="REPLACE";if(typeof document<"u"&&v.length&&y)for(const b of v){const R=parseHref(g.path,g.state);if(await b.blockerFn({currentLocation:n,nextLocation:R,action:g.type})){e.onBlocked?.();return}}f()};return{get location(){return n},get length(){return e.getLength()},subscribers:r,subscribe:f=>(r.add(f),()=>{r.delete(f)}),push:(f,p,g)=>{const m=n.state[stateIndexKey];p=assignKeyAndIndex(m+1,p),u({task:()=>{e.pushState(f,p),i({type:"PUSH"})},navigateOpts:g,type:"PUSH",path:f,state:p})},replace:(f,p,g)=>{const m=n.state[stateIndexKey];p=assignKeyAndIndex(m,p),u({task:()=>{e.replaceState(f,p),i({type:"REPLACE"})},navigateOpts:g,type:"REPLACE",path:f,state:p})},go:(f,p)=>{u({task:()=>{e.go(f),l({type:"GO",index:f})},navigateOpts:p,type:"GO"})},back:f=>{u({task:()=>{e.back(f?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:f,type:"BACK"})},forward:f=>{u({task:()=>{e.forward(f?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:f,type:"FORWARD"})},canGoBack:()=>n.state[stateIndexKey]!==0,createHref:f=>e.createHref(f),block:f=>{if(!e.setBlockers)return()=>{};const p=e.getBlockers?.()??[];return e.setBlockers([...p,f]),()=>{const g=e.getBlockers?.()??[];e.setBlockers?.(g.filter(m=>m!==f))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function assignKeyAndIndex(e,n){n||(n={});const r=createRandomKey();return{...n,key:r,__TSR_key:r,[stateIndexKey]:e}}function createBrowserHistory(e){const n=e?.window??(typeof document<"u"?window:void 0),r=n.history.pushState,i=n.history.replaceState;let l=[];const u=()=>l,f=te=>l=te,p=e?.createHref??(te=>te),g=e?.parseLocation??(()=>parseHref(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const te=createRandomKey();n.history.replaceState({[stateIndexKey]:0,key:te,__TSR_key:te},"")}let m=g(),v,y=!1,b=!1,R=!1,E=!1;const A=()=>m;let O,$;const q=()=>{O&&(F._ignoreSubscribers=!0,(O.isPush?n.history.pushState:n.history.replaceState)(O.state,"",O.href),F._ignoreSubscribers=!1,O=void 0,$=void 0,v=void 0)},Z=(te,ne,oe)=>{const se=p(ne);$||(v=m),m=parseHref(ne,oe),O={href:se,state:oe,isPush:O?.isPush||te==="push"},$||($=Promise.resolve().then(()=>q()))},V=te=>{m=g(),F.notify({type:te})},re=async()=>{if(b){b=!1;return}const te=g(),ne=te.state[stateIndexKey]-m.state[stateIndexKey],oe=ne===1,se=ne===-1,ce=!oe&&!se||y;y=!1;const le=ce?"GO":se?"BACK":"FORWARD",fe=ce?{type:"GO",index:ne}:{type:se?"BACK":"FORWARD"};if(R)R=!1;else{const ge=u();if(typeof document<"u"&&ge.length){for(const L of ge)if(await L.blockerFn({currentLocation:m,nextLocation:te,action:le})){b=!0,n.history.go(1),F.notify(fe);return}}}m=g(),F.notify(fe)},J=te=>{if(E){E=!1;return}let ne=!1;const oe=u();if(typeof document<"u"&&oe.length)for(const se of oe){const ce=se.enableBeforeUnload??!0;if(ce===!0){ne=!0;break}if(typeof ce=="function"&&ce()===!0){ne=!0;break}}if(ne)return te.preventDefault(),te.returnValue=""},F=createHistory({getLocation:A,getLength:()=>n.history.length,pushState:(te,ne)=>Z("push",te,ne),replaceState:(te,ne)=>Z("replace",te,ne),back:te=>(te&&(R=!0),E=!0,n.history.back()),forward:te=>{te&&(R=!0),E=!0,n.history.forward()},go:te=>{y=!0,n.history.go(te)},createHref:te=>p(te),flush:q,destroy:()=>{n.history.pushState=r,n.history.replaceState=i,n.removeEventListener(beforeUnloadEvent,J,{capture:!0}),n.removeEventListener(popStateEvent,re)},onBlocked:()=>{v&&m!==v&&(m=v)},getBlockers:u,setBlockers:f,notifyOnIndexChange:!1});return n.addEventListener(beforeUnloadEvent,J,{capture:!0}),n.addEventListener(popStateEvent,re),n.history.pushState=function(...te){const ne=r.apply(n.history,te);return F._ignoreSubscribers||V("PUSH"),ne},n.history.replaceState=function(...te){const ne=i.apply(n.history,te);return F._ignoreSubscribers||V("REPLACE"),ne},F}function createHashHistory(e){const n=typeof document<"u"?window:void 0;return createBrowserHistory({window:n,parseLocation:()=>{const r=n.location.hash.split("#").slice(1),i=r[0]??"/",l=n.location.search,u=r.slice(1),f=u.length===0?"":`#${u.join("#")}`,p=`${i}${l}${f}`;return parseHref(p,n.history.state)},createHref:r=>`${n.location.pathname}${n.location.search}#${r}`})}function parseHref(e,n){const r=e.indexOf("#"),i=e.indexOf("?"),l=createRandomKey();return{href:e,pathname:e.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:e.length),hash:r>-1?e.substring(r):"",search:i>-1?e.slice(i,r===-1?void 0:r):"",state:n||{[stateIndexKey]:0,key:l,__TSR_key:l}}}function createRandomKey(){return(Math.random()+1).toString(36).substring(7)}function last(e){return e[e.length-1]}function isFunction$2(e){return typeof e=="function"}function functionalUpdate$1(e,n){return isFunction$2(e)?e(n):e}const hasOwn$1=Object.prototype.hasOwnProperty;function replaceEqualDeep$1(e,n){if(e===n)return e;const r=n,i=isPlainArray$1(e)&&isPlainArray$1(r);if(!i&&!(isPlainObject$3(e)&&isPlainObject$3(r)))return r;const l=i?e:getEnumerableOwnKeys(e);if(!l)return r;const u=i?r:getEnumerableOwnKeys(r);if(!u)return r;const f=l.length,p=u.length,g=i?new Array(p):{};let m=0;for(let v=0;v"u")return!0;const r=n.prototype;return!(!hasObjectPrototype$1(r)||!r.hasOwnProperty("isPrototypeOf"))}function hasObjectPrototype$1(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainArray$1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function deepEqual(e,n,r){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let i=0,l=e.length;il||!deepEqual(e[f],n[f],r)))return!1;return l===u}return!1}function createControlledPromise(e){let n,r;const i=new Promise((l,u)=>{n=l,r=u});return i.status="pending",i.resolve=l=>{i.status="resolved",i.value=l,n(l),e?.(l)},i.reject=l=>{i.status="rejected",r(l)},i}function isPromise$1(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function decodeSegment(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}}function decodePath(e,n){if(!e)return e;const r=/%25|%5C/gi;let i=0,l="",u;for(;(u=r.exec(e))!==null;)l+=decodeSegment(e.slice(i,u.index))+u[0],i=r.lastIndex;return l+decodeSegment(i?e.slice(i):e)}var prefix="Invariant failed";function invariant$1(e,n){if(!e)throw new Error(prefix)}function createLRUCache(e){const n=new Map;let r,i;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,i&&(i.next=u,u.prev=i)):(u.next.prev=void 0,r=u.next,u.next=void 0,i&&(u.prev=i,i.next=u)),i=u)};return{get(u){const f=n.get(u);if(f)return l(f),f.value},set(u,f){if(n.size>=e&&r){const g=r;n.delete(g.key),g.next&&(r=g.next,g.next.prev=void 0),g===i&&(i=void 0)}const p=n.get(u);if(p)p.value=f,l(p);else{const g={key:u,value:f,prev:i};i&&(i.next=g),i=g,r||(r=g),n.set(u,g)}},clear(){n.clear(),r=void 0,i=void 0}}}const SEGMENT_TYPE_PATHNAME=0,SEGMENT_TYPE_PARAM=1,SEGMENT_TYPE_WILDCARD=2,SEGMENT_TYPE_OPTIONAL_PARAM=3,PARAM_W_CURLY_BRACES_RE=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,OPTIONAL_PARAM_W_CURLY_BRACES_RE=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,WILDCARD_W_CURLY_BRACES_RE=/^([^{]*)\{\$\}([^}]*)$/;function parseSegment(e,n,r=new Uint16Array(6)){const i=e.indexOf("/",n),l=i===-1?e.length:i,u=e.substring(n,l);if(!u||!u.includes("$"))return r[0]=SEGMENT_TYPE_PATHNAME,r[1]=n,r[2]=n,r[3]=l,r[4]=l,r[5]=l,r;if(u==="$"){const m=e.length;return r[0]=SEGMENT_TYPE_WILDCARD,r[1]=n,r[2]=n,r[3]=m,r[4]=m,r[5]=m,r}if(u.charCodeAt(0)===36)return r[0]=SEGMENT_TYPE_PARAM,r[1]=n,r[2]=n+1,r[3]=l,r[4]=l,r[5]=l,r;const f=u.match(WILDCARD_W_CURLY_BRACES_RE);if(f){const v=f[1].length;return r[0]=SEGMENT_TYPE_WILDCARD,r[1]=n+v,r[2]=n+v+1,r[3]=n+v+2,r[4]=n+v+3,r[5]=e.length,r}const p=u.match(OPTIONAL_PARAM_W_CURLY_BRACES_RE);if(p){const m=p[1],v=p[2],y=p[3],b=m.length;return r[0]=SEGMENT_TYPE_OPTIONAL_PARAM,r[1]=n+b,r[2]=n+b+3,r[3]=n+b+3+v.length,r[4]=l-y.length,r[5]=l,r}const g=u.match(PARAM_W_CURLY_BRACES_RE);if(g){const m=g[1],v=g[2],y=g[3],b=m.length;return r[0]=SEGMENT_TYPE_PARAM,r[1]=n+b,r[2]=n+b+2,r[3]=n+b+2+v.length,r[4]=l-y.length,r[5]=l,r}return r[0]=SEGMENT_TYPE_PATHNAME,r[1]=n,r[2]=n,r[3]=l,r[4]=l,r[5]=l,r}function parseSegments(e,n,r,i,l,u,f){f?.(r);let p=i;{const g=r.fullPath??r.from,m=g.length,v=r.options?.caseSensitive??e;for(;pJ.caseSensitive===q&&J.prefix===Z&&J.suffix===V);if(re)b=re;else{const J=createDynamicNode(SEGMENT_TYPE_PARAM,r.fullPath??r.from,q,Z,V);b=J,J.depth=u,J.parent=l,l.dynamic??=[],l.dynamic.push(J)}break}case SEGMENT_TYPE_OPTIONAL_PARAM:{const O=g.substring(R,y[1]),$=g.substring(y[4],E),q=v&&!!(O||$),Z=O?q?O:O.toLowerCase():void 0,V=$?q?$:$.toLowerCase():void 0,re=l.optional?.find(J=>J.caseSensitive===q&&J.prefix===Z&&J.suffix===V);if(re)b=re;else{const J=createDynamicNode(SEGMENT_TYPE_OPTIONAL_PARAM,r.fullPath??r.from,q,Z,V);b=J,J.parent=l,J.depth=u,l.optional??=[],l.optional.push(J)}break}case SEGMENT_TYPE_WILDCARD:{const O=g.substring(R,y[1]),$=g.substring(y[4],E),q=v&&!!(O||$),Z=O?q?O:O.toLowerCase():void 0,V=$?q?$:$.toLowerCase():void 0,re=createDynamicNode(SEGMENT_TYPE_WILDCARD,r.fullPath??r.from,q,Z,V);b=re,re.parent=l,re.depth=u,l.wildcard??=[],l.wildcard.push(re)}}l=b}if((r.path||!r.children)&&!r.isRoot){const y=g.endsWith("/");y||(l.notFound=r),(!l.route||!l.isIndex&&y)&&(l.route=r),l.isIndex||=y}}if(r.children)for(const g of r.children)parseSegments(e,n,g,p,l,u,f)}function sortDynamic(e,n){if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function sortTreeNodes(e){if(e.static)for(const n of e.static.values())sortTreeNodes(n);if(e.staticInsensitive)for(const n of e.staticInsensitive.values())sortTreeNodes(n);if(e.dynamic?.length){e.dynamic.sort(sortDynamic);for(const n of e.dynamic)sortTreeNodes(n)}if(e.optional?.length){e.optional.sort(sortDynamic);for(const n of e.optional)sortTreeNodes(n)}if(e.wildcard?.length){e.wildcard.sort(sortDynamic);for(const n of e.wildcard)sortTreeNodes(n)}}function createStaticNode(e){return{kind:SEGMENT_TYPE_PATHNAME,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function createDynamicNode(e,n,r,i,l){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,isIndex:!1,notFound:null,caseSensitive:r,prefix:i,suffix:l}}function processRouteMasks(e,n){const r=createStaticNode("/"),i=new Uint16Array(6);for(const l of e)parseSegments(!1,i,l,1,r,0);sortTreeNodes(r),n.masksTree=r,n.flatCache=createLRUCache(1e3)}function findFlatMatch(e,n){e||="/";const r=n.flatCache.get(e);if(r)return r;const i=findMatch(e,n.masksTree);return n.flatCache.set(e,i),i}function findSingleMatch(e,n,r,i,l){e||="/",i||="/";const u=n?`case\0${e}`:e;let f=l.singleCache.get(u);if(!f){f=createStaticNode("/");const p=new Uint16Array(6);parseSegments(n,p,{from:e},1,f,0),l.singleCache.set(u,f)}return findMatch(i,f,r)}function findRouteMatch(e,n,r=!1){const i=r?e:`nofuzz\0${e}`,l=n.matchCache.get(i);if(l!==void 0)return l;e||="/";const u=findMatch(e,n.segmentTree,r);return u&&(u.branch=buildRouteBranch(u.route)),n.matchCache.set(i,u),u}function trimPathRight$1(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function processRouteTree(e,n=!1,r){const i=createStaticNode(e.fullPath),l=new Uint16Array(6),u={},f={};let p=0;return parseSegments(n,l,e,1,i,0,m=>{if(r?.(m,p),invariant$1(!(m.id in u),`Duplicate routes found with id: ${String(m.id)}`),u[m.id]=m,p!==0&&m.path){const v=trimPathRight$1(m.fullPath);(!f[v]||m.fullPath.endsWith("/"))&&(f[v]=m)}p++}),sortTreeNodes(i),{processedTree:{segmentTree:i,singleCache:createLRUCache(1e3),matchCache:createLRUCache(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:f}}function findMatch(e,n,r=!1){const i=e.split("/"),l=getNodeMatch(e,i,n,r);if(!l)return null;const u=extractParams(e,i,l),f="**"in l;return f&&(u["**"]=l["**"]),{route:f?l.node.notFound??l.node.route:l.node.route,params:u}}function extractParams(e,n,r){const i=buildBranch(r.node);let l=null;const u={};for(let f=0,p=0,g=0;p=0;te--){const ne=b.optional[te];p.push({node:ne,index:R,skipped:J,depth:F,statics:O,dynamics:$,optionals:q})}if(!Z)for(let te=b.optional.length-1;te>=0;te--){const ne=b.optional[te],{prefix:oe,suffix:se}=ne;if(oe||se){const ce=ne.caseSensitive?V:re??=V.toLowerCase();if(oe&&!ce.startsWith(oe)||se&&!ce.endsWith(se))continue}p.push({node:ne,index:R+1,skipped:E,depth:F,statics:O,dynamics:$,optionals:q+1})}}if(!Z&&b.dynamic&&V)for(let J=b.dynamic.length-1;J>=0;J--){const F=b.dynamic[J],{prefix:te,suffix:ne}=F;if(te||ne){const oe=F.caseSensitive?V:re??=V.toLowerCase();if(te&&!oe.startsWith(te)||ne&&!oe.endsWith(ne))continue}p.push({node:F,index:R+1,skipped:E,depth:A+1,statics:O,dynamics:$+1,optionals:q})}if(!Z&&b.staticInsensitive){const J=b.staticInsensitive.get(re??=V.toLowerCase());J&&p.push({node:J,index:R+1,skipped:E,depth:A+1,statics:O+1,dynamics:$,optionals:q})}if(!Z&&b.static){const J=b.static.get(V);J&&p.push({node:J,index:R+1,skipped:E,depth:A+1,statics:O+1,dynamics:$,optionals:q})}}if(v)return v;if(g)return g;if(i&&m){let y=m.index;for(let R=0;Re.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&n.optionals>e.optionals):!0}function joinPaths(e){return cleanPath(e.filter(n=>n!==void 0).join("/"))}function cleanPath(e){return e.replace(/\/{2,}/g,"/")}function trimPathLeft(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function trimPathRight(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function trimPath(e){return trimPathRight(trimPathLeft(e))}function removeTrailingSlash(e,n){return e?.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function exactPathTest(e,n,r){return removeTrailingSlash(e,r)===removeTrailingSlash(n,r)}function resolvePath({base:e,to:n,trailingSlash:r="never",cache:i}){const l=n.startsWith("/"),u=!l&&n===".";let f;if(i){f=l?n:u?e:e+"\0"+n;const y=i.get(f);if(y)return y}let p;if(u)p=e.split("/");else if(l)p=n.split("/");else{for(p=e.split("/");p.length>1&&last(p)==="";)p.pop();const y=n.split("/");for(let b=0,R=y.length;b1&&(last(p)===""?r==="never"&&p.pop():r==="always"&&p.push(""));let g,m="";for(let y=0;y0&&(m+="/");const b=p[y];if(!b)continue;g=parseSegment(b,0,g);const R=g[0];if(R===SEGMENT_TYPE_PATHNAME){m+=b;continue}const E=g[5],A=b.substring(0,g[1]),O=b.substring(g[4],E),$=b.substring(g[2],g[3]);R===SEGMENT_TYPE_PARAM?m+=A||O?`${A}{$${$}}${O}`:`$${$}`:R===SEGMENT_TYPE_WILDCARD?m+=A||O?`${A}{$}${O}`:"$":m+=`${A}{-$${$}}${O}`}m=cleanPath(m);const v=m||"/";return f&&i&&i.set(f,v),v}function encodeParam(e,n,r){const i=n[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):encodePathParam(i,r)}function interpolatePath({path:e,params:n,decodeCharMap:r}){let i=!1;const l={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:i};const u=e.length;let f=0,p,g="";for(;f{let r;return(...i)=>{r||(r=setTimeout(()=>{e(...i),r=null},n))}};function createScrollRestorationCache(){const e=getSafeSessionStorage();if(!e)return null;const n=e.getItem(storageKey);let r=n?JSON.parse(n):{};return{state:r,set:i=>(r=functionalUpdate$1(i,r)||r,e.setItem(storageKey,JSON.stringify(r)))}}const scrollRestorationCache=createScrollRestorationCache(),defaultGetScrollRestorationKey=e=>e.state.__TSR_key||e.href;function getCssSelector(e){const n=[];let r;for(;r=e.parentNode;)n.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${n.reverse().join(" > ")}`.toLowerCase()}let ignoreScroll=!1;function restoreScroll({storageKey:e,key:n,behavior:r,shouldScrollRestoration:i,scrollToTopSelectors:l,location:u}){let f;try{f=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(m){console.error(m);return}const p=n||window.history.state?.__TSR_key,g=f[p];ignoreScroll=!0;e:{if(i&&g&&Object.keys(g).length>0){for(const y in g){const b=g[y];if(y==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:r});else if(y){const R=document.querySelector(y);R&&(R.scrollLeft=b.scrollX,R.scrollTop=b.scrollY)}}break e}const m=(u??window.location).hash.split("#",2)[1];if(m){const y=window.history.state?.__hashScrollIntoViewOptions??!0;if(y){const b=document.getElementById(m);b&&b.scrollIntoView(y)}break e}const v={top:0,left:0,behavior:r};if(window.scrollTo(v),l)for(const y of l){if(y==="window")continue;const b=typeof y=="function"?y():document.querySelector(y);b&&b.scrollTo(v)}}ignoreScroll=!1}function setupScrollRestoration(e,n){if(!scrollRestorationCache&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!scrollRestorationCache))return;e.isScrollRestorationSetup=!0,ignoreScroll=!1;const i=e.options.getScrollRestorationKey||defaultGetScrollRestorationKey;window.history.scrollRestoration="manual";const l=u=>{if(ignoreScroll||!e.isScrollRestoring)return;let f="";if(u.target===document||u.target===window)f="window";else{const g=u.target.getAttribute("data-scroll-restoration-id");g?f=`[data-scroll-restoration-id="${g}"]`:f=getCssSelector(u.target)}const p=i(e.state.location);scrollRestorationCache.set(g=>{const m=g[p]||={},v=m[f]||={};if(f==="window")v.scrollX=window.scrollX||0,v.scrollY=window.scrollY||0;else if(f){const y=document.querySelector(f);y&&(v.scrollX=y.scrollLeft||0,v.scrollY=y.scrollTop||0)}return g})};typeof document<"u"&&document.addEventListener("scroll",throttle$1(l,100),!0),e.subscribe("onRendered",u=>{const f=i(u.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(restoreScroll({storageKey,key:f,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&scrollRestorationCache.set(p=>(p[f]||={},p)))})}function handleHashScroll(e){if(typeof document<"u"&&document.querySelector){const n=e.state.location.state.__hashScrollIntoViewOptions??!0;if(n&&e.state.location.hash!==""){const r=document.getElementById(e.state.location.hash);r&&r.scrollIntoView(n)}}}function encode$3(e,n=String){const r=new URLSearchParams;for(const i in e){const l=e[i];l!==void 0&&r.set(i,n(l))}return r.toString()}function toValue(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function decode$1(e){const n=new URLSearchParams(e),r={};for(const[i,l]of n.entries()){const u=r[i];u==null?r[i]=toValue(l):Array.isArray(u)?u.push(toValue(l)):r[i]=[u,toValue(l)]}return r}const defaultParseSearch=parseSearchWith(JSON.parse),defaultStringifySearch=stringifySearchWith(JSON.stringify,JSON.parse);function parseSearchWith(e){return n=>{n[0]==="?"&&(n=n.substring(1));const r=decode$1(n);for(const i in r){const l=r[i];if(typeof l=="string")try{r[i]=e(l)}catch{}}return r}}function stringifySearchWith(e,n){const r=typeof n=="function";function i(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(r&&typeof l=="string")try{return n(l),e(l)}catch{}return l}return l=>{const u=encode$3(l,i);return u?`?${u}`:""}}const rootRouteId="__root__";function redirect(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:n});if(r.options=e,e.throw)throw r;return r}function isRedirect(e){return e instanceof Response&&!!e.options}const triggerOnReady=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},resolvePreload=(e,n)=>!!(e.preload&&!e.router.state.matches.some(r=>r.id===n)),_handleNotFound=(e,n)=>{const r=e.router.routesById[n.routeId??""]??e.router.routeTree;!r.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(r.options.notFoundComponent=e.router.options.defaultNotFoundComponent),invariant$1(r.options.notFoundComponent);const i=e.matches.find(l=>l.routeId===r.id);invariant$1(i,"Could not find match for route: "+r.id),e.updateMatch(i.id,l=>({...l,status:"notFound",error:n,isFetching:!1})),n.routerCode==="BEFORE_LOAD"&&r.parentRoute&&(n.routeId=r.parentRoute.id,_handleNotFound(e,n))},handleRedirectAndNotFound=(e,n,r)=>{if(!(!isRedirect(r)&&!isNotFound(r))){if(isRedirect(r)&&r.redirectHandled&&!r.options.reloadDocument)throw r;if(n){n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0;const i=isRedirect(r)?"redirected":"notFound";n._nonReactive.error=r,e.updateMatch(n.id,l=>({...l,status:i,isFetching:!1,error:r})),isNotFound(r)&&!r.routeId&&(r.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()}throw isRedirect(r)?(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r),r):(_handleNotFound(e,r),r)}},shouldSkipLoader=(e,n)=>{const r=e.router.getMatch(n);return!!(!e.router.isServer&&r._nonReactive.dehydrated||e.router.isServer&&r.ssr===!1)},handleSerialError=(e,n,r,i)=>{const{id:l,routeId:u}=e.matches[n],f=e.router.looseRoutesById[u];if(r instanceof Promise)throw r;r.routerCode=i,e.firstBadMatchIndex??=n,handleRedirectAndNotFound(e,e.router.getMatch(l),r);try{f.options.onError?.(r)}catch(p){r=p,handleRedirectAndNotFound(e,e.router.getMatch(l),r)}e.updateMatch(l,p=>(p._nonReactive.beforeLoadPromise?.resolve(),p._nonReactive.beforeLoadPromise=void 0,p._nonReactive.loadPromise?.resolve(),{...p,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},isBeforeLoadSsr=(e,n,r,i)=>{const l=e.router.getMatch(n),u=e.matches[r-1]?.id,f=u?e.router.getMatch(u):void 0;if(e.router.isShell()){l.ssr=i.id===rootRouteId;return}if(f?.ssr===!1){l.ssr=!1;return}const p=R=>R===!0&&f?.ssr==="data-only"?"data-only":R,g=e.router.options.defaultSsr??!0;if(i.options.ssr===void 0){l.ssr=p(g);return}if(typeof i.options.ssr!="function"){l.ssr=p(i.options.ssr);return}const{search:m,params:v}=l,y={search:makeMaybe(m,l.searchError),params:makeMaybe(v,l.paramsError),location:e.location,matches:e.matches.map(R=>({index:R.index,pathname:R.pathname,fullPath:R.fullPath,staticData:R.staticData,id:R.id,routeId:R.routeId,search:makeMaybe(R.search,R.searchError),params:makeMaybe(R.params,R.paramsError),ssr:R.ssr}))},b=i.options.ssr(y);if(isPromise$1(b))return b.then(R=>{l.ssr=p(R??g)});l.ssr=p(b??g)},setupPendingTimeout=(e,n,r,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const l=r.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!resolvePreload(e,n)&&(r.options.loader||r.options.beforeLoad||routeNeedsPreload(r))&&typeof l=="number"&&l!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent))){const f=setTimeout(()=>{triggerOnReady(e)},l);i._nonReactive.pendingTimeout=f}},preBeforeLoadSetup=(e,n,r)=>{const i=e.router.getMatch(n);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;setupPendingTimeout(e,n,r,i);const l=()=>{const u=e.router.getMatch(n);u.preload&&(u.status==="redirected"||u.status==="notFound")&&handleRedirectAndNotFound(e,u,u.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(l):l()},executeBeforeLoad=(e,n,r,i)=>{const l=e.router.getMatch(n),u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=createControlledPromise(()=>{u?.resolve()});const{paramsError:f,searchError:p}=l;f&&handleSerialError(e,r,f,"PARSE_PARAMS"),p&&handleSerialError(e,r,p,"VALIDATE_SEARCH"),setupPendingTimeout(e,n,i,l);const g=new AbortController,m=e.matches[r-1]?.id,b={...(m?e.router.getMatch(m):void 0)?.context??e.router.options.context??void 0,...l.__routeContext};let R=!1;const E=()=>{R||(R=!0,e.updateMatch(n,F=>({...F,isFetching:"beforeLoad",fetchCount:F.fetchCount+1,abortController:g,context:b})))},A=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,F=>({...F,isFetching:!1}))};if(!i.options.beforeLoad){batch(()=>{E(),A()});return}l._nonReactive.beforeLoadPromise=createControlledPromise();const{search:O,params:$,cause:q}=l,Z=resolvePreload(e,n),V={search:O,abortController:g,params:$,preload:Z,context:b,location:e.location,navigate:F=>e.router.navigate({...F,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:Z?"preload":q,matches:e.matches,...e.router.options.additionalContext},re=F=>{if(F===void 0){batch(()=>{E(),A()});return}(isRedirect(F)||isNotFound(F))&&(E(),handleSerialError(e,r,F,"BEFORE_LOAD")),batch(()=>{E(),e.updateMatch(n,te=>({...te,__beforeLoadContext:F,context:{...te.context,...F}})),A()})};let J;try{if(J=i.options.beforeLoad(V),isPromise$1(J))return E(),J.catch(F=>{handleSerialError(e,r,F,"BEFORE_LOAD")}).then(re)}catch(F){E(),handleSerialError(e,r,F,"BEFORE_LOAD")}re(J)},handleBeforeLoad=(e,n)=>{const{id:r,routeId:i}=e.matches[n],l=e.router.looseRoutesById[i],u=()=>{if(e.router.isServer){const g=isBeforeLoadSsr(e,r,n,l);if(isPromise$1(g))return g.then(p)}return p()},f=()=>executeBeforeLoad(e,r,n,l),p=()=>{if(shouldSkipLoader(e,r))return;const g=preBeforeLoadSetup(e,r,l);return isPromise$1(g)?g.then(f):f()};return u()},executeHead=(e,n,r)=>{const i=e.router.getMatch(n);if(!i||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const l={matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([r.options.head?.(l),r.options.scripts?.(l),r.options.headers?.(l)]).then(([u,f,p])=>{const g=u?.meta,m=u?.links,v=u?.scripts,y=u?.styles;return{meta:g,links:m,headScripts:v,headers:p,scripts:f,styles:y}})},getLoaderContext=(e,n,r,i)=>{const l=e.matchPromises[r-1],{params:u,loaderDeps:f,abortController:p,cause:g}=e.router.getMatch(n);let m=e.router.options.context??{};for(let y=0;y<=r;y++){const b=e.matches[y];if(!b)continue;const R=e.router.getMatch(b.id);R&&(m={...m,...R.__routeContext??{},...R.__beforeLoadContext??{}})}const v=resolvePreload(e,n);return{params:u,deps:f,preload:!!v,parentMatchPromise:l,abortController:p,context:m,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:v?"preload":g,route:i,...e.router.options.additionalContext}},runLoader=async(e,n,r,i)=>{try{const l=e.router.getMatch(n);try{(!e.router.isServer||l.ssr===!0)&&loadRouteChunk(i);const u=i.options.loader?.(getLoaderContext(e,n,r,i)),f=i.options.loader&&isPromise$1(u);if(!!(f||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||l._nonReactive.minPendingPromise)&&e.updateMatch(n,y=>({...y,isFetching:"loader"})),i.options.loader){const y=f?await u:u;handleRedirectAndNotFound(e,e.router.getMatch(n),y),y!==void 0&&e.updateMatch(n,b=>({...b,loaderData:y}))}i._lazyPromise&&await i._lazyPromise;const g=executeHead(e,n,i),m=g?await g:void 0,v=l._nonReactive.minPendingPromise;v&&await v,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,y=>({...y,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...m}))}catch(u){let f=u;const p=l._nonReactive.minPendingPromise;p&&await p,isNotFound(u)&&await i.options.notFoundComponent?.preload?.(),handleRedirectAndNotFound(e,e.router.getMatch(n),u);try{i.options.onError?.(u)}catch(v){f=v,handleRedirectAndNotFound(e,e.router.getMatch(n),v)}const g=executeHead(e,n,i),m=g?await g:void 0;e.updateMatch(n,v=>({...v,error:f,status:"error",isFetching:!1,...m}))}}catch(l){const u=e.router.getMatch(n);if(u){const f=executeHead(e,n,i);if(f){const p=await f;e.updateMatch(n,g=>({...g,...p}))}u._nonReactive.loaderPromise=void 0}handleRedirectAndNotFound(e,u,l)}},loadRouteMatch=async(e,n)=>{const{id:r,routeId:i}=e.matches[n];let l=!1,u=!1;const f=e.router.looseRoutesById[i];if(shouldSkipLoader(e,r)){if(e.router.isServer){const m=executeHead(e,r,f);if(m){const v=await m;e.updateMatch(r,y=>({...y,...v}))}return e.router.getMatch(r)}}else{const m=e.router.getMatch(r);if(m._nonReactive.loaderPromise){if(m.status==="success"&&!e.sync&&!m.preload)return m;await m._nonReactive.loaderPromise;const v=e.router.getMatch(r),y=v._nonReactive.error||v.error;y&&handleRedirectAndNotFound(e,v,y)}else{const v=Date.now()-m.updatedAt,y=resolvePreload(e,r),b=y?f.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:f.options.staleTime??e.router.options.defaultStaleTime??0,R=f.options.shouldReload,E=typeof R=="function"?R(getLoaderContext(e,r,n,f)):R,A=!!y&&!e.router.state.matches.some(Z=>Z.id===r),O=e.router.getMatch(r);O._nonReactive.loaderPromise=createControlledPromise(),A!==O.preload&&e.updateMatch(r,Z=>({...Z,preload:A}));const{status:$,invalid:q}=O;if(l=$==="success"&&(q||(E??v>b)),!(y&&f.options.preload===!1))if(l&&!e.sync)u=!0,(async()=>{try{await runLoader(e,r,n,f);const Z=e.router.getMatch(r);Z._nonReactive.loaderPromise?.resolve(),Z._nonReactive.loadPromise?.resolve(),Z._nonReactive.loaderPromise=void 0}catch(Z){isRedirect(Z)&&await e.router.navigate(Z.options)}})();else if($!=="success"||l&&e.sync)await runLoader(e,r,n,f);else{const Z=executeHead(e,r,f);if(Z){const V=await Z;e.updateMatch(r,re=>({...re,...V}))}}}}const p=e.router.getMatch(r);u||(p._nonReactive.loaderPromise?.resolve(),p._nonReactive.loadPromise?.resolve()),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,u||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const g=u?p.isFetching:!1;return g!==p.isFetching||p.invalid!==!1?(e.updateMatch(r,m=>({...m,isFetching:g,invalid:!1})),e.router.getMatch(r)):p};async function loadMatches(e){const n=Object.assign(e,{matchPromises:[]});!n.router.isServer&&n.router.state.matches.some(r=>r._forcePending)&&triggerOnReady(n);try{for(let l=0;l{const{id:r,...i}=n.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const n=()=>{const r=[];for(const i of componentTypes){const l=e.options[i]?.preload;l&&r.push(l())}if(r.length)return Promise.all(r).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(n):n()}return e._componentsPromise}function makeMaybe(e,n){return n?{status:"error",error:n}:{status:"success",value:e}}function routeNeedsPreload(e){for(const n of componentTypes)if(e.options[n]?.preload)return!0;return!1}const componentTypes=["component","errorComponent","pendingComponent","notFoundComponent"];function composeRewrites(e){return{input:({url:n})=>{for(const r of e)n=executeRewriteInput(r,n);return n},output:({url:n})=>{for(let r=e.length-1;r>=0;r--)n=executeRewriteOutput(e[r],n);return n}}}function rewriteBasepath(e){const n=trimPath(e.basepath),r=`/${n}`,i=`${r}/`,l=e.caseSensitive?r:r.toLowerCase(),u=e.caseSensitive?i:i.toLowerCase();return{input:({url:f})=>{const p=e.caseSensitive?f.pathname:f.pathname.toLowerCase();return p===l?f.pathname="/":p.startsWith(u)&&(f.pathname=f.pathname.slice(r.length)),f},output:({url:f})=>(f.pathname=joinPaths(["/",n,f.pathname]),f)}}function executeRewriteInput(e,n){const r=e?.input?.({url:n});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return n}function executeRewriteOutput(e,n){const r=e?.output?.({url:n});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return n}function getLocationChangeInfo(e){const n=e.resolvedLocation,r=e.location,i=n?.pathname!==r.pathname,l=n?.href!==r.href,u=n?.hash!==r.hash;return{fromLocation:n,toLocation:r,pathChanged:i,hrefChanged:l,hashChanged:u}}class RouterCore{constructor(n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options,l=this.basepath??i?.basepath??"/",u=this.basepath===void 0,f=i?.rewrite;this.options={...i,...r},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(b=>[encodeURIComponent(b),b])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=createBrowserHistory())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Store(getInitialRouterState(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),setupScrollRestoration(this));let p=!1;const g=this.options.basepath??"/",m=this.options.rewrite;if(u||l!==g||f!==m){this.basepath=g;const b=[];trimPath(g)!==""&&b.push(rewriteBasepath({basepath:g})),m&&b.push(m),this.rewrite=b.length===0?void 0:b.length===1?b[0]:composeRewrites(b),this.history&&this.updateLatestLocation(),p=!0}p&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:r,routesByPath:i,processedTree:l}=processRouteTree(this.routeTree,this.options.caseSensitive,(f,p)=>{f.init({originalIndex:p})});this.options.routeMasks&&processRouteMasks(this.options.routeMasks,l),this.routesById=r,this.routesByPath=i,this.processedTree=l;const u=this.options.notFoundRoute;u&&(u.init({originalIndex:99999999999}),this.routesById[u.id]=u)},this.subscribe=(r,i)=>{const l={eventType:r,fn:i};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>{this.subscribers.forEach(i=>{i.eventType===r.type&&i.fn(r)})},this.parseLocation=(r,i)=>{const l=({href:g,state:m})=>{const v=new URL(g,this.origin),y=executeRewriteInput(this.rewrite,v),b=this.options.parseSearch(y.search),R=this.options.stringifySearch(b);y.search=R;const E=y.href.replace(y.origin,""),{pathname:A,hash:O}=y;return{href:E,publicHref:g,url:y.href,pathname:decodePath(A),searchStr:R,search:replaceEqualDeep$1(i?.search,b),hash:O.split("#").reverse()[0]??"",state:replaceEqualDeep$1(i?.state,m)}},u=l(r),{__tempLocation:f,__tempKey:p}=u.state;if(f&&(!p||p===this.tempLocationKey)){const g=l(f);return g.state.key=u.state.key,g.state.__TSR_key=u.state.__TSR_key,delete g.state.__tempLocation,{...g,maskedLocation:u}}return u},this.resolvePathCache=createLRUCache(1e3),this.resolvePathWithBase=(r,i)=>resolvePath({base:r,to:cleanPath(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,i,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:i},l):this.matchRoutesInternal(r,i),this.getMatchedRoutes=r=>getMatchedRoutes({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const i=this.getMatch(r);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const r=this.state.matches.filter(u=>u.status==="pending"),i=this.state.matches.filter(u=>u.isFetching==="loader");new Set([...this.state.pendingMatches??[],...r,...i]).forEach(u=>{this.cancelMatch(u.id)})},this.buildLocation=r=>{const i=(u={})=>{const f=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,p=this.matchRoutes(f,{_buildLocation:!0}),g=last(p);u.from;const m=u.unsafeRelative==="path"?f.pathname:u.from??g.fullPath,v=this.resolvePathWithBase(m,"."),y=g.search,b={...g.params},R=u.to?this.resolvePathWithBase(v,`${u.to}`):this.resolvePathWithBase(v,"."),E=u.params===!1||u.params===null?{}:(u.params??!0)===!0?b:Object.assign(b,functionalUpdate$1(u.params,b)),A=interpolatePath({path:R,params:E}).interpolatedPath,O=this.matchRoutes(A,void 0,{_buildLocation:!0}).map(oe=>this.looseRoutesById[oe.routeId]);if(Object.keys(E).length>0)for(const oe of O){const se=oe.options.params?.stringify??oe.options.stringifyParams;se&&Object.assign(E,se(E))}const $=r.leaveParams?R:decodePath(interpolatePath({path:R,params:E,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let q=y;if(r._includeValidateSearch&&this.options.search?.strict){const oe={};O.forEach(se=>{if(se.options.validateSearch)try{Object.assign(oe,validateSearch(se.options.validateSearch,{...oe,...q}))}catch{}}),q=oe}q=applySearchMiddleware({search:q,dest:u,destRoutes:O,_includeValidateSearch:r._includeValidateSearch}),q=replaceEqualDeep$1(y,q);const Z=this.options.stringifySearch(q),V=u.hash===!0?f.hash:u.hash?functionalUpdate$1(u.hash,f.hash):void 0,re=V?`#${V}`:"";let J=u.state===!0?f.state:u.state?functionalUpdate$1(u.state,f.state):{};J=replaceEqualDeep$1(f.state,J);const F=`${$}${Z}${re}`,te=new URL(F,this.origin),ne=executeRewriteOutput(this.rewrite,te);return{publicHref:ne.pathname+ne.search+ne.hash,href:F,url:ne.href,pathname:$,search:q,searchStr:Z,state:J,hash:V??"",unmaskOnReload:u.unmaskOnReload}},l=(u={},f)=>{const p=i(u);let g=f?i(f):void 0;if(!g){const m={};if(this.options.routeMasks){const v=findFlatMatch(p.pathname,this.processedTree);if(v){Object.assign(m,v.params);const{from:y,...b}=v.route;f={from:r.from,...b,params:m},g=i(f)}}}return g&&(p.maskedLocation=g),p};return r.mask?l(r,{from:r.from,...r.mask}):l(r)},this.commitLocation=({viewTransition:r,ignoreBlocker:i,...l})=>{const u=()=>{const g=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];g.forEach(v=>{l.state[v]=this.latestLocation.state[v]});const m=deepEqual(l.state,this.latestLocation.state);return g.forEach(v=>{delete l.state[v]}),m},f=trimPathRight(this.latestLocation.href)===trimPathRight(l.href),p=this.commitLocationPromise;if(this.commitLocationPromise=createControlledPromise(()=>{p?.resolve()}),f&&u())this.load();else{let{maskedLocation:g,hashScrollIntoView:m,...v}=l;g&&(v={...g,state:{...g.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[l.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:i})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:i,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:f,href:p,...g}={})=>{if(p){const y=this.history.location.state.__TSR_index,b=parseHref(p,{__TSR_index:r?y:y+1});g.to=b.pathname,g.search=this.options.parseSearch(b.search),g.hash=b.hash.slice(1)}const m=this.buildLocation({...g,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const v=this.commitLocation({...m,viewTransition:u,replace:r,resetScroll:i,hashScrollIntoView:l,ignoreBlocker:f});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=({to:r,reloadDocument:i,href:l,...u})=>{if(!i&&l)try{new URL(`${l}`),i=!0}catch{}return i?(l||(l=this.buildLocation({to:r,...u}).url),u.replace?window.location.replace(l):window.location.href=l,Promise.resolve()):this.buildAndCommitLocation({...u,href:l,to:r,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const i=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),l=u=>{try{return encodeURI(decodeURI(u))}catch{return u}};if(trimPath(l(this.latestLocation.href))!==trimPath(l(i.href))){let u=i.url;throw this.origin&&u.startsWith(this.origin)&&(u=u.replace(this.origin,"")||"/"),redirect({href:u})}}const r=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:r,cachedMatches:i.cachedMatches.filter(l=>!r.some(u=>u.id===l.id))}))},this.load=async r=>{let i,l,u;for(u=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const g=this.latestLocation,m=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...getLocationChangeInfo({resolvedLocation:m,location:g})}),this.emit({type:"onBeforeLoad",...getLocationChangeInfo({resolvedLocation:m,location:g})}),await loadMatches({router:this,sync:r?.sync,matches:this.state.pendingMatches,location:g,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let v=[],y=[],b=[];batch(()=>{this.__store.setState(R=>{const E=R.matches,A=R.pendingMatches||R.matches;return v=E.filter(O=>!A.some($=>$.id===O.id)),y=A.filter(O=>!E.some($=>$.id===O.id)),b=A.filter(O=>E.some($=>$.id===O.id)),{...R,isLoading:!1,loadedAt:Date.now(),matches:A,pendingMatches:void 0,cachedMatches:[...R.cachedMatches,...v.filter(O=>O.status!=="error"&&O.status!=="notFound")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[y,"onEnter"],[b,"onStay"]].forEach(([R,E])=>{R.forEach(A=>{this.looseRoutesById[A.routeId].options[E]?.(A)})})})})}})}catch(g){isRedirect(g)?(i=g,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):isNotFound(g)&&(l=g),this.__store.setState(m=>({...m,statusCode:i?i.status:l?404:m.matches.some(v=>v.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===u&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=u,await u;this.latestLoadPromise&&u!==this.latestLoadPromise;)await this.latestLoadPromise;let f;this.hasNotFoundMatch()?f=404:this.__store.state.matches.some(p=>p.status==="error")&&(f=500),f!==void 0&&this.__store.setState(p=>({...p,statusCode:f}))},this.startViewTransition=r=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,f=this.state.resolvedLocation,p=typeof i.types=="function"?i.types(getLocationChangeInfo({resolvedLocation:f,location:u})):i.types;if(p===!1){r();return}l={update:r,types:p}}else l=r;document.startViewTransition(l)}else r()},this.updateMatch=(r,i)=>{this.startTransition(()=>{const l=this.state.pendingMatches?.some(u=>u.id===r)?"pendingMatches":this.state.matches.some(u=>u.id===r)?"matches":this.state.cachedMatches.some(u=>u.id===r)?"cachedMatches":"";l&&this.__store.setState(u=>({...u,[l]:u[l]?.map(f=>f.id===r?i(f):f)}))})},this.getMatch=r=>{const i=l=>l.id===r;return this.state.cachedMatches.find(i)??this.state.pendingMatches?.find(i)??this.state.matches.find(i)},this.invalidate=r=>{const i=l=>r?.filter?.(l)??!0?{...l,invalid:!0,...r?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.__store.setState(l=>({...l,matches:l.matches.map(i),cachedMatches:l.cachedMatches.map(i),pendingMatches:l.pendingMatches?.map(i)})),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.resolveRedirect=r=>{if(!r.options.href){const i=this.buildLocation(r.options);let l=i.url;this.origin&&l.startsWith(this.origin)&&(l=l.replace(this.origin,"")||"/"),r.options.href=i.href,r.headers.set("Location",l)}return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const i=r?.filter;i!==void 0?this.__store.setState(l=>({...l,cachedMatches:l.cachedMatches.filter(u=>!i(u))})):this.__store.setState(l=>({...l,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=i=>{const l=this.looseRoutesById[i.routeId];if(!l.options.loader)return!0;const u=(i.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=u};this.clearCache({filter:r})},this.loadRouteChunk=loadRouteChunk,this.preloadRoute=async r=>{const i=this.buildLocation(r);let l=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:r});const u=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(p=>p.id)),f=new Set([...u,...this.state.cachedMatches.map(p=>p.id)]);batch(()=>{l.forEach(p=>{f.has(p.id)||this.__store.setState(g=>({...g,cachedMatches:[...g.cachedMatches,p]}))})});try{return l=await loadMatches({router:this,matches:l,location:i,preload:!0,updateMatch:(p,g)=>{u.has(p)?l=l.map(m=>m.id===p?g(m):m):this.updateMatch(p,g)}}),l}catch(p){if(isRedirect(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:i});isNotFound(p)||console.error(p);return}},this.matchRoute=(r,i)=>{const l={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},u=this.buildLocation(l);if(i?.pending&&this.state.status!=="pending")return!1;const p=(i?.pending===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,g=findSingleMatch(u.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,p.pathname,this.processedTree);return!g||r.params&&!deepEqual(g.params,r.params,{partial:!0})?!1:i?.includeSearch??!0?deepEqual(p.search,u.search,{partial:!0})?g.params:!1:g.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(r=>r.status==="notFound"||r.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??defaultStringifySearch,parseSearch:n.parseSearch??defaultParseSearch}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(n,r){const i=this.getMatchedRoutes(n.pathname),{foundRoute:l,routeParams:u}=i;let{matchedRoutes:f}=i,p=!1;(l?l.path!=="/"&&u["**"]:trimPathRight(n.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:p=!0);const g=(()=>{if(p){if(this.options.notFoundMode!=="root")for(let y=f.length-1;y>=0;y--){const b=f[y];if(b.children)return b.id}return rootRouteId}})(),m=[],v=y=>y?.id?y.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((y,b)=>{const R=m[b-1],[E,A,O]=(()=>{const le=R?.search??n.search,fe=R?._strictSearch??void 0;try{const ge=validateSearch(y.options.validateSearch,{...le})??void 0;return[{...le,...ge},{...fe,...ge},void 0]}catch(ge){let L=ge;if(ge instanceof SearchParamError||(L=new SearchParamError(ge.message,{cause:ge})),r?.throwOnError)throw L;return[le,{},L]}})(),$=y.options.loaderDeps?.({search:E})??"",q=$?JSON.stringify($):"",{interpolatedPath:Z,usedParams:V}=interpolatePath({path:y.fullPath,params:u,decodeCharMap:this.pathParamsDecodeCharMap}),re=y.id+Z+q,J=this.getMatch(re),F=this.state.matches.find(le=>le.routeId===y.id),te=J?._strictParams??V;let ne;if(!J){const le=y.options.params?.parse??y.options.parseParams;if(le)try{Object.assign(te,le(te))}catch(fe){if(isNotFound(fe)||isRedirect(fe)?ne=fe:ne=new PathParamError(fe.message,{cause:fe}),r?.throwOnError)throw ne}}Object.assign(u,te);const oe=F?"stay":"enter";let se;if(J)se={...J,cause:oe,params:F?replaceEqualDeep$1(F.params,u):u,_strictParams:te,search:replaceEqualDeep$1(F?F.search:J.search,E),_strictSearch:A};else{const le=y.options.loader||y.options.beforeLoad||y.lazyFn||routeNeedsPreload(y)?"pending":"success";se={id:re,index:b,routeId:y.id,params:F?replaceEqualDeep$1(F.params,u):u,_strictParams:te,pathname:Z,updatedAt:Date.now(),search:F?replaceEqualDeep$1(F.search,E):E,_strictSearch:A,searchError:void 0,status:le,isFetching:!1,error:void 0,paramsError:ne,__routeContext:void 0,_nonReactive:{loadPromise:createControlledPromise()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:oe,loaderDeps:F?replaceEqualDeep$1(F.loaderDeps,$):$,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:y.options.staticData||{},fullPath:y.fullPath}}r?.preload||(se.globalNotFound=g===y.id),se.searchError=O;const ce=v(R);se.context={...ce,...se.__routeContext,...se.__beforeLoadContext},m.push(se)}),m.forEach((y,b)=>{const R=this.looseRoutesById[y.routeId];if(!this.getMatch(y.id)&&r?._buildLocation!==!0){const A=m[b-1],O=v(A);if(R.options.context){const $={deps:y.loaderDeps,params:y.params,context:O??{},location:n,navigate:q=>this.navigate({...q,_fromLocation:n}),buildLocation:this.buildLocation,cause:y.cause,abortController:y.abortController,preload:!!y.preload,matches:m};y.__routeContext=R.options.context($)??void 0}y.context={...O,...y.__routeContext,...y.__beforeLoadContext}}}),m}}class SearchParamError extends Error{}class PathParamError extends Error{}function getInitialRouterState(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function validateSearch(e,n){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(n);if(r instanceof Promise)throw new SearchParamError("Async validation not supported");if(r.issues)throw new SearchParamError(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(n):typeof e=="function"?e(n):{}}function getMatchedRoutes({pathname:e,routesById:n,processedTree:r}){const i={},l=trimPathRight(e);let u;const f=findRouteMatch(l,r,!0);return f&&(u=f.route,Object.assign(i,f.params)),{matchedRoutes:f?.branch||[n[rootRouteId]],routeParams:i,foundRoute:u}}function applySearchMiddleware({search:e,dest:n,destRoutes:r,_includeValidateSearch:i}){const l=r.reduce((p,g)=>{const m=[];if("search"in g.options)g.options.search?.middlewares&&m.push(...g.options.search.middlewares);else if(g.options.preSearchFilters||g.options.postSearchFilters){const v=({search:y,next:b})=>{let R=y;"preSearchFilters"in g.options&&g.options.preSearchFilters&&(R=g.options.preSearchFilters.reduce((A,O)=>O(A),y));const E=b(R);return"postSearchFilters"in g.options&&g.options.postSearchFilters?g.options.postSearchFilters.reduce((A,O)=>O(A),E):E};m.push(v)}if(i&&g.options.validateSearch){const v=({search:y,next:b})=>{const R=b(y);try{return{...R,...validateSearch(g.options.validateSearch,R)??void 0}}catch{return R}};m.push(v)}return p.concat(m)},[])??[],u=({search:p})=>n.search?n.search===!0?p:functionalUpdate$1(n.search,p):{};l.push(u);const f=(p,g)=>{if(p>=l.length)return g;const m=l[p];return m({search:g,next:y=>f(p+1,y)})};return f(0,e)}const preloadWarning="Error preloading route! ☝️";class BaseRoute{constructor(n){if(this.init=r=>{this.originalIndex=r.originalIndex;const i=this.options,l=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),l?this._path=rootRouteId:this.parentRoute||invariant$1(!1);let u=l?rootRouteId:i?.path;u&&u!=="/"&&(u=trimPathLeft(u));const f=i?.id||u;let p=l?rootRouteId:joinPaths([this.parentRoute.id===rootRouteId?"":this.parentRoute.id,f]);u===rootRouteId&&(u="/"),p!==rootRouteId&&(p=joinPaths(["/",p]));const g=p===rootRouteId?"/":joinPaths([this.parentRoute.fullPath,u]);this._path=u,this._id=p,this._fullPath=g,this._to=g},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.options=n||{},this.isRoot=!n?.getParentRoute,n?.id&&n?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class BaseRouteApi{constructor({id:n}){this.notFound=r=>notFound({routeId:this.id,...r}),this.id=n}}class BaseRootRoute extends BaseRoute{constructor(n){super(n)}}var react={exports:{}},react_production={};var hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function R(w){return w===null||typeof w!="object"?null:(w=b&&w[b]||w["@@iterator"],typeof w=="function"?w:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,O={};function $(w,B,K){this.props=w,this.context=B,this.refs=O,this.updater=K||E}$.prototype.isReactComponent={},$.prototype.setState=function(w,B){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,B,"setState")},$.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function q(){}q.prototype=$.prototype;function Z(w,B,K){this.props=w,this.context=B,this.refs=O,this.updater=K||E}var V=Z.prototype=new q;V.constructor=Z,A(V,$.prototype),V.isPureReactComponent=!0;var re=Array.isArray;function J(){}var F={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(w,B,K){var ae=K.ref;return{$$typeof:e,type:w,key:B,ref:ae!==void 0?ae:null,props:K}}function oe(w,B){return ne(w.type,B,w.props)}function se(w){return typeof w=="object"&&w!==null&&w.$$typeof===e}function ce(w){var B={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(K){return B[K]})}var le=/\/+/g;function fe(w,B){return typeof w=="object"&&w!==null&&w.key!=null?ce(""+w.key):B.toString(36)}function ge(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(J,J):(w.status="pending",w.then(function(B){w.status==="pending"&&(w.status="fulfilled",w.value=B)},function(B){w.status==="pending"&&(w.status="rejected",w.reason=B)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function L(w,B,K,ae,ue){var pe=typeof w;(pe==="undefined"||pe==="boolean")&&(w=null);var Ee=!1;if(w===null)Ee=!0;else switch(pe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(w.$$typeof){case e:case n:Ee=!0;break;case v:return Ee=w._init,L(Ee(w._payload),B,K,ae,ue)}}if(Ee)return ue=ue(w),Ee=ae===""?"."+fe(w,0):ae,re(ue)?(K="",Ee!=null&&(K=Ee.replace(le,"$&/")+"/"),L(ue,B,K,"",function(vt){return vt})):ue!=null&&(se(ue)&&(ue=oe(ue,K+(ue.key==null||w&&w.key===ue.key?"":(""+ue.key).replace(le,"$&/")+"/")+Ee)),B.push(ue)),1;Ee=0;var _e=ae===""?".":ae+":";if(re(w))for(var Ce=0;Cer?reactExports.createElement(n,{error:r,reset:i}):e.children})}class CatchBoundaryImpl extends reactExports.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,r){this.props.onCatch&&this.props.onCatch(n,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ErrorComponent({error:e}){const[n,r]=reactExports.useState(!1);return jsxRuntimeExports.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[jsxRuntimeExports.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),jsxRuntimeExports.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(i=>!i),children:n?"Hide Error":"Show Error"})]}),jsxRuntimeExports.jsx("div",{style:{height:".25rem"}}),n?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?jsxRuntimeExports.jsx("code",{children:e.message}):null})}):null]})}function ClientOnly({children:e,fallback:n=null}){return useHydrated()?jsxRuntimeExports.jsx(React.Fragment,{children:e}):jsxRuntimeExports.jsx(React.Fragment,{children:n})}function useHydrated(){return React.useSyncExternalStore(subscribe,()=>!0,()=>!1)}function subscribe(){return()=>{}}function warning(e,n){}var withSelector={exports:{}},withSelector_production={},shim={exports:{}},useSyncExternalStoreShim_production={};var hasRequiredUseSyncExternalStoreShim_production;function requireUseSyncExternalStoreShim_production(){if(hasRequiredUseSyncExternalStoreShim_production)return useSyncExternalStoreShim_production;hasRequiredUseSyncExternalStoreShim_production=1;var e=requireReact();function n(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var r=typeof Object.is=="function"?Object.is:n,i=e.useState,l=e.useEffect,u=e.useLayoutEffect,f=e.useDebugValue;function p(y,b){var R=b(),E=i({inst:{value:R,getSnapshot:b}}),A=E[0].inst,O=E[1];return u(function(){A.value=R,A.getSnapshot=b,g(A)&&O({inst:A})},[y,R,b]),l(function(){return g(A)&&O({inst:A}),y(function(){g(A)&&O({inst:A})})},[y]),f(R),R}function g(y){var b=y.getSnapshot;y=y.value;try{var R=b();return!r(y,R)}catch{return!0}}function m(y,b){return b()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:p;return useSyncExternalStoreShim_production.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,useSyncExternalStoreShim_production}var hasRequiredShim;function requireShim(){return hasRequiredShim||(hasRequiredShim=1,shim.exports=requireUseSyncExternalStoreShim_production()),shim.exports}var hasRequiredWithSelector_production;function requireWithSelector_production(){if(hasRequiredWithSelector_production)return withSelector_production;hasRequiredWithSelector_production=1;var e=requireReact(),n=requireShim();function r(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var i=typeof Object.is=="function"?Object.is:r,l=n.useSyncExternalStore,u=e.useRef,f=e.useEffect,p=e.useMemo,g=e.useDebugValue;return withSelector_production.useSyncExternalStoreWithSelector=function(m,v,y,b,R){var E=u(null);if(E.current===null){var A={hasValue:!1,value:null};E.current=A}else A=E.current;E=p(function(){function $(J){if(!q){if(q=!0,Z=J,J=b(J),R!==void 0&&A.hasValue){var F=A.value;if(R(F,J))return V=F}return V=J}if(F=V,i(Z,J))return F;var te=b(J);return R!==void 0&&R(F,te)?(Z=J,F):(Z=J,V=te)}var q=!1,Z,V,re=y===void 0?null:y;return[function(){return $(v())},re===null?void 0:function(){return $(re())}]},[v,y,b,R]);var O=l(m,E[0],E[1]);return f(function(){A.hasValue=!0,A.value=O},[O]),g(O),O},withSelector_production}var hasRequiredWithSelector;function requireWithSelector(){return hasRequiredWithSelector||(hasRequiredWithSelector=1,withSelector.exports=requireWithSelector_production()),withSelector.exports}var withSelectorExports=requireWithSelector();function useStore$1(e,n=i=>i,r={}){const i=r.equal??shallow;return withSelectorExports.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,n,i)}function shallow(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[i,l]of e)if(!n.has(i)||!Object.is(l,n.get(i)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const i of e)if(!n.has(i))return!1;return!0}if(e instanceof Date&&n instanceof Date)return e.getTime()===n.getTime();const r=getOwnKeys(e);if(r.length!==getOwnKeys(n).length)return!1;for(let i=0;i"u"?routerContext:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=routerContext,routerContext)}function useRouter(e){const n=reactExports.useContext(getRouterContext());return e?.warn,n}function useRouterState(e){const n=useRouter({warn:e?.router===void 0}),r=e?.router||n,i=reactExports.useRef(void 0);return useStore$1(r.__store,l=>{if(e?.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const u=replaceEqualDeep$1(i.current,e.select(l));return i.current=u,u}return e.select(l)}return l})}const matchContext=reactExports.createContext(void 0),dummyMatchContext=reactExports.createContext(void 0);function useMatch(e){const n=reactExports.useContext(e.from?dummyMatchContext:matchContext);return useRouterState({select:i=>{const l=i.matches.find(u=>e.from?e.from===u.routeId:u.id===n);if(invariant$1(!((e.shouldThrow??!0)&&!l),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),l!==void 0)return e.select?e.select(l):l},structuralSharing:e.structuralSharing})}function useLoaderData(e){return useMatch({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function useLoaderDeps(e){const{select:n,...r}=e;return useMatch({...r,select:i=>n?n(i.loaderDeps):i.loaderDeps})}function useParams(e){return useMatch({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const r=e.strict===!1?n.params:n._strictParams;return e.select?e.select(r):r}})}function useSearch(e){return useMatch({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}const useLayoutEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function usePrevious(e){const n=reactExports.useRef({value:e,prev:null}),r=n.current.value;return e!==r&&(n.current={value:e,prev:r}),n.current.prev}function useIntersectionObserver(e,n,r={},i={}){reactExports.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{n(u)},r);return l.observe(e.current),()=>{l.disconnect()}},[n,r,i.disabled,e])}function useForwardedRef(e){const n=reactExports.useRef(null);return reactExports.useImperativeHandle(e,()=>n.current,[]),n}function useNavigate(e){const n=useRouter();return reactExports.useCallback(r=>n.navigate({...r,from:r.from??e?.from}),[e?.from,n])}var reactDom={exports:{}},reactDom_production={};var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var e=requireReact();function n(g){var m="https://react.dev/errors/"+g;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),reactDom.exports=requireReactDom_production(),reactDom.exports}var reactDomExports=requireReactDom();const ReactDOM$1=getDefaultExportFromCjs(reactDomExports);function useLinkProps(e,n){const r=useRouter(),[i,l]=reactExports.useState(!1),u=reactExports.useRef(!1),f=useForwardedRef(n),{activeProps:p,inactiveProps:g,activeOptions:m,to:v,preload:y,preloadDelay:b,hashScrollIntoView:R,replace:E,startTransition:A,resetScroll:O,viewTransition:$,children:q,target:Z,disabled:V,style:re,className:J,onClick:F,onFocus:te,onMouseEnter:ne,onMouseLeave:oe,onTouchStart:se,ignoreBlocker:ce,params:le,search:fe,hash:ge,state:L,mask:ee,reloadDocument:ie,unsafeRelative:Se,from:be,_fromLocation:w,...B}=e,K=useRouterState({select:$e=>$e.location.search,structuralSharing:!0}),ae=e.from,ue=reactExports.useMemo(()=>({...e,from:ae}),[r,K,ae,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),pe=reactExports.useMemo(()=>r.buildLocation({...ue}),[r,ue]),Ee=reactExports.useMemo(()=>{if(V)return;let $e=pe.maskedLocation?pe.maskedLocation.url:pe.url,ze=!1;return r.origin&&($e.startsWith(r.origin)?$e=r.history.createHref($e.replace(r.origin,""))||"/":ze=!0),{href:$e,external:ze}},[V,pe.maskedLocation,pe.url,r.origin,r.history]),_e=reactExports.useMemo(()=>{if(Ee?.external)return Ee.href;try{return new URL(v),v}catch{}},[v,Ee]),Ce=e.reloadDocument||_e?!1:y??r.options.defaultPreload,vt=b??r.options.defaultPreloadDelay??0,Ct=useRouterState({select:$e=>{if(_e)return!1;if(m?.exact){if(!exactPathTest($e.location.pathname,pe.pathname,r.basepath))return!1}else{const ze=removeTrailingSlash($e.location.pathname,r.basepath),mt=removeTrailingSlash(pe.pathname,r.basepath);if(!(ze.startsWith(mt)&&(ze.length===mt.length||ze[mt.length]==="/")))return!1}return(m?.includeSearch??!0)&&!deepEqual($e.location.search,pe.search,{partial:!m?.exact,ignoreUndefined:!m?.explicitUndefined})?!1:m?.includeHash?$e.location.hash===pe.hash:!0}}),nt=reactExports.useCallback(()=>{r.preloadRoute({...ue}).catch($e=>{console.warn($e),console.warn(preloadWarning)})},[r,ue]),wa=reactExports.useCallback($e=>{$e?.isIntersecting&&nt()},[nt]);useIntersectionObserver(f,wa,intersectionObserverOptions,{disabled:!!V||Ce!=="viewport"}),reactExports.useEffect(()=>{u.current||!V&&Ce==="render"&&(nt(),u.current=!0)},[V,nt,Ce]);const $t=$e=>{const ze=$e.currentTarget.getAttribute("target"),mt=Z!==void 0?Z:ze;if(!V&&!isCtrlEvent($e)&&!$e.defaultPrevented&&(!mt||mt==="_self")&&$e.button===0){$e.preventDefault(),reactDomExports.flushSync(()=>{l(!0)});const en=r.subscribe("onResolved",()=>{en(),l(!1)});r.navigate({...ue,replace:E,resetScroll:O,hashScrollIntoView:R,startTransition:A,viewTransition:$,ignoreBlocker:ce})}};if(_e)return{...B,ref:f,href:_e,...q&&{children:q},...Z&&{target:Z},...V&&{disabled:V},...re&&{style:re},...J&&{className:J},...F&&{onClick:F},...te&&{onFocus:te},...ne&&{onMouseEnter:ne},...oe&&{onMouseLeave:oe},...se&&{onTouchStart:se}};const Cn=$e=>{V||Ce&&nt()},$n=Cn,ln=$e=>{if(!(V||!Ce))if(!vt)nt();else{const ze=$e.target;if(timeoutMap.has(ze))return;const mt=setTimeout(()=>{timeoutMap.delete(ze),nt()},vt);timeoutMap.set(ze,mt)}},ra=$e=>{if(V||!Ce||!vt)return;const ze=$e.target,mt=timeoutMap.get(ze);mt&&(clearTimeout(mt),timeoutMap.delete(ze))},at=Ct?functionalUpdate$1(p,{})??STATIC_ACTIVE_OBJECT:STATIC_EMPTY_OBJECT,Wt=Ct?STATIC_EMPTY_OBJECT:functionalUpdate$1(g,{})??STATIC_EMPTY_OBJECT,Ln=[J,at.className,Wt.className].filter(Boolean).join(" "),rt=(re||at.style||Wt.style)&&{...re,...at.style,...Wt.style};return{...B,...at,...Wt,href:Ee?.href,ref:f,onClick:composeHandlers([F,$t]),onFocus:composeHandlers([te,Cn]),onMouseEnter:composeHandlers([ne,ln]),onMouseLeave:composeHandlers([oe,ra]),onTouchStart:composeHandlers([se,$n]),disabled:!!V,target:Z,...rt&&{style:rt},...Ln&&{className:Ln},...V&&STATIC_DISABLED_PROPS,...Ct&&STATIC_ACTIVE_PROPS,...i&&STATIC_TRANSITIONING_PROPS}}const STATIC_EMPTY_OBJECT={},STATIC_ACTIVE_OBJECT={className:"active"},STATIC_DISABLED_PROPS={role:"link","aria-disabled":!0},STATIC_ACTIVE_PROPS={"data-status":"active","aria-current":"page"},STATIC_TRANSITIONING_PROPS={"data-transitioning":"transitioning"},timeoutMap=new WeakMap,intersectionObserverOptions={rootMargin:"100px"},composeHandlers=e=>n=>{for(const r of e)if(r){if(n.defaultPrevented)return;r(n)}},Link=reactExports.forwardRef((e,n)=>{const{_asChild:r,...i}=e,{type:l,ref:u,...f}=useLinkProps(i,n),p=typeof i.children=="function"?i.children({isActive:f["data-status"]==="active"}):i.children;return r===void 0&&delete f.disabled,reactExports.createElement(r||"a",{...f,ref:u},p)});function isCtrlEvent(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function getRouteApi(e){return new RouteApi({id:e})}class RouteApi extends BaseRouteApi{constructor({id:n}){super({id:n}),this.useMatch=r=>useMatch({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>useMatch({from:this.id,select:i=>r?.select?r.select(i.context):i.context}),this.useSearch=r=>useSearch({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>useParams({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>useLoaderDeps({...r,from:this.id,strict:!1}),this.useLoaderData=r=>useLoaderData({...r,from:this.id,strict:!1}),this.useNavigate=()=>{const r=useRouter();return useNavigate({from:r.routesById[this.id].fullPath})},this.notFound=r=>notFound({routeId:this.id,...r}),this.Link=React.forwardRef((r,i)=>{const u=useRouter().routesById[this.id].fullPath;return jsxRuntimeExports.jsx(Link,{ref:i,from:u,...r})})}}let Route$2=class extends BaseRoute{constructor(n){super(n),this.useMatch=r=>useMatch({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>useMatch({...r,from:this.id,select:i=>r?.select?r.select(i.context):i.context}),this.useSearch=r=>useSearch({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>useParams({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>useLoaderDeps({...r,from:this.id}),this.useLoaderData=r=>useLoaderData({...r,from:this.id}),this.useNavigate=()=>useNavigate({from:this.fullPath}),this.Link=React.forwardRef((r,i)=>jsxRuntimeExports.jsx(Link,{ref:i,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function createRoute(e){return new Route$2(e)}function createRootRouteWithContext(){return e=>createRootRoute(e)}class RootRoute extends BaseRootRoute{constructor(n){super(n),this.useMatch=r=>useMatch({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>useMatch({...r,from:this.id,select:i=>r?.select?r.select(i.context):i.context}),this.useSearch=r=>useSearch({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>useParams({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>useLoaderDeps({...r,from:this.id}),this.useLoaderData=r=>useLoaderData({...r,from:this.id}),this.useNavigate=()=>useNavigate({from:this.fullPath}),this.Link=React.forwardRef((r,i)=>jsxRuntimeExports.jsx(Link,{ref:i,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function createRootRoute(e){return new RootRoute(e)}function createFileRoute(e){return typeof e=="object"?new FileRoute(e,{silent:!0}).createRoute(e):new FileRoute(e,{silent:!0}).createRoute}class FileRoute{constructor(n,r){this.path=n,this.createRoute=i=>{this.silent;const l=createRoute(i);return l.isRoot=!1,l},this.silent=r?.silent}}class LazyRoute{constructor(n){this.useMatch=r=>useMatch({select:r?.select,from:this.options.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>useMatch({from:this.options.id,select:i=>r?.select?r.select(i.context):i.context}),this.useSearch=r=>useSearch({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useParams=r=>useParams({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>useLoaderDeps({...r,from:this.options.id}),this.useLoaderData=r=>useLoaderData({...r,from:this.options.id}),this.useNavigate=()=>{const r=useRouter();return useNavigate({from:r.routesById[this.options.id].fullPath})},this.options=n,this.$$typeof=Symbol.for("react.memo")}}function createLazyFileRoute(e){return typeof e=="object"?new LazyRoute(e):n=>new LazyRoute({id:e,...n})}function Transitioner(){const e=useRouter(),n=reactExports.useRef({router:e,mounted:!1}),[r,i]=reactExports.useState(!1),{hasPendingMatches:l,isLoading:u}=useRouterState({select:y=>({isLoading:y.isLoading,hasPendingMatches:y.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),f=usePrevious(u),p=u||r||l,g=usePrevious(p),m=u||l,v=usePrevious(m);return e.startTransition=y=>{i(!0),reactExports.startTransition(()=>{y(),i(!1)})},reactExports.useEffect(()=>{const y=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return trimPathRight(e.latestLocation.href)!==trimPathRight(b.href)&&e.commitLocation({...b,replace:!0}),()=>{y()}},[e,e.history]),useLayoutEffect(()=>{if(typeof window<"u"&&e.ssr||n.current.router===e&&n.current.mounted)return;n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),useLayoutEffect(()=>{f&&!u&&e.emit({type:"onLoad",...getLocationChangeInfo(e.state)})},[f,e,u]),useLayoutEffect(()=>{v&&!m&&e.emit({type:"onBeforeRouteMount",...getLocationChangeInfo(e.state)})},[m,v,e]),useLayoutEffect(()=>{g&&!p&&(e.emit({type:"onResolved",...getLocationChangeInfo(e.state)}),e.__store.setState(y=>({...y,status:"idle",resolvedLocation:y.location})),handleHashScroll(e))},[p,g,e]),null}function CatchNotFound(e){const n=useRouterState({select:r=>`not-found-${r.location.pathname}-${r.status}`});return jsxRuntimeExports.jsx(CatchBoundary,{getResetKey:()=>n,onCatch:(r,i)=>{if(isNotFound(r))e.onCatch?.(r,i);else throw r},errorComponent:({error:r})=>{if(isNotFound(r))return e.fallback?.(r);throw r},children:e.children})}function DefaultGlobalNotFound(){return jsxRuntimeExports.jsx("p",{children:"Not Found"})}function SafeFragment(e){return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:e.children})}function renderRouteNotFound(e,n,r){return n.options.notFoundComponent?jsxRuntimeExports.jsx(n.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?jsxRuntimeExports.jsx(e.options.defaultNotFoundComponent,{...r}):jsxRuntimeExports.jsx(DefaultGlobalNotFound,{})}function ScriptOnce({children:e}){const n=useRouter();return n.isServer?jsxRuntimeExports.jsx("script",{nonce:n.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function ScrollRestoration(){const e=useRouter();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const r=(e.options.getScrollRestorationKey||defaultGetScrollRestorationKey)(e.latestLocation),i=r!==defaultGetScrollRestorationKey(e.latestLocation)?r:void 0,l={storageKey,shouldScrollRestoration:!0};return i&&(l.key=i),jsxRuntimeExports.jsx(ScriptOnce,{children:`(${restoreScroll.toString()})(${JSON.stringify(l)})`})}const Match=reactExports.memo(function({matchId:n}){const r=useRouter(),i=useRouterState({select:$=>{const q=$.matches.find(Z=>Z.id===n);return invariant$1(q),{routeId:q.routeId,ssr:q.ssr,_displayPending:q._displayPending}},structuralSharing:!0}),l=r.routesById[i.routeId],u=l.options.pendingComponent??r.options.defaultPendingComponent,f=u?jsxRuntimeExports.jsx(u,{}):null,p=l.options.errorComponent??r.options.defaultErrorComponent,g=l.options.onCatch??r.options.defaultOnCatch,m=l.isRoot?l.options.notFoundComponent??r.options.notFoundRoute?.options.component:l.options.notFoundComponent,v=i.ssr===!1||i.ssr==="data-only",y=(!l.isRoot||l.options.wrapInSuspense||v)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||v))?reactExports.Suspense:SafeFragment,b=p?CatchBoundary:SafeFragment,R=m?CatchNotFound:SafeFragment,E=useRouterState({select:$=>$.loadedAt}),A=useRouterState({select:$=>{const q=$.matches.findIndex(Z=>Z.id===n);return $.matches[q-1]?.routeId}}),O=l.isRoot?l.options.shellComponent??SafeFragment:SafeFragment;return jsxRuntimeExports.jsxs(O,{children:[jsxRuntimeExports.jsx(matchContext.Provider,{value:n,children:jsxRuntimeExports.jsx(y,{fallback:f,children:jsxRuntimeExports.jsx(b,{getResetKey:()=>E,errorComponent:p||ErrorComponent,onCatch:($,q)=>{if(isNotFound($))throw $;g?.($,q)},children:jsxRuntimeExports.jsx(R,{fallback:$=>{if(!m||$.routeId&&$.routeId!==i.routeId||!$.routeId&&!l.isRoot)throw $;return reactExports.createElement(m,$)},children:v||i._displayPending?jsxRuntimeExports.jsx(ClientOnly,{fallback:f,children:jsxRuntimeExports.jsx(MatchInner,{matchId:n})}):jsxRuntimeExports.jsx(MatchInner,{matchId:n})})})})}),A===rootRouteId&&r.options.scrollRestoration?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(OnRendered,{}),jsxRuntimeExports.jsx(ScrollRestoration,{})]}):null]})});function OnRendered(){const e=useRouter(),n=reactExports.useRef(void 0);return jsxRuntimeExports.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(n.current===void 0||n.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...getLocationChangeInfo(e.state)}),n.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const MatchInner=reactExports.memo(function({matchId:n}){const r=useRouter(),{match:i,key:l,routeId:u}=useRouterState({select:g=>{const m=g.matches.find(E=>E.id===n),v=m.routeId,b=(r.routesById[v].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:v,loaderDeps:m.loaderDeps,params:m._strictParams,search:m._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:v,match:{id:m.id,status:m.status,error:m.error,_forcePending:m._forcePending,_displayPending:m._displayPending}}},structuralSharing:!0}),f=r.routesById[u],p=reactExports.useMemo(()=>{const g=f.options.component??r.options.defaultComponent;return g?jsxRuntimeExports.jsx(g,{},l):jsxRuntimeExports.jsx(Outlet,{})},[l,f.options.component,r.options.defaultComponent]);if(i._displayPending)throw r.getMatch(i.id)?._nonReactive.displayPendingPromise;if(i._forcePending)throw r.getMatch(i.id)?._nonReactive.minPendingPromise;if(i.status==="pending"){const g=f.options.pendingMinMs??r.options.defaultPendingMinMs;if(g){const m=r.getMatch(i.id);if(m&&!m._nonReactive.minPendingPromise&&!r.isServer){const v=createControlledPromise();m._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),m._nonReactive.minPendingPromise=void 0},g)}}throw r.getMatch(i.id)?._nonReactive.loadPromise}if(i.status==="notFound")return invariant$1(isNotFound(i.error)),renderRouteNotFound(r,f,i.error);if(i.status==="redirected")throw invariant$1(isRedirect(i.error)),r.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(r.isServer){const g=(f.options.errorComponent??r.options.defaultErrorComponent)||ErrorComponent;return jsxRuntimeExports.jsx(g,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return p}),Outlet=reactExports.memo(function(){const n=useRouter(),r=reactExports.useContext(matchContext),i=useRouterState({select:m=>m.matches.find(v=>v.id===r)?.routeId}),l=n.routesById[i],u=useRouterState({select:m=>{const y=m.matches.find(b=>b.id===r);return invariant$1(y),y.globalNotFound}}),f=useRouterState({select:m=>{const v=m.matches,y=v.findIndex(b=>b.id===r);return v[y+1]?.id}}),p=n.options.defaultPendingComponent?jsxRuntimeExports.jsx(n.options.defaultPendingComponent,{}):null;if(u)return renderRouteNotFound(n,l,void 0);if(!f)return null;const g=jsxRuntimeExports.jsx(Match,{matchId:f});return i===rootRouteId?jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:p,children:g}):g});function Matches(){const e=useRouter(),r=e.routesById[rootRouteId].options.pendingComponent??e.options.defaultPendingComponent,i=r?jsxRuntimeExports.jsx(r,{}):null,l=e.isServer||typeof document<"u"&&e.ssr?SafeFragment:reactExports.Suspense,u=jsxRuntimeExports.jsxs(l,{fallback:i,children:[!e.isServer&&jsxRuntimeExports.jsx(Transitioner,{}),jsxRuntimeExports.jsx(MatchesInner,{})]});return e.options.InnerWrap?jsxRuntimeExports.jsx(e.options.InnerWrap,{children:u}):u}function MatchesInner(){const e=useRouter(),n=useRouterState({select:l=>l.matches[0]?.id}),r=useRouterState({select:l=>l.loadedAt}),i=n?jsxRuntimeExports.jsx(Match,{matchId:n}):null;return jsxRuntimeExports.jsx(matchContext.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?i:jsxRuntimeExports.jsx(CatchBoundary,{getResetKey:()=>r,errorComponent:ErrorComponent,onCatch:l=>{l.message||l.toString()},children:i})})}const createRouter=e=>new Router(e);class Router extends RouterCore{constructor(n){super(n)}}typeof globalThis<"u"?(globalThis.createFileRoute=createFileRoute,globalThis.createLazyFileRoute=createLazyFileRoute):typeof window<"u"&&(window.createFileRoute=createFileRoute,window.createLazyFileRoute=createLazyFileRoute);function RouterContextProvider({router:e,children:n,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const i=getRouterContext(),l=jsxRuntimeExports.jsx(i.Provider,{value:e,children:n});return e.options.Wrap?jsxRuntimeExports.jsx(e.options.Wrap,{children:l}):l}function RouterProvider({router:e,...n}){return jsxRuntimeExports.jsx(RouterContextProvider,{router:e,...n,children:jsxRuntimeExports.jsx(Matches,{})})}var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},defaultTimeoutProvider={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},TimeoutManager=class{#e=defaultTimeoutProvider;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},timeoutManager=new TimeoutManager;function systemSetTimeoutZero(e){setTimeout(e,0)}var isServer=typeof window>"u"||"Deno"in globalThis;function noop$2(){}function functionalUpdate(e,n){return typeof e=="function"?e(n):e}function isValidTimeout(e){return typeof e=="number"&&e>=0&&e!==1/0}function timeUntilStale(e,n){return Math.max(e+(n||0)-Date.now(),0)}function resolveStaleTime(e,n){return typeof e=="function"?e(n):e}function resolveEnabled(e,n){return typeof e=="function"?e(n):e}function matchQuery(e,n){const{type:r="all",exact:i,fetchStatus:l,predicate:u,queryKey:f,stale:p}=e;if(f){if(i){if(n.queryHash!==hashQueryKeyByOptions(f,n.options))return!1}else if(!partialMatchKey(n.queryKey,f))return!1}if(r!=="all"){const g=n.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof p=="boolean"&&n.isStale()!==p||l&&l!==n.state.fetchStatus||u&&!u(n))}function matchMutation(e,n){const{exact:r,status:i,predicate:l,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(r){if(hashKey(n.options.mutationKey)!==hashKey(u))return!1}else if(!partialMatchKey(n.options.mutationKey,u))return!1}return!(i&&n.state.status!==i||l&&!l(n))}function hashQueryKeyByOptions(e,n){return(n?.queryKeyHashFn||hashKey)(e)}function hashKey(e){return JSON.stringify(e,(n,r)=>isPlainObject$2(r)?Object.keys(r).sort().reduce((i,l)=>(i[l]=r[l],i),{}):r)}function partialMatchKey(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>partialMatchKey(e[r],n[r])):!1}var hasOwn=Object.prototype.hasOwnProperty;function replaceEqualDeep(e,n){if(e===n)return e;const r=isPlainArray(e)&&isPlainArray(n);if(!r&&!(isPlainObject$2(e)&&isPlainObject$2(n)))return n;const l=(r?e:Object.keys(e)).length,u=r?n:Object.keys(n),f=u.length,p=r?new Array(f):{};let g=0;for(let m=0;m{timeoutManager.setTimeout(n,e)})}function replaceData(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?replaceEqualDeep(e,n):n}function addToEnd(e,n,r=0){const i=[...e,n];return r&&i.length>r?i.slice(1):i}function addToStart(e,n,r=0){const i=[n,...e];return r&&i.length>r?i.slice(0,-1):i}var skipToken=Symbol();function ensureQueryFn(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function shouldThrowError(e,n){return typeof e=="function"?e(...n):!!e}var FocusManager=class extends Subscribable{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!isServer&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},focusManager=new FocusManager;function pendingThenable(){let e,n;const r=new Promise((l,u)=>{e=l,n=u});r.status="pending",r.catch(()=>{});function i(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{i({status:"fulfilled",value:l}),e(l)},r.reject=l=>{i({status:"rejected",reason:l}),n(l)},r}var defaultScheduler=systemSetTimeoutZero;function createNotifyManager(){let e=[],n=0,r=p=>{p()},i=p=>{p()},l=defaultScheduler;const u=p=>{n?e.push(p):l(()=>{r(p)})},f=()=>{const p=e;e=[],p.length&&l(()=>{i(()=>{p.forEach(g=>{r(g)})})})};return{batch:p=>{let g;n++;try{g=p()}finally{n--,n||f()}return g},batchCalls:p=>(...g)=>{u(()=>{p(...g)})},schedule:u,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{i=p},setScheduler:p=>{l=p}}}var notifyManager=createNotifyManager(),OnlineManager=class extends Subscribable{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!isServer&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},onlineManager=new OnlineManager;function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return(e??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function createRetryer(e){let n=!1,r=0,i;const l=pendingThenable(),u=()=>l.status!=="pending",f=A=>{if(!u()){const O=new CancelledError(A);b(O),e.onCancel?.(O)}},p=()=>{n=!0},g=()=>{n=!1},m=()=>focusManager.isFocused()&&(e.networkMode==="always"||onlineManager.isOnline())&&e.canRun(),v=()=>canFetch(e.networkMode)&&e.canRun(),y=A=>{u()||(i?.(),l.resolve(A))},b=A=>{u()||(i?.(),l.reject(A))},R=()=>new Promise(A=>{i=O=>{(u()||m())&&A(O)},e.onPause?.()}).then(()=>{i=void 0,u()||e.onContinue?.()}),E=()=>{if(u())return;let A;const O=r===0?e.initialPromise:void 0;try{A=O??e.fn()}catch($){A=Promise.reject($)}Promise.resolve(A).then(y).catch($=>{if(u())return;const q=e.retry??(isServer?0:3),Z=e.retryDelay??defaultRetryDelay,V=typeof Z=="function"?Z(r,$):Z,re=q===!0||typeof q=="number"&&rm()?void 0:R()).then(()=>{n?b($):E()})})};return{promise:l,status:()=>l.status,cancel:f,continue:()=>(i?.(),l),cancelRetry:p,continueRetry:g,canStart:v,start:()=>(v()?E():R().then(E),l)}}var Removable=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&(this.#e=timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(isServer?1/0:300*1e3))}clearGcTimeout(){this.#e&&(timeoutManager.clearTimeout(this.#e),this.#e=void 0)}},Query=class extends Removable{#e;#t;#n;#r;#a;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=getDefaultState$1(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=getDefaultState$1(this.options);n.data!==void 0&&(this.setState(successState(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=replaceData(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#o({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#a?.promise;return this.#a?.cancel(e),n?n.then(noop$2).catch(noop$2):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>resolveEnabled(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>resolveStaleTime(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!timeUntilStale(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#a&&(this.#s?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,i=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},l=()=>{const p=ensureQueryFn(this.options,n),m=(()=>{const v={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#s=!1,this.options.persister?this.options.persister(p,m,this):p(m)},f=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:l};return i(p),p})();this.options.behavior?.onFetch(f,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#o({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=createRetryer({initialPromise:n?.initialPromise,fn:f.fetchFn,onCancel:p=>{p instanceof CancelledError&&p.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(p,g)=>{this.#o({type:"failed",failureCount:p,error:g})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const p=await this.#a.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#n.config.onSuccess?.(p,this),this.#n.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof CancelledError){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#o({type:"error",error:p}),this.#n.config.onError?.(p,this),this.#n.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#o(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...fetchState(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...successState(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),notifyManager.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function fetchState(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function successState(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function getDefaultState$1(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function infiniteQueryBehavior(e){return{onFetch:(n,r)=>{const i=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],f=n.state.data?.pageParams||[];let p={pages:[],pageParams:[]},g=0;const m=async()=>{let v=!1;const y=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(n.signal.aborted?v=!0:n.signal.addEventListener("abort",()=>{v=!0}),n.signal)})},b=ensureQueryFn(n.options,n.fetchOptions),R=async(E,A,O)=>{if(v)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const q=(()=>{const J={client:n.client,queryKey:n.queryKey,pageParam:A,direction:O?"backward":"forward",meta:n.options.meta};return y(J),J})(),Z=await b(q),{maxPages:V}=n.options,re=O?addToStart:addToEnd;return{pages:re(E.pages,Z,V),pageParams:re(E.pageParams,A,V)}};if(l&&u.length){const E=l==="backward",A=E?getPreviousPageParam:getNextPageParam,O={pages:u,pageParams:f},$=A(i,O);p=await R(O,$,E)}else{const E=e??u.length;do{const A=g===0?f[0]??i.initialPageParam:getNextPageParam(i,p);if(g>0&&A==null)break;p=await R(p,A),g++}while(gn.options.persister?.(m,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=m}}}function getNextPageParam(e,{pages:n,pageParams:r}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function getPreviousPageParam(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var Mutation=class extends Removable{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||getDefaultState(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(u,f)=>{this.#a({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",l=!this.#r.canStart();try{if(i)n();else{this.#a({type:"pending",variables:e,isPaused:l}),await this.#n.config.onMutate?.(e,this,r);const f=await this.options.onMutate?.(e,r);f!==this.state.context&&this.#a({type:"pending",context:f,variables:e,isPaused:l})}const u=await this.#r.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,r),await this.options.onSuccess?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,e,this.state.context,r),this.#a({type:"success",data:u}),u}catch(u){try{throw await this.#n.config.onError?.(u,e,this.state.context,this,r),await this.options.onError?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,u,e,this.state.context,r),u}finally{this.#a({type:"error",error:u})}}finally{this.#n.runNext(this)}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),notifyManager.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MutationCache=class extends Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const i=new Mutation({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);const n=scopeFor(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=scopeFor(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=scopeFor(e);if(typeof n=="string"){const i=this.#t.get(n)?.find(l=>l.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=scopeFor(e);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){notifyManager.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>matchMutation(n,r))}findAll(e={}){return this.getAll().filter(n=>matchMutation(e,n))}notify(e){notifyManager.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return notifyManager.batch(()=>Promise.all(e.map(n=>n.continue().catch(noop$2))))}};function scopeFor(e){return e.options.scope?.id}var QueryCache=class extends Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const i=n.queryKey,l=n.queryHash??hashQueryKeyByOptions(i,n);let u=this.get(l);return u||(u=new Query({client:e,queryKey:i,queryHash:l,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>matchQuery(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>matchQuery(e,r)):n}notify(e){notifyManager.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},QueryClient=class{#e;#t;#n;#r;#a;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new QueryCache,this.#t=e.mutationCache||new MutationCache,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(resolveStaleTime(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(e,n,r){const i=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(i.queryHash)?.state.data,f=functionalUpdate(n,u);if(f!==void 0)return this.#e.build(this,i).setData(f,{...r,manual:!0})}setQueriesData(e,n,r){return notifyManager.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;notifyManager.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return notifyManager.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},i=notifyManager.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(i).then(noop$2).catch(noop$2)}invalidateQueries(e,n={}){return notifyManager.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=notifyManager.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(noop$2)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(noop$2)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(resolveStaleTime(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(noop$2).catch(noop$2)}fetchInfiniteQuery(e){return e.behavior=infiniteQueryBehavior(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(noop$2).catch(noop$2)}ensureInfiniteQueryData(e){return e.behavior=infiniteQueryBehavior(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return onlineManager.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#r.set(hashKey(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(i=>{partialMatchKey(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,n){this.#a.set(hashKey(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(i=>{partialMatchKey(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=hashQueryKeyByOptions(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===skipToken&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},QueryClientContext=reactExports.createContext(void 0),useQueryClient=e=>{const n=reactExports.useContext(QueryClientContext);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},QueryClientProvider=({client:e,children:n})=>(reactExports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:e,children:n}));function TanStackQueryContext(){return{queryClient:new QueryClient}}function TanStackQueryProvider({children:e,queryClient:n}){return jsxRuntimeExports.jsx(QueryClientProvider,{client:n,children:e})}var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};var hasRequiredScheduler_production;function requireScheduler_production(){return hasRequiredScheduler_production||(hasRequiredScheduler_production=1,(function(e){function n(L,ee){var ie=L.length;L.push(ee);e:for(;0>>1,be=L[Se];if(0>>1;Sel(K,ie))ael(ue,K)?(L[Se]=ue,L[ae]=ie,Se=ae):(L[Se]=K,L[B]=ie,Se=B);else if(ael(ue,ie))L[Se]=ue,L[ae]=ie,Se=ae;else break e}}return ee}function l(L,ee){var ie=L.sortIndex-ee.sortIndex;return ie!==0?ie:L.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,p=f.now();e.unstable_now=function(){return f.now()-p}}var g=[],m=[],v=1,y=null,b=3,R=!1,E=!1,A=!1,O=!1,$=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function V(L){for(var ee=r(m);ee!==null;){if(ee.callback===null)i(m);else if(ee.startTime<=L)i(m),ee.sortIndex=ee.expirationTime,n(g,ee);else break;ee=r(m)}}function re(L){if(A=!1,V(L),!E)if(r(g)!==null)E=!0,J||(J=!0,ce());else{var ee=r(m);ee!==null&&ge(re,ee.startTime-L)}}var J=!1,F=-1,te=5,ne=-1;function oe(){return O?!0:!(e.unstable_now()-neL&&oe());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,b=y.priorityLevel;var be=Se(y.expirationTime<=L);if(L=e.unstable_now(),typeof be=="function"){y.callback=be,V(L),ee=!0;break t}y===r(g)&&i(g),V(L)}else i(g);y=r(g)}if(y!==null)ee=!0;else{var w=r(m);w!==null&&ge(re,w.startTime-L),ee=!1}}break e}finally{y=null,b=ie,R=!1}ee=void 0}}finally{ee?ce():J=!1}}}var ce;if(typeof Z=="function")ce=function(){Z(se)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,fe=le.port2;le.port1.onmessage=se,ce=function(){fe.postMessage(null)}}else ce=function(){$(se,0)};function ge(L,ee){F=$(function(){L(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125Se?(L.sortIndex=ie,n(m,L),r(g)===null&&L===r(m)&&(A?(q(F),F=-1):A=!0,ge(re,ie-Se))):(L.sortIndex=be,n(g,L),E||R||(E=!0,J||(J=!0,ce()))),L},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(L){var ee=b;return function(){var ie=b;b=ee;try{return L.apply(this,arguments)}finally{b=ie}}}})(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var e=requireScheduler(),n=requireReact(),r=requireReactDom();function i(t){var a="https://react.dev/errors/"+t;if(1be||(t.current=Se[be],Se[be]=null,be--)}function K(t,a){be++,Se[be]=t.current,t.current=a}var ae=w(null),ue=w(null),pe=w(null),Ee=w(null);function _e(t,a){switch(K(pe,a),K(ue,t),K(ae,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Vf(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Vf(a),t=Kf(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}B(ae),K(ae,t)}function Ce(){B(ae),B(ue),B(pe)}function vt(t){t.memoizedState!==null&&K(Ee,t);var a=ae.current,o=Kf(a,t.type);a!==o&&(K(ue,t),K(ae,o))}function Ct(t){ue.current===t&&(B(ae),B(ue)),Ee.current===t&&(B(Ee),to._currentValue=ie)}var nt,wa;function $t(t){if(nt===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);nt=a&&a[1]||"",wa=-1)":-1c||T[s]!==N[c]){var I=` `+T[s].replace(" at new "," at ");return t.displayName&&I.includes("")&&(I=I.replace("",t.displayName)),I}while(1<=s&&0<=c);break}}}finally{Cn=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?$t(o):""}function ln(t,a){switch(t.tag){case 26:case 27:case 5:return $t(t.type);case 16:return $t("Lazy");case 13:return t.child!==a&&a!==null?$t("Suspense Fallback"):$t("Suspense");case 19:return $t("SuspenseList");case 0:case 15:return $n(t.type,!1);case 11:return $n(t.type.render,!1);case 1:return $n(t.type,!0);case 31:return $t("Activity");default:return""}}function ra(t){try{var a="",o=null;do a+=ln(t,o),o=t,t=t.return;while(t);return a}catch(s){return` Error generating stack: `+s.message+` `+s.stack}}var at=Object.prototype.hasOwnProperty,Wt=e.unstable_scheduleCallback,Ln=e.unstable_cancelCallback,rt=e.unstable_shouldYield,$e=e.unstable_requestPaint,ze=e.unstable_now,mt=e.unstable_getCurrentPriorityLevel,en=e.unstable_ImmediatePriority,oo=e.unstable_UserBlockingPriority,oa=e.unstable_NormalPriority,pr=e.unstable_LowPriority,un=e.unstable_IdlePriority,io=e.log,zn=e.unstable_setDisableYieldValue,ia=null,gt=null;function Gt(t){if(typeof io=="function"&&zn(t),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(ia,t)}catch{}}var ht=Math.clz32?Math.clz32:tn,bi=Math.log,mr=Math.LN2;function tn(t){return t>>>=0,t===0?32:31-(bi(t)/mr|0)|0}var Oa=256,Aa=262144,sa=4194304;function nn(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ve(t,a,o){var s=t.pendingLanes;if(s===0)return 0;var c=0,d=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var _=s&134217727;return _!==0?(s=_&~d,s!==0?c=nn(s):(S&=_,S!==0?c=nn(S):o||(o=_&~t,o!==0&&(c=nn(o))))):(_=s&~d,_!==0?c=nn(_):S!==0?c=nn(S):o||(o=s&~t,o!==0&&(c=nn(o)))),c===0?0:a!==0&&a!==c&&(a&d)===0&&(d=c&-c,o=a&-a,d>=o||d===32&&(o&4194048)!==0)?a:c}function Fe(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ot(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pt(){var t=sa;return sa<<=1,(sa&62914560)===0&&(sa=4194304),t}function Dn(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function Ve(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function St(t,a,o,s,c,d){var S=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var _=t.entanglements,T=t.expirationTimes,N=t.hiddenUpdates;for(o=S&~o;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var $d=/[\n"\\]/g;function kt(t){return t.replace($d,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ti(t,a,o,s,c,d,S,_){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),a!=null?S==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+Ut(a)):t.value!==""+Ut(a)&&(t.value=""+Ut(a)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),a!=null?wi(t,S,Ut(a)):o!=null?wi(t,S,Ut(o)):s!=null&&t.removeAttribute("value"),c==null&&d!=null&&(t.defaultChecked=!!d),c!=null&&(t.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Ut(_):t.removeAttribute("name")}function kl(t,a,o,s,c,d,S,_){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.type=d),a!=null||o!=null){if(!(d!=="submit"&&d!=="reset"||a!=null)){xi(t);return}o=o!=null?""+Ut(o):"",a=a!=null?""+Ut(a):o,_||a===t.value||(t.value=a),t.defaultValue=a}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=_?t.checked:!!s,t.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),xi(t)}function wi(t,a,o){a==="number"&&uo(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function Pa(t,a,o,s){if(t=t.options,a){a={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Li=!1;if(hn)try{var Sr={};Object.defineProperty(Sr,"passive",{get:function(){Li=!0}}),window.addEventListener("test",Sr,Sr),window.removeEventListener("test",Sr,Sr)}catch{Li=!1}var Pn=null,zi=null,fo=null;function Vl(){if(fo)return fo;var t,a=zi,o=a.length,s,c="value"in Pn?Pn.value:Pn.textContent,d=c.length;for(t=0;t=Er),Jl=" ",Wl=!1;function eu(t,a){switch(t){case"keyup":return rh.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tu(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ka=!1;function ih(t,a){switch(t){case"compositionend":return tu(a);case"keypress":return a.which!==32?null:(Wl=!0,Jl);case"textInput":return t=a.data,t===Jl&&Wl?null:t;default:return null}}function sh(t,a){if(ka)return t==="compositionend"||!ji&&eu(t,a)?(t=Vl(),fo=zi=Pn=null,ka=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:o,offset:a-t};t=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=uu(o)}}function fu(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?fu(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function du(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=uo(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=uo(t.document)}return a}function Zi(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var mh=hn&&"documentMode"in document&&11>=document.documentMode,Za=null,Hi=null,wr=null,Bi=!1;function hu(t,a,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Bi||Za==null||Za!==uo(s)||(s=Za,"selectionStart"in s&&Zi(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),wr&&Tr(wr,s)||(wr=s,s=oi(Hi,"onSelect"),0>=S,c-=S,an=1<<32-ht(a)+c|o<xe?(Ae=he,he=null):Ae=he.sibling;var Me=j(D,he,P[xe],X);if(Me===null){he===null&&(he=Ae);break}t&&he&&Me.alternate===null&&a(D,he),C=d(Me,C,xe),De===null?me=Me:De.sibling=Me,De=Me,he=Ae}if(xe===P.length)return o(D,he),Le&&mn(D,xe),me;if(he===null){for(;xexe?(Ae=he,he=null):Ae=he.sibling;var aa=j(D,he,Me.value,X);if(aa===null){he===null&&(he=Ae);break}t&&he&&aa.alternate===null&&a(D,he),C=d(aa,C,xe),De===null?me=aa:De.sibling=aa,De=aa,he=Ae}if(Me.done)return o(D,he),Le&&mn(D,xe),me;if(he===null){for(;!Me.done;xe++,Me=P.next())Me=W(D,Me.value,X),Me!==null&&(C=d(Me,C,xe),De===null?me=Me:De.sibling=Me,De=Me);return Le&&mn(D,xe),me}for(he=s(he);!Me.done;xe++,Me=P.next())Me=H(he,D,xe,Me.value,X),Me!==null&&(t&&Me.alternate!==null&&he.delete(Me.key===null?xe:Me.key),C=d(Me,C,xe),De===null?me=Me:De.sibling=Me,De=Me);return t&&he.forEach(function(Pp){return a(D,Pp)}),Le&&mn(D,xe),me}function Ze(D,C,P,X){if(typeof P=="object"&&P!==null&&P.type===A&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case R:e:{for(var me=P.key;C!==null;){if(C.key===me){if(me=P.type,me===A){if(C.tag===7){o(D,C.sibling),X=c(C,P.props.children),X.return=D,D=X;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===te&&Sa(me)===C.type){o(D,C.sibling),X=c(C,P.props),zr(X,P),X.return=D,D=X;break e}o(D,C);break}else a(D,C);C=C.sibling}P.type===A?(X=pa(P.props.children,D.mode,X,P.key),X.return=D,D=X):(X=Eo(P.type,P.key,P.props,null,D.mode,X),zr(X,P),X.return=D,D=X)}return S(D);case E:e:{for(me=P.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===P.containerInfo&&C.stateNode.implementation===P.implementation){o(D,C.sibling),X=c(C,P.children||[]),X.return=D,D=X;break e}else{o(D,C);break}else a(D,C);C=C.sibling}X=Yi(P,D.mode,X),X.return=D,D=X}return S(D);case te:return P=Sa(P),Ze(D,C,P,X)}if(ge(P))return de(D,C,P,X);if(ce(P)){if(me=ce(P),typeof me!="function")throw Error(i(150));return P=me.call(P),ye(D,C,P,X)}if(typeof P.then=="function")return Ze(D,C,Co(P),X);if(P.$$typeof===Z)return Ze(D,C,To(D,P),X);$o(D,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,C!==null&&C.tag===6?(o(D,C.sibling),X=c(C,P),X.return=D,D=X):(o(D,C),X=Gi(P,D.mode,X),X.return=D,D=X),S(D)):o(D,C)}return function(D,C,P,X){try{Lr=0;var me=Ze(D,C,P,X);return Xa=null,me}catch(he){if(he===Qa||he===Oo)throw he;var De=zt(29,he,null,D.mode);return De.lanes=X,De.return=D,De}finally{}}}var _a=Nu(!0),ju=Nu(!1),Zn=!1;function ss(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ls(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Hn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Bn(t,a,o){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Pe&2)!==0){var c=s.pending;return c===null?a.next=a:(a.next=c.next,c.next=a),s.pending=a,a=_o(t),bu(t,null,o),a}return bo(t,s,a,o),_o(t)}function Dr(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var s=a.lanes;s&=t.pendingLanes,o|=s,a.lanes=o,bt(t,o)}}function us(t,a){var o=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var c=null,d=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};d===null?c=d=S:d=d.next=S,o=o.next}while(o!==null);d===null?c=d=a:d=d.next=a}else c=d=a;o={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var cs=!1;function Mr(){if(cs){var t=Ya;if(t!==null)throw t}}function Pr(t,a,o,s){cs=!1;var c=t.updateQueue;Zn=!1;var d=c.firstBaseUpdate,S=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var T=_,N=T.next;T.next=null,S===null?d=N:S.next=N,S=T;var I=t.alternate;I!==null&&(I=I.updateQueue,_=I.lastBaseUpdate,_!==S&&(_===null?I.firstBaseUpdate=N:_.next=N,I.lastBaseUpdate=T))}if(d!==null){var W=c.baseState;S=0,I=N=T=null,_=d;do{var j=_.lane&-536870913,H=j!==_.lane;if(H?(Oe&j)===j:(s&j)===j){j!==0&&j===Ga&&(cs=!0),I!==null&&(I=I.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var de=t,ye=_;j=a;var Ze=o;switch(ye.tag){case 1:if(de=ye.payload,typeof de=="function"){W=de.call(Ze,W,j);break e}W=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ye.payload,j=typeof de=="function"?de.call(Ze,W,j):de,j==null)break e;W=y({},W,j);break e;case 2:Zn=!0}}j=_.callback,j!==null&&(t.flags|=64,H&&(t.flags|=8192),H=c.callbacks,H===null?c.callbacks=[j]:H.push(j))}else H={lane:j,tag:_.tag,payload:_.payload,callback:_.callback,next:null},I===null?(N=I=H,T=W):I=I.next=H,S|=j;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;H=_,_=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);I===null&&(T=W),c.baseState=T,c.firstBaseUpdate=N,c.lastBaseUpdate=I,d===null&&(c.shared.lanes=0),Kn|=S,t.lanes=S,t.memoizedState=W}}function Uu(t,a){if(typeof t!="function")throw Error(i(191,t));t.call(a)}function ku(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;td?d:8;var S=L.T,_={};L.T=_,Cs(t,!1,a,o);try{var T=c(),N=L.S;if(N!==null&&N(_,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var I=xh(T,s);Ur(t,a,I,jt(t))}else Ur(t,a,s,jt(t))}catch(W){Ur(t,a,{then:function(){},status:"rejected",reason:W},jt())}finally{ee.p=d,S!==null&&_.types!==null&&(S.types=_.types),L.T=S}}function $h(){}function Os(t,a,o,s){if(t.tag!==5)throw Error(i(476));var c=yc(t).queue;gc(t,c,a,ie,o===null?$h:function(){return vc(t),o(s)})}function yc(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sn,lastRenderedState:ie},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sn,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function vc(t){var a=yc(t);a.next===null&&(a=t.alternate.memoizedState),Ur(t,a.next.queue,{},jt())}function As(){return ct(to)}function Sc(){return Qe().memoizedState}function bc(){return Qe().memoizedState}function Lh(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=jt();t=Hn(o);var s=Bn(a,t,o);s!==null&&(At(s,a,o),Dr(s,a,o)),a={cache:as()},t.payload=a;return}a=a.return}}function zh(t,a,o){var s=jt();o={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Zo(t)?Ec(a,o):(o=Vi(t,a,o,s),o!==null&&(At(o,t,s),Rc(o,a,s)))}function _c(t,a,o){var s=jt();Ur(t,a,o,s)}function Ur(t,a,o,s){var c={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Zo(t))Ec(a,c);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=a.lastRenderedReducer,d!==null))try{var S=a.lastRenderedState,_=d(S,o);if(c.hasEagerState=!0,c.eagerState=_,Lt(_,S))return bo(t,a,c,0),He===null&&So(),!1}catch{}finally{}if(o=Vi(t,a,c,s),o!==null)return At(o,t,s),Rc(o,a,s),!0}return!1}function Cs(t,a,o,s){if(s={lane:2,revertLane:sl(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Zo(t)){if(a)throw Error(i(479))}else a=Vi(t,o,s,2),a!==null&&At(a,t,2)}function Zo(t){var a=t.alternate;return t===Re||a!==null&&a===Re}function Ec(t,a){Wa=Do=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function Rc(t,a,o){if((o&4194048)!==0){var s=a.lanes;s&=t.pendingLanes,o|=s,a.lanes=o,bt(t,o)}}var kr={readContext:ct,use:No,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke};kr.useEffectEvent=Ke;var xc={readContext:ct,use:No,useCallback:function(t,a){return yt().memoizedState=[t,a===void 0?null:a],t},useContext:ct,useEffect:sc,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,Uo(4194308,4,fc.bind(null,a,t),o)},useLayoutEffect:function(t,a){return Uo(4194308,4,t,a)},useInsertionEffect:function(t,a){Uo(4,2,t,a)},useMemo:function(t,a){var o=yt();a=a===void 0?null:a;var s=t();if(Ea){Gt(!0);try{t()}finally{Gt(!1)}}return o.memoizedState=[s,a],s},useReducer:function(t,a,o){var s=yt();if(o!==void 0){var c=o(a);if(Ea){Gt(!0);try{o(a)}finally{Gt(!1)}}}else c=a;return s.memoizedState=s.baseState=c,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:c},s.queue=t,t=t.dispatch=zh.bind(null,Re,t),[s.memoizedState,t]},useRef:function(t){var a=yt();return t={current:t},a.memoizedState=t},useState:function(t){t=Es(t);var a=t.queue,o=_c.bind(null,Re,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:Ts,useDeferredValue:function(t,a){var o=yt();return ws(o,t,a)},useTransition:function(){var t=Es(!1);return t=gc.bind(null,Re,t.queue,!0,!1),yt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var s=Re,c=yt();if(Le){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),He===null)throw Error(i(349));(Oe&127)!==0||Iu(s,a,o)}c.memoizedState=o;var d={value:o,getSnapshot:a};return c.queue=d,sc(Ku.bind(null,s,d,t),[t]),s.flags|=2048,tr(9,{destroy:void 0},Vu.bind(null,s,d,o,a),null),o},useId:function(){var t=yt(),a=He.identifierPrefix;if(Le){var o=rn,s=an;o=(s&~(1<<32-ht(s)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Mo++,0<\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?S.createElement(c,{is:s.is}):S.createElement(c)}}d[lt]=a,d[Et]=s;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)d.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=d;e:switch(dt(d,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&_n(a)}}return qe(a),qs(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,o),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==s&&_n(a);else{if(typeof s!="string"&&a.stateNode===null)throw Error(i(166));if(t=pe.current,Va(a)){if(t=a.stateNode,o=a.memoizedProps,s=null,c=ut,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}t[lt]=a,t=!!(t.nodeValue===o||s!==null&&s.suppressHydrationWarning===!0||Ff(t.nodeValue,o)),t||Un(a,!0)}else t=ii(t).createTextNode(s),t[lt]=a,a.stateNode=t}return qe(a),null;case 31:if(o=a.memoizedState,t===null||t.memoizedState!==null){if(s=Va(a),o!==null){if(t===null){if(!s)throw Error(i(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[lt]=a}else ma(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qe(a),t=!1}else o=Wi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),t=!0;if(!t)return a.flags&256?(Mt(a),a):(Mt(a),null);if((a.flags&128)!==0)throw Error(i(558))}return qe(a),null;case 13:if(s=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(c=Va(a),s!==null&&s.dehydrated!==null){if(t===null){if(!c)throw Error(i(318));if(c=a.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[lt]=a}else ma(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qe(a),c=!1}else c=Wi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=c),c=!0;if(!c)return a.flags&256?(Mt(a),a):(Mt(a),null)}return Mt(a),(a.flags&128)!==0?(a.lanes=o,a):(o=s!==null,t=t!==null&&t.memoizedState!==null,o&&(s=a.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048)),o!==t&&o&&(a.child.flags|=8192),Io(a,a.updateQueue),qe(a),null);case 4:return Ce(),t===null&&fl(a.stateNode.containerInfo),qe(a),null;case 10:return yn(a.type),qe(a),null;case 19:if(B(Ye),s=a.memoizedState,s===null)return qe(a),null;if(c=(a.flags&128)!==0,d=s.rendering,d===null)if(c)Hr(s,!1);else{if(Ge!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(d=zo(t),d!==null){for(a.flags|=128,Hr(s,!1),t=d.updateQueue,a.updateQueue=t,Io(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)_u(o,t),o=o.sibling;return K(Ye,Ye.current&1|2),Le&&mn(a,s.treeForkCount),a.child}t=t.sibling}s.tail!==null&&ze()>Qo&&(a.flags|=128,c=!0,Hr(s,!1),a.lanes=4194304)}else{if(!c)if(t=zo(d),t!==null){if(a.flags|=128,c=!0,t=t.updateQueue,a.updateQueue=t,Io(a,t),Hr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Le)return qe(a),null}else 2*ze()-s.renderingStartTime>Qo&&o!==536870912&&(a.flags|=128,c=!0,Hr(s,!1),a.lanes=4194304);s.isBackwards?(d.sibling=a.child,a.child=d):(t=s.last,t!==null?t.sibling=d:a.child=d,s.last=d)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ze(),t.sibling=null,o=Ye.current,K(Ye,c?o&1|2:o&1),Le&&mn(a,s.treeForkCount),t):(qe(a),null);case 22:case 23:return Mt(a),ds(),s=a.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(a.flags|=8192):s&&(a.flags|=8192),s?(o&536870912)!==0&&(a.flags&128)===0&&(qe(a),a.subtreeFlags&6&&(a.flags|=8192)):qe(a),o=a.updateQueue,o!==null&&Io(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==o&&(a.flags|=2048),t!==null&&B(va),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),yn(Xe),qe(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function jh(t,a){switch(Xi(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return yn(Xe),Ce(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Ct(a),null;case 31:if(a.memoizedState!==null){if(Mt(a),a.alternate===null)throw Error(i(340));ma()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(Mt(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(i(340));ma()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return B(Ye),null;case 4:return Ce(),null;case 10:return yn(a.type),null;case 22:case 23:return Mt(a),ds(),t!==null&&B(va),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return yn(Xe),null;case 25:return null;default:return null}}function Gc(t,a){switch(Xi(a),a.tag){case 3:yn(Xe),Ce();break;case 26:case 27:case 5:Ct(a);break;case 4:Ce();break;case 31:a.memoizedState!==null&&Mt(a);break;case 13:Mt(a);break;case 19:B(Ye);break;case 10:yn(a.type);break;case 22:case 23:Mt(a),ds(),t!==null&&B(va);break;case 24:yn(Xe)}}function Br(t,a){try{var o=a.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var c=s.next;o=c;do{if((o.tag&t)===t){s=void 0;var d=o.create,S=o.inst;s=d(),S.destroy=s}o=o.next}while(o!==c)}}catch(_){je(a,a.return,_)}}function In(t,a,o){try{var s=a.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var d=c.next;s=d;do{if((s.tag&t)===t){var S=s.inst,_=S.destroy;if(_!==void 0){S.destroy=void 0,c=a;var T=o,N=_;try{N()}catch(I){je(c,T,I)}}}s=s.next}while(s!==d)}}catch(I){je(a,a.return,I)}}function Yc(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{ku(a,o)}catch(s){je(t,t.return,s)}}}function Qc(t,a,o){o.props=Ra(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(s){je(t,a,s)}}function qr(t,a){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof o=="function"?t.refCleanup=o(s):o.current=s}}catch(c){je(t,a,c)}}function on(t,a){var o=t.ref,s=t.refCleanup;if(o!==null)if(typeof s=="function")try{s()}catch(c){je(t,a,c)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(c){je(t,a,c)}else o.current=null}function Xc(t){var a=t.type,o=t.memoizedProps,s=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&s.focus();break e;case"img":o.src?s.src=o.src:o.srcSet&&(s.srcset=o.srcSet)}}catch(c){je(t,t.return,c)}}function Fs(t,a,o){try{var s=t.stateNode;op(s,t.type,o,a),s[Et]=a}catch(c){je(t,t.return,c)}}function Jc(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Jn(t.type)||t.tag===4}function Is(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Jc(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Jn(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Vs(t,a,o){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(t),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=dn));else if(s!==4&&(s===27&&Jn(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(Vs(t,a,o),t=t.sibling;t!==null;)Vs(t,a,o),t=t.sibling}function Vo(t,a,o){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(s!==4&&(s===27&&Jn(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(Vo(t,a,o),t=t.sibling;t!==null;)Vo(t,a,o),t=t.sibling}function Wc(t){var a=t.stateNode,o=t.memoizedProps;try{for(var s=t.type,c=a.attributes;c.length;)a.removeAttributeNode(c[0]);dt(a,s,o),a[lt]=t,a[Et]=o}catch(d){je(t,t.return,d)}}var En=!1,et=!1,Ks=!1,ef=typeof WeakSet=="function"?WeakSet:Set,st=null;function Uh(t,a){if(t=t.containerInfo,pl=hi,t=du(t),Zi(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{o.nodeType,d.nodeType}catch{o=null;break e}var S=0,_=-1,T=-1,N=0,I=0,W=t,j=null;t:for(;;){for(var H;W!==o||c!==0&&W.nodeType!==3||(_=S+c),W!==d||s!==0&&W.nodeType!==3||(T=S+s),W.nodeType===3&&(S+=W.nodeValue.length),(H=W.firstChild)!==null;)j=W,W=H;for(;;){if(W===t)break t;if(j===o&&++N===c&&(_=S),j===d&&++I===s&&(T=S),(H=W.nextSibling)!==null)break;W=j,j=W.parentNode}W=H}o=_===-1||T===-1?null:{start:_,end:T}}else o=null}o=o||{start:0,end:0}}else o=null;for(ml={focusedElem:t,selectionRange:o},hi=!1,st=a;st!==null;)if(a=st,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,st=t;else for(;st!==null;){switch(a=st,d=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(o=0;o title"))),dt(d,s,o),d[lt]=t,it(d),s=d;break e;case"link":var S=sd("link","href",c).get(s+(o.href||""));if(S){for(var _=0;_Ze&&(S=Ze,Ze=ye,ye=S);var D=cu(_,ye),C=cu(_,Ze);if(D&&C&&(H.rangeCount!==1||H.anchorNode!==D.node||H.anchorOffset!==D.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var P=W.createRange();P.setStart(D.node,D.offset),H.removeAllRanges(),ye>Ze?(H.addRange(P),H.extend(C.node,C.offset)):(P.setEnd(C.node,C.offset),H.addRange(P))}}}}for(W=[],H=_;H=H.parentNode;)H.nodeType===1&&W.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_o?32:o,L.T=null,o=el,el=null;var d=Yn,S=On;if(tt=0,ir=Yn=null,On=0,(Pe&6)!==0)throw Error(i(331));var _=Pe;if(Pe|=4,df(d.current),uf(d,d.current,S,o),Pe=_,Yr(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(ia,d)}catch{}return!0}finally{ee.p=c,L.T=s,$f(t,a)}}function zf(t,a,o){a=Ht(o,a),a=Ds(t.stateNode,a,2),t=Bn(t,a,2),t!==null&&(Ve(t,2),sn(t))}function je(t,a,o){if(t.tag===3)zf(t,t,o);else for(;a!==null;){if(a.tag===3){zf(a,t,o);break}else if(a.tag===1){var s=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Gn===null||!Gn.has(s))){t=Ht(o,t),o=zc(2),s=Bn(a,o,2),s!==null&&(Dc(o,s,a,t),Ve(s,2),sn(s));break}}a=a.return}}function rl(t,a,o){var s=t.pingCache;if(s===null){s=t.pingCache=new Hh;var c=new Set;s.set(a,c)}else c=s.get(a),c===void 0&&(c=new Set,s.set(a,c));c.has(o)||(Qs=!0,c.add(o),t=Vh.bind(null,t,a,o),a.then(t,t))}function Vh(t,a,o){var s=t.pingCache;s!==null&&s.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,He===t&&(Oe&o)===o&&(Ge===4||Ge===3&&(Oe&62914560)===Oe&&300>ze()-Yo?(Pe&2)===0&&sr(t,0):Xs|=o,or===Oe&&(or=0)),sn(t)}function Df(t,a){a===0&&(a=pt()),t=ha(t,a),t!==null&&(Ve(t,a),sn(t))}function Kh(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),Df(t,o)}function Gh(t,a){var o=0;switch(t.tag){case 31:case 13:var s=t.stateNode,c=t.memoizedState;c!==null&&(o=c.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(i(314))}s!==null&&s.delete(a),Df(t,o)}function Yh(t,a){return Wt(t,a)}var ni=null,ur=null,ol=!1,ai=!1,il=!1,Xn=0;function sn(t){t!==ur&&t.next===null&&(ur===null?ni=ur=t:ur=ur.next=t),ai=!0,ol||(ol=!0,Xh())}function Yr(t,a){if(!il&&ai){il=!0;do for(var o=!1,s=ni;s!==null;){if(t!==0){var c=s.pendingLanes;if(c===0)var d=0;else{var S=s.suspendedLanes,_=s.pingedLanes;d=(1<<31-ht(42|t)+1)-1,d&=c&~(S&~_),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(o=!0,jf(s,d))}else d=Oe,d=ve(s,s===He?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Fe(s,d)||(o=!0,jf(s,d));s=s.next}while(o);il=!1}}function Qh(){Mf()}function Mf(){ai=ol=!1;var t=0;Xn!==0&&sp()&&(t=Xn);for(var a=ze(),o=null,s=ni;s!==null;){var c=s.next,d=Pf(s,a);d===0?(s.next=null,o===null?ni=c:o.next=c,c===null&&(ur=o)):(o=s,(t!==0||(d&3)!==0)&&(ai=!0)),s=c}tt!==0&&tt!==5||Yr(t),Xn!==0&&(Xn=0)}function Pf(t,a){for(var o=t.suspendedLanes,s=t.pingedLanes,c=t.expirationTimes,d=t.pendingLanes&-62914561;0_)break;var I=T.transferSize,W=T.initiatorType;I&&If(W)&&(T=T.responseEnd,S+=I*(T<_?1:(_-N)/(T-N)))}if(--s,a+=8*(d+S)/(c.duration/1e3),t++,10"u"?null:document;function ad(t,a,o){var s=cr;if(s&&typeof a=="string"&&a){var c=kt(a);c='link[rel="'+t+'"][href="'+c+'"]',typeof o=="string"&&(c+='[crossorigin="'+o+'"]'),nd.has(c)||(nd.add(c),t={rel:t,crossOrigin:o,href:a},s.querySelector(c)===null&&(a=s.createElement("link"),dt(a,"link",t),it(a),s.head.appendChild(a)))}}function gp(t){An.D(t),ad("dns-prefetch",t,null)}function yp(t,a){An.C(t,a),ad("preconnect",t,a)}function vp(t,a,o){An.L(t,a,o);var s=cr;if(s&&t&&a){var c='link[rel="preload"][as="'+kt(a)+'"]';a==="image"&&o&&o.imageSrcSet?(c+='[imagesrcset="'+kt(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(c+='[imagesizes="'+kt(o.imageSizes)+'"]')):c+='[href="'+kt(t)+'"]';var d=c;switch(a){case"style":d=fr(t);break;case"script":d=dr(t)}Kt.has(d)||(t=y({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),Kt.set(d,t),s.querySelector(c)!==null||a==="style"&&s.querySelector(Wr(d))||a==="script"&&s.querySelector(eo(d))||(a=s.createElement("link"),dt(a,"link",t),it(a),s.head.appendChild(a)))}}function Sp(t,a){An.m(t,a);var o=cr;if(o&&t){var s=a&&typeof a.as=="string"?a.as:"script",c='link[rel="modulepreload"][as="'+kt(s)+'"][href="'+kt(t)+'"]',d=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=dr(t)}if(!Kt.has(d)&&(t=y({rel:"modulepreload",href:t},a),Kt.set(d,t),o.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(eo(d)))return}s=o.createElement("link"),dt(s,"link",t),it(s),o.head.appendChild(s)}}}function bp(t,a,o){An.S(t,a,o);var s=cr;if(s&&t){var c=Da(s).hoistableStyles,d=fr(t);a=a||"default";var S=c.get(d);if(!S){var _={loading:0,preload:null};if(S=s.querySelector(Wr(d)))_.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":a},o),(o=Kt.get(d))&&El(t,o);var T=S=s.createElement("link");it(T),dt(T,"link",t),T._p=new Promise(function(N,I){T.onload=N,T.onerror=I}),T.addEventListener("load",function(){_.loading|=1}),T.addEventListener("error",function(){_.loading|=2}),_.loading|=4,li(S,a,s)}S={type:"stylesheet",instance:S,count:1,state:_},c.set(d,S)}}}function _p(t,a){An.X(t,a);var o=cr;if(o&&t){var s=Da(o).hoistableScripts,c=dr(t),d=s.get(c);d||(d=o.querySelector(eo(c)),d||(t=y({src:t,async:!0},a),(a=Kt.get(c))&&Rl(t,a),d=o.createElement("script"),it(d),dt(d,"link",t),o.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function Ep(t,a){An.M(t,a);var o=cr;if(o&&t){var s=Da(o).hoistableScripts,c=dr(t),d=s.get(c);d||(d=o.querySelector(eo(c)),d||(t=y({src:t,async:!0,type:"module"},a),(a=Kt.get(c))&&Rl(t,a),d=o.createElement("script"),it(d),dt(d,"link",t),o.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function rd(t,a,o,s){var c=(c=pe.current)?si(c):null;if(!c)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=fr(o.href),o=Da(c).hoistableStyles,s=o.get(a),s||(s={type:"style",instance:null,count:0,state:null},o.set(a,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=fr(o.href);var d=Da(c).hoistableStyles,S=d.get(t);if(S||(c=c.ownerDocument||c,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(t,S),(d=c.querySelector(Wr(t)))&&!d._p&&(S.instance=d,S.state.loading=5),Kt.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Kt.set(t,o),d||Rp(c,t,o,S.state))),a&&s===null)throw Error(i(528,""));return S}if(a&&s!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=dr(o),o=Da(c).hoistableScripts,s=o.get(a),s||(s={type:"script",instance:null,count:0,state:null},o.set(a,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function fr(t){return'href="'+kt(t)+'"'}function Wr(t){return'link[rel="stylesheet"]['+t+"]"}function od(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function Rp(t,a,o,s){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=t.createElement("link"),s.preload=a,a.addEventListener("load",function(){return s.loading|=1}),a.addEventListener("error",function(){return s.loading|=2}),dt(a,"link",o),it(a),t.head.appendChild(a))}function dr(t){return'[src="'+kt(t)+'"]'}function eo(t){return"script[async]"+t}function id(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var s=t.querySelector('style[data-href~="'+kt(o.href)+'"]');if(s)return a.instance=s,it(s),s;var c=y({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),it(s),dt(s,"style",c),li(s,o.precedence,t),a.instance=s;case"stylesheet":c=fr(o.href);var d=t.querySelector(Wr(c));if(d)return a.state.loading|=4,a.instance=d,it(d),d;s=od(o),(c=Kt.get(c))&&El(s,c),d=(t.ownerDocument||t).createElement("link"),it(d);var S=d;return S._p=new Promise(function(_,T){S.onload=_,S.onerror=T}),dt(d,"link",s),a.state.loading|=4,li(d,o.precedence,t),a.instance=d;case"script":return d=dr(o.src),(c=t.querySelector(eo(d)))?(a.instance=c,it(c),c):(s=o,(c=Kt.get(d))&&(s=y({},o),Rl(s,c)),t=t.ownerDocument||t,c=t.createElement("script"),it(c),dt(c,"link",s),t.head.appendChild(c),a.instance=c);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(s=a.instance,a.state.loading|=4,li(s,o.precedence,t));return a.instance}function li(t,a,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,d=c,S=0;S title"):null)}function xp(t,a,o){if(o===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function ud(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Tp(t,a,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var c=fr(s.href),d=a.querySelector(Wr(c));if(d){a=d._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=ci.bind(t),a.then(t,t)),o.state.loading|=4,o.instance=d,it(d);return}d=a.ownerDocument||a,s=od(s),(c=Kt.get(c))&&El(s,c),d=d.createElement("link"),it(d);var S=d;S._p=new Promise(function(_,T){S.onload=_,S.onerror=T}),dt(d,"link",s),o.instance=d}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=ci.bind(t),a.addEventListener("load",o),a.addEventListener("error",o))}}var xl=0;function wp(t,a){return t.stylesheets&&t.count===0&&di(t,t.stylesheets),0xl?50:800)+a);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function ci(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)di(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var fi=null;function di(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,fi=new Map,a.forEach(Op,t),fi=null,ci.call(t))}function Op(t,a){if(!(a.state.loading&4)){var o=fi.get(t);if(o)var s=o.get(null);else{o=new Map,fi.set(t,o);for(var c=t.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient();const ReactDOM=getDefaultExportFromCjs(clientExports),scriptRel="modulepreload",assetsURL=function(e,n){return new URL(e,n).href},seen={},__vitePreload=function(n,r,i){let l=Promise.resolve();if(r&&r.length>0){let m=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const f=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),g=p?.nonce||p?.getAttribute("nonce");l=m(r.map(v=>{if(v=assetsURL(v,i),v in seen)return;seen[v]=!0;const y=v.endsWith(".css"),b=y?'[rel="stylesheet"]':"";if(i)for(let E=f.length-1;E>=0;E--){const A=f[E];if(A.href===v&&(!y||A.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${v}"]${b}`))return;const R=document.createElement("link");if(R.rel=y?"stylesheet":scriptRel,y||(R.as="script"),R.crossOrigin="",R.href=v,g&&R.setAttribute("nonce",g),document.head.appendChild(R),y)return new Promise((E,A)=>{R.addEventListener("load",E),R.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(f){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=f,window.dispatchEvent(p),!p.defaultPrevented)throw f}return l.then(f=>{for(const p of f||[])p.status==="rejected"&&u(p.reason);return n().catch(u)})};const toKebabCase=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),toCamelCase$1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,i)=>i?i.toUpperCase():r.toLowerCase()),toPascalCase=e=>{const n=toCamelCase$1(e);return n.charAt(0).toUpperCase()+n.slice(1)},mergeClasses=(...e)=>e.filter((n,r,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===r).join(" ").trim(),hasA11yProp=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Icon=reactExports.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:l="",children:u,iconNode:f,...p},g)=>reactExports.createElement("svg",{ref:g,...defaultAttributes,width:n,height:n,stroke:e,strokeWidth:i?Number(r)*24/Number(n):r,className:mergeClasses("lucide",l),...!u&&!hasA11yProp(p)&&{"aria-hidden":"true"},...p},[...f.map(([m,v])=>reactExports.createElement(m,v)),...Array.isArray(u)?u:[u]]));const createLucideIcon=(e,n)=>{const r=reactExports.forwardRef(({className:i,...l},u)=>reactExports.createElement(Icon,{ref:u,iconNode:n,className:mergeClasses(`lucide-${toKebabCase(toPascalCase(e))}`,`lucide-${e}`,i),...l}));return r.displayName=toPascalCase(e),r};const __iconNode$4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],CircleCheck=createLucideIcon("circle-check",__iconNode$4);const __iconNode$3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Info=createLucideIcon("info",__iconNode$3);const __iconNode$2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],LoaderCircle=createLucideIcon("loader-circle",__iconNode$2);const __iconNode$1=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],OctagonX=createLucideIcon("octagon-x",__iconNode$1);const __iconNode=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],TriangleAlert=createLucideIcon("triangle-alert",__iconNode);var M=(e,n,r,i,l,u,f,p)=>{let g=document.documentElement,m=["light","dark"];function v(R){(Array.isArray(e)?e:[e]).forEach(E=>{let A=E==="class",O=A&&u?l.map($=>u[$]||$):l;A?(g.classList.remove(...O),g.classList.add(u&&u[R]?u[R]:R)):g.setAttribute(E,R)}),y(R)}function y(R){p&&m.includes(R)&&(g.style.colorScheme=R)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)v(i);else try{let R=localStorage.getItem(n)||r,E=f&&R==="system"?b():R;v(E)}catch{}},x=reactExports.createContext(void 0),U={setTheme:e=>{},themes:[]},z=()=>{var e;return(e=reactExports.useContext(x))!=null?e:U};reactExports.memo(({forcedTheme:e,storageKey:n,attribute:r,enableSystem:i,enableColorScheme:l,defaultTheme:u,value:f,themes:p,nonce:g,scriptProps:m})=>{let v=JSON.stringify([r,n,u,e,p,f,i,l]).slice(1,-1);return reactExports.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${M.toString()})(${v})`}})});function __insertCSS(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const getAsset=e=>{switch(e){case"success":return SuccessIcon;case"info":return InfoIcon;case"warning":return WarningIcon;case"error":return ErrorIcon;default:return null}},bars=Array(12).fill(0),Loader=({visible:e,className:n})=>React.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},React.createElement("div",{className:"sonner-spinner"},bars.map((r,i)=>React.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),SuccessIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),WarningIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),InfoIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ErrorIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},React.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CloseIcon=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),React.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),useIsDocumentHidden=()=>{const[e,n]=React.useState(document.hidden);return React.useEffect(()=>{const r=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let toastsCounter=1;class Observer{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:i,...l}=n,u=typeof n?.id=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:toastsCounter++,f=this.toasts.find(g=>g.id===u),p=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(g=>g.id===u?(this.publish({...g,...n,id:u,title:i}),{...g,...n,id:u,dismissible:p,title:i}):g):this.addToast({title:i,...l,dismissible:p,id:u}),u},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const l=Promise.resolve(n instanceof Function?n():n);let u=i!==void 0,f;const p=l.then(async m=>{if(f=["resolve",m],React.isValidElement(m))u=!1,this.create({id:i,type:"default",message:m});else if(isHttpResponse(m)&&!m.ok){u=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,E=typeof y=="object"&&!React.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:b,...E})}else if(m instanceof Error){u=!1;const y=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,E=typeof y=="object"&&!React.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:b,...E})}else if(r.success!==void 0){u=!1;const y=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,E=typeof y=="object"&&!React.isValidElement(y)?y:{message:y};this.create({id:i,type:"success",description:b,...E})}}).catch(async m=>{if(f=["reject",m],r.error!==void 0){u=!1;const v=typeof r.error=="function"?await r.error(m):r.error,y=typeof r.description=="function"?await r.description(m):r.description,R=typeof v=="object"&&!React.isValidElement(v)?v:{message:v};this.create({id:i,type:"error",description:y,...R})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((m,v)=>p.then(()=>f[0]==="reject"?v(f[1]):m(f[1])).catch(v));return typeof i!="string"&&typeof i!="number"?{unwrap:g}:Object.assign(i,{unwrap:g})},this.custom=(n,r)=>{const i=r?.id||toastsCounter++;return this.create({jsx:n(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ToastState=new Observer,toastFunction=(e,n)=>{const r=n?.id||toastsCounter++;return ToastState.addToast({title:e,...n,id:r}),r},isHttpResponse=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});__insertCSS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function isAction(e){return e.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET="24px",MOBILE_VIEWPORT_OFFSET="16px",TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function cn(...e){return e.filter(Boolean).join(" ")}function getDefaultSwipeDirections(e){const[n,r]=e.split("-"),i=[];return n&&i.push(n),r&&i.push(r),i}const Toast=e=>{var n,r,i,l,u,f,p,g,m;const{invert:v,toast:y,unstyled:b,interacting:R,setHeights:E,visibleToasts:A,heights:O,index:$,toasts:q,expanded:Z,removeToast:V,defaultRichColors:re,closeButton:J,style:F,cancelButtonStyle:te,actionButtonStyle:ne,className:oe="",descriptionClassName:se="",duration:ce,position:le,gap:fe,expandByDefault:ge,classNames:L,icons:ee,closeButtonAriaLabel:ie="Close toast"}=e,[Se,be]=React.useState(null),[w,B]=React.useState(null),[K,ae]=React.useState(!1),[ue,pe]=React.useState(!1),[Ee,_e]=React.useState(!1),[Ce,vt]=React.useState(!1),[Ct,nt]=React.useState(!1),[wa,$t]=React.useState(0),[Cn,$n]=React.useState(0),ln=React.useRef(y.duration||ce||TOAST_LIFETIME),ra=React.useRef(null),at=React.useRef(null),Wt=$===0,Ln=$+1<=A,rt=y.type,$e=y.dismissible!==!1,ze=y.className||"",mt=y.descriptionClassName||"",en=React.useMemo(()=>O.findIndex(ve=>ve.toastId===y.id)||0,[O,y.id]),oo=React.useMemo(()=>{var ve;return(ve=y.closeButton)!=null?ve:J},[y.closeButton,J]),oa=React.useMemo(()=>y.duration||ce||TOAST_LIFETIME,[y.duration,ce]),pr=React.useRef(0),un=React.useRef(0),io=React.useRef(0),zn=React.useRef(null),[ia,gt]=le.split("-"),Gt=React.useMemo(()=>O.reduce((ve,Fe,ot)=>ot>=en?ve:ve+Fe.height,0),[O,en]),ht=useIsDocumentHidden(),bi=y.invert||v,mr=rt==="loading";un.current=React.useMemo(()=>en*fe+Gt,[en,Gt]),React.useEffect(()=>{ln.current=oa},[oa]),React.useEffect(()=>{ae(!0)},[]),React.useEffect(()=>{const ve=at.current;if(ve){const Fe=ve.getBoundingClientRect().height;return $n(Fe),E(ot=>[{toastId:y.id,height:Fe,position:y.position},...ot]),()=>E(ot=>ot.filter(pt=>pt.toastId!==y.id))}},[E,y.id]),React.useLayoutEffect(()=>{if(!K)return;const ve=at.current,Fe=ve.style.height;ve.style.height="auto";const ot=ve.getBoundingClientRect().height;ve.style.height=Fe,$n(ot),E(pt=>pt.find(Ve=>Ve.toastId===y.id)?pt.map(Ve=>Ve.toastId===y.id?{...Ve,height:ot}:Ve):[{toastId:y.id,height:ot,position:y.position},...pt])},[K,y.title,y.description,E,y.id,y.jsx,y.action,y.cancel]);const tn=React.useCallback(()=>{pe(!0),$t(un.current),E(ve=>ve.filter(Fe=>Fe.toastId!==y.id)),setTimeout(()=>{V(y)},TIME_BEFORE_UNMOUNT)},[y,V,E,un]);React.useEffect(()=>{if(y.promise&&rt==="loading"||y.duration===1/0||y.type==="loading")return;let ve;return Z||R||ht?(()=>{if(io.current{ln.current!==1/0&&(pr.current=new Date().getTime(),ve=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),tn()},ln.current))})(),()=>clearTimeout(ve)},[Z,R,y,rt,ht,tn]),React.useEffect(()=>{y.delete&&(tn(),y.onDismiss==null||y.onDismiss.call(y,y))},[tn,y.delete]);function Oa(){var ve;if(ee?.loading){var Fe;return React.createElement("div",{className:cn(L?.loader,y==null||(Fe=y.classNames)==null?void 0:Fe.loader,"sonner-loader"),"data-visible":rt==="loading"},ee.loading)}return React.createElement(Loader,{className:cn(L?.loader,y==null||(ve=y.classNames)==null?void 0:ve.loader),visible:rt==="loading"})}const Aa=y.icon||ee?.[rt]||getAsset(rt);var sa,nn;return React.createElement("li",{tabIndex:0,ref:at,className:cn(oe,ze,L?.toast,y==null||(n=y.classNames)==null?void 0:n.toast,L?.default,L?.[rt],y==null||(r=y.classNames)==null?void 0:r[rt]),"data-sonner-toast":"","data-rich-colors":(sa=y.richColors)!=null?sa:re,"data-styled":!(y.jsx||y.unstyled||b),"data-mounted":K,"data-promise":!!y.promise,"data-swiped":Ct,"data-removed":ue,"data-visible":Ln,"data-y-position":ia,"data-x-position":gt,"data-index":$,"data-front":Wt,"data-swiping":Ee,"data-dismissible":$e,"data-type":rt,"data-invert":bi,"data-swipe-out":Ce,"data-swipe-direction":w,"data-expanded":!!(Z||ge&&K),"data-testid":y.testId,style:{"--index":$,"--toasts-before":$,"--z-index":q.length-$,"--offset":`${ue?wa:un.current}px`,"--initial-height":ge?"auto":`${Cn}px`,...F,...y.style},onDragEnd:()=>{_e(!1),be(null),zn.current=null},onPointerDown:ve=>{ve.button!==2&&(mr||!$e||(ra.current=new Date,$t(un.current),ve.target.setPointerCapture(ve.pointerId),ve.target.tagName!=="BUTTON"&&(_e(!0),zn.current={x:ve.clientX,y:ve.clientY})))},onPointerUp:()=>{var ve,Fe,ot;if(Ce||!$e)return;zn.current=null;const pt=Number(((ve=at.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dn=Number(((Fe=at.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ve=new Date().getTime()-((ot=ra.current)==null?void 0:ot.getTime()),St=Se==="x"?pt:Dn,la=Math.abs(St)/Ve;if(Math.abs(St)>=SWIPE_THRESHOLD||la>.11){$t(un.current),y.onDismiss==null||y.onDismiss.call(y,y),B(Se==="x"?pt>0?"right":"left":Dn>0?"down":"up"),tn(),vt(!0);return}else{var bt,_t;(bt=at.current)==null||bt.style.setProperty("--swipe-amount-x","0px"),(_t=at.current)==null||_t.style.setProperty("--swipe-amount-y","0px")}nt(!1),_e(!1),be(null)},onPointerMove:ve=>{var Fe,ot,pt;if(!zn.current||!$e||((Fe=window.getSelection())==null?void 0:Fe.toString().length)>0)return;const Ve=ve.clientY-zn.current.y,St=ve.clientX-zn.current.x;var la;const bt=(la=e.swipeDirections)!=null?la:getDefaultSwipeDirections(le);!Se&&(Math.abs(St)>1||Math.abs(Ve)>1)&&be(Math.abs(St)>Math.abs(Ve)?"x":"y");let _t={x:0,y:0};const Ca=Yt=>1/(1.5+Math.abs(Yt)/20);if(Se==="y"){if(bt.includes("top")||bt.includes("bottom"))if(bt.includes("top")&&Ve<0||bt.includes("bottom")&&Ve>0)_t.y=Ve;else{const Yt=Ve*Ca(Ve);_t.y=Math.abs(Yt)0)_t.x=St;else{const Yt=St*Ca(St);_t.x=Math.abs(Yt)0||Math.abs(_t.y)>0)&&nt(!0),(ot=at.current)==null||ot.style.setProperty("--swipe-amount-x",`${_t.x}px`),(pt=at.current)==null||pt.style.setProperty("--swipe-amount-y",`${_t.y}px`)}},oo&&!y.jsx&&rt!=="loading"?React.createElement("button",{"aria-label":ie,"data-disabled":mr,"data-close-button":!0,onClick:mr||!$e?()=>{}:()=>{tn(),y.onDismiss==null||y.onDismiss.call(y,y)},className:cn(L?.closeButton,y==null||(i=y.classNames)==null?void 0:i.closeButton)},(nn=ee?.close)!=null?nn:CloseIcon):null,(rt||y.icon||y.promise)&&y.icon!==null&&(ee?.[rt]!==null||y.icon)?React.createElement("div",{"data-icon":"",className:cn(L?.icon,y==null||(l=y.classNames)==null?void 0:l.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Oa():null,y.type!=="loading"?Aa:null):null,React.createElement("div",{"data-content":"",className:cn(L?.content,y==null||(u=y.classNames)==null?void 0:u.content)},React.createElement("div",{"data-title":"",className:cn(L?.title,y==null||(f=y.classNames)==null?void 0:f.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?React.createElement("div",{"data-description":"",className:cn(se,mt,L?.description,y==null||(p=y.classNames)==null?void 0:p.description)},typeof y.description=="function"?y.description():y.description):null),React.isValidElement(y.cancel)?y.cancel:y.cancel&&isAction(y.cancel)?React.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||te,onClick:ve=>{isAction(y.cancel)&&$e&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,ve),tn())},className:cn(L?.cancelButton,y==null||(g=y.classNames)==null?void 0:g.cancelButton)},y.cancel.label):null,React.isValidElement(y.action)?y.action:y.action&&isAction(y.action)?React.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||ne,onClick:ve=>{isAction(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,ve),!ve.defaultPrevented&&tn())},className:cn(L?.actionButton,y==null||(m=y.classNames)==null?void 0:m.actionButton)},y.action.label):null)};function getDocumentDirection(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function assignOffset(e,n){const r={};return[e,n].forEach((i,l)=>{const u=l===1,f=u?"--mobile-offset":"--offset",p=u?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function g(m){["top","right","bottom","left"].forEach(v=>{r[`${f}-${v}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?g(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?r[`${f}-${m}`]=p:r[`${f}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):g(p)}),r}const Toaster$1=React.forwardRef(function(n,r){const{id:i,invert:l,position:u="bottom-right",hotkey:f=["altKey","KeyT"],expand:p,closeButton:g,className:m,offset:v,mobileOffset:y,theme:b="light",richColors:R,duration:E,style:A,visibleToasts:O=VISIBLE_TOASTS_AMOUNT,toastOptions:$,dir:q=getDocumentDirection(),gap:Z=GAP,icons:V,containerAriaLabel:re="Notifications"}=n,[J,F]=React.useState([]),te=React.useMemo(()=>i?J.filter(K=>K.toasterId===i):J.filter(K=>!K.toasterId),[J,i]),ne=React.useMemo(()=>Array.from(new Set([u].concat(te.filter(K=>K.position).map(K=>K.position)))),[te,u]),[oe,se]=React.useState([]),[ce,le]=React.useState(!1),[fe,ge]=React.useState(!1),[L,ee]=React.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=React.useRef(null),Se=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),be=React.useRef(null),w=React.useRef(!1),B=React.useCallback(K=>{F(ae=>{var ue;return(ue=ae.find(pe=>pe.id===K.id))!=null&&ue.delete||ToastState.dismiss(K.id),ae.filter(({id:pe})=>pe!==K.id)})},[]);return React.useEffect(()=>ToastState.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{F(ae=>ae.map(ue=>ue.id===K.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{ReactDOM$1.flushSync(()=>{F(ae=>{const ue=ae.findIndex(pe=>pe.id===K.id);return ue!==-1?[...ae.slice(0,ue),{...ae[ue],...K},...ae.slice(ue+1)]:[K,...ae]})})})}),[J]),React.useEffect(()=>{if(b!=="system"){ee(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:ae})=>{ee(ae?"dark":"light")})}catch{K.addListener(({matches:ue})=>{try{ee(ue?"dark":"light")}catch(pe){console.error(pe)}})}},[b]),React.useEffect(()=>{J.length<=1&&le(!1)},[J]),React.useEffect(()=>{const K=ae=>{var ue;if(f.every(_e=>ae[_e]||ae.code===_e)){var Ee;le(!0),(Ee=ie.current)==null||Ee.focus()}ae.code==="Escape"&&(document.activeElement===ie.current||(ue=ie.current)!=null&&ue.contains(document.activeElement))&&le(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[f]),React.useEffect(()=>{if(ie.current)return()=>{be.current&&(be.current.focus({preventScroll:!0}),be.current=null,w.current=!1)}},[ie.current]),React.createElement("section",{ref:r,"aria-label":`${re} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ne.map((K,ae)=>{var ue;const[pe,Ee]=K.split("-");return te.length?React.createElement("ol",{key:K,dir:q==="auto"?getDocumentDirection():q,tabIndex:-1,ref:ie,className:m,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":pe,"data-x-position":Ee,style:{"--front-toast-height":`${((ue=oe[0])==null?void 0:ue.height)||0}px`,"--width":`${TOAST_WIDTH}px`,"--gap":`${Z}px`,...A,...assignOffset(v,y)},onBlur:_e=>{w.current&&!_e.currentTarget.contains(_e.relatedTarget)&&(w.current=!1,be.current&&(be.current.focus({preventScroll:!0}),be.current=null))},onFocus:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||w.current||(w.current=!0,be.current=_e.relatedTarget)},onMouseEnter:()=>le(!0),onMouseMove:()=>le(!0),onMouseLeave:()=>{fe||le(!1)},onDragEnd:()=>le(!1),onPointerDown:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||ge(!0)},onPointerUp:()=>ge(!1)},te.filter(_e=>!_e.position&&ae===0||_e.position===K).map((_e,Ce)=>{var vt,Ct;return React.createElement(Toast,{key:_e.id,icons:V,index:Ce,toast:_e,defaultRichColors:R,duration:(vt=$?.duration)!=null?vt:E,className:$?.className,descriptionClassName:$?.descriptionClassName,invert:l,visibleToasts:O,closeButton:(Ct=$?.closeButton)!=null?Ct:g,interacting:fe,position:K,style:$?.style,unstyled:$?.unstyled,classNames:$?.classNames,cancelButtonStyle:$?.cancelButtonStyle,actionButtonStyle:$?.actionButtonStyle,closeButtonAriaLabel:$?.closeButtonAriaLabel,removeToast:B,toasts:te.filter(nt=>nt.position==_e.position),heights:oe.filter(nt=>nt.position==_e.position),setHeights:se,expandByDefault:p,gap:Z,expanded:ce,swipeDirections:n.swipeDirections})})):null}))}),Toaster=({...e})=>{const{theme:n="system"}=z();return jsxRuntimeExports.jsx(Toaster$1,{className:"toaster group",icons:{success:jsxRuntimeExports.jsx(CircleCheck,{className:"size-4"}),info:jsxRuntimeExports.jsx(Info,{className:"size-4"}),warning:jsxRuntimeExports.jsx(TriangleAlert,{className:"size-4"}),error:jsxRuntimeExports.jsx(OctagonX,{className:"size-4"}),loading:jsxRuntimeExports.jsx(LoaderCircle,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},theme:n,...e})};var G=()=>{};function Y(e,n,r){let i=reactExports.useRef(G);reactExports.useEffect(()=>{i.current=e}),reactExports.useEffect(()=>{},[r]),reactExports.useEffect(()=>{if(n===null||n===!1)return;let l=setInterval(()=>i.current(),n);return()=>clearInterval(l)},[n])}function k(e,n){return Math.random()*(n-e+1)+e}function h(e,n){return Math.floor(k(e,n))}var Q=reactExports.forwardRef(({progress:e,height:n=2,className:r="",color:i="red",background:l="transparent",onLoaderFinished:u,transitionTime:f=300,loaderSpeed:p=500,waitingTime:g=1e3,shadow:m=!0,containerStyle:v={},style:y={},shadowStyle:b={},containerClassName:R=""},E)=>{let A=reactExports.useRef(!1),[O,$]=reactExports.useState(0),q=reactExports.useRef({active:!1,refreshRate:1e3}),[Z,V]=reactExports.useState({active:!1,value:60}),re={height:"100%",background:i,transition:`all ${p}ms ease`,width:"0%"},J={position:"fixed",top:0,left:0,height:n,background:l,zIndex:99999999999,width:"100%"},F={boxShadow:`0 0 10px ${i}, 0 0 10px ${i}`,width:"5%",opacity:1,position:"absolute",height:"100%",transition:`all ${p}ms ease`,transform:"rotate(2deg) translate(0px, -2px)",left:"-10rem"},[te,ne]=reactExports.useState(re),[oe,se]=reactExports.useState(F);reactExports.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]),reactExports.useImperativeHandle(E,()=>({continuousStart(le,fe=1e3){if(Z.active)return;if(e!==void 0){console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");return}let ge=le||h(10,20);q.current={active:!0,refreshRate:fe},$(ge),ce(ge)},staticStart(le){if(q.current.active)return;if(e!==void 0){console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");return}let fe=le||h(30,60);V({active:!0,value:fe}),$(fe),ce(fe)},start(le="continuous",fe,ge){if(e!==void 0){console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");return}le==="continuous"?q.current={active:!0,refreshRate:ge||1e3}:V({active:!0,value:fe||20});let L=h(10,20),ee=h(30,70),ie=fe||(le==="continuous"?L:ee);$(ie),ce(ie)},complete(){if(e!==void 0){console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");return}$(100),ce(100)},increase(le){if(e!==void 0){console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");return}$(fe=>{let ge=fe+le;return ce(ge),ge})},decrease(le){if(e!==void 0){console.warn("react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar!");return}$(fe=>{let ge=fe-le;return ce(ge),ge})},getProgress(){return O}})),reactExports.useEffect(()=>{ne({...te,background:i}),se({...oe,boxShadow:`0 0 10px ${i}, 0 0 5px ${i}`})},[i]),reactExports.useEffect(()=>{if(E){if(E&&e!==void 0){console.warn(`react-top-loading-bar: You can't use both controlling by props and ref methods to control the bar! Please use only props or only ref methods! Ref methods will override props if "ref" property is available.`);return}ce(O)}else e&&ce(e)},[e]);let ce=le=>{le>=100?(ne({...te,width:"100%"}),m&&se({...oe,left:le-10+"%"}),setTimeout(()=>{A.current&&(ne({...te,opacity:0,width:"100%",transition:`all ${f}ms ease-out`,color:i}),setTimeout(()=>{A.current&&(q.current.active&&(q.current={...q.current,active:!1},$(0),ce(0)),Z.active&&(V({...Z,active:!1}),$(0),ce(0)),u&&u(),$(0),ce(0))},f))},g)):(ne(fe=>({...fe,width:le+"%",opacity:1,transition:le>0?`all ${p}ms ease`:""})),m&&se({...oe,left:le-5.5+"%",transition:le>0?`all ${p}ms ease`:""}))};return Y(()=>{let le=Math.min(10,(100-O)/5),fe=Math.min(20,(100-O)/3),ge=k(le,fe);O+ge<95&&($(O+ge),ce(O+ge))},q.current.active?q.current.refreshRate:null),reactExports.createElement("div",{className:R,style:{...J,...v}},reactExports.createElement("div",{className:r,style:{...te,...y}},m?reactExports.createElement("div",{style:{...oe,...b}}):null))});reactExports.createContext(void 0);function NavigationProgress(){const e=reactExports.useRef(null),n=useRouterState();return reactExports.useEffect(()=>{n.status==="pending"?e.current?.continuousStart():e.current?.complete()},[n.status]),jsxRuntimeExports.jsx(Q,{color:"var(--primary)",height:2,ref:e,shadow:!0})}const DEFAULT_MAX_AGE=3600*24*7;function getCookie(e){if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${e}=`);if(r.length===2)return r.pop()?.split(";").shift()}function setCookie(e,n,r=DEFAULT_MAX_AGE){typeof document>"u"||(document.cookie=`${e}=${n}; path=/; max-age=${r}`)}function removeCookie(e){typeof document>"u"||(document.cookie=`${e}=; path=/; max-age=0`)}const isBrowser=()=>typeof window<"u";function bind(e,n){return function(){return e.apply(n,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>n=>{const r=toString.call(n);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),n=>kindOf(n)===e),typeOfTest=e=>n=>typeof n===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&isArrayBuffer(e.buffer),n}const isString$2=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber=typeOfTest("number"),isObject$2=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject$1=e=>{if(kindOf(e)!=="object")return!1;const n=getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(toStringTag in e)&&!(iterator in e)},isEmptyObject=e=>{if(!isObject$2(e)||isBuffer(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject$2(e)&&isFunction$1(e.pipe),isFormData=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction$1(e.append)&&((n=kindOf(e))==="formdata"||n==="object"&&isFunction$1(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach$1(e,n,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,l;if(typeof e!="object"&&(e=[e]),isArray(e))for(i=0,l=e.length;i0;)if(l=r[i],n===l.toLowerCase())return l;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge$1(){const{caseless:e,skipUndefined:n}=isContextDefined(this)&&this||{},r={},i=(l,u)=>{const f=e&&findKey(r,u)||u;isPlainObject$1(r[f])&&isPlainObject$1(l)?r[f]=merge$1(r[f],l):isPlainObject$1(l)?r[f]=merge$1({},l):isArray(l)?r[f]=l.slice():(!n||!isUndefined(l))&&(r[f]=l)};for(let l=0,u=arguments.length;l(forEach$1(n,(l,u)=>{r&&isFunction$1(l)?e[u]=bind(l,r):e[u]=l},{allOwnKeys:i}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,n,r,i)=>{e.prototype=Object.create(n.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,n,r,i)=>{let l,u,f;const p={};if(n=n||{},e==null)return n;do{for(l=Object.getOwnPropertyNames(e),u=l.length;u-- >0;)f=l[u],(!i||i(f,e,n))&&!p[f]&&(n[f]=e[f],p[f]=!0);e=r!==!1&&getPrototypeOf(e)}while(e&&(!r||r(e,n))&&e!==Object.prototype);return n},endsWith=(e,n,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=n.length;const i=e.indexOf(n,r);return i!==-1&&i===r},toArray=e=>{if(!e)return null;if(isArray(e))return e;let n=e.length;if(!isNumber(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=e[n];return r},isTypedArray=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,n)=>{const i=(e&&e[iterator]).call(e);let l;for(;(l=i.next())&&!l.done;){const u=l.value;n.call(e,u[0],u[1])}},matchAll=(e,n)=>{let r;const i=[];for(;(r=e.exec(n))!==null;)i.push(r);return i},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,l){return i.toUpperCase()+l}),hasOwnProperty=(({hasOwnProperty:e})=>(n,r)=>e.call(n,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,n)=>{const r=Object.getOwnPropertyDescriptors(e),i={};forEach$1(r,(l,u)=>{let f;(f=n(l,u,e))!==!1&&(i[u]=f||l)}),Object.defineProperties(e,i)},freezeMethods=e=>{reduceDescriptors(e,(n,r)=>{if(isFunction$1(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(isFunction$1(i)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet=(e,n)=>{const r={},i=l=>{l.forEach(u=>{r[u]=!0})};return isArray(e)?i(e):i(String(e).split(n)),r},noop$1=()=>{},toFiniteNumber=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const n=new Array(10),r=(i,l)=>{if(isObject$2(i)){if(n.indexOf(i)>=0)return;if(isBuffer(i))return i;if(!("toJSON"in i)){n[l]=i;const u=isArray(i)?[]:{};return forEach$1(i,(f,p)=>{const g=r(f,l+1);!isUndefined(g)&&(u[p]=g)}),n[l]=void 0,u}}return i};return r(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject$2(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),_setImmediate=((e,n)=>e?setImmediate:n?((r,i)=>(_global.addEventListener("message",({source:l,data:u})=>{l===_global&&u===r&&i.length&&i.shift()()},!1),l=>{i.push(l),_global.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction$1(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString:isString$2,isNumber,isBoolean,isObject:isObject$2,isPlainObject:isPlainObject$1,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach:forEach$1,merge:merge$1,extend:extend$1,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,n,r,i,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status?l.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}});Object.defineProperties(AxiosError$1,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError$1.from=(e,n,r,i,l,u)=>{const f=Object.create(prototype$1);utils$1.toFlatObject(e,f,function(v){return v!==Error.prototype},m=>m!=="isAxiosError");const p=e&&e.message?e.message:"Error",g=n==null&&e?e.code:n;return AxiosError$1.call(f,p,g,r,i,l),e&&f.cause==null&&Object.defineProperty(f,"cause",{value:e,configurable:!0}),f.name=e&&e.name||"Error",u&&Object.assign(f,u),f};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,n,r){return e?e.concat(n).map(function(l,u){return l=removeBrackets(l),!r&&u?"["+l+"]":l}).join(r?".":""):n}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(n){return/^is[A-Z]/.test(n)});function toFormData$1(e,n,r){if(!utils$1.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,r=utils$1.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,O){return!utils$1.isUndefined(O[A])});const i=r.metaTokens,l=r.visitor||v,u=r.dots,f=r.indexes,g=(r.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(n);if(!utils$1.isFunction(l))throw new TypeError("visitor must be a function");function m(E){if(E===null)return"";if(utils$1.isDate(E))return E.toISOString();if(utils$1.isBoolean(E))return E.toString();if(!g&&utils$1.isBlob(E))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(E)||utils$1.isTypedArray(E)?g&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function v(E,A,O){let $=E;if(E&&!O&&typeof E=="object"){if(utils$1.endsWith(A,"{}"))A=i?A:A.slice(0,-2),E=JSON.stringify(E);else if(utils$1.isArray(E)&&isFlatArray(E)||(utils$1.isFileList(E)||utils$1.endsWith(A,"[]"))&&($=utils$1.toArray(E)))return A=removeBrackets(A),$.forEach(function(Z,V){!(utils$1.isUndefined(Z)||Z===null)&&n.append(f===!0?renderKey([A],V,u):f===null?A:A+"[]",m(Z))}),!1}return isVisitable(E)?!0:(n.append(renderKey(O,A,u),m(E)),!1)}const y=[],b=Object.assign(predicates,{defaultVisitor:v,convertValue:m,isVisitable});function R(E,A){if(!utils$1.isUndefined(E)){if(y.indexOf(E)!==-1)throw Error("Circular reference detected in "+A.join("."));y.push(E),utils$1.forEach(E,function($,q){(!(utils$1.isUndefined($)||$===null)&&l.call(n,$,utils$1.isString(q)?q.trim():q,A,b))===!0&&R($,A?A.concat(q):[q])}),y.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return R(e),n}function encode$2(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return n[i]})}function AxiosURLSearchParams(e,n){this._pairs=[],e&&toFormData$1(e,this,n)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(n,r){this._pairs.push([n,r])};prototype.toString=function(n){const r=n?function(i){return n.call(this,i,encode$2)}:encode$2;return this._pairs.map(function(l){return r(l[0])+"="+r(l[1])},"").join("&")};function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,n,r){if(!n)return e;const i=r&&r.encode||encode$1;utils$1.isFunction(r)&&(r={serialize:r});const l=r&&r.serialize;let u;if(l?u=l(n,r):u=utils$1.isURLSearchParams(n)?n.toString():new AxiosURLSearchParams(n,r).toString(i),u){const f=e.indexOf("#");f!==-1&&(e=e.slice(0,f)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class InterceptorManager{constructor(){this.handlers=[]}use(n,r,i){return this.handlers.push({fulfilled:n,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){utils$1.forEach(this.handlers,function(i){i!==null&&n(i)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,n){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(r,i,l,u){return platform.isNode&&utils$1.isBuffer(r)?(this.append(i,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...n})}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function arrayToObject(e){const n={},r=Object.keys(e);let i;const l=r.length;let u;for(i=0;i=r.length;return f=!f&&utils$1.isArray(l)?l.length:f,g?(utils$1.hasOwnProp(l,f)?l[f]=[l[f],i]:l[f]=i,!p):((!l[f]||!utils$1.isObject(l[f]))&&(l[f]=[]),n(r,i,l[f],u)&&utils$1.isArray(l[f])&&(l[f]=arrayToObject(l[f])),!p)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const r={};return utils$1.forEachEntry(e,(i,l)=>{n(parsePropPath(i),l,r,0)}),r}return null}function stringifySafely(e,n,r){if(utils$1.isString(e))try{return(n||JSON.parse)(e),utils$1.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const i=r.getContentType()||"",l=i.indexOf("application/json")>-1,u=utils$1.isObject(n);if(u&&utils$1.isHTMLForm(n)&&(n=new FormData(n)),utils$1.isFormData(n))return l?JSON.stringify(formDataToJSON(n)):n;if(utils$1.isArrayBuffer(n)||utils$1.isBuffer(n)||utils$1.isStream(n)||utils$1.isFile(n)||utils$1.isBlob(n)||utils$1.isReadableStream(n))return n;if(utils$1.isArrayBufferView(n))return n.buffer;if(utils$1.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let p;if(u){if(i.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(n,this.formSerializer).toString();if((p=utils$1.isFileList(n))||i.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return toFormData$1(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return u||l?(r.setContentType("application/json",!1),stringifySafely(n)):n}],transformResponse:[function(n){const r=this.transitional||defaults$1.transitional,i=r&&r.forcedJSONParsing,l=this.responseType==="json";if(utils$1.isResponse(n)||utils$1.isReadableStream(n))return n;if(n&&utils$1.isString(n)&&(i&&!this.responseType||l)){const f=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(n,this.parseReviver)}catch(p){if(f)throw p.name==="SyntaxError"?AxiosError$1.from(p,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults$1.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const n={};let r,i,l;return e&&e.split(` `).forEach(function(f){l=f.indexOf(":"),r=f.substring(0,l).trim().toLowerCase(),i=f.substring(l+1).trim(),!(!r||n[r]&&ignoreDuplicateOf[r])&&(r==="set-cookie"?n[r]?n[r].push(i):n[r]=[i]:n[r]=n[r]?n[r]+", "+i:i)}),n},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)n[i[1]]=i[2];return n}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,n,r,i,l){if(utils$1.isFunction(i))return i.call(this,n,r);if(l&&(n=r),!!utils$1.isString(n)){if(utils$1.isString(i))return n.indexOf(i)!==-1;if(utils$1.isRegExp(i))return i.test(n)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,i)=>r.toUpperCase()+i)}function buildAccessors(e,n){const r=utils$1.toCamelCase(" "+n);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(l,u,f){return this[i].call(this,n,l,u,f)},configurable:!0})})}let AxiosHeaders$1=class{constructor(n){n&&this.set(n)}set(n,r,i){const l=this;function u(p,g,m){const v=normalizeHeader(g);if(!v)throw new Error("header name must be a non-empty string");const y=utils$1.findKey(l,v);(!y||l[y]===void 0||m===!0||m===void 0&&l[y]!==!1)&&(l[y||g]=normalizeValue(p))}const f=(p,g)=>utils$1.forEach(p,(m,v)=>u(m,v,g));if(utils$1.isPlainObject(n)||n instanceof this.constructor)f(n,r);else if(utils$1.isString(n)&&(n=n.trim())&&!isValidHeaderName(n))f(parseHeaders(n),r);else if(utils$1.isObject(n)&&utils$1.isIterable(n)){let p={},g,m;for(const v of n){if(!utils$1.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[m=v[0]]=(g=p[m])?utils$1.isArray(g)?[...g,v[1]]:[g,v[1]]:v[1]}f(p,r)}else n!=null&&u(r,n,i);return this}get(n,r){if(n=normalizeHeader(n),n){const i=utils$1.findKey(this,n);if(i){const l=this[i];if(!r)return l;if(r===!0)return parseTokens(l);if(utils$1.isFunction(r))return r.call(this,l,i);if(utils$1.isRegExp(r))return r.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=normalizeHeader(n),n){const i=utils$1.findKey(this,n);return!!(i&&this[i]!==void 0&&(!r||matchHeaderValue(this,this[i],i,r)))}return!1}delete(n,r){const i=this;let l=!1;function u(f){if(f=normalizeHeader(f),f){const p=utils$1.findKey(i,f);p&&(!r||matchHeaderValue(i,i[p],p,r))&&(delete i[p],l=!0)}}return utils$1.isArray(n)?n.forEach(u):u(n),l}clear(n){const r=Object.keys(this);let i=r.length,l=!1;for(;i--;){const u=r[i];(!n||matchHeaderValue(this,this[u],u,n,!0))&&(delete this[u],l=!0)}return l}normalize(n){const r=this,i={};return utils$1.forEach(this,(l,u)=>{const f=utils$1.findKey(i,u);if(f){r[f]=normalizeValue(l),delete r[u];return}const p=n?formatHeader(u):String(u).trim();p!==u&&delete r[u],r[p]=normalizeValue(l),i[p]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return utils$1.forEach(this,(i,l)=>{i!=null&&i!==!1&&(r[l]=n&&utils$1.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const i=new this(n);return r.forEach(l=>i.set(l)),i}static accessor(n){const i=(this[$internals]=this[$internals]={accessors:{}}).accessors,l=this.prototype;function u(f){const p=normalizeHeader(f);i[p]||(buildAccessors(l,f),i[p]=!0)}return utils$1.isArray(n)?n.forEach(u):u(n),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(i){this[r]=i}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,n){const r=this||defaults$1,i=n||r,l=AxiosHeaders$1.from(i.headers);let u=i.data;return utils$1.forEach(e,function(p){u=p.call(r,u,l.normalize(),n?n.status:void 0)}),l.normalize(),u}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,n,r){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,n,r),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,n,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):n(new AxiosError$1("Request failed with status code "+r.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function parseProtocol(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function speedometer(e,n){e=e||10;const r=new Array(e),i=new Array(e);let l=0,u=0,f;return n=n!==void 0?n:1e3,function(g){const m=Date.now(),v=i[u];f||(f=m),r[l]=g,i[l]=m;let y=u,b=0;for(;y!==l;)b+=r[y++],y=y%e;if(l=(l+1)%e,l===u&&(u=(u+1)%e),m-f{r=v,l=null,u&&(clearTimeout(u),u=null),e(...m)};return[(...m)=>{const v=Date.now(),y=v-r;y>=i?f(m,v):(l=m,u||(u=setTimeout(()=>{u=null,f(l)},i-y)))},()=>l&&f(l)]}const progressEventReducer=(e,n,r=3)=>{let i=0;const l=speedometer(50,250);return throttle(u=>{const f=u.loaded,p=u.lengthComputable?u.total:void 0,g=f-i,m=l(g),v=f<=p;i=f;const y={loaded:f,total:p,progress:p?f/p:void 0,bytes:g,rate:m||void 0,estimated:m&&p&&v?(p-f)/m:void 0,event:u,lengthComputable:p!=null,[n?"download":"upload"]:!0};e(y)},r)},progressEventDecorator=(e,n)=>{const r=e!=null;return[i=>n[0]({lengthComputable:r,total:e,loaded:i}),n[1]]},asyncDecorator=e=>(...n)=>utils$1.asap(()=>e(...n)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,n)=>r=>(r=new URL(r,platform.origin),e.protocol===r.protocol&&e.host===r.host&&(n||e.port===r.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,n,r,i,l,u,f){if(typeof document>"u")return;const p=[`${e}=${encodeURIComponent(n)}`];utils$1.isNumber(r)&&p.push(`expires=${new Date(r).toUTCString()}`),utils$1.isString(i)&&p.push(`path=${i}`),utils$1.isString(l)&&p.push(`domain=${l}`),u===!0&&p.push("secure"),utils$1.isString(f)&&p.push(`SameSite=${f}`),document.cookie=p.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function buildFullPath(e,n,r){let i=!isAbsoluteURL(n);return e&&(i||r==!1)?combineURLs(e,n):n}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,n){n=n||{};const r={};function i(m,v,y,b){return utils$1.isPlainObject(m)&&utils$1.isPlainObject(v)?utils$1.merge.call({caseless:b},m,v):utils$1.isPlainObject(v)?utils$1.merge({},v):utils$1.isArray(v)?v.slice():v}function l(m,v,y,b){if(utils$1.isUndefined(v)){if(!utils$1.isUndefined(m))return i(void 0,m,y,b)}else return i(m,v,y,b)}function u(m,v){if(!utils$1.isUndefined(v))return i(void 0,v)}function f(m,v){if(utils$1.isUndefined(v)){if(!utils$1.isUndefined(m))return i(void 0,m)}else return i(void 0,v)}function p(m,v,y){if(y in n)return i(m,v);if(y in e)return i(void 0,m)}const g={url:u,method:u,data:u,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:p,headers:(m,v,y)=>l(headersToObject(m),headersToObject(v),y,!0)};return utils$1.forEach(Object.keys({...e,...n}),function(v){const y=g[v]||l,b=y(e[v],n[v],v);utils$1.isUndefined(b)&&y!==p||(r[v]=b)}),r}const resolveConfig=e=>{const n=mergeConfig$1({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:l,xsrfCookieName:u,headers:f,auth:p}=n;if(n.headers=f=AxiosHeaders$1.from(f),n.url=buildURL(buildFullPath(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),p&&f.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),utils$1.isFormData(r)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if(utils$1.isFunction(r.getHeaders)){const g=r.getHeaders(),m=["content-type","content-length"];Object.entries(g).forEach(([v,y])=>{m.includes(v.toLowerCase())&&f.set(v,y)})}}if(platform.hasStandardBrowserEnv&&(i&&utils$1.isFunction(i)&&(i=i(n)),i||i!==!1&&isURLSameOrigin(n.url))){const g=l&&u&&cookies.read(u);g&&f.set(l,g)}return n},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(r,i){const l=resolveConfig(e);let u=l.data;const f=AxiosHeaders$1.from(l.headers).normalize();let{responseType:p,onUploadProgress:g,onDownloadProgress:m}=l,v,y,b,R,E;function A(){R&&R(),E&&E(),l.cancelToken&&l.cancelToken.unsubscribe(v),l.signal&&l.signal.removeEventListener("abort",v)}let O=new XMLHttpRequest;O.open(l.method.toUpperCase(),l.url,!0),O.timeout=l.timeout;function $(){if(!O)return;const Z=AxiosHeaders$1.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),re={data:!p||p==="text"||p==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:Z,config:e,request:O};settle(function(F){r(F),A()},function(F){i(F),A()},re),O=null}"onloadend"in O?O.onloadend=$:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout($)},O.onabort=function(){O&&(i(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,O)),O=null)},O.onerror=function(V){const re=V&&V.message?V.message:"Network Error",J=new AxiosError$1(re,AxiosError$1.ERR_NETWORK,e,O);J.event=V||null,i(J),O=null},O.ontimeout=function(){let V=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const re=l.transitional||transitionalDefaults;l.timeoutErrorMessage&&(V=l.timeoutErrorMessage),i(new AxiosError$1(V,re.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,O)),O=null},u===void 0&&f.setContentType(null),"setRequestHeader"in O&&utils$1.forEach(f.toJSON(),function(V,re){O.setRequestHeader(re,V)}),utils$1.isUndefined(l.withCredentials)||(O.withCredentials=!!l.withCredentials),p&&p!=="json"&&(O.responseType=l.responseType),m&&([b,E]=progressEventReducer(m,!0),O.addEventListener("progress",b)),g&&O.upload&&([y,R]=progressEventReducer(g),O.upload.addEventListener("progress",y),O.upload.addEventListener("loadend",R)),(l.cancelToken||l.signal)&&(v=Z=>{O&&(i(!Z||Z.type?new CanceledError$1(null,e,O):Z),O.abort(),O=null)},l.cancelToken&&l.cancelToken.subscribe(v),l.signal&&(l.signal.aborted?v():l.signal.addEventListener("abort",v)));const q=parseProtocol(l.url);if(q&&platform.protocols.indexOf(q)===-1){i(new AxiosError$1("Unsupported protocol "+q+":",AxiosError$1.ERR_BAD_REQUEST,e));return}O.send(u||null)})},composeSignals=(e,n)=>{const{length:r}=e=e?e.filter(Boolean):[];if(n||r){let i=new AbortController,l;const u=function(m){if(!l){l=!0,p();const v=m instanceof Error?m:this.reason;i.abort(v instanceof AxiosError$1?v:new CanceledError$1(v instanceof Error?v.message:v))}};let f=n&&setTimeout(()=>{f=null,u(new AxiosError$1(`timeout ${n} of ms exceeded`,AxiosError$1.ETIMEDOUT))},n);const p=()=>{e&&(f&&clearTimeout(f),f=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(u):m.removeEventListener("abort",u)}),e=null)};e.forEach(m=>m.addEventListener("abort",u));const{signal:g}=i;return g.unsubscribe=()=>utils$1.asap(p),g}},streamChunk=function*(e,n){let r=e.byteLength;if(r{const l=readBytes(e,n);let u=0,f,p=g=>{f||(f=!0,i&&i(g))};return new ReadableStream({async pull(g){try{const{done:m,value:v}=await l.next();if(m){p(),g.close();return}let y=v.byteLength;if(r){let b=u+=y;r(b)}g.enqueue(new Uint8Array(v))}catch(m){throw p(m),m}},cancel(g){return p(g),l.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=64*1024,{isFunction}=utils$1,globalFetchAPI=(({Request:e,Response:n})=>({Request:e,Response:n}))(utils$1.global),{ReadableStream:ReadableStream$1,TextEncoder}=utils$1.global,test=(e,...n)=>{try{return!!e(...n)}catch{return!1}},factory=e=>{e=utils$1.merge.call({skipUndefined:!0},globalFetchAPI,e);const{fetch:n,Request:r,Response:i}=e,l=n?isFunction(n):typeof fetch=="function",u=isFunction(r),f=isFunction(i);if(!l)return!1;const p=l&&isFunction(ReadableStream$1),g=l&&(typeof TextEncoder=="function"?(E=>A=>E.encode(A))(new TextEncoder):async E=>new Uint8Array(await new r(E).arrayBuffer())),m=u&&p&&test(()=>{let E=!1;const A=new r(platform.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!A}),v=f&&p&&test(()=>utils$1.isReadableStream(new i("").body)),y={stream:v&&(E=>E.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!y[E]&&(y[E]=(A,O)=>{let $=A&&A[E];if($)return $.call(A);throw new AxiosError$1(`Response type '${E}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,O)})});const b=async E=>{if(E==null)return 0;if(utils$1.isBlob(E))return E.size;if(utils$1.isSpecCompliantForm(E))return(await new r(platform.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(E)||utils$1.isArrayBuffer(E))return E.byteLength;if(utils$1.isURLSearchParams(E)&&(E=E+""),utils$1.isString(E))return(await g(E)).byteLength},R=async(E,A)=>{const O=utils$1.toFiniteNumber(E.getContentLength());return O??b(A)};return async E=>{let{url:A,method:O,data:$,signal:q,cancelToken:Z,timeout:V,onDownloadProgress:re,onUploadProgress:J,responseType:F,headers:te,withCredentials:ne="same-origin",fetchOptions:oe}=resolveConfig(E),se=n||fetch;F=F?(F+"").toLowerCase():"text";let ce=composeSignals([q,Z&&Z.toAbortSignal()],V),le=null;const fe=ce&&ce.unsubscribe&&(()=>{ce.unsubscribe()});let ge;try{if(J&&m&&O!=="get"&&O!=="head"&&(ge=await R(te,$))!==0){let w=new r(A,{method:"POST",body:$,duplex:"half"}),B;if(utils$1.isFormData($)&&(B=w.headers.get("content-type"))&&te.setContentType(B),w.body){const[K,ae]=progressEventDecorator(ge,progressEventReducer(asyncDecorator(J)));$=trackStream(w.body,DEFAULT_CHUNK_SIZE,K,ae)}}utils$1.isString(ne)||(ne=ne?"include":"omit");const L=u&&"credentials"in r.prototype,ee={...oe,signal:ce,method:O.toUpperCase(),headers:te.normalize().toJSON(),body:$,duplex:"half",credentials:L?ne:void 0};le=u&&new r(A,ee);let ie=await(u?se(le,oe):se(A,ee));const Se=v&&(F==="stream"||F==="response");if(v&&(re||Se&&fe)){const w={};["status","statusText","headers"].forEach(ue=>{w[ue]=ie[ue]});const B=utils$1.toFiniteNumber(ie.headers.get("content-length")),[K,ae]=re&&progressEventDecorator(B,progressEventReducer(asyncDecorator(re),!0))||[];ie=new i(trackStream(ie.body,DEFAULT_CHUNK_SIZE,K,()=>{ae&&ae(),fe&&fe()}),w)}F=F||"text";let be=await y[utils$1.findKey(y,F)||"text"](ie,E);return!Se&&fe&&fe(),await new Promise((w,B)=>{settle(w,B,{data:be,headers:AxiosHeaders$1.from(ie.headers),status:ie.status,statusText:ie.statusText,config:E,request:le})})}catch(L){throw fe&&fe(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,E,le),{cause:L.cause||L}):AxiosError$1.from(L,L&&L.code,E,le)}}},seedCache=new Map,getFetch=e=>{let n=e&&e.env||{};const{fetch:r,Request:i,Response:l}=n,u=[i,l,r];let f=u.length,p=f,g,m,v=seedCache;for(;p--;)g=u[p],m=v.get(g),m===void 0&&v.set(g,m=p?new Map:factory(n)),v=m;return m};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$1.forEach(knownAdapters,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1;function getAdapter$1(e,n){e=utils$1.isArray(e)?e:[e];const{length:r}=e;let i,l;const u={};for(let f=0;f`adapter ${g} `+(m===!1?"is not supported by the environment":"is not available in the build"));let p=r?f.length>1?`since : `+f.map(renderReason).join(` `):" "+renderReason(f[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return l}const adapters={getAdapter:getAdapter$1,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults$1.adapter,e)(e).then(function(i){return throwIfCancellationRequested(e),i.data=transformData.call(e,e.transformResponse,i),i.headers=AxiosHeaders$1.from(i.headers),i},function(i){return isCancel$1(i)||(throwIfCancellationRequested(e),i&&i.response&&(i.response.data=transformData.call(e,e.transformResponse,i.response),i.response.headers=AxiosHeaders$1.from(i.response.headers))),Promise.reject(i)})}const VERSION$1="1.13.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{validators$1[e]=function(i){return typeof i===e||"a"+(n<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(n,r,i){function l(u,f){return"[Axios v"+VERSION$1+"] Transitional option '"+u+"'"+f+(i?". "+i:"")}return(u,f,p)=>{if(n===!1)throw new AxiosError$1(l(f," has been removed"+(r?" in "+r:"")),AxiosError$1.ERR_DEPRECATED);return r&&!deprecatedWarnings[f]&&(deprecatedWarnings[f]=!0,console.warn(l(f," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(u,f,p):!0}};validators$1.spelling=function(n){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${n}`),!0)};function assertOptions(e,n,r){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let l=i.length;for(;l-- >0;){const u=i[l],f=n[u];if(f){const p=e[u],g=p===void 0||f(p,u,e);if(g!==!0)throw new AxiosError$1("option "+u+" must be "+g,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new AxiosError$1("Unknown option "+u,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(n){this.defaults=n||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(n,r){try{return await this._request(n,r)}catch(i){if(i instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const u=l.stack?l.stack.replace(/^.+\n/,""):"";try{i.stack?u&&!String(i.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(i.stack+=` `+u):i.stack=u}catch{}}throw i}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=mergeConfig$1(this.defaults,r);const{transitional:i,paramsSerializer:l,headers:u}=r;i!==void 0&&validator.assertOptions(i,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),l!=null&&(utils$1.isFunction(l)?r.paramsSerializer={serialize:l}:validator.assertOptions(l,{encode:validators.function,serialize:validators.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),validator.assertOptions(r,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=u&&utils$1.merge(u.common,u[r.method]);u&&utils$1.forEach(["delete","get","head","post","put","patch","common"],E=>{delete u[E]}),r.headers=AxiosHeaders$1.concat(f,u);const p=[];let g=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(r)===!1||(g=g&&A.synchronous,p.unshift(A.fulfilled,A.rejected))});const m=[];this.interceptors.response.forEach(function(A){m.push(A.fulfilled,A.rejected)});let v,y=0,b;if(!g){const E=[dispatchRequest.bind(this),void 0];for(E.unshift(...p),E.push(...m),b=E.length,v=Promise.resolve(r);y{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](l);i._listeners=null}),this.promise.then=l=>{let u;const f=new Promise(p=>{i.subscribe(p),u=p}).then(l);return f.cancel=function(){i.unsubscribe(u)},f},n(function(u,f,p){i.reason||(i.reason=new CanceledError$1(u,f,p),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=i=>{n.abort(i)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new Rd(function(l){n=l}),cancel:n}}};function spread$1(e){return function(r){return e.apply(null,r)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode$1).forEach(([e,n])=>{HttpStatusCode$1[n]=e});function createInstance(e){const n=new Axios$1(e),r=bind(Axios$1.prototype.request,n);return utils$1.extend(r,Axios$1.prototype,n,{allOwnKeys:!0}),utils$1.extend(r,n,null,{allOwnKeys:!0}),r.create=function(l){return createInstance(mergeConfig$1(e,l))},r}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(n){return Promise.all(n)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios;function handleError(e){const n=e.data?.code;if(n&&[40002,40003,40004,40005].includes(n))return window.logout();if(e?.config?.skipErrorHandler||!isBrowser())return;const r=window.i18n.t,i={10001:r("components:error.10001","Query was not successful, please try again later or check your conditions."),10002:r("components:error.10002","Update operation was not successful, please try again later."),10003:r("components:error.10003","Insert operation cannot be completed at the moment, please try again later."),10004:r("components:error.10004","Deletion operation could not be completed, please try again later."),20001:r("components:error.20001","The user information already exists, please retry with different information."),20002:r("components:error.20002","User not found, please check the information and try again."),20003:r("components:error.20003","Incorrect password, please re-enter."),20004:r("components:error.20004","The user is disabled, please contact customer service if you have questions."),20005:r("components:error.20005","Insufficient balance, please recharge and try again."),20006:r("components:error.20006","The registration function is temporarily unavailable, please try again later."),20008:r("components:error.20008","User information is incorrect, please check and try again."),30001:r("components:error.30001","The node already exists, please do not add it again."),30002:r("components:error.30002","Related node not found, please check and try again."),30003:r("components:error.30003","Group already exists, please try using a different name."),30004:r("components:error.30004","Group not found, please verify the information and try again."),30005:r("components:error.30005","There is still content in the group, please clear it and try again."),400:r("components:error.400","The request parameters are incorrect, please check and resubmit."),40002:r("components:error.40002","Valid Token not found, please log in before retrying."),40003:r("components:error.40003","Current Token is invalid, please reacquire before trying again."),40004:r("components:error.40004","Token has expired, please log in again."),40005:r("components:error.40005","You do not have access permission, please contact the administrator if you have any questions."),401:r("components:error.401","Request is too frequent, please try again later."),500:r("components:error.500","The server is having some issues, please try again later."),50001:r("components:error.50001","Corresponding coupon information not found, please check and try again."),50002:r("components:error.50002","The coupon has been used, cannot be used again."),60001:r("components:error.60001","Subscription has expired, please renew before using."),60002:r("components:error.60002","Unable to use the subscription at the moment, please try again later."),60003:r("components:error.60003","An existing subscription is detected. Please cancel it before proceeding."),60004:r("components:error.60004","Unable to delete at the moment as the subscription has active users."),60005:r("components:error.60005","Single subscription mode has exceeded user limit"),60006:r("components:error.60006","User quota limit has been reached, unable to continue."),60007:r("components:error.60007","Insufficient inventory, please try again later or contact the administrator."),70001:r("components:error.70001","Incorrect verification code, please re-enter."),80001:r("components:error.80001","Task was not successfully queued, please try again later."),90001:r("components:error.90001","Please disable DEBUG mode and try again."),90015:r("components:error.90015","This account has reached the limit of sending times today, please try again tomorrow.")},l=e.data?.message||(n?i[n]:void 0)||r("components:error.unknown","An error occurred in the system, please try again later.");toast.error(l)}const request$1=axios.create({baseURL:void 0});request$1.interceptors.request.use(e=>{const n=getCookie("Authorization");return n&&(e.headers.Authorization=n),e},e=>Promise.reject(e));request$1.interceptors.response.use(e=>{const{code:n}=e.data;if(n!==200&&n!==0)throw handleError({data:e.data,config:{skipErrorHandler:e.config.skipErrorHandler},message:e.statusText}),e;return e},e=>(handleError({data:e.response?.data,config:{skipErrorHandler:e.response?.config?.skipErrorHandler},message:e.message}),Promise.reject(e)));async function getClient(e){return request$1("/api/v1/common/client",{method:"GET"})}async function sendEmailCode(e,n){return request$1("/api/v1/common/send_code",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function sendSmsCode(e,n){return request$1("/api/v1/common/send_sms_code",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function getGlobalConfig(e){return request$1("/api/v1/common/site/config",{method:"GET"})}async function getPrivacyPolicy(e){return request$1("/api/v1/common/site/privacy",{method:"GET"})}async function getStat(e){return request$1("/api/v1/common/site/stat",{method:"GET",...e||{}})}async function getTos(e){return request$1("/api/v1/common/site/tos",{method:"GET"})}var reactFastCompare,hasRequiredReactFastCompare;function requireReactFastCompare(){if(hasRequiredReactFastCompare)return reactFastCompare;hasRequiredReactFastCompare=1;var e=typeof Element<"u",n=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function l(u,f){if(u===f)return!0;if(u&&f&&typeof u=="object"&&typeof f=="object"){if(u.constructor!==f.constructor)return!1;var p,g,m;if(Array.isArray(u)){if(p=u.length,p!=f.length)return!1;for(g=p;g--!==0;)if(!l(u[g],f[g]))return!1;return!0}var v;if(n&&u instanceof Map&&f instanceof Map){if(u.size!==f.size)return!1;for(v=u.entries();!(g=v.next()).done;)if(!f.has(g.value[0]))return!1;for(v=u.entries();!(g=v.next()).done;)if(!l(g.value[1],f.get(g.value[0])))return!1;return!0}if(r&&u instanceof Set&&f instanceof Set){if(u.size!==f.size)return!1;for(v=u.entries();!(g=v.next()).done;)if(!f.has(g.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(u)&&ArrayBuffer.isView(f)){if(p=u.length,p!=f.length)return!1;for(g=p;g--!==0;)if(u[g]!==f[g])return!1;return!0}if(u.constructor===RegExp)return u.source===f.source&&u.flags===f.flags;if(u.valueOf!==Object.prototype.valueOf&&typeof u.valueOf=="function"&&typeof f.valueOf=="function")return u.valueOf()===f.valueOf();if(u.toString!==Object.prototype.toString&&typeof u.toString=="function"&&typeof f.toString=="function")return u.toString()===f.toString();if(m=Object.keys(u),p=m.length,p!==Object.keys(f).length)return!1;for(g=p;g--!==0;)if(!Object.prototype.hasOwnProperty.call(f,m[g]))return!1;if(e&&u instanceof Element)return!1;for(g=p;g--!==0;)if(!((m[g]==="_owner"||m[g]==="__v"||m[g]==="__o")&&u.$$typeof)&&!l(u[m[g]],f[m[g]]))return!1;return!0}return u!==u&&f!==f}return reactFastCompare=function(f,p){try{return l(f,p)}catch(g){if((g.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw g}},reactFastCompare}var reactFastCompareExports=requireReactFastCompare();const isEqual=getDefaultExportFromCjs(reactFastCompareExports);var browser,hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;var e=function(n,r,i,l,u,f,p,g){if(!n){var m;if(r===void 0)m=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var v=[i,l,u,f,p,g],y=0;m=new Error(r.replace(/%s/g,function(){return v[y++]})),m.name="Invariant Violation"}throw m.framesToPop=1,m}};return browser=e,browser}var browserExports=requireBrowser();const invariant=getDefaultExportFromCjs(browserExports);var shallowequal,hasRequiredShallowequal;function requireShallowequal(){return hasRequiredShallowequal||(hasRequiredShallowequal=1,shallowequal=function(n,r,i,l){var u=i?i.call(l,n,r):void 0;if(u!==void 0)return!!u;if(n===r)return!0;if(typeof n!="object"||!n||typeof r!="object"||!r)return!1;var f=Object.keys(n),p=Object.keys(r);if(f.length!==p.length)return!1;for(var g=Object.prototype.hasOwnProperty.bind(r),m=0;m(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(TAG_NAMES||{}),SEO_PRIORITY_TAGS={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},VALID_TAG_NAMES=Object.values(TAG_NAMES),REACT_TAG_MAP={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},HTML_TAG_MAP=Object.entries(REACT_TAG_MAP).reduce((e,[n,r])=>(e[r]=n,e),{}),HELMET_ATTRIBUTE="data-rh",HELMET_PROPS={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},getInnermostProperty=(e,n)=>{for(let r=e.length-1;r>=0;r-=1){const i=e[r];if(Object.prototype.hasOwnProperty.call(i,n))return i[n]}return null},getTitleFromPropsList=e=>{let n=getInnermostProperty(e,"title");const r=getInnermostProperty(e,HELMET_PROPS.TITLE_TEMPLATE);if(Array.isArray(n)&&(n=n.join("")),r&&n)return r.replace(/%s/g,()=>n);const i=getInnermostProperty(e,HELMET_PROPS.DEFAULT_TITLE);return n||i||void 0},getOnChangeClientState=e=>getInnermostProperty(e,HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||(()=>{}),getAttributesFromPropsList=(e,n)=>n.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,i)=>({...r,...i}),{}),getBaseTagFromPropsList=(e,n)=>n.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,i)=>{if(!r.length){const l=Object.keys(i);for(let u=0;uconsole&&typeof console.warn=="function"&&console.warn(e),getTagsFromPropsList=(e,n,r)=>{const i={};return r.filter(l=>Array.isArray(l[e])?!0:(typeof l[e]<"u"&&warn$1(`Helmet: ${e} should be of type "Array". Instead found type "${typeof l[e]}"`),!1)).map(l=>l[e]).reverse().reduce((l,u)=>{const f={};u.filter(g=>{let m;const v=Object.keys(g);for(let b=0;bl.push(g));const p=Object.keys(f);for(let g=0;g{if(Array.isArray(e)&&e.length){for(let r=0;r({baseTag:getBaseTagFromPropsList(["href"],e),bodyAttributes:getAttributesFromPropsList("bodyAttributes",e),defer:getInnermostProperty(e,HELMET_PROPS.DEFER),encode:getInnermostProperty(e,HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:getAttributesFromPropsList("htmlAttributes",e),linkTags:getTagsFromPropsList("link",["rel","href"],e),metaTags:getTagsFromPropsList("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:getTagsFromPropsList("noscript",["innerHTML"],e),onChangeClientState:getOnChangeClientState(e),scriptTags:getTagsFromPropsList("script",["src","innerHTML"],e),styleTags:getTagsFromPropsList("style",["cssText"],e),title:getTitleFromPropsList(e),titleAttributes:getAttributesFromPropsList("titleAttributes",e),prioritizeSeoTags:getAnyTrueFromPropsList(e,HELMET_PROPS.PRIORITIZE_SEO_TAGS)}),flattenArray=e=>Array.isArray(e)?e.join(""):e,checkIfPropsMatch=(e,n)=>{const r=Object.keys(e);for(let i=0;iArray.isArray(e)?e.reduce((r,i)=>(checkIfPropsMatch(i,n)?r.priority.push(i):r.default.push(i),r),{priority:[],default:[]}):{default:e,priority:[]},without=(e,n)=>({...e,[n]:void 0}),SELF_CLOSING_TAGS=["noscript","script","style"],encodeSpecialCharacters=(e,n=!0)=>n===!1?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),generateElementAttributesAsString=e=>Object.keys(e).reduce((n,r)=>{const i=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return n?`${n} ${i}`:i},""),generateTitleAsString=(e,n,r,i)=>{const l=generateElementAttributesAsString(r),u=flattenArray(n);return l?`<${e} ${HELMET_ATTRIBUTE}="true" ${l}>${encodeSpecialCharacters(u,i)}`:`<${e} ${HELMET_ATTRIBUTE}="true">${encodeSpecialCharacters(u,i)}`},generateTagsAsString=(e,n,r=!0)=>n.reduce((i,l)=>{const u=l,f=Object.keys(u).filter(m=>!(m==="innerHTML"||m==="cssText")).reduce((m,v)=>{const y=typeof u[v]>"u"?v:`${v}="${encodeSpecialCharacters(u[v],r)}"`;return m?`${m} ${y}`:y},""),p=u.innerHTML||u.cssText||"",g=SELF_CLOSING_TAGS.indexOf(e)===-1;return`${i}<${e} ${HELMET_ATTRIBUTE}="true" ${f}${g?"/>":`>${p}`}`},""),convertElementAttributesToReactProps=(e,n={})=>Object.keys(e).reduce((r,i)=>{const l=REACT_TAG_MAP[i];return r[l||i]=e[i],r},n),generateTitleAsReactComponent=(e,n,r)=>{const i={key:n,[HELMET_ATTRIBUTE]:!0},l=convertElementAttributesToReactProps(r,i);return[React.createElement("title",l,n)]},generateTagsAsReactComponent=(e,n)=>n.map((r,i)=>{const l={key:i,[HELMET_ATTRIBUTE]:!0};return Object.keys(r).forEach(u=>{const p=REACT_TAG_MAP[u]||u;if(p==="innerHTML"||p==="cssText"){const g=r.innerHTML||r.cssText;l.dangerouslySetInnerHTML={__html:g}}else l[p]=r[u]}),React.createElement(e,l)}),getMethodsForTag=(e,n,r=!0)=>{switch(e){case"title":return{toComponent:()=>generateTitleAsReactComponent(e,n.title,n.titleAttributes),toString:()=>generateTitleAsString(e,n.title,n.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>convertElementAttributesToReactProps(n),toString:()=>generateElementAttributesAsString(n)};default:return{toComponent:()=>generateTagsAsReactComponent(e,n),toString:()=>generateTagsAsString(e,n,r)}}},getPriorityMethods=({metaTags:e,linkTags:n,scriptTags:r,encode:i})=>{const l=prioritizer(e,SEO_PRIORITY_TAGS.meta),u=prioritizer(n,SEO_PRIORITY_TAGS.link),f=prioritizer(r,SEO_PRIORITY_TAGS.script);return{priorityMethods:{toComponent:()=>[...generateTagsAsReactComponent("meta",l.priority),...generateTagsAsReactComponent("link",u.priority),...generateTagsAsReactComponent("script",f.priority)],toString:()=>`${getMethodsForTag("meta",l.priority,i)} ${getMethodsForTag("link",u.priority,i)} ${getMethodsForTag("script",f.priority,i)}`},metaTags:l.default,linkTags:u.default,scriptTags:f.default}},mapStateOnServer=e=>{const{baseTag:n,bodyAttributes:r,encode:i=!0,htmlAttributes:l,noscriptTags:u,styleTags:f,title:p="",titleAttributes:g,prioritizeSeoTags:m}=e;let{linkTags:v,metaTags:y,scriptTags:b}=e,R={toComponent:()=>{},toString:()=>""};return m&&({priorityMethods:R,linkTags:v,metaTags:y,scriptTags:b}=getPriorityMethods(e)),{priority:R,base:getMethodsForTag("base",n,i),bodyAttributes:getMethodsForTag("bodyAttributes",r,i),htmlAttributes:getMethodsForTag("htmlAttributes",l,i),link:getMethodsForTag("link",v,i),meta:getMethodsForTag("meta",y,i),noscript:getMethodsForTag("noscript",u,i),script:getMethodsForTag("script",b,i),style:getMethodsForTag("style",f,i),title:getMethodsForTag("title",{title:p,titleAttributes:g},i)}},server_default=mapStateOnServer,instances=[],isDocument=!!(typeof window<"u"&&window.document&&window.document.createElement),HelmetData=class{instances=[];canUseDOM=isDocument;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?instances:this.instances,add:e=>{(this.canUseDOM?instances:this.instances).push(e)},remove:e=>{const n=(this.canUseDOM?instances:this.instances).indexOf(e);(this.canUseDOM?instances:this.instances).splice(n,1)}}};constructor(e,n){this.context=e,this.canUseDOM=n||!1,n||(e.helmet=server_default({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},defaultValue={},Context=React.createContext(defaultValue),HelmetProvider=class xd extends reactExports.Component{static canUseDOM=isDocument;helmetData;constructor(n){super(n),this.helmetData=new HelmetData(this.props.context||{},xd.canUseDOM)}render(){return React.createElement(Context.Provider,{value:this.helmetData.value},this.props.children)}},updateTags=(e,n)=>{const r=document.head||document.querySelector("head"),i=r.querySelectorAll(`${e}[${HELMET_ATTRIBUTE}]`),l=[].slice.call(i),u=[];let f;return n&&n.length&&n.forEach(p=>{const g=document.createElement(e);for(const m in p)if(Object.prototype.hasOwnProperty.call(p,m))if(m==="innerHTML")g.innerHTML=p.innerHTML;else if(m==="cssText")g.styleSheet?g.styleSheet.cssText=p.cssText:g.appendChild(document.createTextNode(p.cssText));else{const v=m,y=typeof p[v]>"u"?"":p[v];g.setAttribute(m,y)}g.setAttribute(HELMET_ATTRIBUTE,"true"),l.some((m,v)=>(f=v,g.isEqualNode(m)))?l.splice(f,1):u.push(g)}),l.forEach(p=>p.parentNode?.removeChild(p)),u.forEach(p=>r.appendChild(p)),{oldTags:l,newTags:u}},updateAttributes=(e,n)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const i=r.getAttribute(HELMET_ATTRIBUTE),l=i?i.split(","):[],u=[...l],f=Object.keys(n);for(const p of f){const g=n[p]||"";r.getAttribute(p)!==g&&r.setAttribute(p,g),l.indexOf(p)===-1&&l.push(p);const m=u.indexOf(p);m!==-1&&u.splice(m,1)}for(let p=u.length-1;p>=0;p-=1)r.removeAttribute(u[p]);l.length===u.length?r.removeAttribute(HELMET_ATTRIBUTE):r.getAttribute(HELMET_ATTRIBUTE)!==f.join(",")&&r.setAttribute(HELMET_ATTRIBUTE,f.join(","))},updateTitle=(e,n)=>{typeof e<"u"&&document.title!==e&&(document.title=flattenArray(e)),updateAttributes("title",n)},commitTagChanges=(e,n)=>{const{baseTag:r,bodyAttributes:i,htmlAttributes:l,linkTags:u,metaTags:f,noscriptTags:p,onChangeClientState:g,scriptTags:m,styleTags:v,title:y,titleAttributes:b}=e;updateAttributes("body",i),updateAttributes("html",l),updateTitle(y,b);const R={baseTag:updateTags("base",r),linkTags:updateTags("link",u),metaTags:updateTags("meta",f),noscriptTags:updateTags("noscript",p),scriptTags:updateTags("script",m),styleTags:updateTags("style",v)},E={},A={};Object.keys(R).forEach(O=>{const{newTags:$,oldTags:q}=R[O];$.length&&(E[O]=$),q.length&&(A[O]=R[O].oldTags)}),n&&n(),g(e,E,A)},_helmetCallback=null,handleStateChangeOnClient=e=>{_helmetCallback&&cancelAnimationFrame(_helmetCallback),e.defer?_helmetCallback=requestAnimationFrame(()=>{commitTagChanges(e,()=>{_helmetCallback=null})}):(commitTagChanges(e),_helmetCallback=null)},client_default=handleStateChangeOnClient,HelmetDispatcher=class extends reactExports.Component{rendered=!1;shouldComponentUpdate(e){return!shallowEqual(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const i=reducePropsToState(e.get().map(l=>{const u={...l.props};return delete u.context,u}));HelmetProvider.canUseDOM?client_default(i):server_default&&(r=server_default(i)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Helmet=class extends reactExports.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!isEqual(without(this.props,"helmetData"),without(e,"helmetData"))}mapNestedChildrenToProps(e,n){if(!n)return null;switch(e.type){case"script":case"noscript":return{innerHTML:n};case"style":return{cssText:n};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,n,r,i){return{...n,[e.type]:[...n[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,i)}]}}mapObjectTypeChildren(e,n,r,i){switch(e.type){case"title":return{...n,[e.type]:i,titleAttributes:{...r}};case"body":return{...n,bodyAttributes:{...r}};case"html":return{...n,htmlAttributes:{...r}};default:return{...n,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,n){let r={...n};return Object.keys(e).forEach(i=>{r={...r,[i]:e[i]}}),r}warnOnInvalidChildren(e,n){return invariant(VALID_TAG_NAMES.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${VALID_TAG_NAMES.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),invariant(!n||typeof n=="string"||Array.isArray(n)&&!n.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(e,n){let r={};return React.Children.forEach(e,i=>{if(!i||!i.props)return;const{children:l,...u}=i.props,f=Object.keys(u).reduce((g,m)=>(g[HTML_TAG_MAP[m]||m]=u[m],g),{});let{type:p}=i;switch(typeof p=="symbol"?p=p.toString():this.warnOnInvalidChildren(i,l),p){case"Symbol(react.fragment)":n=this.mapChildrenToProps(l,n);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(i,r,f,l);break;default:n=this.mapObjectTypeChildren(i,n,f,l);break}}),this.mapArrayTypeChildrenToProps(r,n)}render(){const{children:e,...n}=this.props;let r={...n},{helmetData:i}=n;if(e&&(r=this.mapChildrenToProps(e,r)),i&&!(i instanceof HelmetData)){const l=i;i=new HelmetData(l.context,!0),delete r.helmetData}return i?React.createElement(HelmetDispatcher,{...r,context:i.value}):React.createElement(Context.Consumer,null,l=>React.createElement(HelmetDispatcher,{...r,context:l}))}};async function queryUserAffiliate(e){return request$1("/api/v1/public/user/affiliate/count",{method:"GET"})}async function queryUserAffiliateList(e,n){return request$1("/api/v1/public/user/affiliate/list",{method:"GET",params:{...e}})}async function queryUserBalanceLog(e){return request$1("/api/v1/public/user/balance_log",{method:"GET",...e||{}})}async function updateBindEmail(e,n){return request$1("/api/v1/public/user/bind_email",{method:"PUT",headers:{"Content-Type":"application/json"},data:e})}async function updateBindMobile(e,n){return request$1("/api/v1/public/user/bind_mobile",{method:"PUT",headers:{"Content-Type":"application/json"},data:e})}async function bindOAuth(e,n){return request$1("/api/v1/public/user/bind_oauth",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function bindOAuthCallback(e,n){return request$1("/api/v1/public/user/bind_oauth/callback",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function queryUserInfo(e){return request$1("/api/v1/public/user/info",{method:"GET"})}async function updateUserNotify(e,n){return request$1("/api/v1/public/user/notify",{method:"PUT",headers:{"Content-Type":"application/json"},data:e})}async function updateUserPassword(e,n){return request$1("/api/v1/public/user/password",{method:"PUT",headers:{"Content-Type":"application/json"},data:e})}async function queryUserSubscribe(e){return request$1("/api/v1/public/user/subscribe",{method:"GET"})}async function resetUserSubscribeToken(e,n){return request$1("/api/v1/public/user/subscribe_token",{method:"PUT",headers:{"Content-Type":"application/json"},data:e})}async function unbindOAuth(e,n){return request$1("/api/v1/public/user/unbind_oauth",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function unsubscribe(e,n){return request$1("/api/v1/public/user/unsubscribe",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...n||{}})}async function preUnsubscribe(e,n){return request$1("/api/v1/public/user/unsubscribe/pre",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}const createStoreImpl=e=>{let n;const r=new Set,i=(m,v)=>{const y=typeof m=="function"?m(n):m;if(!Object.is(y,n)){const b=n;n=v??(typeof y!="object"||y===null)?y:Object.assign({},n,y),r.forEach(R=>R(n,b))}},l=()=>n,p={setState:i,getState:l,getInitialState:()=>g,subscribe:m=>(r.add(m),()=>r.delete(m))},g=n=e(i,l,p);return p},createStore=(e=>e?createStoreImpl(e):createStoreImpl),identity=e=>e;function useStore(e,n=identity){const r=React.useSyncExternalStore(e.subscribe,React.useCallback(()=>n(e.getState()),[e,n]),React.useCallback(()=>n(e.getInitialState()),[e,n]));return React.useDebugValue(r),r}const createImpl=e=>{const n=createStore(e),r=i=>useStore(n,i);return Object.assign(r,n),r},create=(e=>e?createImpl(e):createImpl);function extractDomain(e,n=!0){try{const{hostname:r}=new URL(e);if(/^\d{1,3}(\.\d{1,3}){3}$/.test(r))return r;const i=r.split(".").filter(Boolean);return n&&i.length>2?i.slice(-2).join("."):r}catch(r){return console.error("Invalid URL:",r),null}}const useGlobalStore=create((set,get)=>({common:{site:{host:"",site_name:"",site_desc:"",site_logo:"",keywords:"",custom_html:"",custom_data:""},verify:{turnstile_site_key:"",enable_login_verify:!1,enable_register_verify:!1,enable_reset_password_verify:!1},auth:{mobile:{enable:!1,enable_whitelist:!1,whitelist:[]},email:{enable:!1,enable_verify:!1,enable_domain_suffix:!1,domain_suffix_list:""},register:{stop_register:!1,enable_ip_register_limit:!1,ip_register_limit:0,ip_register_limit_duration:0},device:{enable:!1,show_ads:!1,enable_security:!1,only_real_device:!1}},invite:{forced_invite:!1,referral_percentage:0,only_first_purchase:!1},currency:{currency_unit:"USD",currency_symbol:"$"},subscribe:{single_model:!1,subscribe_path:"",subscribe_domain:"",pan_domain:!1,user_agent_limit:!1,user_agent_list:""},verify_code:{verify_code_expire_time:5,verify_code_limit:15,verify_code_interval:60},oauth_methods:[],web_ad:!1},user:void 0,setCommon:e=>set(n=>({common:{...n.common,...e}})),setUser:e=>set({user:e}),getUserInfo:async()=>{try{const{data:e}=await queryUserInfo();set({user:e.data})}catch(e){console.error("Failed to refresh user:",e)}},getUserSubscribe:(e,n,r)=>{const{pan_domain:i,subscribe_domain:l,subscribe_path:u}=get().common.subscribe||{};return(l?l.split(` `):[extractDomain(window.location.origin,i)]).map(p=>i?r?`https://${e}.${r}.${p}${u}?token=${n}&type=${r}`:`https://${e}.${p}${u}?token=${n}`:r?`https://${p}${u}?token=${n}&type=${r}`:`https://${p}${u}?token=${n}`)},getAppSubLink:(url,schema)=>{const name=get().common?.site?.site_name||"";if(!schema)return"url";try{let result=schema.replace(/\${url}/g,url).replace(/\${name}/g,name);const maxLoop=10;let prev,loop=0;do prev=result,result=result.replace(/\${encodeURIComponent\(JSON\.stringify\(([^)]+)\)\)}/g,(match,expr)=>{try{const processedExpr=expr.replace(/url/g,`"${url}"`).replace(/name/g,`"${name}"`);if(processedExpr.includes("server_remote")){const e=`${url}, tag=${name}`;return encodeURIComponent(JSON.stringify({server_remote:[e]}))}const obj=eval(`(${processedExpr})`);return encodeURIComponent(JSON.stringify(obj))}catch{return match}}),result=result.replace(/\${encodeURIComponent\(([^)]+)\)}/g,(e,n)=>{if(n==="url")return encodeURIComponent(url);if(n==="name")return encodeURIComponent(name);try{return encodeURIComponent(n)}catch{return e}}),result=result.replace(/\${window\.btoa\(([^)]+)\)}/g,(e,n)=>{const r=isBrowser()?window.btoa:i=>i;if(n==="url")return r(url);if(n==="name")return r(name);try{return r(n)}catch{return e}}),result=result.replace(/\${JSON\.stringify\(([^}]+)\)}/g,(match,expr)=>{try{const processedExpr=expr.replace(/url/g,`"${url}"`).replace(/name/g,`"${name}"`);if(processedExpr.includes("server_remote")){const e=`${url}, tag=${name}`;return JSON.stringify({server_remote:[e]})}const result=eval(`(${processedExpr})`);return JSON.stringify(result)}catch{return match}}),loop++;while(result!==prev&&loop{const{common:e,setCommon:n,getUserInfo:r}=useGlobalStore();reactExports.useEffect(()=>{(async()=>{try{const v=await getGlobalConfig();v.data?.data&&n(v.data.data);try{getCookie("Authorization")&&await r()}catch{}}catch(v){console.error("Failed to initialize app:",v)}})()},[]);const{site:i}=e,l=i.site_name||"Loading...",u=i.site_desc||"",f=i.keywords||"",p=i.site_logo||"",g=isBrowser()?window.location.href:"";return jsxRuntimeExports.jsxs(HelmetProvider,{children:[jsxRuntimeExports.jsxs(Helmet,{children:[jsxRuntimeExports.jsx("title",{children:l}),jsxRuntimeExports.jsx("meta",{content:u,name:"description"}),jsxRuntimeExports.jsx("meta",{content:f,name:"keywords"}),jsxRuntimeExports.jsx("link",{href:g,rel:"canonical"}),jsxRuntimeExports.jsx("link",{href:p,rel:"icon",type:"image/*"}),jsxRuntimeExports.jsx("link",{href:p,rel:"apple-touch-icon",sizes:"180x180"}),jsxRuntimeExports.jsx("link",{href:"/site.webmanifest",rel:"manifest"})]}),jsxRuntimeExports.jsx(NavigationProgress,{}),jsxRuntimeExports.jsx(Outlet,{}),jsxRuntimeExports.jsx(Toaster,{closeButton:!0,richColors:!0}),jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e?.site.custom_html||""},id:"custom_html"})]})}});function $constructor(e,n,r){function i(p,g){var m;Object.defineProperty(p,"_zod",{value:p._zod??{},enumerable:!1}),(m=p._zod).traits??(m.traits=new Set),p._zod.traits.add(e),n(p,g);for(const v in f.prototype)v in p||Object.defineProperty(p,v,{value:f.prototype[v].bind(p)});p._zod.constr=f,p._zod.def=g}const l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function f(p){var g;const m=r?.Parent?new u:this;i(m,p),(g=m._zod).deferred??(g.deferred=[]);for(const v of m._zod.deferred)v();return m}return Object.defineProperty(f,"init",{value:i}),Object.defineProperty(f,Symbol.hasInstance,{value:p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $ZodEncodeError extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const globalConfig={};function config(e){return globalConfig}function getEnumValues(e){const n=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,l])=>n.indexOf(+i)===-1).map(([i,l])=>l)}function jsonStringifyReplacer(e,n){return typeof n=="bigint"?n.toString():n}function cached(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function nullish(e){return e==null}function cleanRegex(e){const n=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(n,r)}const EVALUATING=Symbol("evaluating");function defineLazy(e,n,r){let i;Object.defineProperty(e,n,{get(){if(i!==EVALUATING)return i===void 0&&(i=EVALUATING,i=r()),i},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function assignProp(e,n,r){Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!0,configurable:!0})}function mergeDefs(...e){const n={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(n,i)}return Object.defineProperties({},n)}function esc(e){return JSON.stringify(e)}const captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function isObject$1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const allowsEval=cached(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function isPlainObject(e){if(isObject$1(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(isObject$1(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function shallowClone(e){return isPlainObject(e)?{...e}:Array.isArray(e)?[...e]:e}const propertyKeyTypes=new Set(["string","number","symbol"]);function escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function clone(e,n,r){const i=new e._zod.constr(n??e._zod.def);return(!n||r?.parent)&&(i._zod.parent=e),i}function normalizeParams(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function optionalKeys(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}function pick(e,n){const r=e._zod.def,i=mergeDefs(e._zod.def,{get shape(){const l={};for(const u in n){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=r.shape[u])}return assignProp(this,"shape",l),l},checks:[]});return clone(e,i)}function omit(e,n){const r=e._zod.def,i=mergeDefs(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in n){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);n[u]&&delete l[u]}return assignProp(this,"shape",l),l},checks:[]});return clone(e,i)}function extend(e,n){if(!isPlainObject(n))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const l=mergeDefs(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return assignProp(this,"shape",u),u},checks:[]});return clone(e,l)}function safeExtend(e,n){if(!isPlainObject(n))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...n};return assignProp(this,"shape",i),i},checks:e._zod.def.checks};return clone(e,r)}function merge(e,n){const r=mergeDefs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n._zod.def.shape};return assignProp(this,"shape",i),i},get catchall(){return n._zod.def.catchall},checks:[]});return clone(e,r)}function partial(e,n,r){const i=mergeDefs(n._zod.def,{get shape(){const l=n._zod.def.shape,u={...l};if(r)for(const f in r){if(!(f in l))throw new Error(`Unrecognized key: "${f}"`);r[f]&&(u[f]=e?new e({type:"optional",innerType:l[f]}):l[f])}else for(const f in l)u[f]=e?new e({type:"optional",innerType:l[f]}):l[f];return assignProp(this,"shape",u),u},checks:[]});return clone(n,i)}function required(e,n,r){const i=mergeDefs(n._zod.def,{get shape(){const l=n._zod.def.shape,u={...l};if(r)for(const f in r){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);r[f]&&(u[f]=new e({type:"nonoptional",innerType:l[f]}))}else for(const f in l)u[f]=new e({type:"nonoptional",innerType:l[f]});return assignProp(this,"shape",u),u},checks:[]});return clone(n,i)}function aborted(e,n=0){if(e.aborted===!0)return!0;for(let r=n;r{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function unwrapMessage(e){return typeof e=="string"?e:e?.message}function finalizeIssue(e,n,r){const i={...e,path:e.path??[]};if(!e.message){const l=unwrapMessage(e.inst?._zod.def?.error?.(e))??unwrapMessage(n?.error?.(e))??unwrapMessage(r.customError?.(e))??unwrapMessage(r.localeError?.(e))??"Invalid input";i.message=l}return delete i.inst,delete i.continue,n?.reportInput||delete i.input,i}function getLengthableOrigin(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function issue(...e){const[n,r,i]=e;return typeof n=="string"?{message:n,code:"custom",input:r,inst:i}:{...n}}const initializer$1=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,jsonStringifyReplacer,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$ZodError=$constructor("$ZodError",initializer$1),$ZodRealError=$constructor("$ZodError",initializer$1,{Parent:Error});function flattenError(e,n=r=>r.message){const r={},i=[];for(const l of e.issues)l.path.length>0?(r[l.path[0]]=r[l.path[0]]||[],r[l.path[0]].push(n(l))):i.push(n(l));return{formErrors:i,fieldErrors:r}}function formatError(e,n=r=>r.message){const r={_errors:[]},i=l=>{for(const u of l.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(f=>i({issues:f}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)r._errors.push(n(u));else{let f=r,p=0;for(;p(n,r,i,l)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},f=n._zod.run({value:r,issues:[]},u);if(f instanceof Promise)throw new $ZodAsyncError;if(f.issues.length){const p=new(l?.Err??e)(f.issues.map(g=>finalizeIssue(g,u,config())));throw captureStackTrace(p,l?.callee),p}return f.value},parse$1=_parse($ZodRealError),_parseAsync=e=>async(n,r,i,l)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let f=n._zod.run({value:r,issues:[]},u);if(f instanceof Promise&&(f=await f),f.issues.length){const p=new(l?.Err??e)(f.issues.map(g=>finalizeIssue(g,u,config())));throw captureStackTrace(p,l?.callee),p}return f.value},parseAsync$1=_parseAsync($ZodRealError),_safeParse=e=>(n,r,i)=>{const l=i?{...i,async:!1}:{async:!1},u=n._zod.run({value:r,issues:[]},l);if(u instanceof Promise)throw new $ZodAsyncError;return u.issues.length?{success:!1,error:new(e??$ZodError)(u.issues.map(f=>finalizeIssue(f,l,config())))}:{success:!0,data:u.value}},safeParse$1=_safeParse($ZodRealError),_safeParseAsync=e=>async(n,r,i)=>{const l=i?Object.assign(i,{async:!0}):{async:!0};let u=n._zod.run({value:r,issues:[]},l);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(f=>finalizeIssue(f,l,config())))}:{success:!0,data:u.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),_encode=e=>(n,r,i)=>{const l=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _parse(e)(n,r,l)},_decode=e=>(n,r,i)=>_parse(e)(n,r,i),_encodeAsync=e=>async(n,r,i)=>{const l=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _parseAsync(e)(n,r,l)},_decodeAsync=e=>async(n,r,i)=>_parseAsync(e)(n,r,i),_safeEncode=e=>(n,r,i)=>{const l=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _safeParse(e)(n,r,l)},_safeDecode=e=>(n,r,i)=>_safeParse(e)(n,r,i),_safeEncodeAsync=e=>async(n,r,i)=>{const l=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _safeParseAsync(e)(n,r,l)},_safeDecodeAsync=e=>async(n,r,i)=>_safeParseAsync(e)(n,r,i),cuid=/^[cC][^\s-]{8,}$/,cuid2=/^[0-9a-z]+$/,ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xid=/^[0-9a-vA-V]{20}$/,ksuid=/^[A-Za-z0-9]{27}$/,nanoid=/^[a-zA-Z0-9_-]{21}$/,duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,guid=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uuid=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,email$1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_emoji$1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function emoji(){return new RegExp(_emoji$1,"u")}const ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url=/^[A-Za-z0-9_-]*$/,hostname=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,e164=/^\+(?:[0-9]){6,14}[0-9]$/,dateSource="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",date$1=new RegExp(`^${dateSource}$`);function timeSource(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time$1(e){return new RegExp(`^${timeSource(e)}$`)}function datetime$1(e){const n=timeSource({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${n}(?:${r.join("|")})`;return new RegExp(`^${dateSource}T(?:${i})$`)}const string$1=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},boolean$1=/^(?:true|false)$/i,lowercase=/^[^A-Z]*$/,uppercase=/^[^a-z]*$/,$ZodCheck=$constructor("$ZodCheck",(e,n)=>{var r;e._zod??(e._zod={}),e._zod.def=n,(r=e._zod).onattach??(r.onattach=[])}),$ZodCheckMaxLength=$constructor("$ZodCheckMaxLength",(e,n)=>{var r;$ZodCheck.init(e,n),(r=e._zod.def).when??(r.when=i=>{const l=i.value;return!nullish(l)&&l.length!==void 0}),e._zod.onattach.push(i=>{const l=i._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum{const l=i.value;if(l.length<=n.maximum)return;const f=getLengthableOrigin(l);i.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),$ZodCheckMinLength=$constructor("$ZodCheckMinLength",(e,n)=>{var r;$ZodCheck.init(e,n),(r=e._zod.def).when??(r.when=i=>{const l=i.value;return!nullish(l)&&l.length!==void 0}),e._zod.onattach.push(i=>{const l=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>l&&(i._zod.bag.minimum=n.minimum)}),e._zod.check=i=>{const l=i.value;if(l.length>=n.minimum)return;const f=getLengthableOrigin(l);i.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),$ZodCheckLengthEquals=$constructor("$ZodCheckLengthEquals",(e,n)=>{var r;$ZodCheck.init(e,n),(r=e._zod.def).when??(r.when=i=>{const l=i.value;return!nullish(l)&&l.length!==void 0}),e._zod.onattach.push(i=>{const l=i._zod.bag;l.minimum=n.length,l.maximum=n.length,l.length=n.length}),e._zod.check=i=>{const l=i.value,u=l.length;if(u===n.length)return;const f=getLengthableOrigin(l),p=u>n.length;i.issues.push({origin:f,...p?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!n.abort})}}),$ZodCheckStringFormat=$constructor("$ZodCheckStringFormat",(e,n)=>{var r,i;$ZodCheck.init(e,n),e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(r=e._zod).check??(r.check=l=>{n.pattern.lastIndex=0,!n.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:n.format,input:l.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(i=e._zod).check??(i.check=()=>{})}),$ZodCheckRegex=$constructor("$ZodCheckRegex",(e,n)=>{$ZodCheckStringFormat.init(e,n),e._zod.check=r=>{n.pattern.lastIndex=0,!n.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),$ZodCheckLowerCase=$constructor("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=lowercase),$ZodCheckStringFormat.init(e,n)}),$ZodCheckUpperCase=$constructor("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=uppercase),$ZodCheckStringFormat.init(e,n)}),$ZodCheckIncludes=$constructor("$ZodCheckIncludes",(e,n)=>{$ZodCheck.init(e,n);const r=escapeRegex(n.includes),i=new RegExp(typeof n.position=="number"?`^.{${n.position}}${r}`:r);n.pattern=i,e._zod.onattach.push(l=>{const u=l._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=l=>{l.value.includes(n.includes,n.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:l.value,inst:e,continue:!n.abort})}}),$ZodCheckStartsWith=$constructor("$ZodCheckStartsWith",(e,n)=>{$ZodCheck.init(e,n);const r=new RegExp(`^${escapeRegex(n.prefix)}.*`);n.pattern??(n.pattern=r),e._zod.onattach.push(i=>{const l=i._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(n.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:i.value,inst:e,continue:!n.abort})}}),$ZodCheckEndsWith=$constructor("$ZodCheckEndsWith",(e,n)=>{$ZodCheck.init(e,n);const r=new RegExp(`.*${escapeRegex(n.suffix)}$`);n.pattern??(n.pattern=r),e._zod.onattach.push(i=>{const l=i._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(n.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:i.value,inst:e,continue:!n.abort})}}),$ZodCheckOverwrite=$constructor("$ZodCheckOverwrite",(e,n)=>{$ZodCheck.init(e,n),e._zod.check=r=>{r.value=n.tx(r.value)}});class Doc{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const i=n.split(` `).filter(f=>f),l=Math.min(...i.map(f=>f.length-f.trimStart().length)),u=i.map(f=>f.slice(l)).map(f=>" ".repeat(this.indent*2)+f);for(const f of u)this.content.push(f)}compile(){const n=Function,r=this?.args,l=[...(this?.content??[""]).map(u=>` ${u}`)];return new n(...r,l.join(` `))}}const version={major:4,minor:1,patch:12},$ZodType=$constructor("$ZodType",(e,n)=>{var r;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=version;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const l of i)for(const u of l._zod.onattach)u(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(f,p,g)=>{let m=aborted(f),v;for(const y of p){if(y._zod.def.when){if(!y._zod.def.when(f))continue}else if(m)continue;const b=f.issues.length,R=y._zod.check(f);if(R instanceof Promise&&g?.async===!1)throw new $ZodAsyncError;if(v||R instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await R,f.issues.length!==b&&(m||(m=aborted(f,b)))});else{if(f.issues.length===b)continue;m||(m=aborted(f,b))}}return v?v.then(()=>f):f},u=(f,p,g)=>{if(aborted(f))return f.aborted=!0,f;const m=l(p,i,g);if(m instanceof Promise){if(g.async===!1)throw new $ZodAsyncError;return m.then(v=>e._zod.parse(v,g))}return e._zod.parse(m,g)};e._zod.run=(f,p)=>{if(p.skipChecks)return e._zod.parse(f,p);if(p.direction==="backward"){const m=e._zod.parse({value:f.value,issues:[]},{...p,skipChecks:!0});return m instanceof Promise?m.then(v=>u(v,f,p)):u(m,f,p)}const g=e._zod.parse(f,p);if(g instanceof Promise){if(p.async===!1)throw new $ZodAsyncError;return g.then(m=>l(m,i,p))}return l(g,i,p)}}e["~standard"]={validate:l=>{try{const u=safeParse$1(e,l);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return safeParseAsync$1(e,l).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}}),$ZodString=$constructor("$ZodString",(e,n)=>{$ZodType.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??string$1(e._zod.bag),e._zod.parse=(r,i)=>{if(n.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),$ZodStringFormat=$constructor("$ZodStringFormat",(e,n)=>{$ZodCheckStringFormat.init(e,n),$ZodString.init(e,n)}),$ZodGUID=$constructor("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=guid),$ZodStringFormat.init(e,n)}),$ZodUUID=$constructor("$ZodUUID",(e,n)=>{if(n.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(i===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=uuid(i))}else n.pattern??(n.pattern=uuid());$ZodStringFormat.init(e,n)}),$ZodEmail=$constructor("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=email$1),$ZodStringFormat.init(e,n)}),$ZodURL=$constructor("$ZodURL",(e,n)=>{$ZodStringFormat.init(e,n),e._zod.check=r=>{try{const i=r.value.trim(),l=new URL(i);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(l.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:hostname.source,input:r.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:r.value,inst:e,continue:!n.abort})),n.normalize?r.value=l.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!n.abort})}}}),$ZodEmoji=$constructor("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=emoji()),$ZodStringFormat.init(e,n)}),$ZodNanoID=$constructor("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=nanoid),$ZodStringFormat.init(e,n)}),$ZodCUID=$constructor("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=cuid),$ZodStringFormat.init(e,n)}),$ZodCUID2=$constructor("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=cuid2),$ZodStringFormat.init(e,n)}),$ZodULID=$constructor("$ZodULID",(e,n)=>{n.pattern??(n.pattern=ulid),$ZodStringFormat.init(e,n)}),$ZodXID=$constructor("$ZodXID",(e,n)=>{n.pattern??(n.pattern=xid),$ZodStringFormat.init(e,n)}),$ZodKSUID=$constructor("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=ksuid),$ZodStringFormat.init(e,n)}),$ZodISODateTime=$constructor("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=datetime$1(n)),$ZodStringFormat.init(e,n)}),$ZodISODate=$constructor("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=date$1),$ZodStringFormat.init(e,n)}),$ZodISOTime=$constructor("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=time$1(n)),$ZodStringFormat.init(e,n)}),$ZodISODuration=$constructor("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=duration$1),$ZodStringFormat.init(e,n)}),$ZodIPv4=$constructor("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=ipv4),$ZodStringFormat.init(e,n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),$ZodIPv6=$constructor("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=ipv6),$ZodStringFormat.init(e,n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!n.abort})}}}),$ZodCIDRv4=$constructor("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=cidrv4),$ZodStringFormat.init(e,n)}),$ZodCIDRv6=$constructor("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=cidrv6),$ZodStringFormat.init(e,n),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[l,u]=i;if(!u)throw new Error;const f=Number(u);if(`${f}`!==u)throw new Error;if(f<0||f>128)throw new Error;new URL(`http://[${l}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!n.abort})}}});function isValidBase64(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const $ZodBase64=$constructor("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=base64),$ZodStringFormat.init(e,n),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{isValidBase64(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!n.abort})}});function isValidBase64URL(e){if(!base64url.test(e))return!1;const n=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=n.padEnd(Math.ceil(n.length/4)*4,"=");return isValidBase64(r)}const $ZodBase64URL=$constructor("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=base64url),$ZodStringFormat.init(e,n),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{isValidBase64URL(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!n.abort})}}),$ZodE164=$constructor("$ZodE164",(e,n)=>{n.pattern??(n.pattern=e164),$ZodStringFormat.init(e,n)});function isValidJWT(e,n=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const l=JSON.parse(atob(i));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||n&&(!("alg"in l)||l.alg!==n))}catch{return!1}}const $ZodJWT=$constructor("$ZodJWT",(e,n)=>{$ZodStringFormat.init(e,n),e._zod.check=r=>{isValidJWT(r.value,n.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!n.abort})}}),$ZodBoolean=$constructor("$ZodBoolean",(e,n)=>{$ZodType.init(e,n),e._zod.pattern=boolean$1,e._zod.parse=(r,i)=>{if(n.coerce)try{r.value=!!r.value}catch{}const l=r.value;return typeof l=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),r}}),$ZodUnknown=$constructor("$ZodUnknown",(e,n)=>{$ZodType.init(e,n),e._zod.parse=r=>r}),$ZodNever=$constructor("$ZodNever",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function handleArrayResult(e,n,r){e.issues.length&&n.issues.push(...prefixIssues(r,e.issues)),n.value[r]=e.value}const $ZodArray=$constructor("$ZodArray",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,i)=>{const l=r.value;if(!Array.isArray(l))return r.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),r;r.value=Array(l.length);const u=[];for(let f=0;fhandleArrayResult(m,r,f))):handleArrayResult(g,r,f)}return u.length?Promise.all(u).then(()=>r):r}});function handlePropertyResult(e,n,r,i){e.issues.length&&n.issues.push(...prefixIssues(r,e.issues)),e.value===void 0?r in i&&(n.value[r]=void 0):n.value[r]=e.value}function normalizeDef(e){const n=Object.keys(e.shape);for(const i of n)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=optionalKeys(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function handleCatchall(e,n,r,i,l,u){const f=[],p=l.keySet,g=l.catchall._zod,m=g.def.type;for(const v of Object.keys(n)){if(p.has(v))continue;if(m==="never"){f.push(v);continue}const y=g.run({value:n[v],issues:[]},i);y instanceof Promise?e.push(y.then(b=>handlePropertyResult(b,r,v,n))):handlePropertyResult(y,r,v,n)}return f.length&&r.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:u}),e.length?Promise.all(e).then(()=>r):r}const $ZodObject=$constructor("$ZodObject",(e,n)=>{if($ZodType.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const p=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...p};return Object.defineProperty(n,"shape",{value:g}),g}})}const i=cached(()=>normalizeDef(n));defineLazy(e._zod,"propValues",()=>{const p=n.shape,g={};for(const m in p){const v=p[m]._zod;if(v.values){g[m]??(g[m]=new Set);for(const y of v.values)g[m].add(y)}}return g});const l=isObject$1,u=n.catchall;let f;e._zod.parse=(p,g)=>{f??(f=i.value);const m=p.value;if(!l(m))return p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p;p.value={};const v=[],y=f.shape;for(const b of f.keys){const E=y[b]._zod.run({value:m[b],issues:[]},g);E instanceof Promise?v.push(E.then(A=>handlePropertyResult(A,p,b,m))):handlePropertyResult(E,p,b,m)}return u?handleCatchall(v,m,p,g,i.value,e):v.length?Promise.all(v).then(()=>p):p}}),$ZodObjectJIT=$constructor("$ZodObjectJIT",(e,n)=>{$ZodObject.init(e,n);const r=e._zod.parse,i=cached(()=>normalizeDef(n)),l=b=>{const R=new Doc(["shape","payload","ctx"]),E=i.value,A=Z=>{const V=esc(Z);return`shape[${V}]._zod.run({ value: input[${V}], issues: [] }, ctx)`};R.write("const input = payload.value;");const O=Object.create(null);let $=0;for(const Z of E.keys)O[Z]=`key_${$++}`;R.write("const newResult = {};");for(const Z of E.keys){const V=O[Z],re=esc(Z);R.write(`const ${V} = ${A(Z)};`),R.write(` if (${V}.issues.length) { payload.issues = payload.issues.concat(${V}.issues.map(iss => ({ ...iss, path: iss.path ? [${re}, ...iss.path] : [${re}] }))); } if (${V}.value === undefined) { if (${re} in input) { newResult[${re}] = undefined; } } else { newResult[${re}] = ${V}.value; } `)}R.write("payload.value = newResult;"),R.write("return payload;");const q=R.compile();return(Z,V)=>q(b,Z,V)};let u;const f=isObject$1,p=!globalConfig.jitless,m=p&&allowsEval.value,v=n.catchall;let y;e._zod.parse=(b,R)=>{y??(y=i.value);const E=b.value;return f(E)?p&&m&&R?.async===!1&&R.jitless!==!0?(u||(u=l(n.shape)),b=u(b,R),v?handleCatchall([],E,b,R,y,e):b):r(b,R):(b.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),b)}});function handleUnionResults(e,n,r,i){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const l=e.filter(u=>!aborted(u));return l.length===1?(n.value=l[0].value,l[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(u=>u.issues.map(f=>finalizeIssue(f,i,config())))}),n)}const $ZodUnion=$constructor("$ZodUnion",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),defineLazy(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),defineLazy(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),defineLazy(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${l.map(u=>cleanRegex(u.source)).join("|")})$`)}});const r=n.options.length===1,i=n.options[0]._zod.run;e._zod.parse=(l,u)=>{if(r)return i(l,u);let f=!1;const p=[];for(const g of n.options){const m=g._zod.run({value:l.value,issues:[]},u);if(m instanceof Promise)p.push(m),f=!0;else{if(m.issues.length===0)return m;p.push(m)}}return f?Promise.all(p).then(g=>handleUnionResults(g,l,e,u)):handleUnionResults(p,l,e,u)}}),$ZodIntersection=$constructor("$ZodIntersection",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,i)=>{const l=r.value,u=n.left._zod.run({value:l,issues:[]},i),f=n.right._zod.run({value:l,issues:[]},i);return u instanceof Promise||f instanceof Promise?Promise.all([u,f]).then(([g,m])=>handleIntersectionResults(r,g,m)):handleIntersectionResults(r,u,f)}});function mergeValues(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(isPlainObject(e)&&isPlainObject(n)){const r=Object.keys(n),i=Object.keys(e).filter(u=>r.indexOf(u)!==-1),l={...e,...n};for(const u of i){const f=mergeValues(e[u],n[u]);if(!f.valid)return{valid:!1,mergeErrorPath:[u,...f.mergeErrorPath]};l[u]=f.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i{$ZodType.init(e,n);const r=getEnumValues(n.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(l=>propertyKeyTypes.has(typeof l)).map(l=>typeof l=="string"?escapeRegex(l):l.toString()).join("|")})$`),e._zod.parse=(l,u)=>{const f=l.value;return i.has(f)||l.issues.push({code:"invalid_value",values:r,input:f,inst:e}),l}}),$ZodTransform=$constructor("$ZodTransform",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new $ZodEncodeError(e.constructor.name);const l=n.transform(r.value,r);if(i.async)return(l instanceof Promise?l:Promise.resolve(l)).then(f=>(r.value=f,r));if(l instanceof Promise)throw new $ZodAsyncError;return r.value=l,r}});function handleOptionalResult(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const $ZodOptional=$constructor("$ZodOptional",(e,n)=>{$ZodType.init(e,n),e._zod.optin="optional",e._zod.optout="optional",defineLazy(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),defineLazy(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${cleanRegex(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(n.innerType._zod.optin==="optional"){const l=n.innerType._zod.run(r,i);return l instanceof Promise?l.then(u=>handleOptionalResult(u,r.value)):handleOptionalResult(l,r.value)}return r.value===void 0?r:n.innerType._zod.run(r,i)}}),$ZodNullable=$constructor("$ZodNullable",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"optin",()=>n.innerType._zod.optin),defineLazy(e._zod,"optout",()=>n.innerType._zod.optout),defineLazy(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${cleanRegex(r.source)}|null)$`):void 0}),defineLazy(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:n.innerType._zod.run(r,i)}),$ZodDefault=$constructor("$ZodDefault",(e,n)=>{$ZodType.init(e,n),e._zod.optin="optional",defineLazy(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return n.innerType._zod.run(r,i);if(r.value===void 0)return r.value=n.defaultValue,r;const l=n.innerType._zod.run(r,i);return l instanceof Promise?l.then(u=>handleDefaultResult(u,n)):handleDefaultResult(l,n)}});function handleDefaultResult(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const $ZodPrefault=$constructor("$ZodPrefault",(e,n)=>{$ZodType.init(e,n),e._zod.optin="optional",defineLazy(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,i))}),$ZodNonOptional=$constructor("$ZodNonOptional",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"values",()=>{const r=n.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const l=n.innerType._zod.run(r,i);return l instanceof Promise?l.then(u=>handleNonOptionalResult(u,e)):handleNonOptionalResult(l,e)}});function handleNonOptionalResult(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const $ZodCatch=$constructor("$ZodCatch",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"optin",()=>n.innerType._zod.optin),defineLazy(e._zod,"optout",()=>n.innerType._zod.optout),defineLazy(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return n.innerType._zod.run(r,i);const l=n.innerType._zod.run(r,i);return l instanceof Promise?l.then(u=>(r.value=u.value,u.issues.length&&(r.value=n.catchValue({...r,error:{issues:u.issues.map(f=>finalizeIssue(f,i,config()))},input:r.value}),r.issues=[]),r)):(r.value=l.value,l.issues.length&&(r.value=n.catchValue({...r,error:{issues:l.issues.map(u=>finalizeIssue(u,i,config()))},input:r.value}),r.issues=[]),r)}}),$ZodPipe=$constructor("$ZodPipe",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"values",()=>n.in._zod.values),defineLazy(e._zod,"optin",()=>n.in._zod.optin),defineLazy(e._zod,"optout",()=>n.out._zod.optout),defineLazy(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const u=n.out._zod.run(r,i);return u instanceof Promise?u.then(f=>handlePipeResult(f,n.in,i)):handlePipeResult(u,n.in,i)}const l=n.in._zod.run(r,i);return l instanceof Promise?l.then(u=>handlePipeResult(u,n.out,i)):handlePipeResult(l,n.out,i)}});function handlePipeResult(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},r)}const $ZodReadonly=$constructor("$ZodReadonly",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"propValues",()=>n.innerType._zod.propValues),defineLazy(e._zod,"values",()=>n.innerType._zod.values),defineLazy(e._zod,"optin",()=>n.innerType._zod.optin),defineLazy(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return n.innerType._zod.run(r,i);const l=n.innerType._zod.run(r,i);return l instanceof Promise?l.then(handleReadonlyResult):handleReadonlyResult(l)}});function handleReadonlyResult(e){return e.value=Object.freeze(e.value),e}const $ZodCustom=$constructor("$ZodCustom",(e,n)=>{$ZodCheck.init(e,n),$ZodType.init(e,n),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,l=n.fn(i);if(l instanceof Promise)return l.then(u=>handleRefineResult(u,r,i,e));handleRefineResult(l,r,i,e)}});function handleRefineResult(e,n,r,i){if(!e){const l={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(l.params=i._zod.def.params),n.issues.push(issue(l))}}class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...r){const i=r[0];if(this._map.set(n,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,n)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){const r=n._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const l={...i,...this._map.get(n)};return Object.keys(l).length?l:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function registry(){return new $ZodRegistry}const globalRegistry=registry();function _string(e,n){return new e({type:"string",...normalizeParams(n)})}function _email(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...normalizeParams(n)})}function _guid(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(n)})}function _uuid(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(n)})}function _uuidv4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(n)})}function _uuidv6(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(n)})}function _uuidv7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(n)})}function _url(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(n)})}function _emoji(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...normalizeParams(n)})}function _nanoid(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(n)})}function _cuid(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(n)})}function _cuid2(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(n)})}function _ulid(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(n)})}function _xid(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(n)})}function _ksuid(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(n)})}function _ipv4(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(n)})}function _ipv6(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(n)})}function _cidrv4(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(n)})}function _cidrv6(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(n)})}function _base64(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(n)})}function _base64url(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(n)})}function _e164(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(n)})}function _jwt(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(n)})}function _isoDateTime(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(n)})}function _isoDate(e,n){return new e({type:"string",format:"date",check:"string_format",...normalizeParams(n)})}function _isoTime(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(n)})}function _isoDuration(e,n){return new e({type:"string",format:"duration",check:"string_format",...normalizeParams(n)})}function _boolean(e,n){return new e({type:"boolean",...normalizeParams(n)})}function _unknown(e){return new e({type:"unknown"})}function _never(e,n){return new e({type:"never",...normalizeParams(n)})}function _maxLength(e,n){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(n),maximum:e})}function _minLength(e,n){return new $ZodCheckMinLength({check:"min_length",...normalizeParams(n),minimum:e})}function _length(e,n){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(n),length:e})}function _regex(e,n){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(n),pattern:e})}function _lowercase(e){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(e)})}function _uppercase(e){return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(e)})}function _includes(e,n){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(n),includes:e})}function _startsWith(e,n){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(n),prefix:e})}function _endsWith(e,n){return new $ZodCheckEndsWith({check:"string_format",format:"ends_with",...normalizeParams(n),suffix:e})}function _overwrite(e){return new $ZodCheckOverwrite({check:"overwrite",tx:e})}function _normalize(e){return _overwrite(n=>n.normalize(e))}function _trim(){return _overwrite(e=>e.trim())}function _toLowerCase(){return _overwrite(e=>e.toLowerCase())}function _toUpperCase(){return _overwrite(e=>e.toUpperCase())}function _array(e,n,r){return new e({type:"array",element:n,...normalizeParams(r)})}function _refine(e,n,r){return new e({type:"custom",check:"custom",fn:n,...normalizeParams(r)})}function _superRefine(e){const n=_check(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(issue(i,r.value,n._zod.def));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=r.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),r.issues.push(issue(l))}},e(r.value,r)));return n}function _check(e,n){const r=new $ZodCheck({check:"custom",...normalizeParams(n)});return r._zod.check=e,r}const ZodISODateTime=$constructor("ZodISODateTime",(e,n)=>{$ZodISODateTime.init(e,n),ZodStringFormat.init(e,n)});function datetime(e){return _isoDateTime(ZodISODateTime,e)}const ZodISODate=$constructor("ZodISODate",(e,n)=>{$ZodISODate.init(e,n),ZodStringFormat.init(e,n)});function date(e){return _isoDate(ZodISODate,e)}const ZodISOTime=$constructor("ZodISOTime",(e,n)=>{$ZodISOTime.init(e,n),ZodStringFormat.init(e,n)});function time(e){return _isoTime(ZodISOTime,e)}const ZodISODuration=$constructor("ZodISODuration",(e,n)=>{$ZodISODuration.init(e,n),ZodStringFormat.init(e,n)});function duration(e){return _isoDuration(ZodISODuration,e)}const initializer=(e,n)=>{$ZodError.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>formatError(e,r)},flatten:{value:r=>flattenError(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jsonStringifyReplacer,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return e.issues.length===0}}})},ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor("ZodType",(e,n)=>($ZodType.init(e,n),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone(mergeDefs(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),e.clone=(r,i)=>clone(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>parse(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>safeParse(e,r,i),e.parseAsync=async(r,i)=>parseAsync(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>safeParseAsync(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>encode(e,r,i),e.decode=(r,i)=>decode(e,r,i),e.encodeAsync=async(r,i)=>encodeAsync(e,r,i),e.decodeAsync=async(r,i)=>decodeAsync(e,r,i),e.safeEncode=(r,i)=>safeEncode(e,r,i),e.safeDecode=(r,i)=>safeDecode(e,r,i),e.safeEncodeAsync=async(r,i)=>safeEncodeAsync(e,r,i),e.safeDecodeAsync=async(r,i)=>safeDecodeAsync(e,r,i),e.refine=(r,i)=>e.check(refine(r,i)),e.superRefine=r=>e.check(superRefine(r)),e.overwrite=r=>e.check(_overwrite(r)),e.optional=()=>optional(e),e.nullable=()=>nullable(e),e.nullish=()=>optional(nullable(e)),e.nonoptional=r=>nonoptional(e,r),e.array=()=>array(e),e.or=r=>union([e,r]),e.and=r=>intersection(e,r),e.transform=r=>pipe(e,transform(r)),e.default=r=>_default(e,r),e.prefault=r=>prefault(e,r),e.catch=r=>_catch(e,r),e.pipe=r=>pipe(e,r),e.readonly=()=>readonly(e),e.describe=r=>{const i=e.clone();return globalRegistry.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return globalRegistry.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return globalRegistry.get(e);const i=e.clone();return globalRegistry.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),_ZodString=$constructor("_ZodString",(e,n)=>{$ZodString.init(e,n),ZodType.init(e,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(_regex(...i)),e.includes=(...i)=>e.check(_includes(...i)),e.startsWith=(...i)=>e.check(_startsWith(...i)),e.endsWith=(...i)=>e.check(_endsWith(...i)),e.min=(...i)=>e.check(_minLength(...i)),e.max=(...i)=>e.check(_maxLength(...i)),e.length=(...i)=>e.check(_length(...i)),e.nonempty=(...i)=>e.check(_minLength(1,...i)),e.lowercase=i=>e.check(_lowercase(i)),e.uppercase=i=>e.check(_uppercase(i)),e.trim=()=>e.check(_trim()),e.normalize=(...i)=>e.check(_normalize(...i)),e.toLowerCase=()=>e.check(_toLowerCase()),e.toUpperCase=()=>e.check(_toUpperCase())}),ZodString=$constructor("ZodString",(e,n)=>{$ZodString.init(e,n),_ZodString.init(e,n),e.email=r=>e.check(_email(ZodEmail,r)),e.url=r=>e.check(_url(ZodURL,r)),e.jwt=r=>e.check(_jwt(ZodJWT,r)),e.emoji=r=>e.check(_emoji(ZodEmoji,r)),e.guid=r=>e.check(_guid(ZodGUID,r)),e.uuid=r=>e.check(_uuid(ZodUUID,r)),e.uuidv4=r=>e.check(_uuidv4(ZodUUID,r)),e.uuidv6=r=>e.check(_uuidv6(ZodUUID,r)),e.uuidv7=r=>e.check(_uuidv7(ZodUUID,r)),e.nanoid=r=>e.check(_nanoid(ZodNanoID,r)),e.guid=r=>e.check(_guid(ZodGUID,r)),e.cuid=r=>e.check(_cuid(ZodCUID,r)),e.cuid2=r=>e.check(_cuid2(ZodCUID2,r)),e.ulid=r=>e.check(_ulid(ZodULID,r)),e.base64=r=>e.check(_base64(ZodBase64,r)),e.base64url=r=>e.check(_base64url(ZodBase64URL,r)),e.xid=r=>e.check(_xid(ZodXID,r)),e.ksuid=r=>e.check(_ksuid(ZodKSUID,r)),e.ipv4=r=>e.check(_ipv4(ZodIPv4,r)),e.ipv6=r=>e.check(_ipv6(ZodIPv6,r)),e.cidrv4=r=>e.check(_cidrv4(ZodCIDRv4,r)),e.cidrv6=r=>e.check(_cidrv6(ZodCIDRv6,r)),e.e164=r=>e.check(_e164(ZodE164,r)),e.datetime=r=>e.check(datetime(r)),e.date=r=>e.check(date(r)),e.time=r=>e.check(time(r)),e.duration=r=>e.check(duration(r))});function string(e){return _string(ZodString,e)}const ZodStringFormat=$constructor("ZodStringFormat",(e,n)=>{$ZodStringFormat.init(e,n),_ZodString.init(e,n)}),ZodEmail=$constructor("ZodEmail",(e,n)=>{$ZodEmail.init(e,n),ZodStringFormat.init(e,n)});function email(e){return _email(ZodEmail,e)}const ZodGUID=$constructor("ZodGUID",(e,n)=>{$ZodGUID.init(e,n),ZodStringFormat.init(e,n)}),ZodUUID=$constructor("ZodUUID",(e,n)=>{$ZodUUID.init(e,n),ZodStringFormat.init(e,n)}),ZodURL=$constructor("ZodURL",(e,n)=>{$ZodURL.init(e,n),ZodStringFormat.init(e,n)}),ZodEmoji=$constructor("ZodEmoji",(e,n)=>{$ZodEmoji.init(e,n),ZodStringFormat.init(e,n)}),ZodNanoID=$constructor("ZodNanoID",(e,n)=>{$ZodNanoID.init(e,n),ZodStringFormat.init(e,n)}),ZodCUID=$constructor("ZodCUID",(e,n)=>{$ZodCUID.init(e,n),ZodStringFormat.init(e,n)}),ZodCUID2=$constructor("ZodCUID2",(e,n)=>{$ZodCUID2.init(e,n),ZodStringFormat.init(e,n)}),ZodULID=$constructor("ZodULID",(e,n)=>{$ZodULID.init(e,n),ZodStringFormat.init(e,n)}),ZodXID=$constructor("ZodXID",(e,n)=>{$ZodXID.init(e,n),ZodStringFormat.init(e,n)}),ZodKSUID=$constructor("ZodKSUID",(e,n)=>{$ZodKSUID.init(e,n),ZodStringFormat.init(e,n)}),ZodIPv4=$constructor("ZodIPv4",(e,n)=>{$ZodIPv4.init(e,n),ZodStringFormat.init(e,n)}),ZodIPv6=$constructor("ZodIPv6",(e,n)=>{$ZodIPv6.init(e,n),ZodStringFormat.init(e,n)}),ZodCIDRv4=$constructor("ZodCIDRv4",(e,n)=>{$ZodCIDRv4.init(e,n),ZodStringFormat.init(e,n)}),ZodCIDRv6=$constructor("ZodCIDRv6",(e,n)=>{$ZodCIDRv6.init(e,n),ZodStringFormat.init(e,n)}),ZodBase64=$constructor("ZodBase64",(e,n)=>{$ZodBase64.init(e,n),ZodStringFormat.init(e,n)}),ZodBase64URL=$constructor("ZodBase64URL",(e,n)=>{$ZodBase64URL.init(e,n),ZodStringFormat.init(e,n)}),ZodE164=$constructor("ZodE164",(e,n)=>{$ZodE164.init(e,n),ZodStringFormat.init(e,n)}),ZodJWT=$constructor("ZodJWT",(e,n)=>{$ZodJWT.init(e,n),ZodStringFormat.init(e,n)}),ZodBoolean=$constructor("ZodBoolean",(e,n)=>{$ZodBoolean.init(e,n),ZodType.init(e,n)});function boolean(e){return _boolean(ZodBoolean,e)}const ZodUnknown=$constructor("ZodUnknown",(e,n)=>{$ZodUnknown.init(e,n),ZodType.init(e,n)});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(e,n)=>{$ZodNever.init(e,n),ZodType.init(e,n)});function never(e){return _never(ZodNever,e)}const ZodArray=$constructor("ZodArray",(e,n)=>{$ZodArray.init(e,n),ZodType.init(e,n),e.element=n.element,e.min=(r,i)=>e.check(_minLength(r,i)),e.nonempty=r=>e.check(_minLength(1,r)),e.max=(r,i)=>e.check(_maxLength(r,i)),e.length=(r,i)=>e.check(_length(r,i)),e.unwrap=()=>e.element});function array(e,n){return _array(ZodArray,e,n)}const ZodObject=$constructor("ZodObject",(e,n)=>{$ZodObjectJIT.init(e,n),ZodType.init(e,n),defineLazy(e,"shape",()=>n.shape),e.keyof=()=>_enum(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:unknown()}),e.loose=()=>e.clone({...e._zod.def,catchall:unknown()}),e.strict=()=>e.clone({...e._zod.def,catchall:never()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>extend(e,r),e.safeExtend=r=>safeExtend(e,r),e.merge=r=>merge(e,r),e.pick=r=>pick(e,r),e.omit=r=>omit(e,r),e.partial=(...r)=>partial(ZodOptional,e,r[0]),e.required=(...r)=>required(ZodNonOptional,e,r[0])});function object(e,n){const r={type:"object",shape:e??{},...normalizeParams(n)};return new ZodObject(r)}const ZodUnion=$constructor("ZodUnion",(e,n)=>{$ZodUnion.init(e,n),ZodType.init(e,n),e.options=n.options});function union(e,n){return new ZodUnion({type:"union",options:e,...normalizeParams(n)})}const ZodIntersection=$constructor("ZodIntersection",(e,n)=>{$ZodIntersection.init(e,n),ZodType.init(e,n)});function intersection(e,n){return new ZodIntersection({type:"intersection",left:e,right:n})}const ZodEnum=$constructor("ZodEnum",(e,n)=>{$ZodEnum.init(e,n),ZodType.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(i,l)=>{const u={};for(const f of i)if(r.has(f))u[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new ZodEnum({...n,checks:[],...normalizeParams(l),entries:u})},e.exclude=(i,l)=>{const u={...n.entries};for(const f of i)if(r.has(f))delete u[f];else throw new Error(`Key ${f} not found in enum`);return new ZodEnum({...n,checks:[],...normalizeParams(l),entries:u})}});function _enum(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ZodEnum({type:"enum",entries:r,...normalizeParams(n)})}const ZodTransform=$constructor("ZodTransform",(e,n)=>{$ZodTransform.init(e,n),ZodType.init(e,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new $ZodEncodeError(e.constructor.name);r.addIssue=u=>{if(typeof u=="string")r.issues.push(issue(u,r.value,n));else{const f=u;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=r.value),f.inst??(f.inst=e),r.issues.push(issue(f))}};const l=n.transform(r.value,r);return l instanceof Promise?l.then(u=>(r.value=u,r)):(r.value=l,r)}});function transform(e){return new ZodTransform({type:"transform",transform:e})}const ZodOptional=$constructor("ZodOptional",(e,n)=>{$ZodOptional.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType});function optional(e){return new ZodOptional({type:"optional",innerType:e})}const ZodNullable=$constructor("ZodNullable",(e,n)=>{$ZodNullable.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType});function nullable(e){return new ZodNullable({type:"nullable",innerType:e})}const ZodDefault=$constructor("ZodDefault",(e,n)=>{$ZodDefault.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _default(e,n){return new ZodDefault({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():shallowClone(n)}})}const ZodPrefault=$constructor("ZodPrefault",(e,n)=>{$ZodPrefault.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType});function prefault(e,n){return new ZodPrefault({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():shallowClone(n)}})}const ZodNonOptional=$constructor("ZodNonOptional",(e,n)=>{$ZodNonOptional.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType});function nonoptional(e,n){return new ZodNonOptional({type:"nonoptional",innerType:e,...normalizeParams(n)})}const ZodCatch=$constructor("ZodCatch",(e,n)=>{$ZodCatch.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _catch(e,n){return new ZodCatch({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const ZodPipe=$constructor("ZodPipe",(e,n)=>{$ZodPipe.init(e,n),ZodType.init(e,n),e.in=n.in,e.out=n.out});function pipe(e,n){return new ZodPipe({type:"pipe",in:e,out:n})}const ZodReadonly=$constructor("ZodReadonly",(e,n)=>{$ZodReadonly.init(e,n),ZodType.init(e,n),e.unwrap=()=>e._zod.def.innerType});function readonly(e){return new ZodReadonly({type:"readonly",innerType:e})}const ZodCustom=$constructor("ZodCustom",(e,n)=>{$ZodCustom.init(e,n),ZodType.init(e,n)});function refine(e,n={}){return _refine(ZodCustom,e,n)}function superRefine(e){return _superRefine(e)}const searchSchema=object({order_no:string().optional()}),Route=createFileRoute("/(main)/purchasing/order/")({validateSearch:searchSchema}),mainRouteLazyRouteImport=createFileRoute("/(main)")(),AuthIndexLazyRouteImport=createFileRoute("/auth/")(),mainIndexLazyRouteImport=createFileRoute("/(main)/")(),OauthPlatformLazyRouteImport=createFileRoute("/oauth/$platform")(),BindPlatformLazyRouteImport=createFileRoute("/bind/$platform")(),mainTosLazyRouteImport=createFileRoute("/(main)/tos")(),mainPrivacyPolicyLazyRouteImport=createFileRoute("/(main)/privacy-policy")(),mainPaymentLazyRouteImport=createFileRoute("/(main)/payment")(),mainuserRouteLazyRouteImport=createFileRoute("/(main)/(user)")(),mainPurchasingIndexLazyRouteImport=createFileRoute("/(main)/purchasing/")(),mainuserWalletLazyRouteImport=createFileRoute("/(main)/(user)/wallet")(),mainuserTicketLazyRouteImport=createFileRoute("/(main)/(user)/ticket")(),mainuserSubscribeLazyRouteImport=createFileRoute("/(main)/(user)/subscribe")(),mainuserProfileLazyRouteImport=createFileRoute("/(main)/(user)/profile")(),mainuserOrderLazyRouteImport=createFileRoute("/(main)/(user)/order")(),mainuserDocumentLazyRouteImport=createFileRoute("/(main)/(user)/document")(),mainuserDashboardLazyRouteImport=createFileRoute("/(main)/(user)/dashboard")(),mainuserAnnouncementLazyRouteImport=createFileRoute("/(main)/(user)/announcement")(),mainuserAffiliateLazyRouteImport=createFileRoute("/(main)/(user)/affiliate")(),mainRouteLazyRoute=mainRouteLazyRouteImport.update({id:"/(main)",getParentRoute:()=>Route$1}).lazy(()=>__vitePreload(()=>import("./route.lazy-XfIqzMi4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url).then(e=>e.Route)),AuthIndexLazyRoute=AuthIndexLazyRouteImport.update({id:"/auth/",path:"/auth/",getParentRoute:()=>Route$1}).lazy(()=>__vitePreload(()=>import("./index.lazy-BZDcVF23.js"),__vite__mapDeps([16,17,18,7,2,3,13,8,5,6,9,10,11,12,19,20,21,22,4,23,24,25,26,27]),import.meta.url).then(e=>e.Route)),mainIndexLazyRoute=mainIndexLazyRouteImport.update({id:"/",path:"/",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./index.lazy-D5v-z4Oj.js"),__vite__mapDeps([28,17,29,3,30,2,31,1,4,32,33,26,34]),import.meta.url).then(e=>e.Route)),OauthPlatformLazyRoute=OauthPlatformLazyRouteImport.update({id:"/oauth/$platform",path:"/oauth/$platform",getParentRoute:()=>Route$1}).lazy(()=>__vitePreload(()=>import("./_platform.lazy-CozAJAvp.js"),__vite__mapDeps([35,36,3,4,27]),import.meta.url).then(e=>e.Route)),BindPlatformLazyRoute=BindPlatformLazyRouteImport.update({id:"/bind/$platform",path:"/bind/$platform",getParentRoute:()=>Route$1}).lazy(()=>__vitePreload(()=>import("./_platform.lazy-Cz7XvF2l.js"),__vite__mapDeps([37,36,3,4]),import.meta.url).then(e=>e.Route)),mainTosLazyRoute=mainTosLazyRouteImport.update({id:"/tos",path:"/tos",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./tos.lazy-DrNVytTa.js"),__vite__mapDeps([38,39,24,2,3,6,25,26]),import.meta.url).then(e=>e.Route)),mainPrivacyPolicyLazyRoute=mainPrivacyPolicyLazyRouteImport.update({id:"/privacy-policy",path:"/privacy-policy",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./privacy-policy.lazy-DKUOGNXn.js"),__vite__mapDeps([40,39,24,2,3,6,25,26]),import.meta.url).then(e=>e.Route)),mainPaymentLazyRoute=mainPaymentLazyRouteImport.update({id:"/payment",path:"/payment",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./payment.lazy-DdDGVY6h.js"),__vite__mapDeps([41,39,42,2,3,1,32,33,26,31,4,43,30,44,10,23,20,45,34]),import.meta.url).then(e=>e.Route)),mainuserRouteLazyRoute=mainuserRouteLazyRouteImport.update({id:"/(user)",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./route.lazy-DB63iZj-.js"),__vite__mapDeps([46,2,3,22,7,9,10,47,11,12,48,49,39,31,50,4,24,6,25,26,51,15,52,32,33,53,54,23,43,55,20,13,8,56,30]),import.meta.url).then(e=>e.Route)),mainPurchasingIndexLazyRoute=mainPurchasingIndexLazyRouteImport.update({id:"/purchasing/",path:"/purchasing/",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./index.lazy-Couxvjzq.js"),__vite__mapDeps([57,39,30,2,3,31,1,54,23,4,42,32,33,26,58,20,55,7,13,8,12,56,34]),import.meta.url).then(e=>e.Route)),mainuserWalletLazyRoute=mainuserWalletLazyRouteImport.update({id:"/wallet",path:"/wallet",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./wallet.lazy-B-sULRGB.js"),__vite__mapDeps([59,31,3,60,2,7,56,12,6,50,23,21,22,9,10,11,8,48,61,33,32,26,53,47,54,43,55,39,20,13,30]),import.meta.url).then(e=>e.Route)),mainuserTicketLazyRoute=mainuserTicketLazyRouteImport.update({id:"/ticket",path:"/ticket",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./ticket.lazy-BngROJwU.js"),__vite__mapDeps([62,39,2,3,31,47,22,7,9,10,23,20,60,56,12,6,50,21,11,8,48,61,63,4,33]),import.meta.url).then(e=>e.Route)),mainuserSubscribeLazyRoute=mainuserSubscribeLazyRouteImport.update({id:"/subscribe",path:"/subscribe",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./subscribe.lazy-CgulPHYy.js"),__vite__mapDeps([64,65,39,2,3,31,1,50,4,32,33,26,34,47,22,7,9,10,43,58,23,42,20,55,13,8,12,56,30]),import.meta.url).then(e=>e.Route)),mainuserProfileLazyRoute=mainuserProfileLazyRouteImport.update({id:"/profile",path:"/profile",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./profile.lazy-BcCUu6LJ.js"),__vite__mapDeps([66,19,2,3,20,21,22,7,9,10,11,12,4,6,31,23,56,47]),import.meta.url).then(e=>e.Route)),mainuserOrderLazyRoute=mainuserOrderLazyRouteImport.update({id:"/order",path:"/order",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./order.lazy-B9tA3FFq.js"),__vite__mapDeps([67,2,3,31,60,7,56,12,6,50,23,21,22,9,10,11,8,48,61,43,33,32,26]),import.meta.url).then(e=>e.Route)),mainuserDocumentLazyRoute=mainuserDocumentLazyRouteImport.update({id:"/document",path:"/document",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./document.lazy-BdfQH5sO.js"),__vite__mapDeps([68,39,18,7,2,3,13,8,50,14,24,6,25,26,33,29]),import.meta.url).then(e=>e.Route)),mainuserDashboardLazyRoute=mainuserDashboardLazyRouteImport.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./dashboard.lazy-oi8NHC50.js"),__vite__mapDeps([69,49,39,31,3,47,22,7,2,9,10,50,4,24,6,25,26,51,8,61,63,1,18,13,33,45,52,32,65,34,43,58,23,42,20,55,12,56,30]),import.meta.url).then(e=>e.Route)),mainuserAnnouncementLazyRoute=mainuserAnnouncementLazyRouteImport.update({id:"/announcement",path:"/announcement",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./announcement.lazy-JZReVdSN.js"),__vite__mapDeps([70,39,29,50,3,2,24,6,25,26,51]),import.meta.url).then(e=>e.Route)),mainuserAffiliateLazyRoute=mainuserAffiliateLazyRouteImport.update({id:"/affiliate",path:"/affiliate",getParentRoute:()=>mainuserRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./affiliate.lazy-Cd_P-Aqp.js"),__vite__mapDeps([71,39,2,3,31,60,7,56,12,6,50,23,21,22,9,10,11,8,48,61,33,52,32,26,25]),import.meta.url).then(e=>e.Route)),mainPurchasingOrderIndexRoute=Route.update({id:"/purchasing/order/",path:"/purchasing/order/",getParentRoute:()=>mainRouteLazyRoute}).lazy(()=>__vitePreload(()=>import("./index.lazy-B2owfSzP.js"),__vite__mapDeps([72,39,42,2,3,1,32,33,26,31,4,30,44,10,23,20,45,34]),import.meta.url).then(e=>e.Route)),mainuserRouteLazyRouteChildren={mainuserAffiliateLazyRoute,mainuserAnnouncementLazyRoute,mainuserDashboardLazyRoute,mainuserDocumentLazyRoute,mainuserOrderLazyRoute,mainuserProfileLazyRoute,mainuserSubscribeLazyRoute,mainuserTicketLazyRoute,mainuserWalletLazyRoute},mainuserRouteLazyRouteWithChildren=mainuserRouteLazyRoute._addFileChildren(mainuserRouteLazyRouteChildren),mainRouteLazyRouteChildren={mainuserRouteLazyRoute:mainuserRouteLazyRouteWithChildren,mainPaymentLazyRoute,mainPrivacyPolicyLazyRoute,mainTosLazyRoute,mainIndexLazyRoute,mainPurchasingIndexLazyRoute,mainPurchasingOrderIndexRoute},mainRouteLazyRouteWithChildren=mainRouteLazyRoute._addFileChildren(mainRouteLazyRouteChildren),rootRouteChildren={mainRouteLazyRoute:mainRouteLazyRouteWithChildren,BindPlatformLazyRoute,OauthPlatformLazyRoute,AuthIndexLazyRoute},routeTree=Route$1._addFileChildren(rootRouteChildren)._addFileTypes();var DirectionContext$1=reactExports.createContext(void 0),DirectionProvider$1=e=>{const{dir:n,children:r}=e;return jsxRuntimeExports.jsx(DirectionContext$1.Provider,{value:n,children:r})};function useDirection(e){const n=reactExports.useContext(DirectionContext$1);return e||n||"ltr"}const DEFAULT_DIRECTION="ltr",DIRECTION_COOKIE_NAME="dir",DIRECTION_COOKIE_MAX_AGE=3600*24*365,DirectionContext=reactExports.createContext(null);function DirectionProvider({children:e}){const[n,r]=reactExports.useState(()=>getCookie(DIRECTION_COOKIE_NAME)||DEFAULT_DIRECTION);reactExports.useEffect(()=>{document.documentElement.setAttribute("dir",n)},[n]);const i=u=>{r(u),setCookie(DIRECTION_COOKIE_NAME,u,DIRECTION_COOKIE_MAX_AGE)},l=()=>{r(DEFAULT_DIRECTION),removeCookie(DIRECTION_COOKIE_NAME)};return jsxRuntimeExports.jsx(DirectionContext,{value:{defaultDir:DEFAULT_DIRECTION,dir:n,setDir:i,resetDir:l},children:jsxRuntimeExports.jsx(DirectionProvider$1,{dir:n,children:e})})}const isString$1=e=>typeof e=="string",defer=()=>{let e,n;const r=new Promise((i,l)=>{e=i,n=l});return r.resolve=e,r.reject=n,r},makeString=e=>e==null?"":""+e,copy=(e,n,r)=>{e.forEach(i=>{n[i]&&(r[i]=n[i])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=e=>e&&e.indexOf("###")>-1?e.replace(lastOfPathSeparatorRegExp,"."):e,canNotTraverseDeeper=e=>!e||isString$1(e),getLastOfPath=(e,n,r)=>{const i=isString$1(n)?n.split("."):n;let l=0;for(;l{const{obj:i,k:l}=getLastOfPath(e,n,Object);if(i!==void 0||n.length===1){i[l]=r;return}let u=n[n.length-1],f=n.slice(0,n.length-1),p=getLastOfPath(e,f,Object);for(;p.obj===void 0&&f.length;)u=`${f[f.length-1]}.${u}`,f=f.slice(0,f.length-1),p=getLastOfPath(e,f,Object),p?.obj&&typeof p.obj[`${p.k}.${u}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${u}`]=r},pushPath=(e,n,r,i)=>{const{obj:l,k:u}=getLastOfPath(e,n,Object);l[u]=l[u]||[],l[u].push(r)},getPath=(e,n)=>{const{obj:r,k:i}=getLastOfPath(e,n);if(r&&Object.prototype.hasOwnProperty.call(r,i))return r[i]},getPathWithDefaults=(e,n,r)=>{const i=getPath(e,r);return i!==void 0?i:getPath(n,r)},deepExtend=(e,n,r)=>{for(const i in n)i!=="__proto__"&&i!=="constructor"&&(i in e?isString$1(e[i])||e[i]instanceof String||isString$1(n[i])||n[i]instanceof String?r&&(e[i]=n[i]):deepExtend(e[i],n[i],r):e[i]=n[i]);return e},regexEscape=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const escape=e=>isString$1(e)?e.replace(/[&<>"'\/]/g,n=>_entityMap[n]):e;class RegExpCache{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const r=this.regExpMap.get(n);if(r!==void 0)return r;const i=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,i),this.regExpQueue.push(n),i}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(e,n,r)=>{n=n||"",r=r||"";const i=chars.filter(f=>n.indexOf(f)<0&&r.indexOf(f)<0);if(i.length===0)return!0;const l=looksLikeObjectPathRegExpCache.getRegExp(`(${i.map(f=>f==="?"?"\\?":f).join("|")})`);let u=!l.test(e);if(!u){const f=e.indexOf(r);f>0&&!l.test(e.substring(0,f))&&(u=!0)}return u},deepFind=(e,n,r=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const i=n.split(r);let l=e;for(let u=0;u-1&&ge?.replace("_","-"),consoleLogger={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class Logger{constructor(n,r={}){this.init(n,r)}init(n,r={}){this.prefix=r.prefix||"i18next:",this.logger=n||consoleLogger,this.options=r,this.debug=r.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,r,i,l){return l&&!this.debug?null:(isString$1(n[0])&&(n[0]=`${i}${this.prefix} ${n[0]}`),this.logger[r](n))}create(n){return new Logger(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Logger(this.logger,n)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(n,r){return n.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const l=this.observers[i].get(r)||0;this.observers[i].set(r,l+1)}),this}off(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n].delete(r)}}emit(n,...r){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([l,u])=>{for(let f=0;f{for(let f=0;f-1&&this.options.ns.splice(r,1)}getResource(n,r,i,l={}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;n.indexOf(".")>-1?p=n.split("."):(p=[n,r],i&&(Array.isArray(i)?p.push(...i):isString$1(i)&&u?p.push(...i.split(u)):p.push(i)));const g=getPath(this.data,p);return!g&&!r&&!i&&n.indexOf(".")>-1&&(n=p[0],r=p[1],i=p.slice(2).join(".")),g||!f||!isString$1(i)?g:deepFind(this.data?.[n]?.[r],i,u)}addResource(n,r,i,l,u={silent:!1}){const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let p=[n,r];i&&(p=p.concat(f?i.split(f):i)),n.indexOf(".")>-1&&(p=n.split("."),l=r,r=p[1]),this.addNamespaces(r),setPath(this.data,p,l),u.silent||this.emit("added",n,r,i,l)}addResources(n,r,i,l={silent:!1}){for(const u in i)(isString$1(i[u])||Array.isArray(i[u]))&&this.addResource(n,r,u,i[u],{silent:!0});l.silent||this.emit("added",n,r,i)}addResourceBundle(n,r,i,l,u,f={silent:!1,skipCopy:!1}){let p=[n,r];n.indexOf(".")>-1&&(p=n.split("."),l=i,i=r,r=p[1]),this.addNamespaces(r);let g=getPath(this.data,p)||{};f.skipCopy||(i=JSON.parse(JSON.stringify(i))),l?deepExtend(g,i,u):g={...g,...i},setPath(this.data,p,g),f.silent||this.emit("added",n,r,i)}removeResourceBundle(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}hasResourceBundle(n,r){return this.getResource(n,r)!==void 0}getResourceBundle(n,r){return r||(r=this.options.defaultNS),this.getResource(n,r)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const r=this.getDataByLanguage(n);return!!(r&&Object.keys(r)||[]).find(l=>r[l]&&Object.keys(r[l]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,r,i,l){return e.forEach(u=>{n=this.processors[u]?.process(n,r,i,l)??n}),n}};const PATH_KEY=Symbol("i18next/PATH_KEY");function createProxy(){const e=[],n=Object.create(null);let r;return n.get=(i,l)=>(r?.revoke?.(),l===PATH_KEY?e:(e.push(l),r=Proxy.revocable(i,n),r.proxy)),Proxy.revocable(Object.create(null),n).proxy}function keysFromSelector(e,n){const{[PATH_KEY]:r}=e(createProxy());return r.join(n?.keySeparator??".")}const checkedLoadedFor={},shouldHandleAsObject=e=>!isString$1(e)&&typeof e!="boolean"&&typeof e!="number";class Translator extends EventEmitter{constructor(n,r={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,r={interpolation:{}}){const i={...r};if(n==null)return!1;const l=this.resolve(n,i);if(l?.res===void 0)return!1;const u=shouldHandleAsObject(l.res);return!(i.returnObjects===!1&&u)}extractFromKey(n,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const l=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let u=r.ns||this.options.defaultNS||[];const f=i&&n.indexOf(i)>-1,p=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!looksLikeObjectPath(n,i,l);if(f&&!p){const g=n.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:n,namespaces:isString$1(u)?[u]:u};const m=n.split(i);(i!==l||i===l&&this.options.ns.indexOf(m[0])>-1)&&(u=m.shift()),n=m.join(l)}return{key:n,namespaces:isString$1(u)?[u]:u}}translate(n,r,i){let l=typeof r=="object"?{...r}:r;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof l=="object"&&(l={...l}),l||(l={}),n==null)return"";typeof n=="function"&&(n=keysFromSelector(n,{...this.options,...l})),Array.isArray(n)||(n=[String(n)]);const u=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,f=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:p,namespaces:g}=this.extractFromKey(n[n.length-1],l),m=g[g.length-1];let v=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const y=l.lng||this.language,b=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y?.toLowerCase()==="cimode")return b?u?{res:`${m}${v}${p}`,usedKey:p,exactUsedKey:p,usedLng:y,usedNS:m,usedParams:this.getUsedParamsDetails(l)}:`${m}${v}${p}`:u?{res:p,usedKey:p,exactUsedKey:p,usedLng:y,usedNS:m,usedParams:this.getUsedParamsDetails(l)}:p;const R=this.resolve(n,l);let E=R?.res;const A=R?.usedKey||p,O=R?.exactUsedKey||p,$=["[object Number]","[object Function]","[object RegExp]"],q=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,Z=!this.i18nFormat||this.i18nFormat.handleAsObject,V=l.count!==void 0&&!isString$1(l.count),re=Translator.hasDefaultValue(l),J=V?this.pluralResolver.getSuffix(y,l.count,l):"",F=l.ordinal&&V?this.pluralResolver.getSuffix(y,l.count,{ordinal:!1}):"",te=V&&!l.ordinal&&l.count===0,ne=te&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${J}`]||l[`defaultValue${F}`]||l.defaultValue;let oe=E;Z&&!E&&re&&(oe=ne);const se=shouldHandleAsObject(oe),ce=Object.prototype.toString.apply(oe);if(Z&&oe&&se&&$.indexOf(ce)<0&&!(isString$1(q)&&Array.isArray(oe))){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const le=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,oe,{...l,ns:g}):`key '${p} (${this.language})' returned an object instead of string.`;return u?(R.res=le,R.usedParams=this.getUsedParamsDetails(l),R):le}if(f){const le=Array.isArray(oe),fe=le?[]:{},ge=le?O:A;for(const L in oe)if(Object.prototype.hasOwnProperty.call(oe,L)){const ee=`${ge}${f}${L}`;re&&!E?fe[L]=this.translate(ee,{...l,defaultValue:shouldHandleAsObject(ne)?ne[L]:void 0,joinArrays:!1,ns:g}):fe[L]=this.translate(ee,{...l,joinArrays:!1,ns:g}),fe[L]===ee&&(fe[L]=oe[L])}E=fe}}else if(Z&&isString$1(q)&&Array.isArray(E))E=E.join(q),E&&(E=this.extendTranslation(E,n,l,i));else{let le=!1,fe=!1;!this.isValidLookup(E)&&re&&(le=!0,E=ne),this.isValidLookup(E)||(fe=!0,E=p);const L=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&fe?void 0:E,ee=re&&ne!==E&&this.options.updateMissing;if(fe||le||ee){if(this.logger.log(ee?"updateKey":"missingKey",y,m,p,ee?ne:E),f){const w=this.resolve(p,{...l,keySeparator:!1});w&&w.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ie=[];const Se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Se&&Se[0])for(let w=0;w{const ae=re&&K!==E?K:L;this.options.missingKeyHandler?this.options.missingKeyHandler(w,m,B,ae,ee,l):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(w,m,B,ae,ee,l),this.emit("missingKey",w,m,B,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&V?ie.forEach(w=>{const B=this.pluralResolver.getSuffixes(w,l);te&&l[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(K=>{be([w],p+K,l[`defaultValue${K}`]||ne)})}):be(ie,p,ne))}E=this.extendTranslation(E,n,l,R,i),fe&&E===p&&this.options.appendNamespaceToMissingKey&&(E=`${m}${v}${p}`),(fe||le)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${p}`:p,le?E:void 0,l))}return u?(R.res=E,R.usedParams=this.getUsedParamsDetails(l),R):E}extendTranslation(n,r,i,l,u){if(this.i18nFormat?.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const g=isString$1(n)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(g){const y=n.match(this.interpolator.nestingRegexp);m=y&&y.length}let v=i.replace&&!isString$1(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),n=this.interpolator.interpolate(n,v,i.lng||this.language||l.usedLng,i),g){const y=n.match(this.interpolator.nestingRegexp),b=y&&y.length;mu?.[0]===y[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${r[0]}`),null):this.translate(...y,r),i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,p=isString$1(f)?[f]:f;return n!=null&&p?.length&&i.applyPostProcessor!==!1&&(n=postProcessor.handle(p,n,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),n}resolve(n,r={}){let i,l,u,f,p;return isString$1(n)&&(n=[n]),n.forEach(g=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(g,r),v=m.key;l=v;let y=m.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const b=r.count!==void 0&&!isString$1(r.count),R=b&&!r.ordinal&&r.count===0,E=r.context!==void 0&&(isString$1(r.context)||typeof r.context=="number")&&r.context!=="",A=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);y.forEach(O=>{this.isValidLookup(i)||(p=O,!checkedLoadedFor[`${A[0]}-${O}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(checkedLoadedFor[`${A[0]}-${O}`]=!0,this.logger.warn(`key "${l}" for languages "${A.join(", ")}" won't get resolved as namespace "${p}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),A.forEach($=>{if(this.isValidLookup(i))return;f=$;const q=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(q,v,$,O,r);else{let V;b&&(V=this.pluralResolver.getSuffix($,r.count,r));const re=`${this.options.pluralSeparator}zero`,J=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(r.ordinal&&V.indexOf(J)===0&&q.push(v+V.replace(J,this.options.pluralSeparator)),q.push(v+V),R&&q.push(v+re)),E){const F=`${v}${this.options.contextSeparator||"_"}${r.context}`;q.push(F),b&&(r.ordinal&&V.indexOf(J)===0&&q.push(F+V.replace(J,this.options.pluralSeparator)),q.push(F+V),R&&q.push(F+re))}}let Z;for(;Z=q.pop();)this.isValidLookup(i)||(u=Z,i=this.getResource($,O,Z,r))}))})}),{res:i,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:p}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,r,i,l={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(n,r,i,l):this.resourceStore.getResource(n,r,i,l)}getUsedParamsDetails(n={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=n.replace&&!isString$1(n.replace);let l=i?n.replace:n;if(i&&typeof n.count<"u"&&(l.count=n.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!i){l={...l};for(const u of r)delete l[u]}return l}static hasDefaultValue(n){const r="defaultValue";for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&r===i.substring(0,r.length)&&n[i]!==void 0)return!0;return!1}}class LanguageUtil{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(n){if(n=getCleanedCode(n),!n||n.indexOf("-")<0)return null;const r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(n){if(n=getCleanedCode(n),!n||n.indexOf("-")<0)return n;const r=n.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(n){if(isString$1(n)&&n.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(n)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let r;return n.forEach(i=>{if(r)return;const l=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(l))&&(r=l)}),!r&&this.options.supportedLngs&&n.forEach(i=>{if(r)return;const l=this.getScriptPartFromCode(i);if(this.isSupportedCode(l))return r=l;const u=this.getLanguagePartFromCode(i);if(this.isSupportedCode(u))return r=u;r=this.options.supportedLngs.find(f=>{if(f===u)return f;if(!(f.indexOf("-")<0&&u.indexOf("-")<0)&&(f.indexOf("-")>0&&u.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===u||f.indexOf(u)===0&&u.length>1))return f})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),isString$1(n)&&(n=[n]),Array.isArray(n))return n;if(!r)return n.default||[];let i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}toResolveHierarchy(n,r){const i=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],n),l=[],u=f=>{f&&(this.isSupportedCode(f)?l.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return isString$1(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&u(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&u(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&u(this.getLanguagePartFromCode(n))):isString$1(n)&&u(this.formatLanguageCode(n)),i.forEach(f=>{l.indexOf(f)<0&&u(this.formatLanguageCode(f))}),l}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(n,r={}){this.languageUtils=n,this.options=r,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(n,r){this.rules[n]=r}clearCache(){this.pluralRulesCache={}}getRule(n,r={}){const i=getCleanedCode(n==="dev"?"en":n),l=r.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:i,type:l});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let f;try{f=new Intl.PluralRules(i,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!n.match(/-|_/))return dummyRule;const g=this.languageUtils.getLanguagePartFromCode(n);f=this.getRule(g,r)}return this.pluralRulesCache[u]=f,f}needsPlural(n,r={}){let i=this.getRule(n,r);return i||(i=this.getRule("dev",r)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(n,r,i={}){return this.getSuffixes(n,i).map(l=>`${r}${l}`)}getSuffixes(n,r={}){let i=this.getRule(n,r);return i||(i=this.getRule("dev",r)),i?i.resolvedOptions().pluralCategories.sort((l,u)=>suffixesOrder[l]-suffixesOrder[u]).map(l=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(n,r,i={}){const l=this.getRule(n,i);return l?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${l.select(r)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",r,i))}}const deepFindWithDefaults=(e,n,r,i=".",l=!0)=>{let u=getPathWithDefaults(e,n,r);return!u&&l&&isString$1(r)&&(u=deepFind(e,r,i),u===void 0&&(u=deepFind(n,r,i))),u},regexSafe=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(n={}){this.logger=baseLogger.create("interpolator"),this.options=n,this.format=n?.interpolation?.format||(r=>r),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:l,prefix:u,prefixEscaped:f,suffix:p,suffixEscaped:g,formatSeparator:m,unescapeSuffix:v,unescapePrefix:y,nestingPrefix:b,nestingPrefixEscaped:R,nestingSuffix:E,nestingSuffixEscaped:A,nestingOptionsSeparator:O,maxReplaces:$,alwaysFormat:q}=n.interpolation;this.escape=r!==void 0?r:escape,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=u?regexEscape(u):f||"{{",this.suffix=p?regexEscape(p):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=b?regexEscape(b):R||regexEscape("$t("),this.nestingSuffix=E?regexEscape(E):A||regexEscape(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=$||1e3,this.alwaysFormat=q!==void 0?q:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(r,i)=>r?.source===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,r,i,l){let u,f,p;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=R=>{if(R.indexOf(this.formatSeparator)<0){const $=deepFindWithDefaults(r,g,R,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format($,void 0,i,{...l,...r,interpolationkey:R}):$}const E=R.split(this.formatSeparator),A=E.shift().trim(),O=E.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(r,g,A,this.options.keySeparator,this.options.ignoreJSONStructure),O,i,{...l,...r,interpolationkey:A})};this.resetRegExp();const v=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,y=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:R=>regexSafe(R)},{regex:this.regexp,safeValue:R=>this.escapeValue?regexSafe(this.escape(R)):regexSafe(R)}].forEach(R=>{for(p=0;u=R.regex.exec(n);){const E=u[1].trim();if(f=m(E),f===void 0)if(typeof v=="function"){const O=v(n,u,l);f=isString$1(O)?O:""}else if(l&&Object.prototype.hasOwnProperty.call(l,E))f="";else if(y){f=u[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${n}`),f="";else!isString$1(f)&&!this.useRawValueToEscape&&(f=makeString(f));const A=R.safeValue(f);if(n=n.replace(u[0],A),y?(R.regex.lastIndex+=f.length,R.regex.lastIndex-=u[0].length):R.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),n}nest(n,r,i={}){let l,u,f;const p=(g,m)=>{const v=this.nestingOptionsSeparator;if(g.indexOf(v)<0)return g;const y=g.split(new RegExp(`${v}[ ]*{`));let b=`{${y[1]}`;g=y[0],b=this.interpolate(b,f);const R=b.match(/'/g),E=b.match(/"/g);((R?.length??0)%2===0&&!E||E.length%2!==0)&&(b=b.replace(/'/g,'"'));try{f=JSON.parse(b),m&&(f={...m,...f})}catch(A){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,A),`${g}${v}${b}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;l=this.nestingRegexp.exec(n);){let g=[];f={...i},f=f.replace&&!isString$1(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const m=/{.*}/.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(m!==-1&&(g=l[1].slice(m).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),l[1]=l[1].slice(0,m)),u=r(p.call(this,l[1].trim(),f),f),u&&l[0]===n&&!isString$1(u))return u;isString$1(u)||(u=makeString(u)),u||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${n}`),u=""),g.length&&(u=g.reduce((v,y)=>this.format(v,y,i.lng,{...i,interpolationkey:l[1].trim()}),u.trim())),n=n.replace(l[0],u),this.regexp.lastIndex=0}return n}}const parseFormatStr=e=>{let n=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const i=e.split("(");n=i[0].toLowerCase().trim();const l=i[1].substring(0,i[1].length-1);n==="currency"&&l.indexOf(":")<0?r.currency||(r.currency=l.trim()):n==="relativetime"&&l.indexOf(":")<0?r.range||(r.range=l.trim()):l.split(";").forEach(f=>{if(f){const[p,...g]=f.split(":"),m=g.join(":").trim().replace(/^'+|'+$/g,""),v=p.trim();r[v]||(r[v]=m),m==="false"&&(r[v]=!1),m==="true"&&(r[v]=!0),isNaN(m)||(r[v]=parseInt(m,10))}})}return{formatName:n,formatOptions:r}},createCachedFormatter=e=>{const n={};return(r,i,l)=>{let u=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(u={...u,[l.interpolationkey]:void 0});const f=i+JSON.stringify(u);let p=n[f];return p||(p=e(getCleanedCode(i),l),n[f]=p),p(r)}},createNonCachedFormatter=e=>(n,r,i)=>e(getCleanedCode(r),i)(n);class Formatter{constructor(n={}){this.logger=baseLogger.create("formatter"),this.options=n,this.init(n)}init(n,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const i=r.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:i((l,u)=>{const f=new Intl.NumberFormat(l,{...u});return p=>f.format(p)}),currency:i((l,u)=>{const f=new Intl.NumberFormat(l,{...u,style:"currency"});return p=>f.format(p)}),datetime:i((l,u)=>{const f=new Intl.DateTimeFormat(l,{...u});return p=>f.format(p)}),relativetime:i((l,u)=>{const f=new Intl.RelativeTimeFormat(l,{...u});return p=>f.format(p,u.range||"day")}),list:i((l,u)=>{const f=new Intl.ListFormat(l,{...u});return p=>f.format(p)})}}add(n,r){this.formats[n.toLowerCase().trim()]=r}addCached(n,r){this.formats[n.toLowerCase().trim()]=createCachedFormatter(r)}format(n,r,i,l={}){const u=r.split(this.formatSeparator);if(u.length>1&&u[0].indexOf("(")>1&&u[0].indexOf(")")<0&&u.find(p=>p.indexOf(")")>-1)){const p=u.findIndex(g=>g.indexOf(")")>-1);u[0]=[u[0],...u.splice(1,p)].join(this.formatSeparator)}return u.reduce((p,g)=>{const{formatName:m,formatOptions:v}=parseFormatStr(g);if(this.formats[m]){let y=p;try{const b=l?.formatParams?.[l.interpolationkey]||{},R=b.locale||b.lng||l.locale||l.lng||i;y=this.formats[m](p,R,{...v,...l,...b})}catch(b){this.logger.warn(b)}return y}else this.logger.warn(`there was no format function for ${m}`);return p},n)}}const removePending=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class Connector extends EventEmitter{constructor(n,r,i,l={}){super(),this.backend=n,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=l,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,l.backend,l)}queueLoad(n,r,i,l){const u={},f={},p={},g={};return n.forEach(m=>{let v=!0;r.forEach(y=>{const b=`${m}|${y}`;!i.reload&&this.store.hasResourceBundle(m,y)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?f[b]===void 0&&(f[b]=!0):(this.state[b]=1,v=!1,f[b]===void 0&&(f[b]=!0),u[b]===void 0&&(u[b]=!0),g[y]===void 0&&(g[y]=!0)))}),v||(p[m]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}loaded(n,r,i){const l=n.split("|"),u=l[0],f=l[1];r&&this.emit("failedLoading",u,f,r),!r&&i&&this.store.addResourceBundle(u,f,i,void 0,void 0,{skipCopy:!0}),this.state[n]=r?-1:2,r&&i&&(this.state[n]=0);const p={};this.queue.forEach(g=>{pushPath(g.loaded,[u],f),removePending(g,n),r&&g.errors.push(r),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(m=>{p[m]||(p[m]={});const v=g.loaded[m];v.length&&v.forEach(y=>{p[m][y]===void 0&&(p[m][y]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(g=>!g.done)}read(n,r,i,l=0,u=this.retryTimeout,f){if(!n.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:r,fcName:i,tried:l,wait:u,callback:f});return}this.readingCalls++;const p=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&v&&l{this.read.call(this,n,r,i,l+1,u*2,f)},u);return}f(m,v)},g=this.backend[i].bind(this.backend);if(g.length===2){try{const m=g(n,r);m&&typeof m.then=="function"?m.then(v=>p(null,v)).catch(p):p(null,m)}catch(m){p(m)}return}return g(n,r,p)}prepareLoading(n,r,i={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();isString$1(n)&&(n=this.languageUtils.toResolveHierarchy(n)),isString$1(r)&&(r=[r]);const u=this.queueLoad(n,r,i,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(f=>{this.loadOne(f)})}load(n,r,i){this.prepareLoading(n,r,{},i)}reload(n,r,i){this.prepareLoading(n,r,{reload:!0},i)}loadOne(n,r=""){const i=n.split("|"),l=i[0],u=i[1];this.read(l,u,"read",void 0,void 0,(f,p)=>{f&&this.logger.warn(`${r}loading namespace ${u} for language ${l} failed`,f),!f&&p&&this.logger.log(`${r}loaded namespace ${u} for language ${l}`,p),this.loaded(n,f,p)})}saveMissing(n,r,i,l,u,f={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${i}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const g={...f,isUpdate:u},m=this.backend.create.bind(this.backend);if(m.length<6)try{let v;m.length===5?v=m(n,r,i,l,g):v=m(n,r,i,l),v&&typeof v.then=="function"?v.then(y=>p(null,y)).catch(p):p(null,v)}catch(v){p(v)}else m(n,r,i,l,p,g)}!n||!n[0]||this.store.addResource(n[0],r,i,l)}}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if(typeof e[1]=="object"&&(n=e[1]),isString$1(e[1])&&(n.defaultValue=e[1]),isString$1(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=e=>(isString$1(e.ns)&&(e.ns=[e.ns]),isString$1(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),isString$1(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),noop=()=>{},bindMemberFunctions=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class I18n extends EventEmitter{constructor(n={},r){if(super(),this.options=transformOptions(n),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),r&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,r),this;setTimeout(()=>{this.init(n,r)},0)}}init(n={},r){this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(isString$1(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=get();this.options={...i,...this.options,...transformOptions(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const l=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(l(this.modules.logger),this.options):baseLogger.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=Formatter;const v=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const y=this.services;y.logger=baseLogger,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new PluralResolver(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(y.formatter=l(m),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new Interpolator(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new Connector(l(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(R,...E)=>{this.emit(R,...E)}),this.modules.languageDetector&&(y.languageDetector=l(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=l(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(R,...E)=>{this.emit(R,...E)}),this.modules.external.forEach(R=>{R.init&&R.init(this)})}if(this.format=this.options.interpolation.format,r||(r=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const p=defer(),g=()=>{const m=(v,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),p.resolve(y),r(v,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),p}loadResources(n,r=noop){let i=r;const l=isString$1(n)?n:this.language;if(typeof n=="function"&&(i=n),!this.options.resources||this.options.partialBundledLanguages){if(l?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const u=[],f=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(m=>{m!=="cimode"&&u.indexOf(m)<0&&u.push(m)})};l?f(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(p=>f(p)),this.services.backendConnector.load(u,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(p)})}else i(null)}reloadResources(n,r,i){const l=defer();return typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=void 0),n||(n=this.languages),r||(r=this.options.ns),i||(i=noop),this.services.backendConnector.reload(n,r,u=>{l.resolve(),i(u)}),l}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&postProcessor.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,r){this.isLanguageChangingTo=n;const i=defer();this.emit("languageChanging",n);const l=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},u=(p,g)=>{g?this.isLanguageChangingTo===n&&(l(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),r&&r(p,(...m)=>this.t(...m))},f=p=>{!n&&!p&&this.services.languageDetector&&(p=[]);const g=isString$1(p)?p:p&&p[0],m=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(isString$1(p)?[p]:p);m&&(this.language||l(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,v=>{u(v,m)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(n),i}getFixedT(n,r,i){const l=(u,f,...p)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([u,f].concat(p)):g={...f},g.lng=g.lng||l.lng,g.lngs=g.lngs||l.lngs,g.ns=g.ns||l.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||i||l.keyPrefix);const m=this.options.keySeparator||".";let v;return g.keyPrefix&&Array.isArray(u)?v=u.map(y=>(typeof y=="function"&&(y=keysFromSelector(y,{...this.options,...f})),`${g.keyPrefix}${m}${y}`)):(typeof u=="function"&&(u=keysFromSelector(u,{...this.options,...f})),v=g.keyPrefix?`${g.keyPrefix}${m}${u}`:u),this.t(v,g)};return isString$1(n)?l.lng=n:l.lngs=n,l.ns=r,l.keyPrefix=i,l}t(...n){return this.translator?.translate(...n)}exists(...n){return this.translator?.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const f=(p,g)=>{const m=this.services.backendConnector.state[`${p}|${g}`];return m===-1||m===0||m===2};if(r.precheck){const p=r.precheck(this,f);if(p!==void 0)return p}return!!(this.hasResourceBundle(i,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(i,n)&&(!l||f(u,n)))}loadNamespaces(n,r){const i=defer();return this.options.ns?(isString$1(n)&&(n=[n]),n.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{i.resolve(),r&&r(l)}),i):(r&&r(),Promise.resolve())}loadLanguages(n,r){const i=defer();isString$1(n)&&(n=[n]);const l=this.options.preload||[],u=n.filter(f=>l.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return u.length?(this.options.preload=l.concat(u),this.loadResources(f=>{i.resolve(),r&&r(f)}),i):(r&&r(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!n)return"rtl";try{const l=new Intl.Locale(n);if(l&&l.getTextInfo){const u=l.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new LanguageUtil(get());return n.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(i.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},r){const i=new I18n(n,r);return i.createInstance=I18n.createInstance,i}cloneInstance(n={},r=noop){const i=n.forkResourceStore;i&&delete n.forkResourceStore;const l={...this.options,...n,isClone:!0},u=new I18n(l);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(p=>{u[p]=this[p]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},i){const p=Object.keys(this.store.data).reduce((g,m)=>(g[m]={...this.store.data[m]},g[m]=Object.keys(g[m]).reduce((v,y)=>(v[y]={...g[m][y]},v),g[m]),g),{});u.store=new ResourceStore(p,l),u.services.resourceStore=u.store}return u.translator=new Translator(u.services,l),u.translator.on("*",(p,...g)=>{u.emit(p,...g)}),u.init(l,r),u.translator.options=l,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance;instance.dir;instance.init;instance.loadResources;instance.reloadResources;instance.use;instance.changeLanguage;instance.getFixedT;instance.t;instance.exists;instance.setDefaultNamespace;instance.hasLoadedNamespace;instance.loadNamespaces;instance.loadLanguages;const warn=(e,n,r,i)=>{const l=[r,{code:n,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);isString(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...l):console?.warn&&console.warn(...l)},alreadyWarned={},warnOnce=(e,n,r,i)=>{isString(r)&&alreadyWarned[r]||(isString(r)&&(alreadyWarned[r]=new Date),warn(e,n,r,i))},loadedClb=(e,n)=>()=>{if(e.isInitialized)n();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),n()};e.on("initialized",r)}},loadNamespaces=(e,n,r)=>{e.loadNamespaces(n,loadedClb(e,r))},loadLanguages=(e,n,r,i)=>{if(isString(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(n)>-1)return loadNamespaces(e,r,i);r.forEach(l=>{e.options.ns.indexOf(l)<0&&e.options.ns.push(l)}),e.loadLanguages(n,loadedClb(e,i))},hasLoadedNamespace=(e,n,r={})=>!n.languages||!n.languages.length?(warnOnce(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,l)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!l(i.isLanguageChangingTo,e))return!1}}),isString=e=>typeof e=="string",isObject=e=>typeof e=="object"&&e!==null,matchHtmlEntity=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,htmlEntities={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},unescapeHtmlEntity=e=>htmlEntities[e],unescape$1=e=>e.replace(matchHtmlEntity,unescapeHtmlEntity);let defaultOptions={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:unescape$1};const setDefaults=(e={})=>{defaultOptions={...defaultOptions,...e}},getDefaults$2=()=>defaultOptions;let i18nInstance;const setI18n=e=>{i18nInstance=e},getI18n=()=>i18nInstance,initReactI18next={type:"3rdParty",init(e){setDefaults(e.options.react),setI18n(e)}},I18nContext=reactExports.createContext();class ReportNamespaces{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var shimExports=requireShim();const notReadyT=(e,n)=>isString(n)?n:isObject(n)&&isString(n.defaultValue)?n.defaultValue:Array.isArray(e)?e[e.length-1]:e,notReadySnapshot={t:notReadyT,ready:!1},dummySubscribe=()=>()=>{},useTranslation=(e,n={})=>{const{i18n:r}=n,{i18n:i,defaultNS:l}=reactExports.useContext(I18nContext)||{},u=r||i||getI18n();u&&!u.reportNamespaces&&(u.reportNamespaces=new ReportNamespaces),u||warnOnce(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const f=reactExports.useMemo(()=>({...getDefaults$2(),...u?.options?.react,...n}),[u,n]),{useSuspense:p,keyPrefix:g}=f,m=e||l||u?.options?.defaultNS,v=isString(m)?[m]:m||["translation"],y=reactExports.useMemo(()=>v,v);u?.reportNamespaces?.addUsedNamespaces?.(y);const b=reactExports.useRef(0),R=reactExports.useCallback(ne=>{if(!u)return dummySubscribe;const{bindI18n:oe,bindI18nStore:se}=f,ce=()=>{b.current+=1,ne()};return oe&&u.on(oe,ce),se&&u.store.on(se,ce),()=>{oe&&oe.split(" ").forEach(le=>u.off(le,ce)),se&&se.split(" ").forEach(le=>u.store.off(le,ce))}},[u,f]),E=reactExports.useRef(),A=reactExports.useCallback(()=>{if(!u)return notReadySnapshot;const ne=!!(u.isInitialized||u.initializedStoreOnce)&&y.every(ge=>hasLoadedNamespace(ge,u,f)),oe=n.lng||u.language,se=b.current,ce=E.current;if(ce&&ce.ready===ne&&ce.lng===oe&&ce.keyPrefix===g&&ce.revision===se)return ce;const fe={t:u.getFixedT(oe,f.nsMode==="fallback"?y:y[0],g),ready:ne,lng:oe,keyPrefix:g,revision:se};return E.current=fe,fe},[u,y,g,f,n.lng]),[O,$]=reactExports.useState(0),{t:q,ready:Z}=shimExports.useSyncExternalStore(R,A,A);reactExports.useEffect(()=>{if(u&&!Z&&!p){const ne=()=>$(oe=>oe+1);n.lng?loadLanguages(u,n.lng,y,ne):loadNamespaces(u,y,ne)}},[u,n.lng,y,Z,p,O]);const V=u||{},re=reactExports.useRef(null),J=reactExports.useRef(),F=ne=>{const oe=Object.getOwnPropertyDescriptors(ne);oe.__original&&delete oe.__original;const se=Object.create(Object.getPrototypeOf(ne),oe);if(!Object.prototype.hasOwnProperty.call(se,"__original"))try{Object.defineProperty(se,"__original",{value:ne,writable:!1,enumerable:!1,configurable:!1})}catch{}return se},te=reactExports.useMemo(()=>{const ne=V,oe=ne?.language;let se=ne;ne&&(re.current&&re.current.__original===ne?J.current!==oe?(se=F(ne),re.current=se,J.current=oe):se=re.current:(se=F(ne),re.current=se,J.current=oe));const ce=[q,se,Z];return ce.t=q,ce.i18n=se,ce.ready=Z,ce},[q,V,Z,V.resolvedLanguage,V.language,V.languages]);if(u&&p&&!Z)throw new Promise(ne=>{const oe=()=>ne();n.lng?loadLanguages(u,n.lng,y,oe):loadNamespaces(u,y,oe)});return te},LanguageContext=reactExports.createContext(null);function LanguageProvider({children:e,supportedLanguages:n=["en-US","zh-CN"],defaultLanguage:r="en-US"}){const{i18n:i}=useTranslation(),[l,u]=reactExports.useState(r),[f,p]=reactExports.useState(!1),g=async m=>{p(!0);try{await i.changeLanguage(m),u(m)}catch(v){console.error("Failed to change language:",v)}finally{p(!1)}};return reactExports.useEffect(()=>{const m=()=>{const y=i.language;y&&n.includes(y)&&(u(y),document.documentElement.lang=y)},v=y=>{const b=y;u(b),document.documentElement.lang=b};if(i.on("languageChanged",v),i.isInitialized)m();else{const y=()=>{m()};return i.on("initialized",y),()=>{i.off("languageChanged",v),i.off("initialized",y)}}return()=>{i.off("languageChanged",v)}},[i,n]),jsxRuntimeExports.jsx(LanguageContext.Provider,{value:{language:l,changeLanguage:g,isLoading:f,supportedLanguages:n},children:e})}function useLanguage(){const e=reactExports.useContext(LanguageContext);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e}const DEFAULT_THEME="system",THEME_COOKIE_NAME="theme",THEME_COOKIE_MAX_AGE=3600*24*365,initialState={defaultTheme:DEFAULT_THEME,resolvedTheme:"light",theme:DEFAULT_THEME,setTheme:()=>null,resetTheme:()=>null},ThemeContext=reactExports.createContext(initialState);function ThemeProvider({children:e,defaultTheme:n=DEFAULT_THEME,storageKey:r=THEME_COOKIE_NAME,...i}){const[l,u]=reactExports.useState(()=>getCookie(r)||n),f=reactExports.useMemo(()=>l==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":l,[l]);reactExports.useEffect(()=>{const v=window.document.documentElement,y=window.matchMedia("(prefers-color-scheme: dark)"),b=E=>{v.classList.remove("light","dark"),v.classList.add(E)},R=()=>{if(l==="system"){const E=y.matches?"dark":"light";b(E)}};return b(f),y.addEventListener("change",R),()=>y.removeEventListener("change",R)},[l,f]);const m={defaultTheme:n,resolvedTheme:f,resetTheme:()=>{removeCookie(r),u(DEFAULT_THEME)},theme:l,setTheme:v=>{setCookie(r,v,THEME_COOKIE_MAX_AGE),u(v)}};return jsxRuntimeExports.jsx(ThemeContext,{value:m,...i,children:e})}const useTheme=()=>{const e=reactExports.useContext(ThemeContext);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},{slice,forEach}=[];function defaults(e){return forEach.call(slice.call(arguments,1),n=>{if(n)for(const r in n)e[r]===void 0&&(e[r]=n[r])}),e}function hasXSS(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(e))}const fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,serializeCookie=function(e,n){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},l=encodeURIComponent(n);let u=`${e}=${l}`;if(i.maxAge>0){const f=i.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");u+=`; Max-Age=${Math.floor(f)}`}if(i.domain){if(!fieldContentRegExp.test(i.domain))throw new TypeError("option domain is invalid");u+=`; Domain=${i.domain}`}if(i.path){if(!fieldContentRegExp.test(i.path))throw new TypeError("option path is invalid");u+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");u+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(u+="; HttpOnly"),i.secure&&(u+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(u+="; Partitioned"),u},cookie={create(e,n,r,i){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+r*60*1e3)),i&&(l.domain=i),document.cookie=serializeCookie(e,n,l)},read(e){const n=`${e}=`,r=document.cookie.split(";");for(let i=0;i-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let f=0;f0&&u[f].substring(0,p)===n&&(r=u[f].substring(p+1))}}return r}},hash={name:"hash",lookup(e){let{lookupHash:n,lookupFromHashIndex:r}=e,i;if(typeof window<"u"){const{hash:l}=window.location;if(l&&l.length>2){const u=l.substring(1);if(n){const f=u.split("&");for(let p=0;p0&&f[p].substring(0,g)===n&&(i=f[p].substring(g+1))}}if(i)return i;if(!i&&r>-1){const f=l.match(/\/([a-zA-Z-]*)/g);return Array.isArray(f)?f[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return i}};let hasLocalStorageSupport=null;const localStorageAvailable=()=>{if(hasLocalStorageSupport!==null)return hasLocalStorageSupport;try{if(hasLocalStorageSupport=typeof window<"u"&&window.localStorage!==null,!hasLocalStorageSupport)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{hasLocalStorageSupport=!1}return hasLocalStorageSupport};var localStorage$1={name:"localStorage",lookup(e){let{lookupLocalStorage:n}=e;if(n&&localStorageAvailable())return window.localStorage.getItem(n)||void 0},cacheUserLanguage(e,n){let{lookupLocalStorage:r}=n;r&&localStorageAvailable()&&window.localStorage.setItem(r,e)}};let hasSessionStorageSupport=null;const sessionStorageAvailable=()=>{if(hasSessionStorageSupport!==null)return hasSessionStorageSupport;try{if(hasSessionStorageSupport=typeof window<"u"&&window.sessionStorage!==null,!hasSessionStorageSupport)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{hasSessionStorageSupport=!1}return hasSessionStorageSupport};var sessionStorage$1={name:"sessionStorage",lookup(e){let{lookupSessionStorage:n}=e;if(n&&sessionStorageAvailable())return window.sessionStorage.getItem(n)||void 0},cacheUserLanguage(e,n){let{lookupSessionStorage:r}=n;r&&sessionStorageAvailable()&&window.sessionStorage.setItem(r,e)}},navigator$1={name:"navigator",lookup(e){const n=[];if(typeof navigator<"u"){const{languages:r,userLanguage:i,language:l}=navigator;if(r)for(let u=0;u0?n:void 0}},htmlTag={name:"htmlTag",lookup(e){let{htmlTag:n}=e,r;const i=n||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(r=i.getAttribute("lang")),r}},path={name:"path",lookup(e){let{lookupFromPathIndex:n}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof n=="number"?n:0]?.replace("/",""):void 0}},subdomain={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:n}=e;const r=typeof n=="number"?n+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[r]}};let canCookies=!1;try{document.cookie,canCookies=!0}catch(e){}const order=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];canCookies||order.splice(1,1);const getDefaults$1=()=>({order,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Browser{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(n,r)}init(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=defaults(r,this.options||{},getDefaults$1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=l=>l.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(cookie$1),this.addDetector(querystring),this.addDetector(localStorage$1),this.addDetector(sessionStorage$1),this.addDetector(navigator$1),this.addDetector(htmlTag),this.addDetector(path),this.addDetector(subdomain),this.addDetector(hash)}addDetector(n){return this.detectors[n.name]=n,this}detect(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return n.forEach(i=>{if(this.detectors[i]){let l=this.detectors[i].lookup(this.options);l&&typeof l=="string"&&(l=[l]),l&&(r=r.concat(l))}}),r=r.filter(i=>i!=null&&!hasXSS(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(n,this.options)}))}}Browser.type="languageDetector";function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_typeof$2(e)}function hasXMLHttpRequest(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":_typeof$2(XMLHttpRequest))==="object"}function isPromise(e){return!!e&&typeof e.then=="function"}function makePromise(e){return isPromise(e)?e:Promise.resolve(e)}function ownKeys$1(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,i)}return r}function _objectSpread$1(e){for(var n=1;nimport("./browser-ponyfill-CwTwmYVy.js").then(e=>e.b),[],import.meta.url).then(function(e){fetchApi=e.default}).catch(function(){})}catch{}var addQueryString=function e(n,r){if(r&&_typeof$1(r)==="object"){var i="";for(var l in r)i+="&"+encodeURIComponent(l)+"="+encodeURIComponent(r[l]);if(!i)return n;n=n+(n.indexOf("?")!==-1?"&":"?")+i.slice(1)}return n},fetchIt=function e(n,r,i,l){var u=function(g){if(!g.ok)return i(g.statusText||"Error",{status:g.status});g.text().then(function(m){i(null,{status:g.status,data:m})}).catch(i)};if(l){var f=l(n,r);if(f instanceof Promise){f.then(u).catch(i);return}}typeof fetch=="function"?fetch(n,r).then(u).catch(i):fetchApi(n,r).then(u).catch(i)},omitFetchOptions=!1,requestWithFetch=function e(n,r,i,l){n.queryStringParams&&(r=addQueryString(r,n.queryStringParams));var u=_objectSpread$1({},typeof n.customHeaders=="function"?n.customHeaders():n.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(u["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),i&&(u["Content-Type"]="application/json");var f=typeof n.requestOptions=="function"?n.requestOptions(i):n.requestOptions,p=_objectSpread$1({method:i?"POST":"GET",body:i?n.stringify(i):void 0,headers:u},omitFetchOptions?{}:f),g=typeof n.alternateFetch=="function"&&n.alternateFetch.length>=1?n.alternateFetch:void 0;try{fetchIt(r,p,l,g)}catch(m){if(!f||Object.keys(f).length===0||!m.message||m.message.indexOf("not implemented")<0)return l(m);try{Object.keys(f).forEach(function(v){delete p[v]}),fetchIt(r,p,l,g),omitFetchOptions=!0}catch(v){l(v)}}},requestWithXmlHttpRequest=function e(n,r,i,l){i&&_typeof$1(i)==="object"&&(i=addQueryString("",i).slice(1)),n.queryStringParams&&(r=addQueryString(r,n.queryStringParams));try{var u=XmlHttpRequestApi?new XmlHttpRequestApi:new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");u.open(i?"POST":"GET",r,1),n.crossDomain||u.setRequestHeader("X-Requested-With","XMLHttpRequest"),u.withCredentials=!!n.withCredentials,i&&u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.overrideMimeType&&u.overrideMimeType("application/json");var f=n.customHeaders;if(f=typeof f=="function"?f():f,f)for(var p in f)u.setRequestHeader(p,f[p]);u.onreadystatechange=function(){u.readyState>3&&l(u.status>=400?u.statusText:null,{status:u.status,data:u.responseText})},u.send(i)}catch(g){console&&console.log(g)}},request=function e(n,r,i,l){if(typeof i=="function"&&(l=i,i=void 0),l=l||function(){},fetchApi&&r.indexOf("file:")!==0)return requestWithFetch(n,r,i,l);if(hasXMLHttpRequest()||typeof ActiveXObject=="function")return requestWithXmlHttpRequest(n,r,i,l);l(new Error("No fetch and no xhr implementation found!"))};function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_typeof(e)}function ownKeys(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,i)}return r}function _objectSpread(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_classCallCheck(this,e),this.services=n,this.options=r,this.allOptions=i,this.type="backend",this.init(n,r,i)}return _createClass(e,[{key:"init",value:function(r){var i=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=_objectSpread(_objectSpread(_objectSpread({},getDefaults()),this.options||{}),l),this.allOptions=u,this.services&&this.options.reloadInterval){var f=setInterval(function(){return i.reload()},this.options.reloadInterval);_typeof(f)==="object"&&typeof f.unref=="function"&&f.unref()}}},{key:"readMulti",value:function(r,i,l){this._readAny(r,r,i,i,l)}},{key:"read",value:function(r,i,l){this._readAny([r],r,[i],i,l)}},{key:"_readAny",value:function(r,i,l,u,f){var p=this,g=this.options.loadPath;typeof this.options.loadPath=="function"&&(g=this.options.loadPath(r,l)),g=makePromise(g),g.then(function(m){if(!m)return f(null,{});var v=p.services.interpolator.interpolate(m,{lng:r.join("+"),ns:l.join("+")});p.loadUrl(v,f,i,u)})}},{key:"loadUrl",value:function(r,i,l,u){var f=this,p=typeof l=="string"?[l]:l,g=typeof u=="string"?[u]:u,m=this.options.parseLoadPayload(p,g);this.options.request(this.options,r,m,function(v,y){if(y&&(y.status>=500&&y.status<600||!y.status))return i("failed loading "+r+"; status code: "+y.status,!0);if(y&&y.status>=400&&y.status<500)return i("failed loading "+r+"; status code: "+y.status,!1);if(!y&&v&&v.message){var b=v.message.toLowerCase(),R=["failed","fetch","network","load"].find(function(O){return b.indexOf(O)>-1});if(R)return i("failed loading "+r+": "+v.message,!0)}if(v)return i(v,!1);var E,A;try{typeof y.data=="string"?E=f.options.parse(y.data,l,u):E=y.data}catch{A="failed parsing "+r+" to json"}if(A)return i(A,!1);i(null,E)})}},{key:"create",value:function(r,i,l,u,f){var p=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var g=this.options.parsePayload(i,l,u),m=0,v=[],y=[];r.forEach(function(b){var R=p.options.addPath;typeof p.options.addPath=="function"&&(R=p.options.addPath(b,i));var E=p.services.interpolator.interpolate(R,{lng:b,ns:i});p.options.request(p.options,E,g,function(A,O){m+=1,v.push(A),y.push(O),m===r.length&&typeof f=="function"&&f(v,y)})})}}},{key:"reload",value:function(){var r=this,i=this.services,l=i.backendConnector,u=i.languageUtils,f=i.logger,p=l.language;if(!(p&&p.toLowerCase()==="cimode")){var g=[],m=function(y){var b=u.toResolveHierarchy(y);b.forEach(function(R){g.indexOf(R)<0&&g.push(R)})};m(p),this.allOptions.preload&&this.allOptions.preload.forEach(function(v){return m(v)}),g.forEach(function(v){r.allOptions.ns.forEach(function(y){l.read(v,y,"read",null,null,function(b,R){b&&f.warn("loading namespace ".concat(y," for language ").concat(v," failed"),b),!b&&R&&f.log("loaded namespace ".concat(y," for language ").concat(v),R),l.loaded("".concat(v,"|").concat(y),b,R)})})})}}}])})();Backend.type="backend";function initializeI18n(e){return instance.use(Backend).use(Browser).use(initReactI18next).init({fallbackLng:"en-US",supportedLngs:["en-US","zh-CN"],interpolation:{escapeValue:!1},backend:{loadPath:"./assets/locales/{{lng}}/{{ns}}.json",crossDomain:!1,withCredentials:!1,allowMultiLoading:!0},detection:{order:["localStorage","navigator","htmlTag"],lookupLocalStorage:"language",caches:["localStorage"]},defaultNS:"components",ns:[],react:{useSuspense:!0},...e}),window.i18n=instance,instance}const fallbackLng="en-US",supportedLngs=["en-US","zh-CN"],CDN_URL="https://cdn.jsdmirror.com",TUTORIAL_DOCUMENT="true",USER_EMAIL=void 0,USER_PASSWORD=void 0;function getPlatform(){if(typeof window>"u")return"unknown";const e=navigator.userAgent.toLowerCase();return e.includes("win")?"windows":e.includes("mac")?"macos":e.includes("linux")?"linux":e.includes("android")?"android":e.includes("iphone")||e.includes("ipad")?"ios":"unknown"}function setAuthorization(e){setCookie("Authorization",e)}function getRedirectUrl(){if(typeof window>"u")return"/dashboard";const n=new URLSearchParams(window.location.search).get("redirect");return n?.startsWith("/")?n:"/dashboard"}function setRedirectUrl(e){e&&sessionStorage.setItem("redirect-url",e)}function Logout(){if(!isBrowser())return;removeCookie("Authorization");const e=location.pathname,n=location.hash.slice(1);if(!(["","/","/auth","/tos","/privacy-policy"].includes(e)||e.startsWith("/purchasing")||e.startsWith("/oauth/"))){setRedirectUrl(e),location.href="/#/auth";return}n&&!(["","/","/auth","/tos","/privacy-policy"].includes(n)||n.startsWith("/purchasing")||n.startsWith("/oauth/"))&&(setRedirectUrl(n),location.href="/#/auth")}initializeI18n({supportedLngs,fallbackLng,ns:["auth","components","dashboard","document","layout","main","order","payment","profile","subscribe","ticket","wallet"]});window.logout=Logout;const TanStackQueryProviderContext=TanStackQueryContext(),hashHistory=createHashHistory(),router=createRouter({routeTree,history:hashHistory,context:{...TanStackQueryProviderContext},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),rootElement=document.getElementById("app");rootElement&&!rootElement.innerHTML&&ReactDOM.createRoot(rootElement).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(TanStackQueryProvider,{...TanStackQueryProviderContext,children:jsxRuntimeExports.jsx(LanguageProvider,{supportedLanguages:supportedLngs,children:jsxRuntimeExports.jsx(ThemeProvider,{children:jsxRuntimeExports.jsx(DirectionProvider,{children:jsxRuntimeExports.jsx(RouterProvider,{router})})})})})}));export{$ZodError as $,getTos as A,getPrivacyPolicy as B,getRouteApi as C,useRouterState as D,isBrowser as E,queryUserBalanceLog as F,updateUserPassword as G,updateUserNotify as H,boolean as I,updateBindEmail as J,unbindOAuth as K,Link as L,bindOAuth as M,updateBindMobile as N,Outlet as O,parse$1 as P,parseAsync$1 as Q,React as R,sendEmailCode as S,sendSmsCode as T,USER_PASSWORD as U,CDN_URL as V,TUTORIAL_DOCUMENT as W,shimExports as X,unsubscribe as Y,preUnsubscribe as Z,getPlatform as _,useGlobalStore as a,resetUserSubscribeToken as a0,queryUserSubscribe as a1,getClient as a2,getStat as a3,queryUserAffiliateList as a4,queryUserAffiliate as a5,reactDomExports as a6,ReactDOM$1 as a7,React$1 as a8,getAugmentedNamespace as a9,Subscribable as aa,pendingThenable as ab,resolveEnabled as ac,shallowEqualObjects as ad,resolveStaleTime as ae,noop$2 as af,isServer as ag,isValidTimeout as ah,timeUntilStale as ai,timeoutManager as aj,focusManager as ak,fetchState as al,replaceData as am,notifyManager as an,shouldThrowError as ao,useQueryClient as ap,commonjsGlobal as aq,useNavigate as b,Logout as c,createLazyFileRoute as d,request$1 as e,requireReact as f,getDefaultExportFromCjs as g,email as h,useSearch as i,jsxRuntimeExports as j,USER_EMAIL as k,setAuthorization as l,getRedirectUrl as m,createLucideIcon as n,object as o,useDirection as p,useLanguage as q,reactExports as r,string as s,toast as t,useTranslation as u,useTheme as v,useRouter as w,bindOAuthCallback as x,LoaderCircle as y,z};