"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1470],{83:function(t,e,r){var s=r(7294),n="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=s.useState,o=s.useEffect,a=s.useLayoutEffect,u=s.useDebugValue;function l(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!n(t,r)}catch(t){return!0}}var h="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),s=i({inst:{value:r,getSnapshot:e}}),n=s[0].inst,h=s[1];return a(function(){n.value=r,n.getSnapshot=e,l(n)&&h({inst:n})},[t,r,e]),o(function(){return l(n)&&h({inst:n}),t(function(){l(n)&&h({inst:n})})},[t]),u(r),r};e.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:h},1688:function(t,e,r){t.exports=r(83)},7837:function(t,e,r){let s;r.d(e,{a:function(){return x}});var n=r(2161),i=r(81),o=r(5761),a=r(3989),u=r(2379);class l extends a.l{constructor(t,e){super(),this.client=t,this.options=e,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),h(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,e){let r=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),(0,n.VS)(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let i=this.hasListeners();i&&p(this.currentQuery,s,this.options,r)&&this.executeFetch(),this.updateResult(e),i&&(this.currentQuery!==s||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(t){let e=this.client.getQueryCache().build(this.client,t),r=this.createResult(e,t);return t.keepPreviousData||(void 0!==t.placeholderData?!r.isPlaceholderData:(0,n.VS)(this.getCurrentResult(),r))||(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){let e={};return Object.keys(t).forEach(r=>{Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),e}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...e}={}){return this.fetch({...e,meta:{refetchPage:t}})}fetchOptimistic(t){let e=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,e);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,e))}fetch(t){var e;return this.executeFetch({...t,cancelRefetch:null==(e=t.cancelRefetch)||e}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let e=this.currentQuery.fetch(this.options,t);return null!=t&&t.throwOnError||(e=e.catch(n.ZT)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),n.sk||this.currentResult.isStale||!(0,n.PN)(this.options.staleTime))return;let t=(0,n.Kp)(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t+1)}computeRefetchInterval(){var t;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(t=this.options.refetchInterval)&&t}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!n.sk&&!1!==this.options.enabled&&(0,n.PN)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||o.j.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,e){let r;let s=this.currentQuery,i=this.options,o=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,c=t!==s,f=c?t.state:this.currentQueryInitialState,y=c?this.currentResult:this.previousQueryResult,{state:g}=t,{dataUpdatedAt:b,error:m,errorUpdatedAt:v,fetchStatus:R,status:S}=g,E=!1,w=!1;if(e._optimisticResults){let r=this.hasListeners(),n=!r&&h(t,e),o=r&&p(t,s,e,i);(n||o)&&(R=(0,u.Kw)(t.options.networkMode)?"fetching":"paused",b||(S="loading")),"isRestoring"===e._optimisticResults&&(R="idle")}if(e.keepPreviousData&&!g.dataUpdatedAt&&null!=y&&y.isSuccess&&"error"!==S)r=y.data,b=y.dataUpdatedAt,S=y.status,E=!0;else if(e.select&&void 0!==g.data){if(o&&g.data===(null==a?void 0:a.data)&&e.select===this.selectFn)r=this.selectResult;else try{this.selectFn=e.select,r=e.select(g.data),r=(0,n.oE)(null==o?void 0:o.data,r,e),this.selectResult=r,this.selectError=null}catch(t){this.selectError=t}}else r=g.data;if(void 0!==e.placeholderData&&void 0===r&&"loading"===S){let t;if(null!=o&&o.isPlaceholderData&&e.placeholderData===(null==l?void 0:l.placeholderData))t=o.data;else if(t="function"==typeof e.placeholderData?e.placeholderData():e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.selectError=null}catch(t){this.selectError=t}void 0!==t&&(S="success",r=(0,n.oE)(null==o?void 0:o.data,t,e),w=!0)}this.selectError&&(m=this.selectError,r=this.selectResult,v=Date.now(),S="error");let I="fetching"===R,T="loading"===S,C="error"===S;return{status:S,fetchStatus:R,isLoading:T,isSuccess:"success"===S,isError:C,isInitialLoading:T&&I,data:r,dataUpdatedAt:b,error:m,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:C&&0===g.dataUpdatedAt,isPaused:"paused"===R,isPlaceholderData:w,isPreviousData:E,isRefetchError:C&&0!==g.dataUpdatedAt,isStale:d(t,e),refetch:this.refetch,remove:this.remove}}updateResult(t){let e=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,n.VS)(r,e))return;this.currentResult=r;let s={cache:!0};(null==t?void 0:t.listeners)!==!1&&(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.trackedProps.size)return!0;let s=new Set(null!=r?r:this.trackedProps);return this.options.useErrorBoundary&&s.add("error"),Object.keys(this.currentResult).some(t=>this.currentResult[t]!==e[t]&&s.has(t))})()&&(s.listeners=!0),this.notify({...s,...t})}updateQuery(){let t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;let e=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){let e={};"success"===t.type?e.onSuccess=!t.manual:"error"!==t.type||(0,u.DV)(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){i.V.batch(()=>{var e,r,s,n,i,o,a,u;t.onSuccess?(null==(e=(r=this.options).onSuccess)||e.call(r,this.currentResult.data),null==(s=(n=this.options).onSettled)||s.call(n,this.currentResult.data,null)):t.onError&&(null==(i=(o=this.options).onError)||i.call(o,this.currentResult.error),null==(a=(u=this.options).onSettled)||a.call(u,void 0,this.currentResult.error)),t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function h(t,e){return!1!==e.enabled&&!t.state.dataUpdatedAt&&!("error"===t.state.status&&!1===e.retryOnMount)||t.state.dataUpdatedAt>0&&c(t,e,e.refetchOnMount)}function c(t,e,r){if(!1!==e.enabled){let s="function"==typeof r?r(t):r;return"always"===s||!1!==s&&d(t,e)}return!1}function p(t,e,r,s){return!1!==r.enabled&&(t!==e||!1===s.enabled)&&(!r.suspense||"error"!==t.state.status)&&d(t,r)}function d(t,e){return t.isStaleByTime(e.staleTime)}var f=r(7294);let y=r(1688).useSyncExternalStore,g=f.createContext((s=!1,{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s})),b=()=>f.useContext(g);var m=r(5945);let v=f.createContext(!1),R=()=>f.useContext(v);v.Provider;let S=(t,e)=>{(t.suspense||t.useErrorBoundary)&&!e.isReset()&&(t.retryOnMount=!1)},E=t=>{f.useEffect(()=>{t.clearReset()},[t])},w=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:s})=>{var n;return t.isError&&!e.isReset()&&!t.isFetching&&(n=[t.error,s],"function"==typeof r?r(...n):!!r)},I=t=>{t.suspense&&"number"!=typeof t.staleTime&&(t.staleTime=1e3)},T=(t,e)=>t.isLoading&&t.isFetching&&!e,C=(t,e,r)=>(null==t?void 0:t.suspense)&&T(e,r),O=(t,e,r)=>e.fetchOptimistic(t).then(({data:e})=>{null==t.onSuccess||t.onSuccess(e),null==t.onSettled||t.onSettled(e,null)}).catch(e=>{r.clearReset(),null==t.onError||t.onError(e),null==t.onSettled||t.onSettled(void 0,e)});function x(t,e,r){return function(t,e){let r=(0,m.NL)({context:t.context}),s=R(),n=b(),o=r.defaultQueryOptions(t);o._optimisticResults=s?"isRestoring":"optimistic",o.onError&&(o.onError=i.V.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=i.V.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=i.V.batchCalls(o.onSettled)),I(o),S(o,n),E(n);let[a]=f.useState(()=>new e(r,o)),u=a.getOptimisticResult(o);if(y(f.useCallback(t=>{let e=s?()=>void 0:a.subscribe(i.V.batchCalls(t));return a.updateResult(),e},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),f.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),C(o,u,s))throw O(o,a,n);if(w({result:u,errorResetBoundary:n,useErrorBoundary:o.useErrorBoundary,query:a.getCurrentQuery()}))throw u.error;return o.notifyOnChangeProps?u:a.trackResult(u)}((0,n._v)(t,e,r),l)}},3589:function(t,e,r){r.d(e,{Z:function(){return m}});let s=t=>[...new Set(t)],n=(t,e)=>t.filter(t=>!e.includes(t)),i=(t,e)=>t.filter(t=>e.includes(t)),o=t=>"bigint"==typeof t||!Number.isNaN(Number(t))&&Math.floor(Number(t))===t,a=t=>"bigint"==typeof t||t>=0&&Number.isSafeInteger(t);function u(t,e){let r;if(0===e.length)return t;let s=[...t];for(let t=s.length-1,n=0,i=0;t>0;t--,n++){n%=e.length,i+=r=e[n].codePointAt(0);let o=(r+n+i)%t,a=s[t],u=s[o];s[o]=a,s[t]=u}return s}let l=(t,e)=>{let r=[],s=t;if("bigint"==typeof s){let t=BigInt(e.length);do r.unshift(e[Number(s%t)]),s/=t;while(s>BigInt(0))}else do r.unshift(e[s%e.length]),s=Math.floor(s/e.length);while(s>0);return r},h=(t,e)=>t.reduce((r,s)=>{let n=e.indexOf(s);if(-1===n)throw Error(`The provided ID (${t.join("")}) is invalid, as it contains characters that do not exist in the alphabet (${e.join("")})`);if("bigint"==typeof r)return r*BigInt(e.length)+BigInt(n);let i=r*e.length+n;return Number.isSafeInteger(i)?i:(b("Unable to decode the provided string, due to lack of support for BigInt numbers in the current environment"),BigInt(r)*BigInt(e.length)+BigInt(n))},0),c=/^\+?\d+$/,p=t=>{if(!c.test(t))return Number.NaN;let e=Number.parseInt(t,10);return Number.isSafeInteger(e)?e:(b("Unable to encode the provided BigInt string without loss of information due to lack of support for BigInt type in the current environment"),BigInt(t))},d=(t,e,r)=>Array.from({length:Math.ceil(t.length/e)},(s,n)=>r(t.slice(n*e,(n+1)*e))),f=t=>new RegExp(t.map(t=>g(t)).sort((t,e)=>e.length-t.length).join("|")),y=t=>RegExp(`^[${t.map(t=>g(t)).sort((t,e)=>e.length-t.length).join("")}]+$`),g=t=>t.replace(/[\s#$()*+,.?[\\\]^{|}-]/g,"\\$&"),b=(t="BigInt is not available in this environment")=>{if("function"!=typeof BigInt)throw TypeError(t)};class m{constructor(t="",e=0,r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",o="cfhistuCFHISTU"){let a,l;if(this.minLength=e,"number"!=typeof e)throw TypeError(`Hashids: Provided 'minLength' has to be a number (is ${typeof e})`);if("string"!=typeof t)throw TypeError(`Hashids: Provided 'salt' has to be a string (is ${typeof t})`);if("string"!=typeof r)throw TypeError(`Hashids: Provided alphabet has to be a string (is ${typeof r})`);let h=Array.from(t),c=Array.from(r),p=Array.from(o);this.salt=h;let d=s(c);if(d.length<16)throw Error(`Hashids: alphabet must contain at least 16 unique characters, provided: ${d.join("")}`);this.alphabet=n(d,p);let g=i(p,d);this.seps=u(g,h),(0===this.seps.length||this.alphabet.length/this.seps.length>3.5)&&(a=Math.ceil(this.alphabet.length/3.5))>this.seps.length&&(l=a-this.seps.length,this.seps.push(...this.alphabet.slice(0,l)),this.alphabet=this.alphabet.slice(l)),this.alphabet=u(this.alphabet,h);let b=Math.ceil(this.alphabet.length/12);this.alphabet.length<3?(this.guards=this.seps.slice(0,b),this.seps=this.seps.slice(b)):(this.guards=this.alphabet.slice(0,b),this.alphabet=this.alphabet.slice(b)),this.guardsRegExp=f(this.guards),this.sepsRegExp=f(this.seps),this.allowedCharsRegExp=y([...this.alphabet,...this.guards,...this.seps])}encode(t,...e){let r=Array.isArray(t)?t:[...null!=t?[t]:[],...e];return 0===r.length?"":(r.every(o)||(r=r.map(t=>"bigint"==typeof t||"number"==typeof t?t:p(String(t)))),r.every(a))?this._encode(r).join(""):""}decode(t){return t&&"string"==typeof t&&0!==t.length?this._decode(t):[]}encodeHex(t){let e=t;switch(typeof e){case"bigint":e=e.toString(16);break;case"string":if(!/^[\dA-Fa-f]+$/.test(e))return"";break;default:throw Error(`Hashids: The provided value is neither a string, nor a BigInt (got: ${typeof e})`)}let r=d(e,12,t=>Number.parseInt(`1${t}`,16));return this.encode(r)}decodeHex(t){return this.decode(t).map(t=>t.toString(16).slice(1)).join("")}isValidId(t){return this.allowedCharsRegExp.test(t)}_encode(t){let{alphabet:e}=this,r=t.reduce((t,e,r)=>t+("bigint"==typeof e?Number(e%BigInt(r+100)):e%(r+100)),0),s=[e[r%e.length]],n=[...s],{seps:i}=this,{guards:o}=this;if(t.forEach((r,o)=>{let a=n.concat(this.salt,e),h=l(r,e=u(e,a));if(s.push(...h),o+10){let e=t/2;s=s.slice(e,e+this.minLength)}}return s}_decode(t){if(!this.isValidId(t))throw Error(`The provided ID (${t}) is invalid, as it contains characters that do not exist in the alphabet (${this.guards.join("")}${this.seps.join("")}${this.alphabet.join("")})`);let e=t.split(this.guardsRegExp),r=3===e.length||2===e.length?1:0,s=e[r];if(0===s.length)return[];let n=s[Symbol.iterator]().next().value,i=s.slice(n.length).split(this.sepsRegExp),o=this.alphabet,a=[];for(let t of i){let e=[n,...this.salt,...o],r=u(o,e.slice(0,o.length));a.push(h(Array.from(t),r)),o=r}return this._encode(a).join("")!==t?[]:a}}},5225:function(t,e,r){r.d(e,{Wg:function(){return _}});let s=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,n=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,i=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function o(t,e){if("__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`);return}return e}function a(t,e={}){if("string"!=typeof t)return t;if('"'===t[0]&&'"'===t[t.length-1]&&-1===t.indexOf("\\"))return t.slice(1,-1);let r=t.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!i.test(t)){if(e.strict)throw SyntaxError("[destr] Invalid JSON");return t}try{if(s.test(t)||n.test(t)){if(e.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(t,o)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}let u=/#/g,l=/&/g,h=/\//g,c=/=/g,p=/\+/g,d=/%5e/gi,f=/%60/gi,y=/%7c/gi,g=/%20/gi;function b(t){return encodeURI(""+("string"==typeof t?t:JSON.stringify(t))).replace(y,"|").replace(p,"%2B").replace(g,"+").replace(u,"%23").replace(l,"%26").replace(f,"`").replace(d,"^").replace(h,"%2F")}function m(t){return b(t).replace(c,"%3D")}function v(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}let R=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,S=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,E=/^([/\\]\s*){2,}[^/\\]/,w=/^\.?\//;function I(t,e={}){return("boolean"==typeof e&&(e={acceptRelative:e}),e.strict)?R.test(t):S.test(t)||!!e.acceptRelative&&E.test(t)}let T=Symbol.for("ufo:protocolRelative");function C(t=""){let[e="",r="",s=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:r,hash:s}}class O extends Error{constructor(t,e){super(t,e),this.name="FetchError",e?.cause&&!this.cause&&(this.cause=e.cause)}}let x=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Q(t="GET"){return x.has(t.toUpperCase())}let A=new Set(["image/svg","application/xml","application/xhtml","application/html"]),N=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;async function j(t,e){if(e){if(Array.isArray(e))for(let r of e)await r(t);else await e(t)}}let $=new Set([408,409,425,429,500,502,503,504]),q=new Set([101,204,205,304]),F=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}(),_=function t(e={}){let{fetch:r=globalThis.fetch,Headers:s=globalThis.Headers,AbortController:n=globalThis.AbortController}=e;async function i(t){let e=t.error&&"AbortError"===t.error.name&&!t.options.timeout||!1;if(!1!==t.options.retry&&!e){let e;e="number"==typeof t.options.retry?t.options.retry:Q(t.options.method)?0:1;let r=t.response&&t.response.status||500;if(e>0&&(Array.isArray(t.options.retryStatusCodes)?t.options.retryStatusCodes.includes(r):$.has(r))){let r="function"==typeof t.options.retryDelay?t.options.retryDelay(t):t.options.retryDelay||0;return r>0&&await new Promise(t=>setTimeout(t,r)),o(t.request,{...t.options,retry:e-1})}}let r=function(t){let e=t.error?.message||t.error?.toString()||"",r=t.request?.method||t.options?.method||"GET",s=t.request?.url||String(t.request)||"/",n=`[${r}] ${JSON.stringify(s)}`,i=t.response?`${t.response.status} ${t.response.statusText}`:"",o=new O(`${n}: ${i}${e?` ${e}`:""}`,t.error?{cause:t.error}:void 0);for(let e of["request","options","response"])Object.defineProperty(o,e,{get:()=>t[e]});for(let[e,r]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(o,e,{get:()=>t.response&&t.response[r]});return o}(t);throw Error.captureStackTrace&&Error.captureStackTrace(r,o),r}let o=async function(t,o={}){let u;let l={request:t,options:function(t,e,r,s){let n;let i=function(t,e,r){if(!e)return new r(t);let s=new r(e);if(t)for(let[e,n]of Symbol.iterator in t||Array.isArray(t)?t:new r(t))s.set(e,n);return s}(e?.headers??t?.headers,r?.headers,s);return(r?.query||r?.params||e?.params||e?.query)&&(n={...r?.params,...r?.query,...e?.params,...e?.query}),{...r,...e,query:n,params:n,headers:i}}(t,o,e.defaults,s),response:void 0,error:void 0};if(l.options.method&&(l.options.method=l.options.method.toUpperCase()),l.options.onRequest&&await j(l,l.options.onRequest),"string"==typeof l.request&&(l.options.baseURL&&(l.request=function(t,e){if(!e||"/"===e||I(t))return t;let r=function(t="",e){return(!function(t="",e){return t.endsWith("/")}(t)?t:t.slice(0,-1))||"/"}(e);return t.startsWith(r)?t:function(t,...e){let r=t||"";for(let t of e.filter(t=>t&&"/"!==t))if(r){let e=t.replace(w,"");r=function(t="",e){return t.endsWith("/")?t:t+"/"}(r)+e}else r=t;return r}(r,t)}(l.request,l.options.baseURL)),l.options.query&&(l.request=function(t,e){let r=function t(e="",r){let s=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(s){let[,t,e=""]=s;return{protocol:t.toLowerCase(),pathname:e,href:t+e,auth:"",host:"",search:"",hash:""}}if(!I(e,{acceptRelative:!0}))return r?t(r+e):C(e);let[,n="",i,o=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",u=""]=o.match(/([^#/?]*)(.*)?/)||[];"file:"===n&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:l,search:h,hash:c}=C(u);return{protocol:n.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:a,pathname:l,search:h,hash:c,[T]:!n}}(t),s={...function(t=""){let e=Object.create(null);for(let r of("?"===t[0]&&(t=t.slice(1)),t.split("&"))){let t=r.match(/([^=]+)=?(.*)/)||[];if(t.length<2)continue;let s=v(t[1].replace(p," "));if("__proto__"===s||"constructor"===s)continue;let n=v((t[2]||"").replace(p," "));void 0===e[s]?e[s]=n:Array.isArray(e[s])?e[s].push(n):e[s]=[e[s],n]}return e}(r.search),...e};return r.search=Object.keys(s).filter(t=>void 0!==s[t]).map(t=>{var e;return(("number"==typeof(e=s[t])||"boolean"==typeof e)&&(e=String(e)),e)?Array.isArray(e)?e.map(e=>`${m(t)}=${b(e)}`).join("&"):`${m(t)}=${b(e)}`:m(t)}).filter(Boolean).join("&"),function(t){let e=t.pathname||"",r=t.search?(t.search.startsWith("?")?"":"?")+t.search:"",s=t.hash||"",n=t.auth?t.auth+"@":"",i=t.host||"";return(t.protocol||t[T]?(t.protocol||"")+"//":"")+n+i+e+r+s}(r)}(l.request,l.options.query),delete l.options.query),"query"in l.options&&delete l.options.query,"params"in l.options&&delete l.options.params),l.options.body&&Q(l.options.method)&&(function(t){if(void 0===t)return!1;let e=typeof t;return"string"===e||"number"===e||"boolean"===e||null===e||"object"===e&&(!!Array.isArray(t)||!t.buffer&&(t.constructor&&"Object"===t.constructor.name||"function"==typeof t.toJSON))}(l.options.body)?(l.options.body="string"==typeof l.options.body?l.options.body:JSON.stringify(l.options.body),l.options.headers=new s(l.options.headers||{}),l.options.headers.has("content-type")||l.options.headers.set("content-type","application/json"),l.options.headers.has("accept")||l.options.headers.set("accept","application/json")):("pipeTo"in l.options.body&&"function"==typeof l.options.body.pipeTo||"function"==typeof l.options.body.pipe)&&!("duplex"in l.options)&&(l.options.duplex="half")),!l.options.signal&&l.options.timeout){let t=new n;u=setTimeout(()=>{let e=Error("[TimeoutError]: The operation was aborted due to timeout");e.name="TimeoutError",e.code=23,t.abort(e)},l.options.timeout),l.options.signal=t.signal}try{l.response=await r(l.request,l.options)}catch(t){return l.error=t,l.options.onRequestError&&await j(l,l.options.onRequestError),await i(l)}finally{u&&clearTimeout(u)}if((l.response.body||l.response._bodyInit)&&!q.has(l.response.status)&&"HEAD"!==l.options.method){let t=(l.options.parseResponse?"json":l.options.responseType)||function(t=""){if(!t)return"json";let e=t.split(";").shift()||"";return N.test(e)?"json":A.has(e)||e.startsWith("text/")?"text":"blob"}(l.response.headers.get("content-type")||"");switch(t){case"json":{let t=await l.response.text(),e=l.options.parseResponse||a;l.response._data=e(t);break}case"stream":l.response._data=l.response.body||l.response._bodyInit;break;default:l.response._data=await l.response[t]()}}return(l.options.onResponse&&await j(l,l.options.onResponse),!l.options.ignoreResponseError&&l.response.status>=400&&l.response.status<600)?(l.options.onResponseError&&await j(l,l.options.onResponseError),await i(l)):l.response},u=async function(t,e){return(await o(t,e))._data};return u.raw=o,u.native=(...t)=>r(...t),u.create=(r={},s={})=>t({...e,...s,defaults:{...e.defaults,...s.defaults,...r}}),u}({fetch:F.fetch?(...t)=>F.fetch(...t):()=>Promise.reject(Error("[ofetch] global.fetch is not supported!")),Headers:F.Headers,AbortController:F.AbortController})}}]);