@swirls/looms 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/actor/cell.d.ts +5 -1
- package/dist/actor/cell.js +2 -0
- package/dist/actor/host.d.ts +5 -1
- package/dist/actor/host.js +2 -0
- package/dist/agent/effects.d.ts +266 -266
- package/dist/approval/effects.d.ts +26 -26
- package/dist/approval/module.d.ts +52 -52
- package/dist/client/client.d.ts +1 -0
- package/dist/client/client.js +10 -4
- package/dist/cloudflare/durable-object.d.ts +5 -1
- package/dist/cloudflare/durable-object.js +2 -0
- package/dist/cloudflare/queue-consumer.js +11 -3
- package/dist/core/effects.d.ts +1 -1
- package/dist/core/module.d.ts +1 -0
- package/dist/core/run-context.d.ts +6 -2
- package/dist/core/sqlite-store.js +6 -0
- package/dist/core/store.js +5 -0
- package/dist/core/worker-callback.d.ts +5 -2
- package/dist/debugger/app/assets/{index-Br9tGbPI.js → index-BjZn1DuJ.js} +2 -2
- package/dist/debugger/app/assets/{routes-CZ0buqO7.js → routes-B90xnBF1.js} +2 -2
- package/dist/debugger/app/index.html +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/react.d.ts +33 -0
- package/dist/react/react.js +51 -0
- package/dist/runtime/effect-admission.d.ts +8 -3
- package/dist/runtime/effect-admission.js +23 -4
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/local-effect-executor.d.ts +8 -2
- package/dist/runtime/local-effect-executor.js +21 -8
- package/dist/runtime/looms.d.ts +6 -0
- package/dist/runtime/looms.js +2 -0
- package/dist/runtime/observer.d.ts +15 -0
- package/dist/runtime/run-secrets.d.ts +132 -0
- package/dist/runtime/run-secrets.js +154 -0
- package/dist/runtime/runtime.js +27 -25
- package/dist/runtime/secret-sealer.d.ts +24 -0
- package/dist/runtime/secret-sealer.js +120 -0
- package/dist/runtime/server/routes/runs.js +2 -1
- package/dist/runtime/types.d.ts +20 -7
- package/dist/runtime/wake-engine.d.ts +2 -0
- package/dist/runtime/wake-engine.js +23 -9
- package/dist/runtime/worker-callbacks.d.ts +4 -2
- package/dist/runtime/worker-callbacks.js +15 -2
- package/dist/runtime/worker-effect-dispatch.d.ts +1 -2
- package/dist/runtime/worker-effect-dispatch.js +0 -1
- package/dist/schedule/module.d.ts +36 -36
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-B90xnBF1.js","./rolldown-runtime-CbXtAM7H.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{n as e,t}from"./rolldown-runtime-CbXtAM7H.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function ee(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ae(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var oe=/\/+/g;function se(e,t){return typeof e==`object`&&e&&e.key!=null?ae(``+e.key):t.toString(36)}function ce(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ee,ee):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function le(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,le(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+se(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(oe,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(oe,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+se(a,u),c+=le(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+se(a,u++),c+=le(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return le(ce(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function w(e,t,n){if(e==null)return e;var r=[],i=0;return le(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function T(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ue=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},de={map:w,forEach:function(e,t,n){w(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return w(e,function(){t++}),t},toArray:function(e){return w(e,function(e){return e})||[]},only:function(e){if(!ie(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=de,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!te.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ne(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)te.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ne(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ie,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ee,ue)}catch(e){ue(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.8`})),r=t(((e,t)=>{t.exports=n()})),i=e(r(),1),a=i.use,o=i.useLayoutEffect;function s(e,t,n){i.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function c(e){let t=i.useRef(null);return i.useImperativeHandle(e,()=>t.current,[]),t}function l(e){return e[e.length-1]}function u(e,t){return typeof e==`function`?e(t):e}var d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;function p(e){for(let t in e)if(d.call(e,t))return!0;return!1}var m=()=>Object.create(null),h=(e,t)=>g(e,t,m);function g(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=b(e)&&b(i);if(!a&&!(v(e)&&v(i)))return i;let o=a?e:_(e);if(!o)return i;let s=a?i:_(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),f=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],p=i[o];if(l===p){u[o]=l,(a?t<c:d.call(e,o))&&f++;continue}if(l===null||p===null||typeof l!=`object`||typeof p!=`object`){u[o]=p;continue}let m=g(l,p,n,r+1);u[o]=m,m===l&&f++}return c===l&&f===c?e:u}function _(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!f.call(e,r))return!1;t.push(r)}return t}function v(e){if(!y(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!y(n)||!n.hasOwnProperty(`isPrototypeOf`))}function y(e){return Object.prototype.toString.call(e)===`[object Object]`}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function x(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!x(e[r],t[r],n))return!1;return!0}if(v(e)&&v(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!x(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!x(e[o],t[o],n)))return!1;return i===a}return!1}function S(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var ee=/[\x00-\x1f\x7f"<>`{}]/g;function C(e){return e.replace(ee,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function te(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return C(t)}var ne=[`http:`,`https:`,`mailto:`,`tel:`];function re(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ie(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=te(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=te(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ae(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function oe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function se(){throw Error(`Invariant failed`)}function ce(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var le=4,w=5;function T(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function ue(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=T(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=fe(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=pe(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=fe(r);e.kind=w,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=fe(r);e.kind=le,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)ue(e,t,r,c,i,a,o,s)}function de(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function fe(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function pe(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function me(e,t){let n=fe(`/`),r=new Uint16Array(6),i=[];for(let t of e)ue(!1,r,t,1,n,0,i);for(let e of i)e.sort(de);t.masksTree=n,t.flatCache=ce(1e3)}function E(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=ye(e,t.masksTree);return t.flatCache.set(e,r),r}function he(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=fe(`/`),ue(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ye(r,o,n)}function ge(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ye(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=xe(a.route)),t.matchCache.set(r,a),a}function _e(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ve(e,t=!1,n){let r=fe(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;ue(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&se(),o[e.id]=e,c!==0&&e.path){let t=_e(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(de);return{processedTree:{segmentTree:r,singleCache:ce(1e3),matchCache:ce(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function ye(e,t,n=!1){let r=e.split(`/`),i=Ce(e,r,t,n);if(!i)return null;let[a]=be(e,r,i);return{route:i.node.route,rawParams:a}}function be(e,t,n){let r=Se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===le)break;if(u.kind===w){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function xe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!De(u,n))continue;if(i.parse){if(!Ee(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==le&&De(c,n)&&(c=n);let _=l===o;if(_&&(i.route&&(!a||i.kind===le||i.kind===2)&&De(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[l],y;if(_&&i.index){let n={node:i.index,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Ee(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Te(f,o))return n;De(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(l).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:l,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p,optionals:m+we(o,l),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p+we(o,l),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,statics:f+we(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:l+1,skipped:d,statics:f+we(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function we(e,t){return 2**(e-t-1)}function Te(e,t){return e===2**(t-1)-1}function Ee(e,t,n){let r,i;try{[r,i]=be(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function De(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===le)>(e.node.kind===le)||t.node.kind===le==(e.node.kind===le)&&t.node.depth>e.node.depth)))}function Oe(e){return ke(e.filter(e=>e!==void 0).join(`/`))}function ke(e){return e.replace(/\/{2,}/g,`/`)}function Ae(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function je(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Me(e){return je(Ae(e))}function Ne(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Pe(e,t,n){return Ne(e,n)===Ne(t,n)}function Fe({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=ke(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=ke(e)),o=e.split(`/`);o.length>1&&l(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(l(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?ke(s):s)||`/`;return a&&r&&r.set(a,c),c}function Ie(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Le(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>ze(e,n)).join(`/`):ze(r,n):r}function Re({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=T(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Le(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Le(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Le(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function ze(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function Be(e){return e?.isNotFound===!0}function Ve(){try{return sessionStorage}catch{return}}var He=`tsr-scroll-restoration-v1_3`,Ue=Ve();function We(){try{return JSON.parse(Ue?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ge(){try{Ue?.setItem(He,JSON.stringify(Ke))}catch{}}var Ke=We(),qe=`data-scroll-restoration-id`,Je=e=>e.state.__TSR_key||e.href;function Ye(e){let t=e.getAttribute(qe);if(t)return`[${qe}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Xe=!1,Ze=`window`;function Qe(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $e(e){let t=new Set;for(let n of e){if(n===Ze)continue;let e=Qe(n);e&&t.add(e)}return t}function et(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Je,a=new Set,o=e=>{let t=Ke[e]||={};for(let e of a)e===document?t[Ze]={scrollX,scrollY}:e.isConnected&&(t[Ye(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Xe=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Xe||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ge()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Ke[d];if(e){let t=Ke[u];for(let n in e){if(n===Ze){if(s)continue}else{let e=Qe(n);if(!e||s&&o&&(l??=$e(o),l.has(e)))continue}t||=Ke[u]={},t[n]??=e[n]}}}Xe=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=$e(o));let t=e&&i&&c,s=r.restoring?Ke[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Ze){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Qe(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Xe=!1}}))}function tt(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function nt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function rt(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=nt(r):Array.isArray(t)?t.push(nt(r)):n[e]=[t,nt(r)]}return n}var it=/^(?:\s|["[{\d-]|fa|nu|tr)/,at=st(JSON.parse),ot=ct(JSON.stringify,JSON.parse);function st(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=rt(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ct(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!it.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=tt(e,r);return t?`?${t}`:``}}var lt=`__root__`;function ut(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function dt(e){return e instanceof Response&&!!e.options}function ft(e){return{input:({url:t})=>{for(let n of e)t=mt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ht(e[n],t);return t}}}function pt(e){let t=Me(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Oe([`/`,t,e.pathname]),e)}}function mt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ht(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function gt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{oe(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var _t=`__TSR_index`,vt=`popstate`,yt=`beforeunload`;function bt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=wt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[_t];i=xt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[_t];i=xt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[_t]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function xt(e,t){t||={};let n=Tt();return{...t,key:n,__TSR_key:n,[_t]:e}}function St(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>wt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Tt();t.history.replaceState({[_t]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=wt(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[_t]-l.state[_t],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=bt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(yt,x,{capture:!0}),t.removeEventListener(vt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(yt,x,{capture:!0}),t.addEventListener(vt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Ct(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function wt(e,t){let n=Ct(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Tt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[_t]:0,key:a,__TSR_key:a}}}function Tt(){return(Math.random()+1).toString(36).substring(7)}function Et(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Dt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Ot({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function kt(e,t,n,r){for(let i of t){if(r&&e._tx!==r)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r&&e._tx!==r)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var At=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Ie(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:St()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ce(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=gt(this.latestLocation,e),et(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=Me(a);t&&t!==`/`&&e.push(pt({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ft(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ve(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&me(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ie(e).path,external:!1,searchStr:o,search:h(t?.search,i),hash:ie(r.slice(1)).path,state:g(t?.state,a)}}let o=new URL(i,this.origin),s=mt(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ie(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:h(t?.search,c),hash:ie(s.hash.slice(1)).path,state:g(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Fe({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=ge(je(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=wt(t.href,{});t={...t,to:mt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=It(t.params,o),l=this.routesByPath[je(s)],d;if(l)d=this.getRouteBranch(l);else if(s.includes(`$`))d=[];else{let[e,t,n]=this.getMatchedRoutes(s);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}if(d.length&&p(c))for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let f=e.leaveParams?s:ie(Re({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Nt(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=Pt(m,t,d,e._includeValidateSearch),m=h(a,m);let _=this.options.stringifySearch(m),v=t.hash===!0?n.hash:t.hash?u(t.hash,n.hash):void 0,y=v?`#${v}`:``,b=t.state===!0?n.state:t.state?u(t.state,n.state):{};t.state&&(b=g(n.state,b));let x=`${f}${_}${y}`,S,ee,C=!1;if(this.rewrite){let e=new URL(x,this.origin),t=ht(this.rewrite,e);S=e.href.replace(e.origin,``),t.origin===this.origin?ee=t.pathname+t.search+t.hash:(ee=t.href,C=!0)}else S=ae(x),ee=S;return{publicHref:ee,href:S,pathname:f,search:m,searchStr:_,state:b,hash:v??``,external:C,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=E(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=It(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=je(this.latestLocation.href)===je(n.href)&&x(Ot(n.state),Ot(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(re(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await On(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Dt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Et(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href){let t=this.buildLocation(e.options).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&re(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Bt,this.preloadRoute=e=>kn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=he(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!x(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?x(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ot,parseSearch:e.parseSearch??at,protocolAllowlist:e.protocolAllowlist??ne}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=xe(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:je(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Ft(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Nt(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof jt||(r=new jt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,_=``;try{m=i.options.loaderDeps?.({search:l})??``,_=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let{interpolatedPath:v,usedParams:y}=Re({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),b=i.id+v+_,x=u(i,n),S=this._cache.get(b)??(x?.id===b?x:void 0);d=S?._strictParams??Object.assign(y,d);let ee;if(!S)try{Lt(i,d)}catch(e){if(ee=Be(e)||dt(e)?e:new Mt(e.message,{cause:e}),t?.throwOnError)throw ee}let C=x?`stay`:`enter`,te;if(S)te={...S,cause:C,search:h(x?x.search:S.search,l),_strictSearch:f,searchError:p};else{let e=Et(i)?`pending`:`success`;te={id:b,ssr:i.options.ssr,index:n,routeId:i.id,params:x?.params??d,_strictParams:d,pathname:v,updatedAt:Date.now(),search:x?h(x.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:ee,context:{},abortController:t?._controller??new AbortController,cause:C,loaderDeps:x?g(x.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let ne=s===i.id;te._notFound&&!ne&&(te.error=void 0),te._notFound=ne,c[n]=te}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?h(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=l(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=l(a),c={...e.search};for(let e of a)try{Object.assign(c,Nt(e.options.validateSearch,c))}catch{}let u=n&&n.routeId===s.id&&n.pathname===e.pathname,d;if(u)d=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{Lt(t,e)}catch{}d=e}let f=[a,s.fullPath,c,d];return this.lightweightCache.set(e,[r,f]),f}},jt=class extends Error{},Mt=class extends Error{};function Nt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new jt(`Async validation not supported`);if(n.issues)throw new jt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Pt(e,t,n,r){let i=[];for(let e of n){let t=e.options;`search`in t?t.search?.middlewares&&i.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&i.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=Nt(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=u(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function Ft(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return lt}function It(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,u(e,n))}function Lt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Rt(e,t){return e.options[t]?.preload?.()}function zt(e,t){let n=Rt(e,`component`),r=Rt(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Bt(e,t,n){let r=()=>t===!1?void 0:t?Rt(e,t):zt(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Vt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var Ht=0,Ut=1,Wt=2,Gt=3,Kt=[4];function qt(e){return typeof e[0]==`number`}function Jt(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function Yt(e,t){return e.routesById[t.routeId]}function Xt(e,t,n){return dt(e)?[Gt,e]:Be(e)?(e.routeId||=n,[Wt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Ut,e]):[Ht,e]}function Zt(e,t){let n=Xt(t,!0,e.id);if(n[0]!==Ut)return n;try{e.options.onError?.(n[1])}catch(t){n=Xt(t,!0,e.id)}return n}function Qt(e,t,n,r,i){return i[0].signal.aborted?Kt:hn(e,t,n,Zt(n,r),i)}async function $t(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Yt(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return tn(e,r),[i,Qt(e,t,u,a,n)]}if(c.aborted)return[i,Kt];let p=r.paramsError??r.searchError;if(p!==void 0)return tn(e,r),[i,Qt(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{an(e,r,`beforeLoad`,n[0]);let a=await Jt(m({...f,search:r.search,context:r.context,...e.options.additionalContext}),c);if(c.aborted)return[i,Kt];let o=hn(e,t,u,Xt(a,!1,u.id),n);if(o[0]!==Ht)return tn(e,r),[i,o];r.context={...r.context,...a}}catch(a){return tn(e,r),[i,Qt(e,t,u,a,n)]}finally{r.status=h,an(e,r,!1,n[0])}}i()}function en(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function tn(e,t){let n=t._flight;t._flight=void 0,en(e,t,n)?.abort()}function nn(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=en(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function rn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function an(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function on(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function sn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Kt;if(!i)return[Ht,void 0];let l=n._flight;an(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(on(e,t,n,r,s,a,!!o[3]))).then(e=>Xt(e,!1,r.id),e=>Xt(e,!0,r.id)).then(t=>(t[0]!==Ht&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Ut&&l[2]?Zt(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],hn(e,t,r,await Jt(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return tn(e,n),Kt}finally{an(e,n,!1,s)}}function cn(e,t,n){t[0]!==Gt&&(e.status=`success`,e.error=void 0,t[0]===Ht?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ln(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&tn(e,r)}function un(e,t){return t[0]===Ut||t[0]===Wt?{...e,status:t[0]===Ut?`error`:`notFound`,error:t[1],_flight:void 0}:e}function dn(e,t,n,r,i,a,o){let s=t[1][n],c=Yt(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(on(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Kt)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,tn(e,s),p=Qt(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,ee=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,en(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let C=(p?Promise.resolve(p):x?sn(e,t,s,c,g,i,a):Promise.resolve([Ht,s.loaderData])).then(t=>(x&&(cn(s,t,l),t[0]===Ht&&(m&&!a[0].signal.aborted&&ln(e,s,u),n>=o&&(s.status=`pending`))),t)),te=Jt(Promise.resolve().then(()=>Bt(c,void 0,ee)),a[0].signal).then(()=>void 0,r=>t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound))?void 0:[n,Qt(e,t,c,r,a)]).then(e=>C.then(t=>(x&&!e&&t[0]===Ht&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.()),e)));if(r.push([n,C,te]),!y)return C.then(e=>un(s,e));let ne={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let re=sn(e,t,ne,c,g,i,a).then(e=>(s.isFetching=!1,cn(ne,e,!1),e));return(t[2]??=[]).push([n,re,te,ne]),re.then(e=>un(ne,e))}async function fn(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Yt(e,t[n]);try{let e=Bt(i,!1);e&&await Jt(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function pn(e,t){t[2]&&=(nn(e,t[2].map(e=>e[3])),void 0)}async function mn(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Gt)throw[a,t];!i&&t[0]!==Ht&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Gt)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function hn(e,t,n,r,i,a){for(;r[0]===Gt;){let o=r[1],s=o.options;if(s.reloadDocument?i[3]:i[1]>=20)return r;try{return s.href&&s.reloadDocument?(e.resolveRedirect(o),r):[Gt,o,e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0})]}catch(e){r=a?[Ut,e]:Zt(n,e),a=!0}}return r}async function gn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Wt?fn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Gt)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Ht&&t[0]<Gt&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Gt){let n=s[1];if(n[0]!==Gt||n[1].options.reloadDocument||n[2])return pn(e,t),n;c=!0,s=[0,[Ut,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Ut?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Yt(e,u);try{await Jt(i?Promise.resolve().then(()=>Bt(m,l===Ut?`errorComponent`:`notFoundComponent`)):Promise.all([Bt(m),Bt(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return pn(e,t),Kt}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),pn(e,t),nn(e,o),p()):u.status=`success`}return t}async function _n(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Yt(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Jt(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function vn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await fn(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||i._notFound||e.preload||a?.id!==e.id||a.status!==`success`||a._notFound)break;l++}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=dn(e,i,t,u,f,r,l)},m=await $t(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Wt){let t=await fn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=Gt&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=gn(e,i,u,r[0],mn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=mn(i[2],void 0,void 0,h.then(e=>qt(e)?0:Vt(n).length,()=>0))),o=await h}catch(t){if(pn(e,i),t===a&&a.aborted)return Kt;throw t}return qt(o)?o:_n(e,o,a,r[6]===n.length?r[6]:0)}function yn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Yt(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>yn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function bn(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function xn(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Vt(t[3]).some(e=>e.id===n[1]))return;let i;try{await Jt(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Sn(e,t){e._committed=t,e.stores.setMatches(t)}function Cn(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Vt(n).length,s=new Map;{let t=Date.now();for(let r of[...i,...a.values()]){if(r.status!==`success`||n.some((e,t)=>e.id===r.id&&(t<o||e.status===`success`)))continue;let i=Yt(e,r);!i.options.loader||t-r.updatedAt>=(r.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||s.set(r.id,a.get(r.id)===r?r:{...r,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=s,Sn(e,n),nn(e,[...a.values(),...i],[...n,...s.values()]),kt(e,i,n,t)}async function wn(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}function Tn(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:i.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function En(e,t,n,r,i){let a=n.map(e=>({...e}));rn(a);for(let t of r)tn(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await gn(e,o,r,t[0],i)}catch(t){throw nn(e,a),t}if(qt(s)){nn(e,a),s[0]===Gt&&e._tx===t&&e._committed===n&&await Tn(e,t,s);return}if(await _n(e,s,t[0].signal),e._tx!==t||e._committed!==n){nn(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),tn(e,n))}Sn(e,a),nn(e,n,a)}async function Dn(e,t,n,r,i,a){let o=await vn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(qt(o)){let n=o[0]===Gt&&e._tx===t;if((!n||o[1].options.reloadDocument)&&bn(e,t),nn(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){bn(e,t);return}await Tn(e,t,o);return}let s=o[1];if(e._tx===t&&await xn(e,t),e._tx!==t){bn(e,t),nn(e,s),pn(e,o);return}let c=t[2],l=Dt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await xn(e,t),e._tx!==t){bn(e,t),nn(e,s),pn(e,o);return}let n=await e.startTransition(()=>{bn(e,t),Cn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){pn(e,o);return}u?.length&&En(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function On(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Dt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await wn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});rn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){nn(e,m),await wn(e,n);return}e._preflight=void 0;let g,_=()=>Dn(e,y,f,()=>yn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_).then(),y=[p,s,a,m,Date.now(),v];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&an(e,t,!1)}n[0].abort(),nn(e,n[3],y[3],!0)}if(e._tx!==y){nn(e,y[3]),y[3]=[],g?.(),await wn(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&yn(e,y),g?.(_()),await v,await wn(e,y)}async function kn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),rn(a),o=(e._preloads??=new Map).set(i,a),s=await vn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),nn(e,a)),i.abort()}if(!qt(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Be(e)||console.error(e);return}}}var An=`Error preloading route! ☝️`,jn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=lt:this.parentRoute||se();let r=n?lt:t?.path;r&&r!==`/`&&(r=Ae(r));let i=t?.id||r,a=n?lt:Oe([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Oe([`/`,a]));let o=a===`__root__`?`/`:Oe([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=je(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>ut({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Mn=class extends jn{constructor(e){super(e)}},Nn=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Pn=t(((e,t)=>{t.exports=Nn()})),D=Pn(),Fn=class extends i.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?i.createElement(this.props.errorComponent??In,{error:e,reset:this.reset}):this.props.children}};function In({error:e}){let[t,n]=i.useState(!1);return(0,D.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,D.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,D.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,D.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,D.jsx)(`div`,{children:(0,D.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,D.jsx)(`code`,{children:e.message}):null})}):null]})}function Ln({children:e,fallback:t=null}){return(0,D.jsx)(i.Fragment,{children:Rn()?e:t})}function Rn(){return i.useSyncExternalStore(zn,()=>!0,()=>!1)}function zn(){return()=>{}}var Bn=i.createContext(null);function Vn(e){return i.useContext(Bn)}var Hn=i.createContext(void 0),Un=i.createContext(void 0),O=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(O||{});function Wn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Gn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Kn=[],qn=0,{link:Jn,unlink:Yn,propagate:Xn,checkDirty:Zn,shallowPropagate:Qn}=Wn({update(e){return e._update()},notify(e){Kn[er++]=e,e.flags&=~O.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=O.Mutable|O.Dirty,ir(e))}}),$n=0,er=0,tr,nr=0;function rr(e){try{++nr,e()}finally{--nr||ar()}}function ir(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Yn(n,e)}function ar(){if(!(nr>0)){for(;$n<er;){let e=Kn[$n];Kn[$n++]=void 0,e.notify()}$n=0,er=0}}function or(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?O.None:O.Mutable,get(){return tr!==void 0&&Jn(i,tr,qn),i._snapshot},subscribe(e){let t=Gn(e),n={current:!1},r=sr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=tr,o=t?.compare??Object.is;if(n)tr=i,++qn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=O.Mutable|O.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{tr=a,n&&(i.flags&=~O.RecursedCheck),ir(i)}}};return n?(i.flags=O.Mutable|O.Dirty,i.get=function(){let e=i.flags;if(e&O.Dirty||e&O.Pending&&Zn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Qn(e)}}else e&O.Pending&&(i.flags=e&~O.Pending);return tr!==void 0&&Jn(i,tr,qn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Xn(e),Qn(e),ar())}},i}function sr(e){let t=()=>{let t=tr;tr=n,++qn,n.depsTail=void 0,n.flags=O.Watching|O.RecursedCheck;try{return e()}finally{tr=t,n.flags&=~O.RecursedCheck,ir(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:O.Watching|O.RecursedCheck,notify(){let e=this.flags;e&O.Dirty||e&O.Pending&&Zn(this.deps,this)?t():this.flags=O.Watching},stop(){this.flags=O.None,this.depsTail=void 0,ir(this)}};return t(),n}var cr=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),lr=t(((e,t)=>{t.exports=cr()})),ur=t((e=>{var t=r(),n=lr();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),dr=t(((e,t)=>{t.exports=ur()}))();function fr(e,t){return e===t}function pr(e,t,n=fr){let r=(0,i.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,i.useCallback)(()=>e?.get(),[e]);return(0,dr.useSyncExternalStoreWithSelector)(r,a,a,t,n)}var mr={};function hr(e,t){let n=i.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=g(n.current,i):i}}function gr(e){let t=Vn(),n=i.useContext(e.from?Un:Hn),r=e.from??n,a=t.stores.getMatchStore(r),o=hr(e,t),s=pr(a,e=>e?o(e):mr);if(s!==mr)return s;(e.shouldThrow??!0)&&se()}function _r(e){return gr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vr(e){let{select:t,...n}=e;return gr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function yr(e){return gr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function br(e){return gr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function xr(e){let t=Vn();return i.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Sr(e){return gr({...e,select:t=>e.select?e.select(t.context):t.context})}function Cr(e){let t=i.useRef(e);return x(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function wr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Tr(e,t,n){if(e?.external)return re(e.href,n)?void 0:e.href;if(!Ir(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),re(t,n)?void 0:t}catch{}}function Er(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!Pe(e.pathname,t.pathname,r))return!1}else{let n=Ne(e.pathname,r),i=Ne(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!x(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function Dr(e,t){let n=Vn(),r=c(t),{activeProps:a,inactiveProps:o,activeOptions:l,to:d,preload:f,preloadDelay:p,preloadIntentProximity:m,hashScrollIntoView:h,replace:g,startTransition:_,resetScroll:v,viewTransition:y,children:b,target:x,disabled:S,style:ee,className:C,onClick:te,onBlur:ne,onFocus:re,onMouseEnter:ie,onMouseLeave:ae,onTouchStart:oe,ignoreBlocker:se,params:ce,search:le,hash:w,state:T,mask:ue,reloadDocument:de,unsafeRelative:fe,from:pe,_fromLocation:me,...E}=e,he=Rn(),ge=Cr(e.search),_e=Cr(e.params),ve=Cr(l),ye=i.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,ge,_e,e.state,e.mask,e.unsafeRelative]),be=i.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...ye}),r=Fr(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,S),i=Tr(r,d,n.protocolAllowlist);return[r?.href,i,Er(e,t,ve,n.basepath,he,i!==void 0)]},[ve,S,he,ye,n,d]),[xe,Se,Ce]=pr(n.stores.location,be,wr),we=Ce?u(a,{})??kr:Or,Te=Ce?Or:u(o,{})??Or,Ee=[C,we.className,Te.className].filter(Boolean).join(` `),De=(ee||we.style||Te.style)&&{...ee,...we.style,...Te.style},Oe=i.useRef(!1),ke=e.reloadDocument||Se||S?!1:f??n.options.defaultPreload,Ae=p??n.options.defaultPreloadDelay??0,je=i.useCallback(()=>{n.preloadRoute(ye).catch(e=>{console.warn(e),console.warn(An)})},[n,ye]),Me=i.useCallback(e=>{if(!e){Nr(r);return}if(!(e.isIntersecting??ke===`intent`)){e.isIntersecting===!1&&Nr(r);return}if(!Ae){je();return}Mr.has(r)||Mr.set(r,setTimeout(()=>{Mr.delete(r),je()},Ae))},[je,r,ke,Ae]);s(r,Me,ke!==`viewport`),i.useEffect(()=>{Oe.current||ke===`render`&&(je(),Oe.current=!0)},[je,ke]);let Ne=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;!S&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...ye,replace:g,resetScroll:v,hashScrollIntoView:h,startTransition:_,viewTransition:y,ignoreBlocker:se}))};if(Se)return{...E,ref:r,href:Se,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...ee&&{style:ee},...C&&{className:C},...te&&{onClick:te},...ne&&{onBlur:ne},...re&&{onFocus:re},...ie&&{onMouseEnter:ie},...ae&&{onMouseLeave:ae},...oe&&{onTouchStart:oe}};let Pe=()=>{ke===`intent`&&je()},Fe=()=>{ke===`intent`&&Nr(r)};return{...E,...we,...Te,href:xe,ref:r,onClick:Pr([te,Ne]),onBlur:Pr([ne,Fe]),onFocus:Pr([re,Me]),onMouseEnter:Pr([ie,Me]),onMouseLeave:Pr([ae,Fe]),onTouchStart:Pr([oe,Pe]),disabled:!!S,target:x,...De&&{style:De},...Ee&&{className:Ee},...S&&Ar,...Ce&&jr}}var Or={},kr={className:`active`},Ar={role:`link`,"aria-disabled":!0},jr={"data-status":`active`,"aria-current":`page`},Mr=new WeakMap,Nr=e=>{clearTimeout(Mr.get(e)),Mr.delete(e)},Pr=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Fr(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ir(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Lr=i.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:a,...o}=Dr(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=o;return i.createElement(`a`,t,s)}return i.createElement(n,o,s)}),Rr=class extends jn{constructor(e){super(e),this.useMatch=e=>gr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Sr({...e,from:this.id}),this.useSearch=e=>br({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>yr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>vr({...e,from:this.id}),this.useLoaderData=e=>_r({...e,from:this.id}),this.useNavigate=()=>xr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,D.jsx)(Lr,{ref:t,from:this.fullPath,...e}))}};function zr(e){return new Rr(e)}var Br=class extends Mn{constructor(e){super(e),this.useMatch=e=>gr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Sr({...e,from:this.id}),this.useSearch=e=>br({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>yr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>vr({...e,from:this.id}),this.useLoaderData=e=>_r({...e,from:this.id}),this.useNavigate=()=>xr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,D.jsx)(Lr,{ref:t,from:this.fullPath,...e}))}};function Vr(e){return new Br(e)}function Hr(e){return e=>{let t=zr(e);return t.isRoot=!1,t}}function Ur(e,t){let n,r,o,s=()=>(n||=(o=void 0,e().then(e=>{n=void 0,c.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,o=e})),n),c=function(e){if(o){if(S(o)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw o}if(!r){if(a)a(s());else throw s()}return i.createElement(r,e)};return c.preload=s,c}function Wr(e){let t=Vn(),n=`not-found-${pr(t.stores.location,e=>e.pathname)}-${pr(t.stores.status,e=>e)}`;return(0,D.jsx)(Fn,{getResetKey:()=>n,onCatch:(t,n)=>{if(Be(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Be(t))return e.fallback?.(t);throw t},children:e.children})}function Gr(){return(0,D.jsx)(`p`,{children:`Not Found`})}function Kr(e){return(0,D.jsx)(D.Fragment,{children:e.children})}function qr(e,t,n){return t.options.notFoundComponent?(0,D.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,D.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,D.jsx)(Gr,{})}function Jr(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,D.jsx)(n,{}):null}var Yr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Xr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Zr=i.memo(function({routeId:e}){let t=Vn();return(0,D.jsx)(Qr,{router:t,match:pr(t.stores.getMatchStore(e),e=>e)})});function Qr({router:e,match:t}){let n=e.routesById[t.routeId],r=Jr(e,n),a=n.options.errorComponent??e.options.defaultErrorComponent,o=n.options.onCatch??e.options.defaultOnCatch,s=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,c=t.ssr===!1||t.ssr===`data-only`,l=Xr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||c))?i.Suspense:Kr,u=a?Fn:Kr,d=s?Wr:Kr;return(0,D.jsxs)(n.isRoot?n.options.shellComponent??Kr:Kr,{children:[(0,D.jsx)(Hn.Provider,{value:t.routeId,children:(0,D.jsx)(l,{fallback:r,children:(0,D.jsx)(u,{getResetKey:()=>t,errorComponent:a,onCatch:(e,n)=>{if(Be(e))throw e.routeId??=t.routeId,e;o?.(e,n)},children:(0,D.jsx)(d,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return i.createElement(s,e)},children:c?(0,D.jsx)(Ln,{fallback:r,children:(0,D.jsx)($r,{match:t})}):(0,D.jsx)($r,{match:t})})})})}),null]})}var $r=i.memo(function({match:e}){let t=Vn(),n=e.routeId,r=t.routesById[n],a=i.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),o=i.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,D.jsx)(e,{},a):(0,D.jsx)(ei,{})},[a,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Xr(t,r,e.ssr))return o;if(t._tx)throw t._tx[5];return Jr(t,r)}if(e.status===`notFound`)return qr(t,r,e.error);if(e.status===`error`)throw e.error;return o}),ei=i.memo(function(){let e=Vn(),t=i.useContext(Hn),n,r,a;{let i=e.stores.getMatchStore(t);[n,r]=pr(i,e=>[!!e._notFound,e.error],Yr),a=pr(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return qr(e,e.routesById[t],r);if(!a)return null;let o=(0,D.jsx)(Zr,{routeId:a});return t===`__root__`?(0,D.jsx)(i.Suspense,{fallback:Jr(e),children:o}):o});function ti(e,t){let n=e[1];e.length=0,n?.(t)}function ni({t:e}){let t=Vn(),n=t._rendered??=[];return t.startTransition=(r,a)=>new Promise(o=>{ti(n,!1),n.push(a,o),e(t),i.startTransition(r)}),o(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(je(r.publicHref)!==je(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Dt(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ri(){let e=Vn(),t=e.routesById[lt],n=Jr(e,t),r=e.ssr?Kr:i.Suspense,a=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(ni,{t:i.useState()[1]}),(0,D.jsx)(r,{fallback:n,children:(0,D.jsx)(ii,{})})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:a}):a}function ii(){let e=Vn(),t=e._rendered,n=pr(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;o(()=>{t[0]===n&&ti(t,!0)},[t,n]);let a=i?(0,D.jsx)(Zr,{routeId:i}):null;return(0,D.jsx)(Hn.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,D.jsx)(Fn,{getResetKey:()=>r,onCatch:void 0,children:a})})}var ai=e=>({createMutableStore:or,createReadonlyStore:or,batch:rr}),oi=e=>new si(e),si=class extends At{constructor(e){super(e,ai)}};function ci({router:e,children:t,...n}){p(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,D.jsx)(Bn.Provider,{value:e,children:t});return e.options.Wrap?(0,D.jsx)(e.options.Wrap,{children:r}):r}function li({router:e,...t}){return(0,D.jsx)(ci,{router:e,...t,children:(0,D.jsx)(ri,{})})}var ui=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}}var S=!1,ee=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){if(g=!1,S){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){ee=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ee),ee=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),di=t(((e,t)=>{t.exports=ui()})),fi=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),pi=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fi()})),mi=t((e=>{var t=di(),n=r(),i=pi();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.memo_cache_sentinel`),ae=Symbol.iterator;function oe(e){return typeof e!=`object`||!e?null:(e=ae&&e[ae]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case ee:return`Suspense`;case C:return`SuspenseList`;case re:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],fe=-1;function pe(e){return{current:e}}function me(e){0>fe||(e.current=de[fe],de[fe]=null,fe--)}function E(e,t){fe++,de[fe]=e.current,e.current=t}var he=pe(null),ge=pe(null),_e=pe(null),ve=pe(null);function ye(e,t){switch(E(_e,t),E(ge,e),E(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}me(he),E(he,e)}function be(){me(he),me(ge),me(_e)}function xe(e){e.memoizedState!==null&&E(ve,e);var t=he.current,n=Ud(t,e.type);t!==n&&(E(ge,e),E(he,n))}function Se(e){ge.current===e&&(me(he),me(ge)),ve.current===e&&(me(ve),$f._currentValue=ue)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Ce+e+we}var Ee=!1;function De(e,t){if(!e||Ee)return``;Ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -19,4 +19,4 @@ Error generating stack: `+e.message+`
|
|
|
19
19
|
`)},Jl=e=>K(e).map(Yl).join(`
|
|
20
20
|
`),Yl=e=>e.cause?`${e.stack} {\n${Xl(e.cause,` `)}\n}`:e.stack,Xl=(e,t)=>{let n=e.stack.split(`
|
|
21
21
|
`),r=`${t}[cause]: ${n[0]}`;for(let e=1,i=n.length;e<i;e++)r+=`\n${t}${n[e]}`;return e.cause&&(r+=` {\n${Xl(e.cause,`${t} `)}\n${t}}`),r},Zl=`~effect/Fiber`,Ql={_A:bi,_E:bi},$l={id:0},eu=()=>globalThis[Ma],tu=class{constructor(e,t=!0){this[Zl]=Ql,this.setContext(e),this.id=++$l.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._running=!1,this._deferredInterrupt=!1,this.runtimeMetrics?.recordFiberStart(this.context)}[Zl];id;interruptible;currentOpCount;_stack;_observers;_exit;_children;_interruptedCause;_yielded;_running;_deferredInterrupt;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(e){return kc(this.context,e)}addObserver(e){return this._exit?(e(this._exit),Ei):(this._observers.push(e),()=>{if(this._exit)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)})}interruptUnsafe(e,t){if(this._exit)return;let n=Fl(e);this.currentStackFrame&&(n=_o(n,Tc(To,this.currentStackFrame))),t&&(n=_o(n,t)),this._interruptedCause=this._interruptedCause?Vl(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(fu(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===to)return;let n=ru.interruptChildren&&ru.interruptChildren(this);if(n!==void 0)return this.evaluate(Hu(n,()=>t));this._exit=t,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let e=0;e<this._observers.length;e++)this._observers[e](t);this._observers.length=0,this._stack.length=0,this._children=void 0,this.context=Cc()}runLoop(e){let t=globalThis[Ma];globalThis[Ma]=this;let n=this._running;this._running=!0;let r=!1,i=e;this.currentOpCount=0;try{for(;;){if(this._deferredInterrupt&&(this._deferredInterrupt=!1,i=fu(this._interruptedCause)),this.currentOpCount++,!r&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){r=!0;let e=i;i=Hu(hu,()=>e)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[Za](this),i===to){let e=this._yielded;if(Ja in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return to}}}catch(e){return j(i,Za)?this.runLoop(ko(e)):ko(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{this._running=n,globalThis[Ma]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,nu;for(;;){let t=this._stack.pop();if(!t)return;let n=t[eo]&&t[eo](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,to}children(){return this._children??=new Set}pipe(){return _i(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&bc(t,e))return;let n=this.getRef(pl);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=Oc(e,Cl),this.currentLogLevel=this.getRef(Ol),this.minimumLogLevel=this.getRef(kl),this.currentStackFrame=this.getRef(El),this.maxOpsBeforeYield=this.getRef(yl),this.currentPreventYield=this.getRef(bl),this.runtimeMetrics=Oc(e,Tl);let r=Oc(e,wl);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},nu={[Qa](e,t){return fu(t._interruptedCause)},[$a](e,t){return fu(t._interruptedCause)}},ru={interruptChildren:void 0},iu=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(Eo.key,e.currentStackFrame),vc(t)},au=e=>{if(e._children!==void 0&&e._children.size!==0)return du(e._children)},ou=e=>{let t=e;return t._exit?J(t._exit):Du(n=>t._exit?n(J(t._exit)):mu(e.addObserver(e=>n(J(e)))))},su=e=>Du(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(J(r))}return a(),mu(()=>i?.())}),cu=e=>{let t=e;return t._exit?t._exit:Du(n=>t._exit?n(t._exit):mu(e.addObserver(n)))},lu=e=>Ao(t=>uu(e,t.id)),uu=k(e=>j(e[0],Zl),(e,t,n)=>Ao(r=>{let i=iu(r);return i=i&&n?Nc(i,n):i??n,e.interruptUnsafe(t,i),zu(ou(e))})),du=e=>Ao(t=>{let n=iu(t),r=Is();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return zu(su(r))}),J=z,fu=Do,pu=Oo,mu=Co({op:`Sync`,[Za](e){let t=this[F](),n=e.getCont(Qa);return n?n[Qa](t,e):e.yieldWith(z(t))}}),Y=Co({op:`Suspend`,[Za](e){return this[F]()}}),hu=Co({op:`Yield`,[Za](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(Zu)},this[F]??0),e.yieldWith(()=>{t=!0})}})(0),gu=J(ls()),_u=e=>Y(()=>fu(Ka(e))),vu=e=>ko(e),yu=e=>Y(()=>pu(Ka(e))),bu=J(void 0),xu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new Mf(e,`An error occurred in Effect.try`):e.catch;return Y(()=>{try{return J(Ka(t))}catch(e){return pu(Ka(()=>n(e)))}})},Su=e=>Tu(function(t,n){Ka(()=>e(n)).then(e=>t(J(e)),e=>t(vu(e)))},e.length!==0),Cu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new Mf(e,`An error occurred in Effect.tryPromise`):e.catch;return Tu(function(e,r){let i=t=>{try{e(pu(Ka(()=>n(t))))}catch(t){e(vu(t))}};try{Ka(()=>t(r)).then(t=>e(J(t)),i)}catch(e){i(e)}},t.length!==0)},wu=e=>Ao(t=>e(t.id)),Tu=Co({op:`Async`,single:!1,[Za](e){let t=Ka(()=>this[F][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[F][1]?new AbortController:void 0,a=t(t=>{n||(n=!0,r?e.evaluate(t):r=t)},i?.signal);return r===!1?(r=!0,e._yielded=()=>{n=!0},i===void 0&&a===void 0||e._stack.push(Eu(()=>(n=!0,i?.abort(),a??Zu))),to):r}}),Eu=Co({op:`AsyncFinalizer`,[eo](e){e.interruptible&&(e.interruptible=!1,e._stack.push(Yd))},[$a](e,t){return zl(e)?Hu(this[F](),()=>fu(e)):fu(e)}}),Du=e=>Tu(e,e.length>=2),Ou=Du(Ei),ku=(...e)=>Y(()=>Pu(e.length===1?e[0]():e[1].call(e[0].self))),Au=(e,...t)=>{let n=t.length===0?function(){return Y(()=>Pu(e.apply(this,arguments)))}:function(){let n=Y(()=>Pu(e.apply(this,arguments)));for(let e=0;e<t.length;e++)n=t[e](n,...arguments);return n};return ju(e.length,n)},ju=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),Mu=(e,...t)=>ju(e.length,t.length===0?function(){return Nu(()=>e.apply(this,arguments))}:function(){let n=Nu(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),Nu=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return J(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}if(i&&i._tag===`Failure`)return r.value;{let n=!0;return Y(()=>n?(n=!1,Hu(r.value,e=>Pu(t,e))):Y(()=>Pu(e())))}}}catch(e){return vu(e)}},Pu=Co({op:`Iterator`,single:!1,[Qa](e,t){let n=this[F][0];for(;;){let r=n.next(e);if(r.done)return J(r.value);if(!Wu(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[Za](e){return this[Qa](this[F][1],e)}}),Fu=k(2,(e,t)=>{let n=J(t);return Hu(e,e=>n)}),Iu=e=>Ku(e,us),Lu=k(2,(e,t)=>Hu(e,e=>io(t)?t:Ka(()=>t(e)))),Ru=k(2,(e,t)=>Hu(e,e=>Fu(io(t)?t:Ka(()=>t(e)),e))),zu=e=>Hu(e,e=>Zu),Bu=(e,t)=>Ao(n=>Du(r=>{let i=!1,a=new Set,o=e=>{i=!0,r(a.size===0?e:Hu(qd(du(a)),()=>e))},s=0;for(let r of e){if(i)break;let e=s++,c=af(n,r,!0,!0,!1);a.add(c),c.addObserver(r=>{a.delete(c);let s=!i;o(r),s&&t?.onWinner&&t.onWinner({fiber:c,index:e,parentFiber:n})})}return du(a)})),Vu=k(e=>io(e[1]),(e,t,n)=>Bu([e,t],n)),Hu=k(2,(e,t)=>{let n=Object.create(Uu);return n[F]=e,n[Qa]=t.length===1?t:e=>t(e),n}),Uu=So({op:`OnSuccess`,[Za](e){return e._stack.push(this),this[F]}}),Wu=e=>Ja in e,Gu=k(2,(e,t)=>Wu(e)?e._tag===`Success`?t(e.value):e:Hu(e,t)),X=e=>Hu(e,bi),Ku=k(2,(e,t)=>Hu(e,e=>J(Ka(()=>t(e))))),qu=k(2,(e,t)=>Wu(e)?Qu(e,t):Ku(e,t)),Ju=e=>Do(Fl(e)),Yu=e=>e._tag===`Success`,Xu=e=>e._tag===`Failure`?bs(e.cause):xs(e),Zu=z(void 0),Qu=k(2,(e,t)=>e._tag===`Success`?z(t(e.value)):e),$u=k(2,(e,t)=>Yu(e)?t:e),ed=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?Zu:Do(I(t))},td=k(2,(e,t)=>Ao(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),Vd(e,()=>{n.setContext(r)}))})),nd=()=>rd,rd=Ao(e=>J(e.context)),id=e=>Ao(t=>e(t.context)),ad=k(2,(e,t)=>Wu(e)?e:td(e,Nc(t))),od=function(){return arguments.length===1?k(2,(e,t)=>sd(e,arguments[0],t)):k(3,(e,t,n)=>sd(e,t,n)).apply(this,arguments)},sd=(e,t,n)=>td(e,Ec(t,n)),cd=k(e=>io(e[0]),(e,t)=>ef({while:Si,body:xi(t?.disableYield?e:Hu(e,e=>hu)),step:Ei})),ld=k(2,(e,t)=>{let n=Object.create(ud);return n[F]=e,n[$a]=t.length===1?t:e=>t(e),n}),ud=So({op:`OnFailure`,[Za](e){return e._stack.push(this),this[F]}}),dd=k(3,(e,t,n)=>ld(e,e=>{let r=t(e);return Cs(r)?fu(r.failure):Ka(()=>n(r.success,e))})),fd=k(2,(e,t)=>dd(e,Ll,e=>t(e))),pd=k(2,(e,t)=>dd(e,Rl,t)),md=k(3,(e,t,n)=>ld(e,e=>{let r=t(e);return Cs(r)?fu(e):Lu(Ka(()=>n(r.success,e)),fu(e))})),hd=k(2,(e,t)=>md(e,Ll,e=>t(e))),gd=k(e=>io(e[0]),(e,t,n,r)=>ld(e,e=>{let i=Ll(e);return Cs(i)?fu(i.failure):t(i.success)?Ka(()=>n(i.success)):r?Ka(()=>r(i.success)):fu(e)})),_d=k(2,(e,t)=>fd(e,e=>yu(()=>t(e)))),vd=k(e=>io(e[0]),(e,t)=>{if(!t?.log)return Z(e,{onFailure:e=>bu,onSuccess:e=>bu});let n=Vf(t.log===!0?void 0:t.log);return yd(e,{onFailure(e){let r=Il(e);return Cs(r)?fu(r.failure):t.message===void 0?n(e):n(t.message,e)},onSuccess:e=>bu})}),yd=k(2,(e,t)=>{let n=Object.create(bd);return n[F]=e,n[Qa]=t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),n[$a]=t.onFailure.length===1?t.onFailure:e=>t.onFailure(e),n}),bd=So({op:`OnSuccessAndFailure`,[Za](e){return e._stack.push(this),this[F]}}),Z=k(2,(e,t)=>yd(e,{onFailure:e=>{let n=e.reasons.find(vo);return n?Ka(()=>t.onFailure(n.error)):fu(e)},onSuccess:t.onSuccess})),xd=k(2,(e,t)=>Z(e,{onFailure:e=>mu(()=>t.onFailure(e)),onSuccess:e=>mu(()=>t.onSuccess(e))})),Sd=e=>Wu(e)?z(e):Cd(e),Cd=Co({op:`Exit`,[Za](e){return e._stack.push(this),this[F]},[Qa](e,t,n){return J(n??z(e))},[$a](e,t,n){return J(n??Do(e))}}),wd=`~effect/Scope`,Td=`~effect/Scope/Closeable`,Ed=ac(`effect/Scope`),Dd=(e,t)=>Y(()=>Od(e,t)??bu),Od=(e,t)=>{if(e.state._tag===`Closed`)return;let n={_tag:`Closed`,exit:t};if(e.state._tag===`Empty`){e.state=n;return}let r=e.state;if(e.state=n,r.finalizer!==void 0)return r.finalizer(t);let i=r.finalizers;if(i!==void 0&&i.size!==0)return i.size===1?i.values().next().value(t):Ad(e,i,t)},kd=(e,t)=>Yu(e)?t:ld(t,t=>fu(Vl(e.cause,t))),Ad=Au(function*(e,t,n){let r=[],i=[],a=Array.from(t.values()),o=eu();for(let t=a.length-1;t>=0;t--){let s=a[t];e.strategy===`sequential`?r.push(yield*Sd(s(n))):i.push(af(o,s(n),!0,!0,`inherit`))}return i.length>0&&(r=yield*su(i)),yield*ed(r)}),jd=(e,t)=>{let n=Id(t);if(e.state._tag===`Closed`)return n.state=e.state,n;let r={};return Q(e,r,e=>Dd(n,e)),Q(n,r,t=>mu(()=>Pd(e,r))),n},Md=(e,t)=>Y(()=>e.state._tag===`Closed`?t(e.state.exit):(Q(e,{},t),bu)),Nd=(e,t)=>Md(e,xi(t)),Q=(e,t,n)=>{if(e.state._tag===`Empty`)e.state={_tag:`Open`,finalizerKey:t,finalizer:n,finalizers:void 0};else if(e.state._tag===`Open`){let r=e.state;r.finalizer===void 0?r.finalizers===void 0?(r.finalizerKey=t,r.finalizer=n):r.finalizers.set(t,n):(r.finalizers=new Map([[r.finalizerKey,r.finalizer]]),r.finalizerKey=void 0,r.finalizer=void 0,r.finalizers.set(t,n))}},Pd=(e,t)=>{if(e.state._tag===`Open`){let n=e.state;n.finalizerKey===t?(n.finalizerKey=void 0,n.finalizer=void 0):n.finalizers!==void 0&&n.finalizers.delete(t)}},Fd=e=>e.state._tag===`Open`?e.state.finalizer===void 0?e.state.finalizers?.size??0:1:0,Id=(e=`sequential`)=>({[Td]:Td,[wd]:wd,strategy:e,state:Ld}),Ld={_tag:`Empty`},Rd=Ed,zd=od(Ed),Bd=e=>Hu(Rd,t=>id(n=>Md(t,t=>ad(e(t),n)))),Vd=Co({op:`OnExit`,single:!1,[Za](e){return e._stack.push(this),this[F][0]},[eo](e){e.interruptible&&this[F][2]!==!0&&(e._stack.push(Yd),e.interruptible=!1)},[Qa](e,t,n){n??=z(e);let r=this[F][1](n);return r?Hu(r,e=>n):n},[$a](e,t,n){n??=Do(e);let r=this[F][1](n);return r?Hu(kd(n,r),e=>n):n}}),Hd=k(2,Vd),Ud=k(2,(e,t)=>Hd(e,e=>t)),Wd=k(3,(e,t,n)=>Hd(e,e=>{let r=t(e);return Cs(r)?bu:n(r.success,e)})),Gd=k(2,(e,t)=>Wd(e,Xu,t)),Kd=(e,t,n)=>$d(r=>Hu(e,e=>Vd(r(t(e)),t=>n(e,t),!0))),qd=e=>Ao(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Yd),e):e),Jd=Co({op:`SetInterruptible`,[eo](e){if(e.interruptible=this[F],e._interruptedCause&&e.interruptible)return()=>fu(e._interruptedCause)}}),Yd=Jd(!0),Xd=Jd(!1),Zd=e=>{if(e.interruptible=!0,e._stack.push(Xd),e._interruptedCause)return fu(e._interruptedCause)},Qd=e=>Ao(t=>t.interruptible?e:Zd(t)??e),$d=e=>Ao(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Yd),e(Qd)):e(bi)),ef=Co({op:`While`,[Qa](e,t){return this[F].step(e),this[F].while()?(t._stack.push(this),this[F].body()):Zu},[Za](e){return this[F].while()?(e._stack.push(this),this[F].body()):Zu}}),tf=e=>{let t=e.onItem,n=e.step,r=(e,i,a,o)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!Wu(c))return Hu(Sd(c),t=>n(e,s,t,a)??r(e,i,a+1,o)??bu);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return(e,i,a)=>{let o=0,s=a?.end??i.length,c=a?.concurrency??1;if(c===1)return r(e,i,0,s);let l=a?.orderedStep===!0,u=!1,d,f,p,m=!1,h,g,_=o,v=l?Array(s):void 0,y=e=>{let t=ko(e);return h=t,u=!0,m=!0,f&&f.size>0?Hu(qd(du(Array.from(f))),()=>t):t},b=(t,r,a)=>{if(!l)return n(e,t,r,a);if(h)return h;for(v[a]=r;_<s;){let t=v[_];if(t===void 0)return;v[_]=void 0;let r=_++,a=n(e,i[r],t,r);if(a)return a}},x=()=>{let n=!1;for(;!h&&o<s;o++){let r=i[o],a=g??t(e,r,o);if(Wu(a)){if(h=b(r,a,o),h)break}else if(d){g=void 0;let e=af(d,a,!0,!0,`inherit`);if(e._exit){if(h=b(r,e._exit,o),h)break;continue}f.add(e);let t=o;if(e.addObserver(i=>{f.delete(e);try{if(h){if(!m&&i._tag===`Failure`)for(let e of i.cause.reasons)if(e._tag===`Interrupt`)continue;else h._tag===`Failure`?h.cause.reasons.push(e):h=Do(I([e]))}else{let e=b(r,i,t);e&&(h=e._tag===`Failure`?Do(I(e.cause.reasons.slice())):e,x())}if(n){let e=x();e&&p(e)}else u&&f.size===0&&p(h??bu)}catch(e){p(y(e))}}),f.size<c)continue;n=!0,o++;return}else return Du(e=>{d=eu(),f=new Set,g=a,p=e;let t;try{t=x()}catch(t){return e(y(t))}return t?e(t):Y(()=>(h=Zu,m=!0,f?du(f):bu))})}if(u=!0,h){if(f&&f.size>0){let e=iu(d);f.forEach(t=>t.interruptUnsafe(d.id,e));return}if(p||h._tag===`Failure`)return h}else if(p){if(f)f.size===0&&p(bu);else return Zu}};return x()}},nf=()=>tf,rf=k(e=>io(e[0]),(e,t)=>Ao(n=>(Kf(),J(af(n,e,t?.startImmediately,!1,t?.uninterruptible??!1))))),af=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new tu(a.context,o);return n?s.evaluate(t):a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0),!r&&!s._exit&&(a.children().add(s),s.addObserver(()=>a._children.delete(s))),s},of=k(e=>io(e[0]),(e,t,n)=>Ao(r=>{let i=af(r,e,n?.startImmediately,!0,n?.uninterruptible);if(!i._exit){if(t.state._tag!==`Closed`){let e={};Q(t,e,()=>wu(e=>e===i.id?bu:lu(i))),i.addObserver(()=>Pd(t,e))}else i.interruptUnsafe(r.id,iu(r))}return J(i)})),sf=e=>(t,n)=>{let r=new tu(n?.scheduler?Ec(e,pl,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal){if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}}return n?.onFiberStart&&n.onFiberStart(r),r},cf=k(2,(e,t)=>{if(e._exit)return e;if(t.state._tag===`Closed`)return e.interruptUnsafe(e.id),e;let n={};return Q(t,n,()=>lu(e)),e.addObserver(()=>Pd(t,n)),e}),lf=sf(Cc()),uf=e=>{let t=sf(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},df=e=>{let t=uf(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw G(e.cause);return e.value})},ff=df(Cc()),pf=(e=>{let t=sf(e);return e=>{if(Wu(e))return e;let n=new _l(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??ko(new Af(r))}})(Cc()),mf=J(!0),hf=J(!1),gf=class{waiters=[];scheduled=void 0;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){if(this.waiters.length===0)return mf;if(this.scheduled===void 0)this.scheduled=this.waiters,e.currentDispatcher.scheduleTask(this.flushScheduled,0);else for(let e=0;e<this.waiters.length;e++)this.scheduled.push(this.waiters[e]);return this.waiters=[],mf}flushScheduled=()=>{if(this.scheduled===void 0)return;let e=this.scheduled;this.scheduled=void 0;for(let t=0;t<e.length;t++)e[t](Zu)};flushWaiters(){let e=this.waiters;this.waiters=[],this.flushScheduled();for(let t=0;t<e.length;t++)e[t](Zu)}open=Ao(e=>this._isOpen?hf:(this._isOpen=!0,this.scheduleUnsafe(e)));release=Ao(e=>this._isOpen?hf:this.scheduleUnsafe(e));openUnsafe(){return!this._isOpen&&(this._isOpen=!0,this.flushWaiters(),!0)}await=Du(e=>this._isOpen?e(bu):(this.waiters.push(e),mu(()=>{let t=this.waiters.indexOf(e);t===-1?this.scheduled!==void 0&&(t=this.scheduled.indexOf(e),t!==-1&&this.scheduled.splice(t,1)):this.waiters.splice(t,1)})));closeUnsafe(){return this._isOpen?(this._isOpen=!1,!0):!1}close=mu(()=>this.closeUnsafe());whenOpen=e=>Hu(this.await,()=>e);isOpen(){return this._isOpen}},_f=e=>new gf(e??!1),vf=e=>mu(()=>_f(e)),yf=Pc(`effect/Clock`,{defaultValue:()=>new xf}),bf=2**31-1,xf=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=mu(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return wf()}currentTimeNanos=mu(()=>this.currentTimeNanosUnsafe());monotonicTimeNanosUnsafe(){return Cf()}monotonicTimeNanos=mu(()=>this.monotonicTimeNanosUnsafe());sleep(e){return this.sleepMillis(cl(e))}sleepMillis(e){return e<=0?hu:Number.isFinite(e)?Du(t=>{let n=e>bf?this.sleepMillis(e-bf):bu,r=setTimeout(()=>t(n),Math.min(e,bf));return mu(()=>clearTimeout(r))}):Ou}},Sf=BigInt(1e6),Cf=function(){let e=globalThis.process?.hrtime;if(typeof e?.bigint==`function`)return()=>e.bigint();if(typeof performance<`u`&&typeof performance.now==`function`)return()=>BigInt(Math.round(performance.now()*1e6));let t=BigInt(0);return()=>{let e=BigInt(Date.now())*Sf;return e>t&&(t=e),t}}(),wf=function(){let e=BigInt(1e9),t;return()=>{let n=Cf(),r=BigInt(Date.now())*Sf;if(t===void 0)t=r-n;else{let i=t+n;(r>i?r-i:i-r)>e&&(t=r-n)}return t+n}}(),Tf=e=>Ao(t=>e(t.getRef(yf))),Ef=e=>Tf(t=>t.sleep(Wc(e))),Df=`~effect/Cause/IllegalArgumentError`,Of=class extends No(`IllegalArgumentError`){[Df]=Df;constructor(e){super({message:e})}},kf=`~effect/Cause/AsyncFiberError`,Af=class extends No(`AsyncFiberError`){[kf]=kf;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},jf=`~effect/Cause/UnknownError`,Mf=class extends No(`UnknownError`){[jf]=jf;constructor(e,t){super({message:t,cause:e})}},Nf=Pc(`effect/Console/CurrentConsole`,{defaultValue:()=>globalThis.console}),Pf=cs(ss(os,e=>{switch(e){case`All`:return-(2**53-1);case`Fatal`:return 5e4;case`Error`:return 4e4;case`Warn`:return 3e4;case`Info`:return 2e4;case`Debug`:return 1e4;case`Trace`:return 0;case`None`:return 2**53-1}})),Ff=Pc(`effect/Loggers/CurrentLoggers`,{defaultValue:()=>new Set([Wf,Gf])}),If=Pc(`effect/Logger/LogToStderr`,{defaultValue:Ci}),Lf={"~effect/Logger":{_Message:bi,_Output:bi},pipe(){return _i(this,arguments)}},Rf=e=>{let t=Object.create(Lf);return t.log=e,t},zf=e=>e.replace(/[\s="]/g,`_`),Bf=(e,t)=>`${zf(e[0])}=${t-e[1]}ms`,Vf=e=>(...t)=>{let n;for(let e=0,r=t.length;e<r;e++){let r=t[e];co(r)&&(n?t.splice(e,1):t=t.slice(0,e).concat(t.slice(e+1)),n=n?I(n.reasons.concat(r.reasons)):r,e--)}return n===void 0&&(n=ho),Ao(r=>{let i=e??r.currentLogLevel;if(Pf(r.minimumLogLevel,i))return bu;let a=r.getRef(yf),o=r.getRef(Ff);if(o.size>0){let e=new Date(a.currentTimeMillisUnsafe());for(let a of o)a.log({cause:n,fiber:r,date:e,logLevel:i,message:t})}return bu})},Hf={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};Hf.gray,Hf.blue,Hf.green,Hf.yellow,Hf.red,Hf.bgBrightRed,Hf.black;var Uf=e=>`${e.getHours().toString().padStart(2,`0`)}:${e.getMinutes().toString().padStart(2,`0`)}:${e.getSeconds().toString().padStart(2,`0`)}.${e.getMilliseconds().toString().padStart(3,`0`)}`,Wf=Rf(({cause:e,date:t,fiber:n,logLevel:r,message:i})=>{let a=Array.isArray(i)?i.slice():[i];e.reasons.length>0&&a.push(Jl(e));let o=t.getTime(),s=n.getRef(Al),c=``;for(let e of s)c+=` ${Bf(e,o)}`;let l=n.getRef(Dl);Object.keys(l).length>0&&a.push(l);let u=n.getRef(Nf);(n.getRef(If)?u.error:u.log)(`[${Uf(t)}] ${r.toUpperCase()} (#${n.id})${c}:`,...a)}),Gf=Rf(({cause:e,fiber:t,logLevel:n,message:r})=>{let i=t.getRef(yf),a=t.getRef(Dl),o=t.currentSpan;if(o===void 0||o._tag===`ExternalSpan`)return;let s={};for(let[e,t]of Object.entries(a))Ea(s,e,t);s[`effect.fiberId`]=t.id,s[`effect.logLevel`]=n.toUpperCase(),e.reasons.length>0&&(s[`effect.cause`]=Jl(e)),o.event(Wa(Array.isArray(r)&&r.length===1?r[0]:r),i.currentTimeNanosUnsafe(),s)});function Kf(){ru.interruptChildren??=au}var qf=vo,Jf=I,Yf=Bl,Xf=U,Zf=G,Qf=Jl,$f=Po,ep=Ro,tp=Of,np=z,rp=Do,ip=Oo,ap=ko,op=Zu,sp=Yu,cp=`~effect/time/DateTime`,lp=`~effect/time/DateTime/TimeZone`,up={[cp]:cp,pipe(){return _i(this,arguments)},[Ha](){return this.toString()},toJSON(){return Rp(this).toJSON()}},dp={...up,_tag:`Utc`,[M](){return qi(this.epochMilliseconds)},[ia](e){return _p(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${Rp(this).toJSON()})`}},fp={...up,_tag:`Zoned`,[M](){return Wi(qi(this.epochMilliseconds))(N(this.zone))},[ia](e){return _p(e)&&e._tag===`Zoned`&&this.epochMilliseconds===e.epochMilliseconds&&aa(this.zone,e.zone)},toString(){return`DateTime.Zoned(${Qp(this)})`}},pp={[lp]:lp,[Ha](){return this.toString()}},mp={...pp,_tag:`Named`,[M](){return P(`Named:${this.id}`)},[ia](e){return yp(e)&&e._tag===`Named`&&this.id===e.id},toString(){return`TimeZone.Named(${this.id})`},toJSON(){return{_id:`TimeZone`,_tag:`Named`,id:this.id}}},hp={...pp,_tag:`Offset`,[M](){return P(`Offset:${this.offset}`)},[ia](e){return yp(e)&&e._tag===`Offset`&&this.offset===e.offset},toString(){return`TimeZone.Offset(${Vp(this.offset)})`},toJSON(){return{_id:`TimeZone`,_tag:`Offset`,offset:this.offset}}},gp=(e,t,n)=>{let r=Object.create(fp);return r.epochMilliseconds=e,r.zone=t,Object.defineProperty(r,"partsUtc",{value:n,enumerable:!1,writable:!0}),Object.defineProperty(r,"adjustedEpochMillis",{value:void 0,enumerable:!1,writable:!0}),Object.defineProperty(r,"partsAdjusted",{value:void 0,enumerable:!1,writable:!0}),r},_p=e=>j(e,cp),vp=e=>_p(e[0]),yp=e=>j(e,lp),bp=e=>yp(e)&&e._tag===`Named`,xp=e=>e._tag===`Zoned`,Sp=e=>{let t=Object.create(dp);return t.epochMilliseconds=e,Object.defineProperty(t,"partsUtc",{value:void 0,enumerable:!1,writable:!0}),t},Cp=e=>{let t=e.getTime();if(Number.isNaN(t))throw new tp(`Invalid date`);return Sp(t)},wp=e=>{if(_p(e))return e;if(e instanceof Date)return Cp(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return Cp(new Date(e.epochMilliseconds));let t=new Date(0);return Wp(t,e),Cp(t)}return typeof e==`string`&&!Tp(e)?Cp(new Date(e+`Z`)):Cp(new Date(e))},Tp=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e),Ep=-864e13+432e5,Dp=864e13-504e5,Op=(e,t)=>{let n=t?.timeZone;if(n===void 0&&_p(e)&&xp(e))return e;let r=wp(e);if(r.epochMilliseconds<Ep||r.epochMilliseconds>Dp)throw RangeError(`Epoch millis out of range: ${r.epochMilliseconds}`);n===void 0&&typeof e==`object`&&`timeZoneId`in e&&(n=e.timeZoneId);let i;if(n===void 0)i=Pp(new Date(r.epochMilliseconds).getTimezoneOffset()*-60*1e3);else if(yp(n))i=n;else if(typeof n==`number`)i=Pp(n);else{let e=Lp(n);if(ds(e))throw new tp(`Invalid time zone: ${n}`);i=e.value}return t?.adjustForTimeZone===!0?Kp(r.epochMilliseconds,i,t?.disambiguation??`compatible`):gp(r.epochMilliseconds,i,r.partsUtc)},kp=()=>Sp(Date.now()),Ap=new Map,jp={day:`numeric`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`longOffset`,fractionalSecondDigits:3,hourCycle:`h23`},Mp=e=>{let t=e.resolvedOptions().timeZone;if(Ap.has(t))return Ap.get(t);let n=Object.create(mp);return n.id=t,n.format=e,Ap.set(t,n),n},Np=e=>{if(Ap.has(e))return Ap.get(e);try{return Mp(new Intl.DateTimeFormat(`en-US`,{...jp,timeZone:e}))}catch{throw new tp(`Invalid time zone: ${e}`)}},Pp=e=>{let t=Object.create(hp);return t.offset=e,t},Fp=_s(Np),Ip=/^(?:GMT|[+-])/,Lp=e=>{if(Ip.test(e)){let t=Jp(e);return t===null?ls():us(Pp(t))}return Fp(e)},Rp=e=>new Date(e.epochMilliseconds),zp=e=>{if(e._tag===`Utc`)return new Date(e.epochMilliseconds);if(e.zone._tag===`Offset`)return new Date(e.epochMilliseconds+e.zone.offset);if(e.adjustedEpochMilliseconds!==void 0)return new Date(e.adjustedEpochMilliseconds);let t=e.zone.format.formatToParts(e.epochMilliseconds).filter(e=>e.type!==`literal`),n=new Date(0);return n.setUTCFullYear(Number(t[2].value),Number(t[0].value)-1,Number(t[1].value)),n.setUTCHours(Number(t[3].value),Number(t[4].value),Number(t[5].value),Number(t[6].value)),e.adjustedEpochMilliseconds=n.getTime(),n},Bp=e=>zp(e).getTime()-Up(e),Vp=e=>{let t=Math.abs(e),n=Math.floor(t/36e5),r=Math.round(t%36e5/6e4);return r===60&&(n+=1,r=0),`${e<0?`-`:`+`}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},Hp=e=>Vp(Bp(e)),Up=e=>e.epochMilliseconds,Wp=(e,t)=>{if(t.year!==void 0&&e.setUTCFullYear(t.year),t.month!==void 0&&e.setUTCMonth(t.month-1),t.day!==void 0&&e.setUTCDate(t.day),t.weekDay!==void 0){let n=t.weekDay-e.getUTCDay();e.setUTCDate(e.getUTCDate()+n)}t.hour!==void 0&&e.setUTCHours(t.hour),t.minute!==void 0&&e.setUTCMinutes(t.minute),t.second!==void 0&&e.setUTCSeconds(t.second),t.millisecond!==void 0&&e.setUTCMilliseconds(t.millisecond)},Gp=864e5,Kp=(e,t,n)=>{if(t._tag===`Offset`)return gp(e-t.offset,t);let r=Yp(e-Gp,e,t),i=Yp(e+Gp,e,t);if(r===i)return gp(e-r,t);let a=r<i,o=r-i;if(a){if(Yp(e-i,e,t)===i)return gp(e-i,t);let a=gp(e-r,t);if(e!==zp(a).getTime())switch(n){case`reject`:{let n=new Date(e).toISOString();throw RangeError(`Gap time: ${n} does not exist in time zone ${t.id}`)}case`earlier`:return gp(e-i,t);case`compatible`:case`later`:return a}return a}if(Yp(e-r,e,t)===r){if(n===`earlier`||n===`compatible`||Yp(e-r+o,e+o,t)===r)return gp(e-r,t);if(n===`reject`){let n=new Date(e).toISOString();throw RangeError(`Ambiguous time: ${n} occurs twice in time zone ${t.id}`)}}return gp(e-i,t)},qp=/([+-])(\d{2}):(\d{2})$/,Jp=e=>{let t=qp.exec(e);if(t===null)return null;let[,n,r,i]=t;return(n===`+`?1:-1)*(Number(r)*60+Number(i))*60*1e3},Yp=(e,t,n)=>{let r=n.format.formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``;if(r===`GMT`)return 0;let i=Jp(r);return i===null?Bp(gp(t,n)):i},Xp=k(vp,(e,t,n)=>{if(e._tag===`Utc`){let n=Rp(e);return t(n),Sp(n.getTime())}let r=zp(e),i=new Date(r.getTime());return t(i),Kp(i.getTime(),e.zone,n?.disambiguation??`compatible`)}),Zp=e=>{let t=zp(e);return e._tag===`Utc`?t.toISOString():`${t.toISOString().slice(0,-1)}${Hp(e)}`},Qp=e=>e.zone._tag===`Offset`?Zp(e):`${Zp(e)}[${e.zone.id}]`,$p=io,em=Su,tm=Cu,nm=J,rm=gu,im=Y,am=mu,om=bu,sm=Du,cm=Ou,lm=ku,um=pu,dm=fu,fm=_u,pm=vu,mm=xu,hm=hu,gm=Hu,_m=X,vm=Lu,ym=Ru,bm=Sd,xm=Ku,Sm=Fu,Cm=fd,wm=ld,Tm=pd,Em=gd,Dm=_d,Om=hd,km=vd,Am=Ef,jm=Vu,Mm=xd,Nm=yd,Pm=nd,Fm=Kd,Im=Bd,Lm=Ud,Rm=Gd,zm=cd,Bm=rf,Vm=of,Hm=lf,Um=sf,Wm=ff,Gm=df,Km=pf,qm=Au,Jm=Vf(`Error`),Ym=qu,Xm=Gu,Zm=Mu;function Qm(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}var $m=`~structural`,eh=`~sentinels`,th=`~constructor`,nh=Oi(e=>{let t=Qm(e)?.identifier;return typeof t==`string`?t:e.getExpected(nh)}),$=Symbol(),rh=np,ih=rh($),ah=rh($),oh=e=>e===$?ls():us(e),sh=e=>e._tag===`None`?ih:rh(e.value),ch=`~effect/SchemaIssue/Issue`;function lh(e){return j(e,ch)&&e[ch]===ch}function uh(e){return Object.hasOwn(e,`input`)}var dh=class{[ch]=ch;constructor(e,t){t?.reportInput===!0&&e!==$&&(this.input=e)}},fh=class extends dh{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},ph=class extends dh{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},mh=class extends dh{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},hh=class extends dh{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},gh=class extends dh{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},_h=class extends dh{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},vh=class extends dh{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},yh=class extends dh{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},bh=class extends dh{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},xh=class extends dh{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Sh(e,t,n){if(lh(e))return e;if(typeof e==`string`)return new yh({message:e},t,n);let r=typeof e.issue==`string`?new yh({message:e.issue},t,n):e.issue;return new mh(e.path,r)}function Ch(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new yh(void 0,t,n):Sh(e,t,n)}function wh(e,t,n,r){return Array.isArray(t)?Ms(t)?t.length===1?Sh(t[0],n,r):new _h(e,Rs(t,e=>Sh(e,n,r)),n,r):void 0:Ch(t,n,r)}var Th=e=>{let t=Ih(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Ah(nh(e.ast),e);case`InvalidValue`:{let t=kh(e);if(t!==void 0)return Ah(t,e);let n=Oh(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Oh(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Oh(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Eh=e=>Ih(e.issue)??Ih(e);function Dh(e){return t=>({issues:jh(t,[],e?.leafHook??Th,e?.checkHook??Eh)})}function Oh(e){return uh(e)?Fa(e.input):void 0}function kh(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function Ah(e,t){let n=Oh(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function jh(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];if(e.issue._tag!==`InvalidValue`)return jh(e.issue,t,n,r);let a=kh(e.issue);return[{path:t,message:a===void 0?Ah(Mh(e.filter),e):Ah(a,e.issue)}]}case`Encoding`:return jh(e.issue,t,n,r);case`Pointer`:return jh(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>jh(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:Ih(e)??Ah(nh(e.ast),e)}]:e.issues.flatMap(e=>jh(e,t,n,r));default:return[{path:t,message:n(e)}]}}function Mh(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>Mh(e)).join(` & `)}}function Nh(){return e=>Fh(e,``)}var Ph=Nh();function Fh(e,t){let n;switch(e._tag){case`Filter`:{let r=Eh(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return Fh(e.issue,t);let r=kh(e.issue);n=r===void 0?Ah(Mh(e.filter),e):Ah(r,e.issue)}break}case`Encoding`:return Fh(e.issue,t);case`Pointer`:return Fh(e.issue,t+Ra(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Fh(e,t)).join(`
|
|
22
|
-
`);n=Ih(e)??Ah(nh(e.ast),e);break;default:n=Th(e)}return t?`${n}\n at ${t}`:n}function Ih(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Ih(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function Lh(e){let t;for(let n of e.reasons){if(!qf(n)||!lh(n.error))return;t??=n.error}return t}function Rh(e,t){let n=Lh(e);if(n===void 0)throw Error(t,{cause:e});return n}var zh=kp,Bh=Up,Vh=class e extends yi{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(Ym(vs(t))))}compose(t){return Uh(this)?t:Uh(t)?this:new e((e,n)=>this.run(e,n).pipe(Xm(e=>t.run(e,n))))}},Hh=new Vh(nm);function Uh(e){return e.run===Hh.run}function Wh(){return Hh}function Gh(e){return new Vh((t,n)=>ds(t)?rm:e(t.value,n))}function Kh(e){return qh(vs(e))}function qh(e){return new Vh(t=>nm(e(t)))}function Jh(){return new Vh(()=>rm)}function Yh(e){return new Vh(t=>{let n=ys(t,Ri);return fs(n)?nm(n):Ym(e,us)})}function Xh(){return Kh(globalThis.String)}function Zh(){return Kh(globalThis.Number)}function Qh(e){return Gh((t,n)=>mm({try:()=>us(JSON.parse(t,e?.reviver)),catch:()=>new yh({expected:`a valid JSON string`},t,n)}))}function $h(e){return Gh((t,n)=>mm({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return us(n)},catch:()=>new yh({expected:`a JSON-serializable value`},t,n)}))}var eg=`~effect/SchemaTransformation/Transformation`,tg=class e{[eg]=eg;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function ng(e){return j(e,eg)&&e[eg]===eg}var rg=e=>ng(e)?e:new tg(e.decode,e.encode),ig=new tg(Wh(),Wh());function ag(){return ig}var og=new tg(Zh(),Xh());function sg(e){return new tg(Qh(e??{}),$h(e))}function cg(e){return t=>t._tag===e}var lg=cg(`Declaration`),ug=cg(`Never`),dg=cg(`Literal`),fg=cg(`UniqueSymbol`),pg=cg(`Arrays`),mg=cg(`Objects`),hg=cg(`Suspend`),gg=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},_g={},vg=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},yg=`~effect/Schema`,bg=class{[yg]=yg;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},xg=class e extends bg{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===$?ih:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(t,n,r,i,a){let o=j_(this.typeParameters,t);return o===this.typeParameters&&n===this.checks&&r===this.encodingChecks&&i===this.run&&a===this.encodingRun?this:new e(o,i,this.annotations,n,void 0,this.context,r,a)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},Sg=new class extends bg{_tag=`Null`;getParser(){return q_(this,null)}getExpected(){return`null`}},Cg=class extends bg{_tag=`Undefined`;getParser(){return q_(this,void 0)}toCodecJson(){return x_(this,[wg])}getExpected(){return`undefined`}},wg=new gg(Sg,new tg(Kh(()=>void 0),Kh(()=>null))),Tg=new Cg,Eg=new class extends bg{_tag=`Unknown`;getParser(){return J_(this,Bi)}getExpected(){return`unknown`}},Dg=class extends bg{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${Fa(e)}`);this.literal=e}getParser(){return q_(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Og(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Og(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Og(e){let t=globalThis.String(e.literal);return x_(e,[new gg(new Dg(t),new tg(Kh(()=>e.literal),Kh(()=>t)))])}var kg=new class extends bg{_tag=`String`;getParser(){return J_(this,Mi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&nv(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},Ag=class extends bg{_tag=`Number`;getParser(){return J_(this,Ni)}matchKey(e,t){return this._match(Z_,e,t)}matchPart(e,t){return this._match(X_,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:nv(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(jg(this.checks,`effect/schema/isFinite`)||jg(this.checks,`effect/schema/isInt`))?this:x_(this,[g_])}toCodecStringTree(){return this.toCodecJson()===this?x_(this,[ev]):x_(this,[tv])}getExpected(){return`number`}};function jg(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&jg(e.checks,t))}var Mg=new Ag,Ng=new class extends bg{_tag=`Boolean`;getParser(){return J_(this,Pi)}getExpected(){return`boolean`}},Pg=class e extends bg{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(z_(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(z_(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}return Zm(function*(e,c){if(e===$)return $;if(!Array.isArray(e))return yield*um(new vh(n,e,c));r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)})));let l=e.length,u={ast:n,getParser:s,input:e,len:l,tailThreshold:Math.max(a,l-o),output:new globalThis.Array(l),issues:void 0,options:c},d=Fg(u,e,{concurrency:Ig(c?.concurrency)?.concurrency,end:n.rest.length===0?a:Math.max(l,a+o)});if(d&&(yield*d),n.rest.length===0&&l>a)for(let t=a;t<=l-1;t++){let r=new gh(n,e[t],c),i=new mh([t],r);if(c.errors===`all`)u.issues?u.issues.push(i):u.issues=[i];else return yield*um(new _h(n,[i],e,c))}return u.issues?yield*um(new _h(n,u.issues,e,c)):u.output})}_rebuild(t,n,r){let i=j_(this.elements,t),a=j_(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},Fg=nf()({onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return Lg(e,e.ast,r,n);let i=n===ah?t:n[F];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(z_(t.ast))return;let n=new mh([r],new hh(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return ip(new _h(e.ast,[n],e.input,e.options))}}}),Ig=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),Lg=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Lh(r.cause);if(i===void 0)return rp(Xf(r.cause,r=>new _h(t,[new mh([n],r)],e.input,e.options)));let a=new mh([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return ip(new _h(t,[a],e.input,e.options))},Rg=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function zg(e,t,n=_g){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Y_(U_(t)))}var Bg=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Vg(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Vg);default:return!1}}function Hg(e){return Vg(e)&&Vg(U_(e))}var Ug=class{parameter;type;constructor(e,t){if(!Hg(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,z_(t)&&!K_(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},Wg=class e extends bg{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e,t=e){let n=this,r=[];for(let e of n.propertySignatures)r.push(e.name);let i=r.length,a=n.indexSignatures.length,o=i&&a?new Set(r):void 0;if(!i&&!a)return J_(n,zi);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return Lg(e,n,t,s)??op;let c=s===ah?a:s[F];if(r!==$&&c!==$){if(i&&(o.has(t)||o.has(r)))return op;Ea(e.out,r,c)}return op},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!Wu(n))return gm(bm(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return Lg(e,n,t,i)??op;let a=i===ah?t:i[F],o=e.input[t],s=r.parserValue(o,e.options);return Wu(s)?l(e,t,a,o,s):gm(bm(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return Wu(i)?l(e,t,t,r,i):gm(bm(i),n=>l(e,t,t,r,n))},f=a?nf()({onItem:(e,[t,n])=>u(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0,p=()=>(s||(s=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),c=a?n.indexSignatures.map(n=>({is:n,parserKey:e(Y_(n.parameter)),parserValue:t(n.type)})):void 0),s),m=Zm(function*(e,t){if(e===$)return $;if(typeof e!=`object`||!e||Array.isArray(e))return yield*um(new vh(n,e,t));p();let l=e,m={},h={ast:n,input:l,out:m,issues:void 0,options:t},g=t.errors===`all`,_=t.onExcessProperty===`error`,v=t.onExcessProperty===`preserve`,y;if(!a&&(_||v)){o??=new Set(r),y=Reflect.ownKeys(l);for(let r=0;r<y.length;r++){let i=y[r];if(!o.has(i)){if(_){let r=new gh(n,l[i],t),a=new mh([i],r);if(g){h.issues?h.issues.push(a):h.issues=[a];continue}return yield*um(new _h(n,[a],e,t))}Ea(m,i,l[i])}}}let b=Ig(t?.concurrency);if(i){let e=Kg(h,s,b);e&&(yield*e)}if(a&&!b)for(let e=0;e<a;e++){let n=c[e],r=n.is.parameter===kg?d:u,i=n.is.parameter===kg?Object.keys(l):zg(l,n.is.parameter,t);for(let e=0;e<i.length;e++){let t=r(h,i[e],n);if(!Wu(t))yield*t;else if(t._tag===`Failure`)return yield*t}}else if(f){let e=Is();for(let n=0;n<a;n++){let r=c[n],i=zg(l,r.is.parameter,t);for(let t=0;t<i.length;t++)e.push([i[t],r])}let n=f(h,e,b);n&&(yield*n)}if(h.issues)return yield*um(new _h(n,h.issues,e,t));if(t.propertyOrder===`original`){let e=(y??Reflect.ownKeys(l)).concat(r),t={};for(let n of e)Object.hasOwn(m,n)&&Ea(t,n,m[n]);return t}return m});if(a)return m;let h=(e,t,n)=>{let r=s[t];return gm(bm(n),n=>{let i=Gg(e,r,n);if(i)return i;let a=()=>rh(e.out),o=Kg(e,s.slice(t+1));return o?Xm(o,a):a()})};return(e,t)=>{if(e===$)return ih;if(t.errors===`all`||t.onExcessProperty!==void 0||t.propertyOrder===`original`||t.concurrency!==void 0)return m(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return um(new vh(n,e,t));let r=p(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Object.hasOwn(i,s),l=c?i[s]:$,u=n.parser(l,t);if(!Wu(u))return h(o,e,u);if(u===ah){c&&Ea(a,s,l);continue}let d=Gg(o,n,u);if(d)return d}}catch(e){return pm(e)}return rh(a)}}_rebuild(t,n,r,i){let a=j_(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new Bg(e.name,n)}),o=j_(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new Ug(r,i)});return a===this.propertySignatures&&o===this.indexSignatures&&r===this.checks&&i===this.encodingChecks?this:new e(a,o,this.annotations,r,void 0,this.context,i)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function Gg(e,t,n){if(n._tag===`Failure`)return Lg(e,e.ast,t.name,n);if(n===ah)return;let r=n[F];if(r!==$){Ea(e.out,t.name,r);return}if(delete e.out[t.name],!z_(t.type)){let n=new mh([t.name],new hh(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return ip(new _h(e.ast,[n],e.input,e.options))}}var Kg=nf()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser($,e.options);let n=e.input[t.name];return Ea(e.out,t.name,n),t.parser(n,e.options)},step:Gg});function qg(e,t){return e?t?[...e,...t]:e:t}function Jg(e,t,n){return new Wg(Reflect.ownKeys(e).map(t=>new Bg(t,e[t].ast)),[],n,t)}function Yg(e){return e.ast}function Xg(e,t,n){return new a_(e.map(Yg),t,void 0,n)}var Zg=ki(e=>{for(;;){if(hg(e))return Eg;let t=e.encoding;if(!t)return e.recur?.(Zg,bi)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==bi))return Eg;e=t[t.length-1].to}});function Qg(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Qg)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function $g(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[eh];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!z_(t)){if(dg(t))return[{key:e.name,literal:t.literal}];if(fg(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!z_(e)){if(dg(e))return[{key:t,literal:e.literal}];if(fg(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>$g(Zg(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return $g(e.thunk())}}var e_=new WeakMap,t_=Object.freeze([]);function n_(e){let t=e_.get(e);if(t)return t;let n,r=0,i,a,o=!0;for(let t=0;t<e.length;t++){let s=e[t],c=Zg(s);if(ug(c))continue;if(o){if(dg(c)||fg(c)){a??=new Map;let e=dg(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1}let l=$g(c);if(l.length){n??=new Map,r++;for(let{key:e,literal:r}of l){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=Qg(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??t_;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=i;for(let[t,n]of i)a.set(t,Object.freeze(Array.from(n,t=>e[t])));t=(t,n)=>{if(A(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??t_;if(n)return e}return t_}}else if(n){let a;for(let e of n)(!a||e[1][0].size>a[1][0].size)&&e[1][1].size===r&&(a=e);t=(t,r)=>{let o=i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??t_;if(!A(t))return o.map(t=>e[t]);let s=new Set(o),c;if(a){let[n,[i]]=a,l=Object.hasOwn(t,n),u=l?t[n]:void 0;if(l&&(!r||u!==void 0)){let t=i.get(u);if(!t)return o.map(t=>e[t]);for(let e of t)s.add(e);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t).map(t=>e[t])}}else t=t=>(i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??t_).map(t=>e[t]).filter(r_(t));return e_.set(e,t),t}function r_(e){return t=>{let n=Zg(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function i_(e,t,n=!1){return n_(t)(e,n)}var a_=class e extends bg{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e,t){let n=this;return(r,i)=>{if(r===$)return ih;let a=i_(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:Wu(t)?o_(n,t.cause,r,i):wm(t,e=>o_(n,e,r,i))}let o={ast:n,compile:e,input:r,out:void 0,successes:n.mode===`oneOf`?[]:void 0,issues:void 0,options:i},s=Ig(i?.concurrency),c=s_(o,a,s?{...s,orderedStep:!0}:void 0);return c?Xm(c,e=>o.out===ah?nm(r):o.out?o.out:um(new bh(n,o.issues??[],r,i))):o.out?o.out:um(new bh(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=j_(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=U_(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(dg);if(t.length>0)return`${l_(n.isMutable)}[ ${t.map(t=>e(t)+u_(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>dg(e.type));if(t.length>0)return`{ ${t.map(t=>`${l_(t.type.context?.isMutable)}${La(t.name)}${u_(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function o_(e,t,n,r){let i=Lh(t);return i?ip(new bh(e,[i],n,r)):rp(t)}var s_=nf()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Lh(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(t),ip(new xh(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return op}}}),c_=new a_([new Dg(`Infinity`),new Dg(`-Infinity`),new Dg(`NaN`)],`anyOf`);function l_(e){return e?``:`readonly `}function u_(e){return e?`?`:``}var d_=class e extends yi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new f_([this,e],t)}},f_=class e extends yi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function p_(e,t,n=!1){return new d_((t,n,r)=>wh(n,e(t,n,r),t,r),t,n)}function m_(e){return p_(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}var h_=T_(Mg,[m_()]),g_=new gg(new a_([h_,c_],`anyOf`),new tg(Zh(),Kh(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function __(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return p_(e=>(r.lastIndex=0,r.test(e)),{expected:`a string matching the RegExp ${n}`,representation:{id:`effect/schema/isPattern`,payload:{source:n,flags:e.flags}},toJsonSchema:()=>({pattern:n}),arbitrary:{constraint:{patterns:[e.source]}},...t})}function v_(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var y_=new WeakMap;function b_(e){return y_.get(e)??e}function x_(e,t){return e.encoding===t?e:v_(e,e=>{e.encoding.value=t})}function S_(e,t){if(e.context===t)return e;let n=b_(e);if(n.context===t)return n;let r=v_(e,e=>{e.context.value=t});return y_.set(r,n),r}function C_(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return w_(e,ks(e.checks.slice(0,-1),n.annotate(t)))}return v_(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function w_(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:v_(e,e=>{e.checks.value=t})}function T_(e,t){return w_(e,qg(e.checks,t))}function E_(e,t){let n=t(e.to);return n===e.to?e:new gg(n,e.transformation)}function D_(e,t){let n=e,r=n[n.length-1],i=E_(r,t);return i===r?e:ks(e.slice(0,e.length-1),i)}function O_(e){return t=>t.encoding?x_(t,D_(t.encoding,e)):t}function k_(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:x_(r,D_(r.encoding,n))}return e(r)}return ki(n)}function A_(e,t,n){let r=new gg(e,t);return x_(n,n.encoding?[...n.encoding,r]:[r])}function j_(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function M_(e,t){return S_(e,e.context?new vg(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new vg(!1,!1,void 0,t))}var N_=ki(e=>P_(S_(e,e.context?e.context.isOptional===!1?new vg(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new vg(!0,!1)))),P_=O_(N_),F_=Oi(e=>N_(new a_([e,Tg],`anyOf`)));function I_(e,t,n){return A_(e,n,t)}function L_(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Ii(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function R_(e,t){let{literals:n,parameters:r}=L_(e);return new Wg(n.map(e=>new Bg(e,t)),r.map(e=>new Ug(e,t)))}function z_(e){return e.context?.isOptional??!1}function B_(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(B_)}function V_(e){function t(e){return B_(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return js(n)?n:void 0}var H_=ki(e=>{if(e.encoding)return H_(x_(e,void 0));let t=e,n=t.recur?.(H_)??t,r=n.encodingChecks;if(r){let t=n===e?r:pg(n)||mg(n)||lg(n)&&n.typeParameters.length>0?V_(r):void 0;return v_(n,e=>{e.encodingChecks.value=void 0,e.checks.value=qg(n.checks,t)})}return n}),U_=ki(e=>H_(G_(e)));function W_(e,t){let n=t,r=n.length,i=n[r-1],a=[new gg(G_(x_(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new gg(G_(n[e-1].to),n[e].transformation.flip()));let o=G_(i.to);return o.encoding?x_(o,[...o.encoding,...a]):x_(o,a)}var G_=Oi(e=>{if(e.encoding)return W_(e,e.encoding);let t=e;return t.flip?.(G_)??t.recur?.(G_)??t});function K_(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(K_);default:return!1}}function q_(e,t){let n=rh(t);return(r,i)=>r===$?ih:r===t?n:um(new vh(e,r,i))}function J_(e,t){return(n,r)=>n===$?ih:t(n)?ah:um(new vh(e,n,r))}var Y_=k_(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Y_)}}),X_=new globalThis.RegExp(`^${Rg}$`),Z_=new globalThis.RegExp(`^(?:${Rg}|Infinity|-Infinity|NaN)$`);function Q_(e){return __(X_,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:X_.source}),...e})}var $_=T_(kg,[Q_()]),ev=new gg($_,og),tv=new gg(new a_([$_,c_],`anyOf`),og);function nv(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=nv(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new fh(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function rv(e){if(!lg(e))return;let t=e.annotations?.[th];return Li(t)?t(e.typeParameters):void 0}function iv(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function av(e){return e===void 0||typeof e==`string`}function ov(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function sv(e){return ov(e,iv)}var cv=new xg([],()=>(e,t,n)=>sv(e)?ah:um(new vh(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>uv,toArbitrary:()=>e=>e.jsonValue()});function lv(e){return ov(e,av)}var uv=new gg(new xg([],()=>(e,t,n)=>lv(e)?ah:um(new vh(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),ag());function dv(e){let t=Cv(Dv,H_(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function fv(e){let t=dv(e);return(e,n)=>{let r=Km(t(e,n));return sp(r)?us(r.value):(Rh(r.cause,`Option adapter can only return none for schema issues`),ls())}}function pv(e){let t=dv(e);return(e,n)=>{let r=Km(t(e,n));if(sp(r))return r.value;let i=Rh(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function mv(e){return hv(e.ast)}function hv(e){let t=wv(Sv(H_(e)));return e=>{let n=t(e,_g);return sp(n)?!0:(Rh(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}function gv(e,t){let n=Sv(e.ast);return t===void 0?n:(e,r)=>n(e,bv(t,r))}function _v(e,t){return Tv(gv(e,t))}var vv=_v;function yv(e,t){let n=Sv(G_(e.ast));return t===void 0?n:(e,r)=>n(e,bv(t,r))}var bv=(e,t)=>t?{...e,...t}:e,xv=e=>e===$?um(new yh):nm(e);function Sv(e){return Cv(Ev,e)}function Cv(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??_g);return a===ah?nm(r):Wu(a)?a[F]===$?xv($):a:Xm(a,xv)}}function wv(e){return(t,n)=>Km(e(t,n))}function Tv(e){let t=wv(e);return(e,n)=>{let r=t(e,n);return sp(r)?us(r.value):(Rh(r.cause,`Option adapter can only return none for schema issues`),ls())}}var Ev=Oi(e=>Mv(e,Ev)),Dv=Oi(e=>Mv(e,Dv,kv)),Ov=Oi(e=>Mv(e,Dv,kv,e.context?.constructorDefault));function kv(e){return e.context?.constructorDefault?Ov(e):Dv(e)}function Av(e,t,n,r){let i;if(Wu(e)&&e._tag===`Success`){let a=oh(e===ah?t:e[F]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(rh(a),r)}else i=n._tag===`Transformation`?Xm(e,e=>n.decode.run(oh(e),r)):n.decode(Ym(e,oh),r);return Wu(i)&&i._tag===`Success`?sh(i[F]):Xm(i,sh)}function jv(e,t){let n;return(r,i)=>r===$?ih:e.isConstructed(r)?ah:Av((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function Mv(e,t,n,r){let i=n?rv(e):void 0,a=i?jv(i,t):e.getParser(t,n),o=e.checks,s=r?e.encoding?[...e.encoding,r]:[r]:e.encoding,c=e.encodingChecks,l=(o?o[o.length-1].annotations:e.annotations)?.parseOptions;if(!s&&!o&&!c)return l?(e,t)=>a(e,bv(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===ah?t:r[F];if(t!==$&&i!==$){let i=nv(c,t,void 0,e,n);i&&(r=um(new _h(e,i,t,n)))}}}else r=gm(r,r=>{if(t!==$&&r!==$){let r=nv(c,t,void 0,e,n);if(r)return um(new _h(e,r,t,n))}return nm(r)})}if(o&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===ah?t:r[F];if(i===$)return r;let a=nv(o,i,void 0,e,n);a&&(r=um(new _h(e,a,i,n)))}}else r=gm(r,t=>{if(t!==$){let r=nv(o,t,void 0,e,n);if(r)return um(new _h(e,r,t,n))}return nm(t)})}return r};return s?(n,r)=>{l&&(r=bv(r,l));let i=u??=s.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=s.length-1;e>=0;e--)if(o=Av(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[F],o=t(a,r)):o=Xm(o,e=>{let n=t(e,r);return n===ah?rh(e):n})}if(o._tag===`Success`){let e=o[F],t=d(e,r);return t===ah?o:t}return o=wm(o,t=>fm(()=>Xf(t,t=>new ph(e,t,n,r)))),Xm(o,e=>{let t=d(e,r);return t===ah?rh(e):t})}:l?(e,t)=>d(e,bv(t,l)):d}var Nv=`~effect/Schema/Schema`,Pv={[Nv]:Nv,pipe(){return _i(this,arguments)},annotate(e){return this.rebuild(C_(this.ast,e))},annotateKey(e){return this.rebuild(M_(this.ast,e))},check(...e){return this.rebuild(T_(this.ast,e))}};function Fv(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,Pv),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>Fv(e,t),r.makeEffect=dv(r),r.make=pv(r),r.makeOption=fv(r),r}var Iv=e=>e,Lv=`~effect/SchemaError/SchemaError`,Rv=class extends xl(`SchemaError`){[Lv]=Lv;constructor(e){let t=Ml();Nl(0);try{super({issue:e})}finally{Nl(t)}}get message(){return Ph(this.issue)}toString(){return`SchemaError(${this.message})`}};function zv(e){return j(e,Lv)&&e[Lv]===Lv}function Bv(e){return sp(e)?e.value:{issues:[{message:Qf(e.cause)}]}}function Vv(e,t){let n=gv(e),r={errors:`all`,...t?.parseOptions},i=Dh(t),a=e=>{let t=new _l(`sync`),a=Hm(Mm(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Bv(o):new Promise(e=>{a.addObserver(t=>{e(Bv(t))})})};if(`~standard`in e){let t=e;return`validate`in t[`~standard`]||Object.assign(t[`~standard`],{validate:a}),t}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,validate:a}})}var Hv=mv;function Uv(e,t){let n=gv(e,t);return(e,t)=>Wv(n(e,t))}function Wv(e){return Wu(e)?qv(e):wm(e,e=>fm(()=>Xf(e,e=>new Rv(e))))}function Gv(e,t){let n;for(let r of e.reasons){if(!qf(r)||!zv(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Kv(e){let t=Km(e);if(sp(t))return t.value;throw Gv(t.cause,`Sync adapter can only throw schema errors`)}function qv(e){return sp(e)?e:rp(Xf(e.cause,e=>new Rv(e)))}var Jv=_v,Yv=vv;function Xv(e,t){let n=Uv(e,t);return(e,t)=>Kv(n(e,t))}function Zv(e,t){let n=yv(e,t);return(e,t)=>Wv(n(e,t))}function Qv(e,t){let n=Zv(e,t);return(e,t)=>Kv(n(e,t))}var $v=Qv,ey=Fv,ty=Iv(e=>ey(N_(e.ast),{schema:e})),ny=Iv(e=>{let t=by(e);return ey(F_(e.ast),{schema:t})}),ry=Iv(e=>ey(U_(e.ast),{schema:e}));function iy(e){let t=ey(new Dg(e),{literal:e,transform(n){return t.pipe(xy(iy(n),{decode:Kh(()=>n),encode:Kh(()=>e)}))}});return t}var ay=ey(Eg),oy=ey(Sg),sy=ey(Tg),cy=ey(kg),ly=ey(Mg),uy=ey(Ng);function dy(e,t){return ey(e,{fields:t,mapFields(e,t){let n=e(this.fields);return dy(Jg(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function fy(e){return dy(Jg(e,void 0),e)}function py(e,t){return ey(R_(e.ast,t.ast),{key:e,value:t})}var my=Iv(e=>ey(new Pg(!1,[],[e.ast]),{value:e})),hy=Iv(e=>ey(new Pg(!0,e.ast.elements,e.ast.rest),{schema:e}));function gy(e,t){return ey(e,{members:t,mapMembers(e,t){let n=e(this.members);return gy(Xg(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function _y(e,t){return gy(Xg(e,t?.mode??`anyOf`,void 0),e)}function vy(e){let t=e.map(iy);return ey(Xg(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return _y(e(this.members))},pick(e){return vy(e)},transform(e){return _y(t.map((t,n)=>t.transform(e[n])))}})}var yy=Iv(e=>_y([e,oy])),by=Iv(e=>_y([e,sy]));function xy(e,t){return n=>ey(I_(n.ast,e.ast,t?rg(t):ag()),{from:n,to:e})}function Sy(e){return wm(e,e=>fm(()=>Xf(e,e=>e.issue)))}function Cy(e,t){let n=t?.encodingStrategy===`omit`?Jh():Wh();return t=>ty(ry(t)).pipe(xy(t,{decode:Yh(Sy(e)),encode:n}))}var wy=p_,Ty=ey(h_);function Ey(e){return wy(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`}),toCode:()=>({runtime:`Schema.isInt()`}),arbitrary:{constraint:{integer:!0}},...e})}var Dy=ly.check(Ey());function Oy(e,t){return e=Math.max(0,Math.floor(e)),wy(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:t})=>t===`array`?{minItems:e}:{minLength:e},toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[$m]:!0,arbitrary:{constraint:{minLength:e}},...t})}function ky(e){return Oy(1,e)}var Ay=cy.check(ky());globalThis.RegExp,globalThis.URL;var jy=cy.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function My(e,t){return jy.pipe(xy(e,sg(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams,globalThis.Uint8Array;var Ny=ey(C_(cv,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),Py=Jv(Ay),Fy=Jv(Dy);function Iy(e){let t=Py(e??``);return fs(t)?t.value:void 0}function Ly(e){if(e===void 0)return;let t=Fy(e);if(fs(t)&&t.value>0)return t.value;if(!Mi(e))return;let n=Fy(Number.parseInt(e,10));return fs(n)&&n.value>0?n.value:void 0}function Ry(e){return{kind:Iy(e.kind),name:Iy(e.name),run:Iy(e.run),thread:Iy(e.thread),seq:Ly(e.seq)}}var zy=`modulepreload`,By=function(e,t){return new URL(e,t).href},Vy={},Hy=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=By(t,n),t=s(t),t in Vy)return;Vy[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:zy,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Uy=Hr(`/`)({validateSearch:Ry,component:Ur(()=>Hy(()=>import(`./routes-CZ0buqO7.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),Wy={IndexRoute:Uy.update({id:`/`,path:`/`,getParentRoute:()=>gi})},Gy=gi._addFileChildren(Wy)._addFileTypes();function Ky(){if(typeof document>`u`)return;let e=document.querySelector(`base`)?.getAttribute(`href`);if(!e)return;let t=e.replace(/\/+$/,``);return t.startsWith(`/`)&&t.length>1?t:void 0}function qy(){return oi({routeTree:Gy,basepath:Ky()})}var Jy=document.getElementById(`root`);Jy&&(0,hi.createRoot)(Jy).render((0,D.jsx)(i.StrictMode,{children:(0,D.jsx)(li,{router:qy()})}));export{Dm as $,M as $n,zd as $t,Sm as A,ds as An,op as At,dm as B,z as Bn,Ju as Bt,Vv as C,ws as Cn,zp as Ct,Fm as D,ps as Dn,rp as Dt,Bh as E,ms as En,ap as Et,Cm as F,Io as Fn,Zf as Ft,zm as G,wa as Gn,cu as Gt,Xm as H,Ha as Hn,$u as Ht,Pm as I,no as In,Lu as It,lm as J,aa as Jn,eu as Jt,Bm as K,xa as Kn,cf as Kt,Lm as L,go as Ln,Iu as Lt,wm as M,ls as Mn,Jf as Mt,Tm as N,us as Nn,Yf as Nt,Im as O,hs as On,sp as Ot,Em as P,os as Pn,$f as Pt,xm as Q,N as Qn,Vd as Qt,bm as R,Oo as Rn,Du as Rt,ny as S,Cs as Sn,Xp as St,zh as T,bs as Tn,Lp as Tt,_m as U,Ua as Un,ou as Ut,gm as V,Ao as Vn,Zu as Vt,qm as W,Fa as Wn,lu as Wt,$p as X,Zi as Xn,Ku as Xt,km as Y,ia as Yn,vf as Yt,Jm as Z,Wi as Zn,Hd as Zt,Xv as _,Ls as _n,om as _t,Ny as a,J as an,Hi as ar,Hm as at,Hv as b,xs as bn,bp as bt,yy as c,mu as cn,xi as cr,Gm as ct,fy as d,xl as dn,Di as dr,im as dt,Nd as en,j as er,Nm as et,_y as f,ac as fn,_i as fr,am as ft,Jv as g,Ms as gn,mm as gt,Uv as h,Os as hn,r as hr,tm as ht,Ty as i,Id as in,Vi as ir,jm as it,sm as j,fs as jn,ep as jt,vm as k,gs as kn,np as kt,py as l,$d as ln,k as lr,Am as lt,Yv as m,Tc as mn,Pn as mr,Om as mt,my as n,Fd as nn,Li as nr,Rm as nt,iy as o,gu as on,Mi as or,Um as ot,ay as p,Cc as pn,pi as pr,ym as pt,Vm as q,Ca as qn,Hu as qt,uy as r,jd as rn,Ni as rr,em as rt,vy as s,Y as sn,Ei as sr,Wm as st,Uy as t,Dd as tn,Pi as tr,cm as tt,cy as u,bu as un,bi as ur,nm as ut,$v as v,Ns as vn,hm as vt,Cy as w,Ts as wn,Rp as wt,hy as x,Ss as xn,Op as xt,My as y,Es as yn,yp as yt,um as z,Do as zn,dd as zt};
|
|
22
|
+
`);n=Ih(e)??Ah(nh(e.ast),e);break;default:n=Th(e)}return t?`${n}\n at ${t}`:n}function Ih(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Ih(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function Lh(e){let t;for(let n of e.reasons){if(!qf(n)||!lh(n.error))return;t??=n.error}return t}function Rh(e,t){let n=Lh(e);if(n===void 0)throw Error(t,{cause:e});return n}var zh=kp,Bh=Up,Vh=class e extends yi{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(Ym(vs(t))))}compose(t){return Uh(this)?t:Uh(t)?this:new e((e,n)=>this.run(e,n).pipe(Xm(e=>t.run(e,n))))}},Hh=new Vh(nm);function Uh(e){return e.run===Hh.run}function Wh(){return Hh}function Gh(e){return new Vh((t,n)=>ds(t)?rm:e(t.value,n))}function Kh(e){return qh(vs(e))}function qh(e){return new Vh(t=>nm(e(t)))}function Jh(){return new Vh(()=>rm)}function Yh(e){return new Vh(t=>{let n=ys(t,Ri);return fs(n)?nm(n):Ym(e,us)})}function Xh(){return Kh(globalThis.String)}function Zh(){return Kh(globalThis.Number)}function Qh(e){return Gh((t,n)=>mm({try:()=>us(JSON.parse(t,e?.reviver)),catch:()=>new yh({expected:`a valid JSON string`},t,n)}))}function $h(e){return Gh((t,n)=>mm({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return us(n)},catch:()=>new yh({expected:`a JSON-serializable value`},t,n)}))}var eg=`~effect/SchemaTransformation/Transformation`,tg=class e{[eg]=eg;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function ng(e){return j(e,eg)&&e[eg]===eg}var rg=e=>ng(e)?e:new tg(e.decode,e.encode),ig=new tg(Wh(),Wh());function ag(){return ig}var og=new tg(Zh(),Xh());function sg(e){return new tg(Qh(e??{}),$h(e))}function cg(e){return t=>t._tag===e}var lg=cg(`Declaration`),ug=cg(`Never`),dg=cg(`Literal`),fg=cg(`UniqueSymbol`),pg=cg(`Arrays`),mg=cg(`Objects`),hg=cg(`Suspend`),gg=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},_g={},vg=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},yg=`~effect/Schema`,bg=class{[yg]=yg;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},xg=class e extends bg{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===$?ih:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(t,n,r,i,a){let o=j_(this.typeParameters,t);return o===this.typeParameters&&n===this.checks&&r===this.encodingChecks&&i===this.run&&a===this.encodingRun?this:new e(o,i,this.annotations,n,void 0,this.context,r,a)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},Sg=new class extends bg{_tag=`Null`;getParser(){return q_(this,null)}getExpected(){return`null`}},Cg=class extends bg{_tag=`Undefined`;getParser(){return q_(this,void 0)}toCodecJson(){return x_(this,[wg])}getExpected(){return`undefined`}},wg=new gg(Sg,new tg(Kh(()=>void 0),Kh(()=>null))),Tg=new Cg,Eg=new class extends bg{_tag=`Unknown`;getParser(){return J_(this,Bi)}getExpected(){return`unknown`}},Dg=class extends bg{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${Fa(e)}`);this.literal=e}getParser(){return q_(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Og(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Og(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Og(e){let t=globalThis.String(e.literal);return x_(e,[new gg(new Dg(t),new tg(Kh(()=>e.literal),Kh(()=>t)))])}var kg=new class extends bg{_tag=`String`;getParser(){return J_(this,Mi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&nv(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},Ag=class extends bg{_tag=`Number`;getParser(){return J_(this,Ni)}matchKey(e,t){return this._match(Z_,e,t)}matchPart(e,t){return this._match(X_,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:nv(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(jg(this.checks,`effect/schema/isFinite`)||jg(this.checks,`effect/schema/isInt`))?this:x_(this,[g_])}toCodecStringTree(){return this.toCodecJson()===this?x_(this,[ev]):x_(this,[tv])}getExpected(){return`number`}};function jg(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&jg(e.checks,t))}var Mg=new Ag,Ng=new class extends bg{_tag=`Boolean`;getParser(){return J_(this,Pi)}getExpected(){return`boolean`}},Pg=class e extends bg{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(z_(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(z_(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}return Zm(function*(e,c){if(e===$)return $;if(!Array.isArray(e))return yield*um(new vh(n,e,c));r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)})));let l=e.length,u={ast:n,getParser:s,input:e,len:l,tailThreshold:Math.max(a,l-o),output:new globalThis.Array(l),issues:void 0,options:c},d=Fg(u,e,{concurrency:Ig(c?.concurrency)?.concurrency,end:n.rest.length===0?a:Math.max(l,a+o)});if(d&&(yield*d),n.rest.length===0&&l>a)for(let t=a;t<=l-1;t++){let r=new gh(n,e[t],c),i=new mh([t],r);if(c.errors===`all`)u.issues?u.issues.push(i):u.issues=[i];else return yield*um(new _h(n,[i],e,c))}return u.issues?yield*um(new _h(n,u.issues,e,c)):u.output})}_rebuild(t,n,r){let i=j_(this.elements,t),a=j_(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},Fg=nf()({onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return Lg(e,e.ast,r,n);let i=n===ah?t:n[F];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(z_(t.ast))return;let n=new mh([r],new hh(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return ip(new _h(e.ast,[n],e.input,e.options))}}}),Ig=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),Lg=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Lh(r.cause);if(i===void 0)return rp(Xf(r.cause,r=>new _h(t,[new mh([n],r)],e.input,e.options)));let a=new mh([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return ip(new _h(t,[a],e.input,e.options))},Rg=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function zg(e,t,n=_g){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Y_(U_(t)))}var Bg=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Vg(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Vg);default:return!1}}function Hg(e){return Vg(e)&&Vg(U_(e))}var Ug=class{parameter;type;constructor(e,t){if(!Hg(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,z_(t)&&!K_(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},Wg=class e extends bg{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e,t=e){let n=this,r=[];for(let e of n.propertySignatures)r.push(e.name);let i=r.length,a=n.indexSignatures.length,o=i&&a?new Set(r):void 0;if(!i&&!a)return J_(n,zi);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return Lg(e,n,t,s)??op;let c=s===ah?a:s[F];if(r!==$&&c!==$){if(i&&(o.has(t)||o.has(r)))return op;Ea(e.out,r,c)}return op},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!Wu(n))return gm(bm(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return Lg(e,n,t,i)??op;let a=i===ah?t:i[F],o=e.input[t],s=r.parserValue(o,e.options);return Wu(s)?l(e,t,a,o,s):gm(bm(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return Wu(i)?l(e,t,t,r,i):gm(bm(i),n=>l(e,t,t,r,n))},f=a?nf()({onItem:(e,[t,n])=>u(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0,p=()=>(s||(s=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),c=a?n.indexSignatures.map(n=>({is:n,parserKey:e(Y_(n.parameter)),parserValue:t(n.type)})):void 0),s),m=Zm(function*(e,t){if(e===$)return $;if(typeof e!=`object`||!e||Array.isArray(e))return yield*um(new vh(n,e,t));p();let l=e,m={},h={ast:n,input:l,out:m,issues:void 0,options:t},g=t.errors===`all`,_=t.onExcessProperty===`error`,v=t.onExcessProperty===`preserve`,y;if(!a&&(_||v)){o??=new Set(r),y=Reflect.ownKeys(l);for(let r=0;r<y.length;r++){let i=y[r];if(!o.has(i)){if(_){let r=new gh(n,l[i],t),a=new mh([i],r);if(g){h.issues?h.issues.push(a):h.issues=[a];continue}return yield*um(new _h(n,[a],e,t))}Ea(m,i,l[i])}}}let b=Ig(t?.concurrency);if(i){let e=Kg(h,s,b);e&&(yield*e)}if(a&&!b)for(let e=0;e<a;e++){let n=c[e],r=n.is.parameter===kg?d:u,i=n.is.parameter===kg?Object.keys(l):zg(l,n.is.parameter,t);for(let e=0;e<i.length;e++){let t=r(h,i[e],n);if(!Wu(t))yield*t;else if(t._tag===`Failure`)return yield*t}}else if(f){let e=Is();for(let n=0;n<a;n++){let r=c[n],i=zg(l,r.is.parameter,t);for(let t=0;t<i.length;t++)e.push([i[t],r])}let n=f(h,e,b);n&&(yield*n)}if(h.issues)return yield*um(new _h(n,h.issues,e,t));if(t.propertyOrder===`original`){let e=(y??Reflect.ownKeys(l)).concat(r),t={};for(let n of e)Object.hasOwn(m,n)&&Ea(t,n,m[n]);return t}return m});if(a)return m;let h=(e,t,n)=>{let r=s[t];return gm(bm(n),n=>{let i=Gg(e,r,n);if(i)return i;let a=()=>rh(e.out),o=Kg(e,s.slice(t+1));return o?Xm(o,a):a()})};return(e,t)=>{if(e===$)return ih;if(t.errors===`all`||t.onExcessProperty!==void 0||t.propertyOrder===`original`||t.concurrency!==void 0)return m(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return um(new vh(n,e,t));let r=p(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Object.hasOwn(i,s),l=c?i[s]:$,u=n.parser(l,t);if(!Wu(u))return h(o,e,u);if(u===ah){c&&Ea(a,s,l);continue}let d=Gg(o,n,u);if(d)return d}}catch(e){return pm(e)}return rh(a)}}_rebuild(t,n,r,i){let a=j_(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new Bg(e.name,n)}),o=j_(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new Ug(r,i)});return a===this.propertySignatures&&o===this.indexSignatures&&r===this.checks&&i===this.encodingChecks?this:new e(a,o,this.annotations,r,void 0,this.context,i)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function Gg(e,t,n){if(n._tag===`Failure`)return Lg(e,e.ast,t.name,n);if(n===ah)return;let r=n[F];if(r!==$){Ea(e.out,t.name,r);return}if(delete e.out[t.name],!z_(t.type)){let n=new mh([t.name],new hh(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return ip(new _h(e.ast,[n],e.input,e.options))}}var Kg=nf()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser($,e.options);let n=e.input[t.name];return Ea(e.out,t.name,n),t.parser(n,e.options)},step:Gg});function qg(e,t){return e?t?[...e,...t]:e:t}function Jg(e,t,n){return new Wg(Reflect.ownKeys(e).map(t=>new Bg(t,e[t].ast)),[],n,t)}function Yg(e){return e.ast}function Xg(e,t,n){return new a_(e.map(Yg),t,void 0,n)}var Zg=ki(e=>{for(;;){if(hg(e))return Eg;let t=e.encoding;if(!t)return e.recur?.(Zg,bi)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==bi))return Eg;e=t[t.length-1].to}});function Qg(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Qg)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function $g(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[eh];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!z_(t)){if(dg(t))return[{key:e.name,literal:t.literal}];if(fg(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!z_(e)){if(dg(e))return[{key:t,literal:e.literal}];if(fg(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>$g(Zg(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return $g(e.thunk())}}var e_=new WeakMap,t_=Object.freeze([]);function n_(e){let t=e_.get(e);if(t)return t;let n,r=0,i,a,o=!0;for(let t=0;t<e.length;t++){let s=e[t],c=Zg(s);if(ug(c))continue;if(o){if(dg(c)||fg(c)){a??=new Map;let e=dg(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1}let l=$g(c);if(l.length){n??=new Map,r++;for(let{key:e,literal:r}of l){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=Qg(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??t_;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=i;for(let[t,n]of i)a.set(t,Object.freeze(Array.from(n,t=>e[t])));t=(t,n)=>{if(A(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??t_;if(n)return e}return t_}}else if(n){let a;for(let e of n)(!a||e[1][0].size>a[1][0].size)&&e[1][1].size===r&&(a=e);t=(t,r)=>{let o=i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??t_;if(!A(t))return o.map(t=>e[t]);let s=new Set(o),c;if(a){let[n,[i]]=a,l=Object.hasOwn(t,n),u=l?t[n]:void 0;if(l&&(!r||u!==void 0)){let t=i.get(u);if(!t)return o.map(t=>e[t]);for(let e of t)s.add(e);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t).map(t=>e[t])}}else t=t=>(i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??t_).map(t=>e[t]).filter(r_(t));return e_.set(e,t),t}function r_(e){return t=>{let n=Zg(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function i_(e,t,n=!1){return n_(t)(e,n)}var a_=class e extends bg{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e,t){let n=this;return(r,i)=>{if(r===$)return ih;let a=i_(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:Wu(t)?o_(n,t.cause,r,i):wm(t,e=>o_(n,e,r,i))}let o={ast:n,compile:e,input:r,out:void 0,successes:n.mode===`oneOf`?[]:void 0,issues:void 0,options:i},s=Ig(i?.concurrency),c=s_(o,a,s?{...s,orderedStep:!0}:void 0);return c?Xm(c,e=>o.out===ah?nm(r):o.out?o.out:um(new bh(n,o.issues??[],r,i))):o.out?o.out:um(new bh(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=j_(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=U_(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(dg);if(t.length>0)return`${l_(n.isMutable)}[ ${t.map(t=>e(t)+u_(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>dg(e.type));if(t.length>0)return`{ ${t.map(t=>`${l_(t.type.context?.isMutable)}${La(t.name)}${u_(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function o_(e,t,n,r){let i=Lh(t);return i?ip(new bh(e,[i],n,r)):rp(t)}var s_=nf()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Lh(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(t),ip(new xh(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return op}}}),c_=new a_([new Dg(`Infinity`),new Dg(`-Infinity`),new Dg(`NaN`)],`anyOf`);function l_(e){return e?``:`readonly `}function u_(e){return e?`?`:``}var d_=class e extends yi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new f_([this,e],t)}},f_=class e extends yi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function p_(e,t,n=!1){return new d_((t,n,r)=>wh(n,e(t,n,r),t,r),t,n)}function m_(e){return p_(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}var h_=T_(Mg,[m_()]),g_=new gg(new a_([h_,c_],`anyOf`),new tg(Zh(),Kh(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function __(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return p_(e=>(r.lastIndex=0,r.test(e)),{expected:`a string matching the RegExp ${n}`,representation:{id:`effect/schema/isPattern`,payload:{source:n,flags:e.flags}},toJsonSchema:()=>({pattern:n}),arbitrary:{constraint:{patterns:[e.source]}},...t})}function v_(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var y_=new WeakMap;function b_(e){return y_.get(e)??e}function x_(e,t){return e.encoding===t?e:v_(e,e=>{e.encoding.value=t})}function S_(e,t){if(e.context===t)return e;let n=b_(e);if(n.context===t)return n;let r=v_(e,e=>{e.context.value=t});return y_.set(r,n),r}function C_(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return w_(e,ks(e.checks.slice(0,-1),n.annotate(t)))}return v_(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function w_(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:v_(e,e=>{e.checks.value=t})}function T_(e,t){return w_(e,qg(e.checks,t))}function E_(e,t){let n=t(e.to);return n===e.to?e:new gg(n,e.transformation)}function D_(e,t){let n=e,r=n[n.length-1],i=E_(r,t);return i===r?e:ks(e.slice(0,e.length-1),i)}function O_(e){return t=>t.encoding?x_(t,D_(t.encoding,e)):t}function k_(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:x_(r,D_(r.encoding,n))}return e(r)}return ki(n)}function A_(e,t,n){let r=new gg(e,t);return x_(n,n.encoding?[...n.encoding,r]:[r])}function j_(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function M_(e,t){return S_(e,e.context?new vg(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new vg(!1,!1,void 0,t))}var N_=ki(e=>P_(S_(e,e.context?e.context.isOptional===!1?new vg(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new vg(!0,!1)))),P_=O_(N_),F_=Oi(e=>N_(new a_([e,Tg],`anyOf`)));function I_(e,t,n){return A_(e,n,t)}function L_(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Ii(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function R_(e,t){let{literals:n,parameters:r}=L_(e);return new Wg(n.map(e=>new Bg(e,t)),r.map(e=>new Ug(e,t)))}function z_(e){return e.context?.isOptional??!1}function B_(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(B_)}function V_(e){function t(e){return B_(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return js(n)?n:void 0}var H_=ki(e=>{if(e.encoding)return H_(x_(e,void 0));let t=e,n=t.recur?.(H_)??t,r=n.encodingChecks;if(r){let t=n===e?r:pg(n)||mg(n)||lg(n)&&n.typeParameters.length>0?V_(r):void 0;return v_(n,e=>{e.encodingChecks.value=void 0,e.checks.value=qg(n.checks,t)})}return n}),U_=ki(e=>H_(G_(e)));function W_(e,t){let n=t,r=n.length,i=n[r-1],a=[new gg(G_(x_(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new gg(G_(n[e-1].to),n[e].transformation.flip()));let o=G_(i.to);return o.encoding?x_(o,[...o.encoding,...a]):x_(o,a)}var G_=Oi(e=>{if(e.encoding)return W_(e,e.encoding);let t=e;return t.flip?.(G_)??t.recur?.(G_)??t});function K_(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(K_);default:return!1}}function q_(e,t){let n=rh(t);return(r,i)=>r===$?ih:r===t?n:um(new vh(e,r,i))}function J_(e,t){return(n,r)=>n===$?ih:t(n)?ah:um(new vh(e,n,r))}var Y_=k_(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Y_)}}),X_=new globalThis.RegExp(`^${Rg}$`),Z_=new globalThis.RegExp(`^(?:${Rg}|Infinity|-Infinity|NaN)$`);function Q_(e){return __(X_,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:X_.source}),...e})}var $_=T_(kg,[Q_()]),ev=new gg($_,og),tv=new gg(new a_([$_,c_],`anyOf`),og);function nv(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=nv(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new fh(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function rv(e){if(!lg(e))return;let t=e.annotations?.[th];return Li(t)?t(e.typeParameters):void 0}function iv(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function av(e){return e===void 0||typeof e==`string`}function ov(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function sv(e){return ov(e,iv)}var cv=new xg([],()=>(e,t,n)=>sv(e)?ah:um(new vh(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>uv,toArbitrary:()=>e=>e.jsonValue()});function lv(e){return ov(e,av)}var uv=new gg(new xg([],()=>(e,t,n)=>lv(e)?ah:um(new vh(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),ag());function dv(e){let t=Cv(Dv,H_(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function fv(e){let t=dv(e);return(e,n)=>{let r=Km(t(e,n));return sp(r)?us(r.value):(Rh(r.cause,`Option adapter can only return none for schema issues`),ls())}}function pv(e){let t=dv(e);return(e,n)=>{let r=Km(t(e,n));if(sp(r))return r.value;let i=Rh(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function mv(e){return hv(e.ast)}function hv(e){let t=wv(Sv(H_(e)));return e=>{let n=t(e,_g);return sp(n)?!0:(Rh(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}function gv(e,t){let n=Sv(e.ast);return t===void 0?n:(e,r)=>n(e,bv(t,r))}function _v(e,t){return Tv(gv(e,t))}var vv=_v;function yv(e,t){let n=Sv(G_(e.ast));return t===void 0?n:(e,r)=>n(e,bv(t,r))}var bv=(e,t)=>t?{...e,...t}:e,xv=e=>e===$?um(new yh):nm(e);function Sv(e){return Cv(Ev,e)}function Cv(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??_g);return a===ah?nm(r):Wu(a)?a[F]===$?xv($):a:Xm(a,xv)}}function wv(e){return(t,n)=>Km(e(t,n))}function Tv(e){let t=wv(e);return(e,n)=>{let r=t(e,n);return sp(r)?us(r.value):(Rh(r.cause,`Option adapter can only return none for schema issues`),ls())}}var Ev=Oi(e=>Mv(e,Ev)),Dv=Oi(e=>Mv(e,Dv,kv)),Ov=Oi(e=>Mv(e,Dv,kv,e.context?.constructorDefault));function kv(e){return e.context?.constructorDefault?Ov(e):Dv(e)}function Av(e,t,n,r){let i;if(Wu(e)&&e._tag===`Success`){let a=oh(e===ah?t:e[F]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(rh(a),r)}else i=n._tag===`Transformation`?Xm(e,e=>n.decode.run(oh(e),r)):n.decode(Ym(e,oh),r);return Wu(i)&&i._tag===`Success`?sh(i[F]):Xm(i,sh)}function jv(e,t){let n;return(r,i)=>r===$?ih:e.isConstructed(r)?ah:Av((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function Mv(e,t,n,r){let i=n?rv(e):void 0,a=i?jv(i,t):e.getParser(t,n),o=e.checks,s=r?e.encoding?[...e.encoding,r]:[r]:e.encoding,c=e.encodingChecks,l=(o?o[o.length-1].annotations:e.annotations)?.parseOptions;if(!s&&!o&&!c)return l?(e,t)=>a(e,bv(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===ah?t:r[F];if(t!==$&&i!==$){let i=nv(c,t,void 0,e,n);i&&(r=um(new _h(e,i,t,n)))}}}else r=gm(r,r=>{if(t!==$&&r!==$){let r=nv(c,t,void 0,e,n);if(r)return um(new _h(e,r,t,n))}return nm(r)})}if(o&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===ah?t:r[F];if(i===$)return r;let a=nv(o,i,void 0,e,n);a&&(r=um(new _h(e,a,i,n)))}}else r=gm(r,t=>{if(t!==$){let r=nv(o,t,void 0,e,n);if(r)return um(new _h(e,r,t,n))}return nm(t)})}return r};return s?(n,r)=>{l&&(r=bv(r,l));let i=u??=s.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=s.length-1;e>=0;e--)if(o=Av(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[F],o=t(a,r)):o=Xm(o,e=>{let n=t(e,r);return n===ah?rh(e):n})}if(o._tag===`Success`){let e=o[F],t=d(e,r);return t===ah?o:t}return o=wm(o,t=>fm(()=>Xf(t,t=>new ph(e,t,n,r)))),Xm(o,e=>{let t=d(e,r);return t===ah?rh(e):t})}:l?(e,t)=>d(e,bv(t,l)):d}var Nv=`~effect/Schema/Schema`,Pv={[Nv]:Nv,pipe(){return _i(this,arguments)},annotate(e){return this.rebuild(C_(this.ast,e))},annotateKey(e){return this.rebuild(M_(this.ast,e))},check(...e){return this.rebuild(T_(this.ast,e))}};function Fv(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,Pv),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>Fv(e,t),r.makeEffect=dv(r),r.make=pv(r),r.makeOption=fv(r),r}var Iv=e=>e,Lv=`~effect/SchemaError/SchemaError`,Rv=class extends xl(`SchemaError`){[Lv]=Lv;constructor(e){let t=Ml();Nl(0);try{super({issue:e})}finally{Nl(t)}}get message(){return Ph(this.issue)}toString(){return`SchemaError(${this.message})`}};function zv(e){return j(e,Lv)&&e[Lv]===Lv}function Bv(e){return sp(e)?e.value:{issues:[{message:Qf(e.cause)}]}}function Vv(e,t){let n=gv(e),r={errors:`all`,...t?.parseOptions},i=Dh(t),a=e=>{let t=new _l(`sync`),a=Hm(Mm(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Bv(o):new Promise(e=>{a.addObserver(t=>{e(Bv(t))})})};if(`~standard`in e){let t=e;return`validate`in t[`~standard`]||Object.assign(t[`~standard`],{validate:a}),t}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,validate:a}})}var Hv=mv;function Uv(e,t){let n=gv(e,t);return(e,t)=>Wv(n(e,t))}function Wv(e){return Wu(e)?qv(e):wm(e,e=>fm(()=>Xf(e,e=>new Rv(e))))}function Gv(e,t){let n;for(let r of e.reasons){if(!qf(r)||!zv(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Kv(e){let t=Km(e);if(sp(t))return t.value;throw Gv(t.cause,`Sync adapter can only throw schema errors`)}function qv(e){return sp(e)?e:rp(Xf(e.cause,e=>new Rv(e)))}var Jv=_v,Yv=vv;function Xv(e,t){let n=Uv(e,t);return(e,t)=>Kv(n(e,t))}function Zv(e,t){let n=yv(e,t);return(e,t)=>Wv(n(e,t))}function Qv(e,t){let n=Zv(e,t);return(e,t)=>Kv(n(e,t))}var $v=Qv,ey=Fv,ty=Iv(e=>ey(N_(e.ast),{schema:e})),ny=Iv(e=>{let t=by(e);return ey(F_(e.ast),{schema:t})}),ry=Iv(e=>ey(U_(e.ast),{schema:e}));function iy(e){let t=ey(new Dg(e),{literal:e,transform(n){return t.pipe(xy(iy(n),{decode:Kh(()=>n),encode:Kh(()=>e)}))}});return t}var ay=ey(Eg),oy=ey(Sg),sy=ey(Tg),cy=ey(kg),ly=ey(Mg),uy=ey(Ng);function dy(e,t){return ey(e,{fields:t,mapFields(e,t){let n=e(this.fields);return dy(Jg(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function fy(e){return dy(Jg(e,void 0),e)}function py(e,t){return ey(R_(e.ast,t.ast),{key:e,value:t})}var my=Iv(e=>ey(new Pg(!1,[],[e.ast]),{value:e})),hy=Iv(e=>ey(new Pg(!0,e.ast.elements,e.ast.rest),{schema:e}));function gy(e,t){return ey(e,{members:t,mapMembers(e,t){let n=e(this.members);return gy(Xg(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function _y(e,t){return gy(Xg(e,t?.mode??`anyOf`,void 0),e)}function vy(e){let t=e.map(iy);return ey(Xg(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return _y(e(this.members))},pick(e){return vy(e)},transform(e){return _y(t.map((t,n)=>t.transform(e[n])))}})}var yy=Iv(e=>_y([e,oy])),by=Iv(e=>_y([e,sy]));function xy(e,t){return n=>ey(I_(n.ast,e.ast,t?rg(t):ag()),{from:n,to:e})}function Sy(e){return wm(e,e=>fm(()=>Xf(e,e=>e.issue)))}function Cy(e,t){let n=t?.encodingStrategy===`omit`?Jh():Wh();return t=>ty(ry(t)).pipe(xy(t,{decode:Yh(Sy(e)),encode:n}))}var wy=p_,Ty=ey(h_);function Ey(e){return wy(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`}),toCode:()=>({runtime:`Schema.isInt()`}),arbitrary:{constraint:{integer:!0}},...e})}var Dy=ly.check(Ey());function Oy(e,t){return e=Math.max(0,Math.floor(e)),wy(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:t})=>t===`array`?{minItems:e}:{minLength:e},toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[$m]:!0,arbitrary:{constraint:{minLength:e}},...t})}function ky(e){return Oy(1,e)}var Ay=cy.check(ky());globalThis.RegExp,globalThis.URL;var jy=cy.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function My(e,t){return jy.pipe(xy(e,sg(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams,globalThis.Uint8Array;var Ny=ey(C_(cv,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),Py=Jv(Ay),Fy=Jv(Dy);function Iy(e){let t=Py(e??``);return fs(t)?t.value:void 0}function Ly(e){if(e===void 0)return;let t=Fy(e);if(fs(t)&&t.value>0)return t.value;if(!Mi(e))return;let n=Fy(Number.parseInt(e,10));return fs(n)&&n.value>0?n.value:void 0}function Ry(e){return{kind:Iy(e.kind),name:Iy(e.name),run:Iy(e.run),thread:Iy(e.thread),seq:Ly(e.seq)}}var zy=`modulepreload`,By=function(e,t){return new URL(e,t).href},Vy={},Hy=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=By(t,n),t=s(t),t in Vy)return;Vy[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:zy,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Uy=Hr(`/`)({validateSearch:Ry,component:Ur(()=>Hy(()=>import(`./routes-B90xnBF1.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),Wy={IndexRoute:Uy.update({id:`/`,path:`/`,getParentRoute:()=>gi})},Gy=gi._addFileChildren(Wy)._addFileTypes();function Ky(){if(typeof document>`u`)return;let e=document.querySelector(`base`)?.getAttribute(`href`);if(!e)return;let t=e.replace(/\/+$/,``);return t.startsWith(`/`)&&t.length>1?t:void 0}function qy(){return oi({routeTree:Gy,basepath:Ky()})}var Jy=document.getElementById(`root`);Jy&&(0,hi.createRoot)(Jy).render((0,D.jsx)(i.StrictMode,{children:(0,D.jsx)(li,{router:qy()})}));export{Dm as $,M as $n,zd as $t,Sm as A,ds as An,op as At,dm as B,z as Bn,Ju as Bt,Vv as C,ws as Cn,zp as Ct,Fm as D,ps as Dn,rp as Dt,Bh as E,ms as En,ap as Et,Cm as F,Io as Fn,Zf as Ft,zm as G,wa as Gn,cu as Gt,Xm as H,Ha as Hn,$u as Ht,Pm as I,no as In,Lu as It,lm as J,aa as Jn,eu as Jt,Bm as K,xa as Kn,cf as Kt,Lm as L,go as Ln,Iu as Lt,wm as M,ls as Mn,Jf as Mt,Tm as N,us as Nn,Yf as Nt,Im as O,hs as On,sp as Ot,Em as P,os as Pn,$f as Pt,xm as Q,N as Qn,Vd as Qt,bm as R,Oo as Rn,Du as Rt,ny as S,Cs as Sn,Xp as St,zh as T,bs as Tn,Lp as Tt,_m as U,Ua as Un,ou as Ut,gm as V,Ao as Vn,Zu as Vt,qm as W,Fa as Wn,lu as Wt,$p as X,Zi as Xn,Ku as Xt,km as Y,ia as Yn,vf as Yt,Jm as Z,Wi as Zn,Hd as Zt,Xv as _,Ls as _n,om as _t,Ny as a,J as an,Hi as ar,Hm as at,Hv as b,xs as bn,bp as bt,yy as c,mu as cn,xi as cr,Gm as ct,fy as d,xl as dn,Di as dr,im as dt,Nd as en,j as er,Nm as et,_y as f,ac as fn,_i as fr,am as ft,Jv as g,Ms as gn,mm as gt,Uv as h,Os as hn,r as hr,tm as ht,Ty as i,Id as in,Vi as ir,jm as it,sm as j,fs as jn,ep as jt,vm as k,gs as kn,np as kt,py as l,$d as ln,k as lr,Am as lt,Yv as m,Tc as mn,Pn as mr,Om as mt,my as n,Fd as nn,Li as nr,Rm as nt,iy as o,gu as on,Mi as or,Um as ot,ay as p,Cc as pn,pi as pr,ym as pt,Vm as q,Ca as qn,Hu as qt,uy as r,jd as rn,Ni as rr,em as rt,vy as s,Y as sn,Ei as sr,Wm as st,Uy as t,Dd as tn,Pi as tr,cm as tt,cy as u,bu as un,bi as ur,nm as ut,$v as v,Ns as vn,hm as vt,Cy as w,Ts as wn,Rp as wt,hy as x,Ss as xn,Op as xt,My as y,Es as yn,yp as yt,um as z,Do as zn,dd as zt};
|