niceeval 0.13.4-canary.49 → 0.14.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/INDEX.md +3 -3
- package/dist/inspection/overview.cjs +20 -4
- package/dist/inspection/overview.cjs.map +1 -1
- package/dist/inspection/overview.d.cts +5 -0
- package/dist/inspection/overview.d.mts +5 -0
- package/dist/inspection/overview.d.ts +5 -0
- package/dist/inspection/protocol.d.cts +238 -0
- package/dist/inspection/protocol.d.mts +238 -0
- package/dist/inspection/protocol.d.ts +238 -0
- package/dist/inspection/public.mjs +19 -16
- package/dist/inspection/results.cjs +11 -10
- package/dist/inspection/results.cjs.map +1 -1
- package/dist/inspection/results.d.cts +34 -0
- package/dist/inspection/results.d.mts +34 -0
- package/dist/inspection/results.d.ts +34 -0
- package/dist/show/contribution.cjs +11 -2
- package/dist/show/contribution.cjs.map +1 -1
- package/dist/show/contribution.d.cts +7 -0
- package/dist/show/contribution.d.mts +7 -0
- package/dist/show/contribution.d.ts +7 -0
- package/dist/show/model.cjs +1 -0
- package/dist/show/model.cjs.map +1 -1
- package/dist/show/model.d.cts +2 -0
- package/dist/show/model.d.mts +2 -0
- package/dist/show/model.d.ts +2 -0
- package/dist/show/render.cjs +149 -81
- package/dist/show/render.cjs.map +1 -1
- package/dist/show/render.d.cts +3 -1
- package/dist/show/render.d.mts +3 -1
- package/dist/show/render.d.ts +3 -1
- package/dist/view/app-dist/.vite/manifest.json +18 -18
- package/dist/view/app-dist/assets/{AttemptDialog-zlgkBA66.js → AttemptDialog-76dX1VQq.js} +1 -1
- package/dist/view/app-dist/assets/{AttemptRoute-DN6R4719.js → AttemptRoute-DRHVh2JA.js} +1 -1
- package/dist/view/app-dist/assets/{ResultsPage-BfH9vA6y.js → ResultsPage-9CSI8dvZ.js} +2 -2
- package/dist/view/app-dist/assets/{RunPage-XiJvNLB-.js → RunPage-BUF0REv7.js} +1 -1
- package/dist/view/app-dist/assets/{TableContentView-V8MYLnmk.js → TableContentView-_Sbg5wDr.js} +1 -1
- package/dist/view/app-dist/assets/index-BGr_6pGY.js +19 -0
- package/dist/view/app-dist/assets/{quality-cost-scatter-Bxyj_9oc.js → quality-cost-scatter-B5wDa_F1.js} +1 -1
- package/dist/view/app-dist/assets/useSuspenseQuery-D3W8Uy33.js +1 -0
- package/dist/view/app-dist/index.html +1 -1
- package/dist/view/function-runtime.mjs +35 -20
- package/docs-site/zh/examples/ai-agent-application.mdx +1 -1
- package/docs-site/zh/examples/index.mdx +1 -3
- package/docs-site/zh/explanation/evals.mdx +1 -1
- package/docs-site/zh/explanation/experiment.mdx +3 -1
- package/docs-site/zh/explanation/overview.mdx +6 -4
- package/docs-site/zh/explanation/record.mdx +9 -5
- package/docs-site/zh/explanation/runner.mdx +3 -3
- package/docs-site/zh/index.mdx +4 -8
- package/docs-site/zh/introduction.mdx +2 -2
- package/docs-site/zh/reference/cli.mdx +8 -7
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +5 -5
- package/docs-site/zh/troubleshooting/debugging.mdx +8 -8
- package/docs-site/zh/troubleshooting/recover-after-kill.mdx +35 -55
- package/docs-site/zh/tutorials/accept-results.mdx +4 -4
- package/docs-site/zh/tutorials/agent-onboarding.mdx +2 -2
- package/docs-site/zh/tutorials/authoring.mdx +1 -1
- package/docs-site/zh/tutorials/compare-runs.mdx +3 -3
- package/docs-site/zh/tutorials/concurrency.mdx +6 -6
- package/docs-site/zh/tutorials/connect-your-agent.mdx +2 -2
- package/docs-site/zh/tutorials/docker-in-docker.mdx +1 -1
- package/docs-site/zh/tutorials/experiments.mdx +1 -1
- package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +1 -1
- package/docs-site/zh/tutorials/quickstart.mdx +2 -2
- package/docs-site/zh/tutorials/reporters.mdx +3 -3
- package/docs-site/zh/tutorials/sandbox-agent.mdx +2 -2
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +3 -3
- package/docs-site/zh/tutorials/viewing-results.mdx +10 -11
- package/package.json +1 -1
- package/dist/view/app-dist/assets/index-BSJP_UAR.js +0 -19
- package/dist/view/app-dist/assets/useSuspenseQuery-Bdi9nQF1.js +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ResultsPage-BfH9vA6y.js","assets/jsx-runtime-BnHLaUks.js","assets/useSuspenseQuery-Bdi9nQF1.js","assets/TableContentView-V8MYLnmk.js","assets/RunPage-XiJvNLB-.js","assets/AttemptDialog-zlgkBA66.js","assets/AttemptRoute-DN6R4719.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,c as t,n,o as r,r as i,t as a}from"./jsx-runtime-BnHLaUks.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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var o=r((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,te());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){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&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,O=D.port2;D.port1.onmessage=ee,te=function(){O.postMessage(null)}}else te=function(){_(ee,0)};function ne(t,n){C=_(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`):w=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(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),s=r(((e,t)=>{t.exports=o()})),c=r((t=>{var n=e();function r(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(r(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=n.__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:``}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},t.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()}},t.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))},t.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},t.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})}},t.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)},t.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})}},t.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)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},t.useFormStatus=function(){return c.H.useHostTransitionStatus()},t.version=`19.2.8`})),l=r(((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=c()})),u=r((t=>{var n=s(),r=e(),i=l();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 c(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 u(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 d(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 f(e){if(c(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=c(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 f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)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 m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,k=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function ue(e){return{current:e}}function de(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function fe(e,t){le++,ce[le]=e.current,e.current=t}var pe=ue(null),me=ue(null),he=ue(null),ge=ue(null);function _e(e,t){switch(fe(he,t),fe(me,e),fe(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}de(pe),fe(pe,e)}function ve(){de(pe),de(me),de(he)}function ye(e){e.memoizedState!==null&&fe(ge,e);var t=pe.current,n=nf(t,e.type);t!==n&&(fe(me,e),fe(pe,n))}function be(e){me.current===e&&(de(pe),de(me)),ge.current===e&&(de(ge),fp._currentValue=se)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!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(`
|
|
5
|
-
`),l=s.split(`
|
|
6
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=n.unstable_scheduleCallback,Ae=n.unstable_cancelCallback,je=n.unstable_shouldYield,Me=n.unstable_requestPaint,Ne=n.unstable_now,Pe=n.unstable_getCurrentPriorityLevel,Fe=n.unstable_ImmediatePriority,Ie=n.unstable_UserBlockingPriority,Le=n.unstable_NormalPriority,Re=n.unstable_LowPriority,ze=n.unstable_IdlePriority,Be=n.log,Ve=n.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ge(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=A.p;return e===0?(e=window.event,e===void 0?32:Op(e.type)):e}function ft(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tf(e);e!==null;){if(n=e[mt])return n;e=Tf(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[xt]=!0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Nt={},Pt={};function Ft(e){return Oe.call(Pt,e)?!0:Oe.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}function It(e,t,n){if(Ft(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Lt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Rt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Gt=/[\n"\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+zt(t)):e.value!==``+zt(t)&&(e.value=``+zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,zt(n)):Yt(e,o,zt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+zt(s):e.removeAttribute(`name`)}function Jt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ht(e);return}n=n==null?``:``+zt(n),t=t==null?n:``+zt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+zt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Zt(e,t,n){if(t!=null&&(t=``+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+zt(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(oe(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function tn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&tn(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&tn(e,o,t[o])}function rn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var an=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),on=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ht]||null;if(!i)throw Error(a(90));qt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(Mu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Sn=i.slice(e,1<r?1-r:void 0)}function wn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Tn(){return!0}function En(){return!1}function Dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Tn:En,this.isPropagationStopped=En,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Tn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kn=Dn(On),An=h({},On,{view:0,detail:0}),jn=Dn(An),Mn,Nn,Pn,Fn=h({},An,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Pn&&(Pn&&e.type===`mousemove`?(Mn=e.screenX-Pn.screenX,Nn=e.screenY-Pn.screenY):Nn=Mn=0,Pn=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),In=Dn(Fn),Ln=Dn(h({},Fn,{dataTransfer:0})),Rn=Dn(h({},An,{relatedTarget:0})),zn=Dn(h({},On,{animationName:0,elapsedTime:0,pseudoElement:0})),Bn=Dn(h({},On,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Vn=Dn(h({},On,{data:0})),Hn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Un={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wn[e])?!!t[e]:!1}function Kn(){return Gn}var qn=Dn(h({},An,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=wn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Un[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kn,charCode:function(e){return e.type===`keypress`?wn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?wn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Jn=Dn(h({},Fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Yn=Dn(h({},An,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kn})),Xn=Dn(h({},On,{propertyName:0,elapsedTime:0,pseudoElement:0})),Zn=Dn(h({},Fn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Qn=Dn(h({},On,{newState:0,oldState:0})),$n=[9,13,27,32],er=_n&&`CompositionEvent`in window,tr=null;_n&&`documentMode`in document&&(tr=document.documentMode);var nr=_n&&`TextEvent`in window&&!tr,rr=_n&&(!er||tr&&8<tr&&11>=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var cr=!1;function lr(e,t){switch(e){case`compositionend`:return sr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function ur(e,t){if(cr)return e===`compositionend`||!er&&or(e,t)?(e=Cn(),Sn=xn=bn=null,cr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return rr&&t.locale!==`ko`?null:t.data;default:return null}}var dr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!dr[e.type]:t===`textarea`}function pr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=zd(t,`onChange`),0<t.length&&(n=new kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var mr=null,hr=null;function gr(e){Md(e,0)}function _r(e){if(Ut(Tt(e)))return e}function vr(e,t){if(e===`change`)return t}var yr=!1;if(_n){var br;if(_n){var xr=`oninput`in document;if(!xr){var Sr=document.createElement(`div`);Sr.setAttribute(`oninput`,`return;`),xr=typeof Sr.oninput==`function`}br=xr}else br=!1;yr=br&&(!document.documentMode||9<document.documentMode)}function Cr(){mr&&(mr.detachEvent(`onpropertychange`,wr),hr=mr=null)}function wr(e){if(e.propertyName===`value`&&_r(hr)){var t=[];pr(t,hr,e,un(e)),hn(gr,t)}}function Tr(e,t,n){e===`focusin`?(Cr(),mr=t,hr=n,mr.attachEvent(`onpropertychange`,wr)):e===`focusout`&&Cr()}function Er(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return _r(hr)}function Dr(e,t){if(e===`click`)return _r(t)}function Or(e,t){if(e===`input`||e===`change`)return _r(t)}function kr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ar=typeof Object.is==`function`?Object.is:kr;function jr(e,t){if(Ar(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Oe.call(t,i)||!Ar(e[i],t[i]))return!1}return!0}function Mr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nr(e,t){var n=Mr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Mr(n)}}function Pr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wt(e.document)}return t}function Ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Lr=_n&&`documentMode`in document&&11>=document.documentMode,Rr=null,zr=null,Br=null,Vr=!1;function Hr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vr||Rr==null||Rr!==Wt(r)||(r=Rr,`selectionStart`in r&&Ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Br&&jr(Br,r)||(Br=r,r=zd(zr,`onSelect`),0<r.length&&(t=new kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Rr)))}function Ur(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Wr={animationend:Ur(`Animation`,`AnimationEnd`),animationiteration:Ur(`Animation`,`AnimationIteration`),animationstart:Ur(`Animation`,`AnimationStart`),transitionrun:Ur(`Transition`,`TransitionRun`),transitionstart:Ur(`Transition`,`TransitionStart`),transitioncancel:Ur(`Transition`,`TransitionCancel`),transitionend:Ur(`Transition`,`TransitionEnd`)},Gr={},Kr={};_n&&(Kr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),`TransitionEvent`in window||delete Wr.transitionend.transition);function qr(e){if(Gr[e])return Gr[e];if(!Wr[e])return e;var t=Wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Kr)return Gr[e]=t[n];return e}var Jr=qr(`animationend`),Yr=qr(`animationiteration`),Xr=qr(`animationstart`),Zr=qr(`transitionrun`),Qr=qr(`transitionstart`),$r=qr(`transitioncancel`),ei=qr(`transitionend`),ti=new Map,ni=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ni.push(`scrollEnd`);function ri(e,t){ti.set(e,t),At(t,[e])}var ii=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)},ai=[],oi=0,si=0;function ci(){for(var e=oi,t=si=oi=0;t<e;){var n=ai[t];ai[t++]=null;var r=ai[t];ai[t++]=null;var i=ai[t];ai[t++]=null;var a=ai[t];if(ai[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&fi(n,i,a)}}function li(e,t,n,r){ai[oi++]=e,ai[oi++]=t,ai[oi++]=n,ai[oi++]=r,si|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ui(e,t,n,r){return li(e,t,n,r),pi(e)}function di(e,t){return li(e,null,null,t),pi(e)}function fi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function pi(e){if(50<Cu)throw Cu=0,wu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var mi={};function hi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gi(e,t,n,r){return new hi(e,t,n,r)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vi(e,t){var n=e.alternate;return n===null?(n=gi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function yi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)_i(e)&&(s=1);else if(typeof e==`string`)s=rp(e,n,pe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=gi(31,n,t,i),e.elementType=D,e.lanes=o,e;case y:return xi(n.children,i,o,t);case b:s=8,i|=24;break;case x:return e=gi(12,n,t,i|2),e.elementType=x,e.lanes=o,e;case T:return e=gi(13,n,t,i),e.elementType=T,e.lanes=o,e;case E:return e=gi(19,n,t,i),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case ee:s=14;break a;case te:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=gi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function xi(e,t,n,r){return e=gi(7,e,r,t),e.lanes=n,e}function Si(e,t,n){return e=gi(6,e,null,t),e.lanes=n,e}function Ci(e){var t=gi(18,null,null,0);return t.stateNode=e,t}function wi(e,t,n){return t=gi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ti=new WeakMap;function Ei(e,t){if(typeof e==`object`&&e){var n=Ti.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},Ti.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var Di=[],Oi=0,ki=null,Ai=0,ji=[],Mi=0,Ni=null,Pi=1,Fi=``;function Ii(e,t){Di[Oi++]=Ai,Di[Oi++]=ki,ki=e,Ai=t}function Li(e,t,n){ji[Mi++]=Pi,ji[Mi++]=Fi,ji[Mi++]=Ni,Ni=e;var r=Pi;e=Fi;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Pi=1<<32-Ge(t)+i|n<<i|r,Fi=a+e}else Pi=1<<a|n<<i|r,Fi=e}function Ri(e){e.return!==null&&(Ii(e,1),Li(e,1,0))}function zi(e){for(;e===ki;)ki=Di[--Oi],Di[Oi]=null,Ai=Di[--Oi],Di[Oi]=null;for(;e===Ni;)Ni=ji[--Mi],ji[Mi]=null,Fi=ji[--Mi],ji[Mi]=null,Pi=ji[--Mi],ji[Mi]=null}function Bi(e,t){ji[Mi++]=Pi,ji[Mi++]=Fi,ji[Mi++]=Ni,Pi=t.id,Fi=t.overflow,Ni=e}var Vi=null,Hi=null,j=!1,Ui=null,Wi=!1,Gi=Error(a(519));function Ki(e){throw Qi(Ei(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Gi}function qi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:z(`cancel`,t),z(`close`,t);break;case`iframe`:case`object`:case`embed`:z(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ad.length;n++)z(Ad[n],t);break;case`source`:z(`error`,t);break;case`img`:case`image`:case`link`:z(`error`,t),z(`load`,t);break;case`details`:z(`toggle`,t);break;case`input`:z(`invalid`,t),Jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:z(`invalid`,t);break;case`textarea`:z(`invalid`,t),Qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Gd(t.textContent,n)?(r.popover!=null&&(z(`beforetoggle`,t),z(`toggle`,t)),r.onScroll!=null&&z(`scroll`,t),r.onScrollEnd!=null&&z(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Ki(e,!0)}function Ji(e){for(Vi=e.return;Vi;)switch(Vi.tag){case 5:case 31:case 13:Wi=!1;return;case 27:case 3:Wi=!0;return;default:Vi=Vi.return}}function Yi(e){if(e!==Vi)return!1;if(!j)return Ji(e),j=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&Hi&&Ki(e),Ji(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Hi=wf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Hi=wf(e)}else t===27?(t=Hi,ff(e.type)?(e=Cf,Cf=null,Hi=e):Hi=t):Hi=Vi?Sf(e.stateNode.nextSibling):null;return!0}function Xi(){Hi=Vi=null,j=!1}function Zi(){var e=Ui;return e!==null&&(lu===null?lu=e:lu.push.apply(lu,e),Ui=null),e}function Qi(e){Ui===null?Ui=[e]:Ui.push(e)}var $i=ue(null),ea=null,ta=null;function na(e,t,n){fe($i,t._currentValue),t._currentValue=n}function ra(e){e._currentValue=$i.current,de($i)}function ia(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function aa(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ia(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ia(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function oa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Ar(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ge.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[fp]:e.push(fp))}i=i.return}e!==null&&aa(t,e,n,r),t.flags|=262144}function sa(e){for(e=e.firstContext;e!==null;){if(!Ar(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ca(e){ea=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function M(e){return ua(ea,e)}function la(e,t){return ea===null&&ca(e),ua(e,t)}function ua(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ta===null){if(e===null)throw Error(a(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return n}var da=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},fa=n.unstable_scheduleCallback,pa=n.unstable_NormalPriority,ma={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ha(){return{controller:new da,data:new Map,refCount:0}}function ga(e){e.refCount--,e.refCount===0&&fa(pa,function(){e.controller.abort()})}var _a=null,va=0,ya=0,ba=null;function xa(e,t){if(_a===null){var n=_a=[];va=0,ya=wd(),ba={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return va++,t.then(Sa,Sa),t}function Sa(){if(--va===0&&_a!==null){ba!==null&&(ba.status=`fulfilled`);var e=_a;_a=null,ya=0,ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var wa=k.S;k.S=function(e,t){fu=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&xa(e,t),wa!==null&&wa(e,t)};var Ta=ue(null);function Ea(){var e=Ta.current;return e===null?Yl.pooledCache:e}function Da(e,t){t===null?fe(Ta,Ta.current):fe(Ta,t.pool)}function Oa(){var e=Ea();return e===null?null:{parent:ma._currentValue,pool:e}}var ka=Error(a(460)),Aa=Error(a(474)),ja=Error(a(542)),Ma={then:function(){}};function Na(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Pa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=Yl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e}throw Ia=t,ka}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ia=e,ka):e}}var Ia=null;function La(){if(Ia===null)throw Error(a(459));var e=Ia;return Ia=null,e}function Ra(e){if(e===ka||e===ja)throw Error(a(483))}var za=null,Ba=0;function Va(e){var t=Ba;return Ba+=1,za===null&&(za=[]),Pa(za,e,t)}function Ha(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ua(e,t){throw t.$$typeof===g?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=vi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Si(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===te&&Fa(a)===t.type)?(t=i(t,n.props),Ha(t,n),t.return=e,t):(t=bi(n.type,n.key,n.props,null,e.mode,r),Ha(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=wi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=xi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=bi(t.type,t.key,t.props,null,e.mode,n),Ha(n,t),n.return=e,n;case v:return t=wi(t,e.mode,n),t.return=e,t;case te:return t=Fa(t),f(e,t,n)}if(oe(t)||re(t))return t=xi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Va(t),n);if(t.$$typeof===C)return f(e,la(e,t),n);Ua(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case te:return n=Fa(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Va(n),r);if(n.$$typeof===C)return p(e,t,la(e,n),r);Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case te:return r=Fa(r),m(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Va(r),i);if(r.$$typeof===C)return m(e,t,n,la(t,r),i);Ua(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),j&&Ii(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return j&&Ii(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),j&&Ii(i,h),l}function g(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),j&&Ii(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return j&&Ii(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),j&&Ii(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===te&&Fa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ha(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=xi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=bi(o.type,o.key,o.props,null,e.mode,c),Ha(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=wi(o,e.mode,c),c.return=e,e=c}return s(e);case te:return o=Fa(o),b(e,r,o,c)}if(oe(o))return h(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Va(o),c);if(o.$$typeof===C)return b(e,r,la(e,o),c);Ua(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ba=0;var i=b(e,t,n,r);return za=null,i}catch(t){if(t===ka||t===ja)throw t;var a=gi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ga=Wa(!0),Ka=Wa(!1),qa=!1;function Ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ya(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=pi(e),fi(e,null,n),t}return li(e,r,t,n),pi(e)}function Qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var eo=!1;function to(){if(eo){var e=ba;if(e!==null)throw e}}function no(e,t,n,r){eo=!1;var i=e.updateQueue;qa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(R&f)===f:(r&f)===f){f!==0&&f===ya&&(eo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:qa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ru|=o,e.lanes=o,e.memoizedState=d}}function ro(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function io(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ro(n[e],t)}var ao=ue(null),oo=ue(0);function so(e,t){e=tu,fe(oo,e),fe(ao,t),tu=e|t.baseLanes}function co(){fe(oo,tu),fe(ao,ao.current)}function lo(){tu=oo.current,de(ao),de(oo)}var uo=ue(null),fo=null;function N(e){var t=e.alternate;fe(_o,_o.current&1),fe(uo,e),fo===null&&(t===null||ao.current!==null||t.memoizedState!==null)&&(fo=e)}function po(e){fe(_o,_o.current),fe(uo,e),fo===null&&(fo=e)}function mo(e){e.tag===22?(fe(_o,_o.current),fe(uo,e),fo===null&&(fo=e)):ho(e)}function ho(){fe(_o,_o.current),fe(uo,uo.current)}function go(e){de(uo),fo===e&&(fo=null),de(_o)}var _o=ue(0);function vo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yo=0,P=null,bo=null,xo=null,So=!1,Co=!1,wo=!1,To=0,Eo=0,Do=null,Oo=0;function ko(){throw Error(a(321))}function Ao(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ar(e[n],t[n]))return!1;return!0}function jo(e,t,n,r,i,a){return yo=a,P=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Js:Ys,wo=!1,a=n(r,i),wo=!1,Co&&(a=No(t,n,r,i)),Mo(e),a}function Mo(e){k.H=qs;var t=bo!==null&&bo.next!==null;if(yo=0,xo=bo=P=null,So=!1,Eo=0,Do=null,t)throw Error(a(300));e===null||F||(e=e.dependencies,e!==null&&sa(e)&&(F=!0))}function No(e,t,n,r){P=e;var i=0;do{if(Co&&(Do=null),Eo=0,Co=!1,25<=i)throw Error(a(301));if(i+=1,xo=bo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=Xs,o=t(n,r)}while(Co);return o}function Po(){var e=k.H,t=e.useState()[0];return t=typeof t.then==`function`?Vo(t):t,e=e.useState()[0],(bo===null?null:bo.memoizedState)!==e&&(P.flags|=1024),t}function Fo(){var e=To!==0;return To=0,e}function Io(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Lo(e){if(So){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}So=!1}yo=0,xo=bo=P=null,Co=!1,Eo=To=0,Do=null}function Ro(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xo===null?P.memoizedState=xo=e:xo=xo.next=e,xo}function zo(){if(bo===null){var e=P.alternate;e=e===null?null:e.memoizedState}else e=bo.next;var t=xo===null?P.memoizedState:xo.next;if(t!==null)xo=t,bo=e;else{if(e===null)throw P.alternate===null?Error(a(467)):Error(a(310));bo=e,e={memoizedState:bo.memoizedState,baseState:bo.baseState,baseQueue:bo.baseQueue,queue:bo.queue,next:null},xo===null?P.memoizedState=xo=e:xo=xo.next=e}return xo}function Bo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vo(e){var t=Eo;return Eo+=1,Do===null&&(Do=[]),e=Pa(Do,e,t),t=P,(xo===null?t.memoizedState:xo.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Js:Ys),e}function Ho(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Vo(e);if(e.$$typeof===C)return M(e)}throw Error(a(438,String(e)))}function Uo(e){var t=null,n=P.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=P.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Bo(),P.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=O;return t.index++,n}function Wo(e,t){return typeof t==`function`?t(e):t}function Go(e){return Ko(zo(),bo,e)}function Ko(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(yo&f)===f:(R&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ya&&(d=!0);else if((yo&p)===p){u=u.next,p===ya&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,P.lanes|=p,ru|=p;f=u.action,wo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,P.lanes|=f,ru|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ar(o,e.memoizedState)&&(F=!0,d&&(n=ba,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function qo(e){var t=zo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Ar(o,t.memoizedState)||(F=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Jo(e,t,n){var r=P,i=zo(),o=j;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Ar((bo||i).memoizedState,n);if(s&&(i.memoizedState=n,F=!0),i=i.queue,ys(Zo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||xo!==null&&xo.memoizedState.tag&1){if(r.flags|=2048,ms(9,{destroy:void 0},Xo.bind(null,r,i,n,t),null),Yl===null)throw Error(a(349));o||yo&127||Yo(r,t,n)}return n}function Yo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=P.updateQueue,t===null?(t=Bo(),P.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xo(e,t,n,r){t.value=n,t.getSnapshot=r,Qo(t)&&$o(e)}function Zo(e,t,n){return n(function(){Qo(t)&&$o(e)})}function Qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ar(e,n)}catch{return!0}}function $o(e){var t=di(e,2);t!==null&&Du(t,e,2)}function es(e){var t=Ro();if(typeof e==`function`){var n=e;if(e=n(),wo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:e},t}function ts(e,t,n,r){return e.baseState=n,Ko(e,bo,typeof r==`function`?r:Wo)}function ns(e,t,n,r,i){if(Ws(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};k.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,rs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function rs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=k.T,o={};k.T=o;try{var s=n(i,r),c=k.S;c!==null&&c(o,s),is(e,t,s)}catch(n){os(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),k.T=a}}else try{a=n(i,r),is(e,t,a)}catch(n){os(e,t,n)}}function is(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){as(e,t,n)},function(n){return os(e,t,n)}):as(e,t,n)}function as(e,t,n){t.status=`fulfilled`,t.value=n,ss(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,rs(e,n)))}function os(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ss(t),t=t.next;while(t!==r)}e.action=null}function ss(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cs(e,t){return t}function ls(e,t){if(j){var n=Yl.formState;if(n!==null){a:{var r=P;if(j){if(Hi){b:{for(var i=Hi,a=Wi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Hi=Sf(i.nextSibling),r=i.data===`F!`;break a}}Ki(r)}r=!1}r&&(t=n[0])}}return n=Ro(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:t},n.queue=r,n=Vs.bind(null,P,r),r.dispatch=n,r=es(!1),a=Us.bind(null,P,!1,r.queue),r=Ro(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ns.bind(null,P,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function us(e){return ds(zo(),bo,e)}function ds(e,t,n){if(t=Ko(e,t,cs)[0],e=Go(Wo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Vo(t)}catch(e){throw e===ka?ja:e}else r=t;t=zo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(P.flags|=2048,ms(9,{destroy:void 0},fs.bind(null,i,n),null)),[r,a,e]}function fs(e,t){e.action=t}function ps(e){var t=zo(),n=bo;if(n!==null)return ds(t,n,e);zo(),t=t.memoizedState,n=zo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ms(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=P.updateQueue,t===null&&(t=Bo(),P.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function hs(){return zo().memoizedState}function gs(e,t,n,r){var i=Ro();P.flags|=e,i.memoizedState=ms(1|t,{destroy:void 0},n,r===void 0?null:r)}function _s(e,t,n,r){var i=zo();r=r===void 0?null:r;var a=i.memoizedState.inst;bo!==null&&r!==null&&Ao(r,bo.memoizedState.deps)?i.memoizedState=ms(t,a,n,r):(P.flags|=e,i.memoizedState=ms(1|t,a,n,r))}function vs(e,t){gs(8390656,8,e,t)}function ys(e,t){_s(2048,8,e,t)}function bs(e){P.flags|=4;var t=P.updateQueue;if(t===null)t=Bo(),P.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function xs(e){var t=zo().memoizedState;return bs({ref:t,nextImpl:e}),function(){if(Jl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Ss(e,t){return _s(4,2,e,t)}function Cs(e,t){return _s(4,4,e,t)}function ws(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ts(e,t,n){n=n==null?null:n.concat([e]),_s(4,4,ws.bind(null,t,e),n)}function Es(){}function Ds(e,t){var n=zo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ao(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Os(e,t){var n=zo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ao(t,r[1]))return r[0];if(r=e(),wo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function ks(e,t,n){return n===void 0||yo&1073741824&&!(R&261930)?e.memoizedState=t:(e.memoizedState=n,e=Eu(),P.lanes|=e,ru|=e,n)}function As(e,t,n,r){return Ar(n,t)?n:ao.current===null?!(yo&42)||yo&1073741824&&!(R&261930)?(F=!0,e.memoizedState=n):(e=Eu(),P.lanes|=e,ru|=e,t):(e=ks(e,n,r),Ar(e,t)||(F=!0),e)}function js(e,t,n,r,i){var a=A.p;A.p=a!==0&&8>a?a:8;var o=k.T,s={};k.T=s,Us(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Hs(e,t,Ca(c,r),Tu(e)):Hs(e,t,r,Tu(e))}catch(n){Hs(e,t,{then:function(){},status:`rejected`,reason:n},Tu())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function Ms(){}function Ns(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ps(e).queue;js(e,i,t,se,n===null?Ms:function(){return Fs(e),n(r)})}function Ps(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fs(e){var t=Ps(e);t.next===null&&(t=e.alternate.memoizedState),Hs(e,t.next.queue,{},Tu())}function Is(){return M(fp)}function Ls(){return zo().memoizedState}function Rs(){return zo().memoizedState}function zs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tu();e=Xa(n);var r=Za(t,e,n);r!==null&&(Du(r,t,n),Qa(r,t,n)),t={cache:ha()},e.payload=t;return}t=t.return}}function Bs(e,t,n){var r=Tu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Gs(t,n):(n=ui(e,t,n,r),n!==null&&(Du(n,e,r),Ks(n,t,r)))}function Vs(e,t,n){Hs(e,t,n,Tu())}function Hs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Gs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ar(s,o))return li(e,t,i,0),Yl===null&&ci(),!1}catch{}if(n=ui(e,t,i,r),n!==null)return Du(n,e,r),Ks(n,t,r),!0}return!1}function Us(e,t,n,r){if(r={lane:2,revertLane:wd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(t)throw Error(a(479))}else t=ui(e,n,r,2),t!==null&&Du(t,e,2)}function Ws(e){var t=e.alternate;return e===P||t!==null&&t===P}function Gs(e,t){Co=So=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ks(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var qs={readContext:M,use:Ho,useCallback:ko,useContext:ko,useEffect:ko,useImperativeHandle:ko,useLayoutEffect:ko,useInsertionEffect:ko,useMemo:ko,useReducer:ko,useRef:ko,useState:ko,useDebugValue:ko,useDeferredValue:ko,useTransition:ko,useSyncExternalStore:ko,useId:ko,useHostTransitionStatus:ko,useFormState:ko,useActionState:ko,useOptimistic:ko,useMemoCache:ko,useCacheRefresh:ko};qs.useEffectEvent=ko;var Js={readContext:M,use:Ho,useCallback:function(e,t){return Ro().memoizedState=[e,t===void 0?null:t],e},useContext:M,useEffect:vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),gs(4194308,4,ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gs(4194308,4,e,t)},useInsertionEffect:function(e,t){gs(4,2,e,t)},useMemo:function(e,t){var n=Ro();t=t===void 0?null:t;var r=e();if(wo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ro();if(n!==void 0){var i=n(t);if(wo){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Bs.bind(null,P,e),[r.memoizedState,e]},useRef:function(e){var t=Ro();return e={current:e},t.memoizedState=e},useState:function(e){e=es(e);var t=e.queue,n=Vs.bind(null,P,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Es,useDeferredValue:function(e,t){return ks(Ro(),e,t)},useTransition:function(){var e=es(!1);return e=js.bind(null,P,e.queue,!0,!1),Ro().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=P,i=Ro();if(j){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Yl===null)throw Error(a(349));R&127||Yo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,vs(Zo.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,{destroy:void 0},Xo.bind(null,r,o,n,t),null),n},useId:function(){var e=Ro(),t=Yl.identifierPrefix;if(j){var n=Fi,r=Pi;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=To++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Oo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Is,useFormState:ls,useActionState:ls,useOptimistic:function(e){var t=Ro();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Us.bind(null,P,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uo,useCacheRefresh:function(){return Ro().memoizedState=zs.bind(null,P)},useEffectEvent:function(e){var t=Ro(),n={impl:e};return t.memoizedState=n,function(){if(Jl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ys={readContext:M,use:Ho,useCallback:Ds,useContext:M,useEffect:ys,useImperativeHandle:Ts,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:Os,useReducer:Go,useRef:hs,useState:function(){return Go(Wo)},useDebugValue:Es,useDeferredValue:function(e,t){return As(zo(),bo.memoizedState,e,t)},useTransition:function(){var e=Go(Wo)[0],t=zo().memoizedState;return[typeof e==`boolean`?e:Vo(e),t]},useSyncExternalStore:Jo,useId:Ls,useHostTransitionStatus:Is,useFormState:us,useActionState:us,useOptimistic:function(e,t){return ts(zo(),bo,e,t)},useMemoCache:Uo,useCacheRefresh:Rs};Ys.useEffectEvent=xs;var Xs={readContext:M,use:Ho,useCallback:Ds,useContext:M,useEffect:ys,useImperativeHandle:Ts,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:Os,useReducer:qo,useRef:hs,useState:function(){return qo(Wo)},useDebugValue:Es,useDeferredValue:function(e,t){var n=zo();return bo===null?ks(n,e,t):As(n,bo.memoizedState,e,t)},useTransition:function(){var e=qo(Wo)[0],t=zo().memoizedState;return[typeof e==`boolean`?e:Vo(e),t]},useSyncExternalStore:Jo,useId:Ls,useHostTransitionStatus:Is,useFormState:ps,useActionState:ps,useOptimistic:function(e,t){var n=zo();return bo===null?(n.baseState=e,[e,n.queue.dispatch]):ts(n,bo,e,t)},useMemoCache:Uo,useCacheRefresh:Rs};Xs.useEffectEvent=xs;function Zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tu(),i=Xa(r);i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(Du(t,e,r),Qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tu(),i=Xa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(Du(t,e,r),Qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tu(),r=Xa(n);r.tag=2,t!=null&&(r.callback=t),t=Za(e,r,n),t!==null&&(Du(t,e,n),Qa(t,e,n))}};function $s(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!jr(n,r)||!jr(i,a):!0}function ec(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Qs.enqueueReplaceState(t,t.state,null)}function tc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function nc(e){ii(e)}function rc(e){console.error(e)}function ic(e){ii(e)}function ac(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function oc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function sc(e,t,n){return n=Xa(n),n.tag=3,n.payload={element:null},n.callback=function(){ac(e,t)},n}function cc(e){return e=Xa(e),e.tag=3,e}function lc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){oc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){oc(t,n,r),typeof i!=`function`&&(hu===null?hu=new Set([this]):hu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function uc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&oa(t,n,i,!0),n=uo.current,n!==null){switch(n.tag){case 31:case 13:return fo===null?zu():n.alternate===null&&nu===0&&(nu=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),id(e,r,i)),!1;case 22:return n.flags|=65536,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),id(e,r,i)),!1}throw Error(a(435,n.tag))}return id(e,r,i),zu(),!1}if(j)return t=uo.current,t===null?(r!==Gi&&(t=Error(a(423),{cause:r}),Qi(Ei(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Ei(r,n),i=sc(e.stateNode,r,i),$a(e,i),nu!==4&&(nu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Gi&&(e=Error(a(422),{cause:r}),Qi(Ei(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Ei(o,n),cu===null?cu=[o]:cu.push(o),nu!==4&&(nu=2),t===null)return!0;r=Ei(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=sc(n.stateNode,r,e),$a(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(hu===null||!hu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=cc(i),lc(i,e,n,r),$a(n,i),!1}n=n.return}while(n!==null);return!1}var dc=Error(a(461)),F=!1;function fc(e,t,n,r){t.child=e===null?Ka(t,null,n,r):Ga(t,e.child,n,r)}function pc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ca(t),r=jo(e,t,n,o,a,i),s=Fo(),e!==null&&!F?(Io(e,t,i),Lc(e,t,i)):(j&&s&&Ri(t),t.flags|=1,fc(e,t,r,i),t.child)}function mc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!_i(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,hc(e,t,a,r,i)):(e=bi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Rc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?jr:n,n(o,r)&&e.ref===t.ref)return Lc(e,t,i)}return t.flags|=1,e=vi(a,r),e.ref=t.ref,e.return=t,t.child=e}function hc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(jr(a,r)&&e.ref===t.ref)if(F=!1,t.pendingProps=r=a,Rc(e,i))e.flags&131072&&(F=!0);else return t.lanes=e.lanes,Lc(e,t,i)}return Cc(e,t,n,r,i)}function gc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return vc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Da(t,a===null?null:a.cachePool),a===null?co():so(t,a),mo(t);else return r=t.lanes=536870912,vc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Da(t,null),co(),ho(t)):(Da(t,a.cachePool),so(t,a),ho(t),t.memoizedState=null);return fc(e,t,i,n),t.child}function _c(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vc(e,t,n,r,i){var a=Ea();return a=a===null?null:{parent:ma._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Da(t,null),co(),mo(t),e!==null&&oa(e,t,r,!0),t.childLanes=i,null}function yc(e,t){return t=Mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bc(e,t,n){return Ga(t,e.child,null,n),e=yc(t,t.pendingProps),e.flags|=2,go(t),t.memoizedState=null,e}function xc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(j){if(r.mode===`hidden`)return e=yc(t,r),t.lanes=536870912,_c(null,e);if(po(t),(e=Hi)?(e=vf(e,Wi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ni===null?null:{id:Pi,overflow:Fi},retryLane:536870912,hydrationErrors:null},n=Ci(e),n.return=t,t.child=n,Vi=t,Hi=null)):e=null,e===null)throw Ki(t);return t.lanes=536870912,null}return yc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(po(t),i)if(t.flags&256)t.flags&=-257,t=bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(F||oa(e,t,n,!1),i=(n&e.childLanes)!==0,F||i){if(r=Yl,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,di(e,s),Du(r,e,s),dc;zu(),t=bc(e,t,n)}else e=o.treeContext,Hi=Sf(s.nextSibling),Vi=t,j=!0,Ui=null,Wi=!1,e!==null&&Bi(t,e),t=yc(t,r),t.flags|=4096;return t}return e=vi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Sc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Cc(e,t,n,r,i){return ca(t),n=jo(e,t,n,r,void 0,i),r=Fo(),e!==null&&!F?(Io(e,t,i),Lc(e,t,i)):(j&&r&&Ri(t),t.flags|=1,fc(e,t,n,i),t.child)}function wc(e,t,n,r,i,a){return ca(t),t.updateQueue=null,n=No(t,r,n,i),Mo(e),r=Fo(),e!==null&&!F?(Io(e,t,a),Lc(e,t,a)):(j&&r&&Ri(t),t.flags|=1,fc(e,t,n,a),t.child)}function Tc(e,t,n,r,i){if(ca(t),t.stateNode===null){var a=mi,o=n.contextType;typeof o==`object`&&o&&(a=M(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ja(t),o=n.contextType,a.context=typeof o==`object`&&o?M(o):mi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Qs.enqueueReplaceState(a,a.state,null),no(t,r,a,i),to(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=tc(n,s);a.props=c;var l=a.context,u=n.contextType;o=mi,typeof u==`object`&&u&&(o=M(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&ec(t,a,r,o),qa=!1;var f=t.memoizedState;a.state=f,no(t,r,a,i),to(),l=t.memoizedState,s||f!==l||qa?(typeof d==`function`&&(Zs(t,n,d,r),l=t.memoizedState),(c=qa||$s(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ya(e,t),o=t.memoizedProps,u=tc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=mi,typeof l==`object`&&l&&(c=M(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&ec(t,a,r,c),qa=!1,f=t.memoizedState,a.state=f,no(t,r,a,i),to();var p=t.memoizedState;o!==d||f!==p||qa||e!==null&&e.dependencies!==null&&sa(e.dependencies)?(typeof s==`function`&&(Zs(t,n,s,r),p=t.memoizedState),(u=qa||$s(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Sc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ga(t,e.child,null,i),t.child=Ga(t,null,n,i)):fc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Lc(e,t,i),e}function Ec(e,t,n,r){return Xi(),t.flags|=256,fc(e,t,n,r),t.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(e){return{baseLanes:e,cachePool:Oa()}}function kc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ou),e}function Ac(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(_o.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(j){if(i?N(t):ho(t),(e=Hi)?(e=vf(e,Wi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ni===null?null:{id:Pi,overflow:Fi},retryLane:536870912,hydrationErrors:null},n=Ci(e),n.return=t,t.child=n,Vi=t,Hi=null)):e=null,e===null)throw Ki(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(ho(t),i=t.mode,c=Mc({mode:`hidden`,children:c},i),r=xi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Oc(n),r.childLanes=kc(e,s,n),t.memoizedState=Dc,_c(null,r)):(N(t),jc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(N(t),t.flags&=-257,t=Nc(e,t,n)):t.memoizedState===null?(ho(t),c=r.fallback,i=t.mode,r=Mc({mode:`visible`,children:r.children},i),c=xi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ga(t,e.child,null,n),r=t.child,r.memoizedState=Oc(n),r.childLanes=kc(e,s,n),t.memoizedState=Dc,t=_c(null,r)):(ho(t),t.child=e.child,t.flags|=128,t=null);else if(N(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Qi({value:r,source:null,stack:null}),t=Nc(e,t,n)}else if(F||oa(e,t,n,!1),s=(n&e.childLanes)!==0,F||s){if(s=Yl,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,di(e,r),Du(s,e,r),dc;yf(c)||zu(),t=Nc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Hi=Sf(c.nextSibling),Vi=t,j=!0,Ui=null,Wi=!1,e!==null&&Bi(t,e),t=jc(t,r.children),t.flags|=4096);return t}return i?(ho(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=vi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=xi(c,i,n,null),c.flags|=2):c=vi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,_c(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Oc(n):(i=c.cachePool,i===null?i=Oa():(l=ma._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=kc(e,s,n),t.memoizedState=Dc,_c(e.child,r)):(N(t),n=e.child,e=n.sibling,n=vi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function jc(e,t){return t=Mc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Mc(e,t){return e=gi(22,e,null,t),e.lanes=0,e}function Nc(e,t,n){return Ga(t,e.child,null,n),e=jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ia(e.return,t,n)}function Fc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ic(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=_o.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,fe(_o,o),fc(e,t,r,n),r=j?Ai:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pc(e,n,t);else if(e.tag===19)Pc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&vo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&vo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fc(t,!0,n,null,a,r);break;case`together`:Fc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Lc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ru|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(oa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=vi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&sa(e))):!0}function zc(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),na(t,ma,e.memoizedState.cache),Xi();break;case 27:case 5:ye(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,po(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(N(t),e=Lc(e,t,n),e===null?null:e.sibling):Ac(e,t,n):(N(t),t.flags|=128,null);N(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(oa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ic(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),fe(_o,_o.current),r)break;return null;case 22:return t.lanes=0,gc(e,t,n,t.pendingProps);case 24:na(t,ma,e.memoizedState.cache)}return Lc(e,t,n)}function Bc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)F=!0;else{if(!Rc(e,n)&&!(t.flags&128))return F=!1,zc(e,t,n);F=!!(e.flags&131072)}else F=!1,j&&t.flags&1048576&&Li(t,Ai,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e==`function`)_i(e)?(r=tc(e,r),t.tag=1,t=Tc(null,t,e,r,n)):(t.tag=0,t=Cc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=pc(null,t,e,r,n);break a}else if(i===ee){t.tag=14,t=mc(null,t,e,r,n);break a}}throw t=ae(e)||e,Error(a(306,t,``))}}return t;case 0:return Cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=tc(r,t.pendingProps),Tc(e,t,r,i,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ya(e,t),no(t,r,null,n);var s=t.memoizedState;if(r=s.cache,na(t,ma,r),r!==o.cache&&aa(t,[ma],n,!0),to(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Ec(e,t,r,n);break a}else if(r!==i){i=Ei(Error(a(424)),t),Qi(i),t=Ec(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Hi=Sf(e.firstChild),Vi=t,j=!0,Ui=null,Wi=!0,n=Ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Xi(),r===i){t=Lc(e,t,n);break a}fc(e,t,r,n)}t=t.child}return t;case 26:return Sc(e,t),e===null?(n=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=n:j||(n=t.type,e=t.pendingProps,r=ef(he.current).createElement(n),r[mt]=t,r[ht]=e,Jd(r,n,e),Dt(r),t.stateNode=r):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&j&&(r=t.stateNode=Ef(t.type,t.pendingProps,he.current),Vi=t,Wi=!0,i=Hi,ff(t.type)?(Cf=i,Hi=Sf(r.firstChild)):Hi=i),fc(e,t,t.pendingProps.children,n),Sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&j&&((i=r=Hi)&&(r=gf(r,t.type,t.pendingProps,Wi),r===null?i=!1:(t.stateNode=r,Vi=t,Hi=Sf(r.firstChild),Wi=!1,i=!0)),i||Ki(t)),ye(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(i,o)?r=null:s!==null&&rf(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=jo(e,t,Po,null,null,n),fp._currentValue=i),Sc(e,t),fc(e,t,r,n),t.child;case 6:return e===null&&j&&((e=n=Hi)&&(n=_f(n,t.pendingProps,Wi),n===null?e=!1:(t.stateNode=n,Vi=t,Hi=null,e=!0)),e||Ki(t)),null;case 13:return Ac(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):fc(e,t,r,n),t.child;case 11:return pc(e,t,t.type,t.pendingProps,n);case 7:return fc(e,t,t.pendingProps,n),t.child;case 8:return fc(e,t,t.pendingProps.children,n),t.child;case 12:return fc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,na(t,t.type,r.value),fc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ca(t),i=M(i),r=r(i),t.flags|=1,fc(e,t,r,n),t.child;case 14:return mc(e,t,t.type,t.pendingProps,n);case 15:return hc(e,t,t.type,t.pendingProps,n);case 19:return Ic(e,t,n);case 31:return xc(e,t,n);case 22:return gc(e,t,n,t.pendingProps);case 24:return ca(t),r=M(ma),e===null?(i=Ea(),i===null&&(i=Yl,o=ha(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ja(t),na(t,ma,i)):((e.lanes&n)!==0&&(Ya(e,t),no(t,null,null,n),to()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,na(t,ma,r),r!==i.cache&&aa(t,[ma],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),na(t,ma,r))),fc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Vc(e){e.flags|=4}function Hc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Iu())e.flags|=8192;else throw Ia=Ma,Aa}else e.flags&=-16777217}function Uc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ip(t))if(Iu())e.flags|=8192;else throw Ia=Ma,Aa}function Wc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,su|=t)}function Gc(e,t){if(!j)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Kc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qc(e,t,n){var r=t.pendingProps;switch(zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kc(t),null;case 1:return Kc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ra(ma),ve(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?Vc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zi())),Kc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Vc(t),o===null?(Kc(t),Hc(t,i,null,r,n)):(Kc(t),Uc(t,o))):o?o===e.memoizedState?(Kc(t),t.flags&=-16777217):(Vc(t),Kc(t),Uc(t,o)):(e=e.memoizedProps,e!==r&&Vc(t),Kc(t),Hc(t,i,e,r,n)),null;case 27:if(be(t),n=he.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Kc(t),null}e=pe.current,Yi(t)?qi(t,e):(e=Ef(i,r,n),t.stateNode=e,Vc(t))}return Kc(t),null;case 5:if(be(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Kc(t),null}if(o=pe.current,Yi(t))qi(t,o);else{var s=ef(he.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Vc(t)}}return Kc(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=he.current,Yi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Vi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Ki(t,!0)}else e=ef(e).createTextNode(r),e[mt]=t,t.stateNode=e}return Kc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Yi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[mt]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kc(t),e=!1}else n=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(go(t),t):(go(t),null);if(t.flags&128)throw Error(a(558))}return Kc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Yi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[mt]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kc(t),i=!1}else i=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(go(t),t):(go(t),null)}return go(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Wc(t,t.updateQueue),Kc(t),null);case 4:return ve(),e===null&&Fd(t.stateNode.containerInfo),Kc(t),null;case 10:return ra(t.type),Kc(t),null;case 19:if(de(_o),r=t.memoizedState,r===null)return Kc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Gc(r,!1);else{if(nu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=vo(e),o!==null){for(t.flags|=128,Gc(r,!1),e=o.updateQueue,t.updateQueue=e,Wc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)yi(n,e),n=n.sibling;return fe(_o,_o.current&1|2),j&&Ii(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>pu&&(t.flags|=128,i=!0,Gc(r,!1),t.lanes=4194304)}else{if(!i)if(e=vo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Wc(t,e),Gc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!j)return Kc(t),null}else 2*Ne()-r.renderingStartTime>pu&&n!==536870912&&(t.flags|=128,i=!0,Gc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Kc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=_o.current,fe(_o,i?n&1|2:n&1),j&&Ii(t,r.treeForkCount),e);case 22:case 23:return go(t),lo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Kc(t),t.subtreeFlags&6&&(t.flags|=8192)):Kc(t),n=t.updateQueue,n!==null&&Wc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&de(Ta),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(ma),Kc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Jc(e,t){switch(zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(ma),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(go(t),t.alternate===null)throw Error(a(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(go(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(_o),null;case 4:return ve(),null;case 10:return ra(t.type),null;case 22:case 23:return go(t),lo(),e!==null&&de(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(ma),null;case 25:return null;default:return null}}function Yc(e,t){switch(zi(t),t.tag){case 3:ra(ma),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&go(t);break;case 13:go(t);break;case 19:de(_o);break;case 10:ra(t.type);break;case 22:case 23:go(t),lo(),e!==null&&de(Ta);break;case 24:ra(ma)}}function Xc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){rd(t,t.return,e)}}function Zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){rd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){rd(t,t.return,e)}}function Qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{io(t,n)}catch(t){rd(e,e.return,t)}}}function $c(e,t,n){n.props=tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){rd(e,t,n)}}function el(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){rd(e,t,n)}}function tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){rd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){rd(e,t,n)}else n.current=null}function nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){rd(e,e.return,t)}}function rl(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[ht]=t}catch(t){rd(e,e.return,t)}}function il(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ff(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function I(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[mt]=e,t[ht]=n}catch(t){rd(e,e.return,t)}}var cl=!1,ll=!1,ul=!1,dl=typeof WeakSet==`function`?WeakSet:Set,fl=null;function pl(e,t){if(e=e.containerInfo,Qd=xp,e=Fr(e),Ir(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},xp=!1,fl=t;fl!==null;)if(t=fl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,fl=e;else for(;fl!==null;){switch(t=fl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=tc(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){rd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,fl=e;break}fl=t.return}}function ml(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:kl(e,n),r&4&&Xc(5,n);break;case 1:if(kl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){rd(n,n.return,e)}else{var i=tc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){rd(n,n.return,e)}}r&64&&Qc(n),r&512&&el(n,n.return);break;case 3:if(kl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{io(e,t)}catch(e){rd(n,n.return,e)}}break;case 27:t===null&&r&4&&I(n);case 26:case 5:kl(e,n),t===null&&r&4&&nl(n),r&512&&el(n,n.return);break;case 12:kl(e,n);break;case 31:kl(e,n),r&4&&bl(e,n);break;case 13:kl(e,n),r&4&&xl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=sd.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||cl,!r){t=t!==null&&t.memoizedState!==null||ll,i=cl;var a=ll;cl=r,(ll=t)&&!a?jl(e,n,(n.subtreeFlags&8772)!=0):kl(e,n),cl=i,ll=a}break;case 30:break;default:kl(e,n)}}function hl(e){var t=e.alternate;t!==null&&(e.alternate=null,hl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gl=null,_l=!1;function vl(e,t,n){for(n=n.child;n!==null;)yl(e,t,n),n=n.sibling}function yl(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:ll||tl(n,t),vl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ll||tl(n,t);var r=gl,i=_l;ff(n.type)&&(gl=n.stateNode,_l=!1),vl(e,t,n),Df(n.stateNode),gl=r,_l=i;break;case 5:ll||tl(n,t);case 6:if(r=gl,i=_l,gl=null,vl(e,t,n),gl=r,_l=i,gl!==null)if(_l)try{(gl.nodeType===9?gl.body:gl.nodeName===`HTML`?gl.ownerDocument.body:gl).removeChild(n.stateNode)}catch(e){rd(n,t,e)}else try{gl.removeChild(n.stateNode)}catch(e){rd(n,t,e)}break;case 18:gl!==null&&(_l?(e=gl,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),qp(e)):pf(gl,n.stateNode));break;case 4:r=gl,i=_l,gl=n.stateNode.containerInfo,_l=!0,vl(e,t,n),gl=r,_l=i;break;case 0:case 11:case 14:case 15:Zc(2,n,t),ll||Zc(4,n,t),vl(e,t,n);break;case 1:ll||(tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&$c(n,t,r)),vl(e,t,n);break;case 21:vl(e,t,n);break;case 22:ll=(r=ll)||n.memoizedState!==null,vl(e,t,n),ll=r;break;default:vl(e,t,n)}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qp(e)}catch(e){rd(t,t.return,e)}}}function xl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qp(e)}catch(e){rd(t,t.return,e)}}function Sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dl),t;default:throw Error(a(435,e.tag))}}function Cl(e,t){var n=Sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=cd.bind(null,e,t);t.then(r,r)}})}function wl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){gl=c.stateNode,_l=!1;break a}break;case 5:gl=c.stateNode,_l=!1;break a;case 3:case 4:gl=c.stateNode.containerInfo,_l=!0;break a}c=c.return}if(gl===null)throw Error(a(160));yl(o,s,i),gl=null,_l=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)El(t,e),t=t.sibling}var Tl=null;function El(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wl(t,e),Dl(e),r&4&&(Zc(3,e,e.return),Xc(3,e),Zc(5,e,e.return));break;case 1:wl(t,e),Dl(e),r&512&&(ll||n===null||tl(n,n.return)),r&64&&cl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=Tl;if(wl(t,e),Dl(e),r&512&&(ll||n===null||tl(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[xt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Jd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=tp(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Jd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=tp(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Jd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[mt]=e,Dt(o),r=o}e.stateNode=r}else np(i,e.type,e.stateNode);else e.stateNode=Xf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&rl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?np(i,e.type,e.stateNode):Xf(i,r,e.memoizedProps))}break;case 27:wl(t,e),Dl(e),r&512&&(ll||n===null||tl(n,n.return)),n!==null&&r&4&&rl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(wl(t,e),Dl(e),r&512&&(ll||n===null||tl(n,n.return)),e.flags&32){i=e.stateNode;try{$t(i,``)}catch(t){rd(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,rl(e,i,n===null?i:n.memoizedProps)),r&1024&&(ul=!0);break;case 6:if(wl(t,e),Dl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){rd(e,e.return,t)}}break;case 3:if(ep=null,i=Tl,Tl=Af(t.containerInfo),wl(t,e),Tl=i,Dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{qp(t.containerInfo)}catch(t){rd(e,e.return,t)}ul&&(ul=!1,Ol(e));break;case 4:r=Tl,Tl=Af(e.stateNode.containerInfo),wl(t,e),Dl(e),Tl=r;break;case 12:wl(t,e),Dl(e);break;case 31:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 13:wl(t,e),Dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(du=Ne()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=cl,d=ll;if(cl=u||i,ll=d||l,wl(t,e),ll=d,cl=u,Dl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||cl||ll||Al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){rd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){rd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?mf(m,!0):mf(l.stateNode,!1)}catch(e){rd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Cl(e,n))));break;case 19:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 30:break;case 21:break;default:wl(t,e),Dl(e)}}function Dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(il(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;sl(e,al(e),i);break;case 5:var o=n.stateNode;n.flags&32&&($t(o,``),n.flags&=-33),sl(e,al(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;ol(e,al(e),s);break;default:throw Error(a(161))}}catch(t){rd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ol(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ol(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ml(e,t.alternate,t),t=t.sibling}function Al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Zc(4,t,t.return),Al(t);break;case 1:tl(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&$c(t,t.return,n),Al(t);break;case 27:Df(t.stateNode);case 26:case 5:tl(t,t.return),Al(t);break;case 22:t.memoizedState===null&&Al(t);break;case 30:Al(t);break;default:Al(t)}e=e.sibling}}function jl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:jl(i,a,n),Xc(4,a);break;case 1:if(jl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){rd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)ro(c[i],s)}catch(e){rd(r,r.return,e)}}n&&o&64&&Qc(a),el(a,a.return);break;case 27:I(a);case 26:case 5:jl(i,a,n),n&&r===null&&o&4&&nl(a),el(a,a.return);break;case 12:jl(i,a,n);break;case 31:jl(i,a,n),n&&o&4&&bl(i,a);break;case 13:jl(i,a,n),n&&o&4&&xl(i,a);break;case 22:a.memoizedState===null&&jl(i,a,n),el(a,a.return);break;case 30:break;default:jl(i,a,n)}t=t.sibling}}function Ml(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ga(n))}function Nl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e))}function Pl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fl(e,t,n,r),t=t.sibling}function Fl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Pl(e,t,n,r),i&2048&&Xc(9,t);break;case 1:Pl(e,t,n,r);break;case 3:Pl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e)));break;case 12:if(i&2048){Pl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){rd(t,t.return,e)}}else Pl(e,t,n,r);break;case 31:Pl(e,t,n,r);break;case 13:Pl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Pl(e,t,n,r):(a._visibility|=2,Il(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Pl(e,t,n,r):Ll(e,t),i&2048&&Ml(o,t);break;case 24:Pl(e,t,n,r),i&2048&&Nl(t.alternate,t);break;default:Pl(e,t,n,r)}}function Il(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Il(a,o,s,c,i),Xc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Il(a,o,s,c,i)):u._visibility&2?Il(a,o,s,c,i):Ll(a,o),i&&l&2048&&Ml(o.alternate,o);break;case 24:Il(a,o,s,c,i),i&&l&2048&&Nl(o.alternate,o);break;default:Il(a,o,s,c,i)}t=t.sibling}}function Ll(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ll(n,r),i&2048&&Ml(r.alternate,r);break;case 24:Ll(n,r),i&2048&&Nl(r.alternate,r);break;default:Ll(n,r)}t=t.sibling}}var Rl=8192;function zl(e,t,n){if(e.subtreeFlags&Rl)for(e=e.child;e!==null;)Bl(e,t,n),e=e.sibling}function Bl(e,t,n){switch(e.tag){case 26:zl(e,t,n),e.flags&Rl&&e.memoizedState!==null&&ap(n,Tl,e.memoizedState,e.memoizedProps);break;case 5:zl(e,t,n);break;case 3:case 4:var r=Tl;Tl=Af(e.stateNode.containerInfo),zl(e,t,n),Tl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Rl,Rl=16777216,zl(e,t,n),Rl=r):zl(e,t,n));break;default:zl(e,t,n)}}function Vl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fl=r,Gl(r,e)}Vl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ul(e),e=e.sibling}function Ul(e){switch(e.tag){case 0:case 11:case 15:Hl(e),e.flags&2048&&Zc(9,e,e.return);break;case 3:Hl(e);break;case 12:Hl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wl(e)):Hl(e);break;default:Hl(e)}}function Wl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fl=r,Gl(r,e)}Vl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Zc(8,t,t.return),Wl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wl(t));break;default:Wl(t)}e=e.sibling}}function Gl(e,t){for(;fl!==null;){var n=fl;switch(n.tag){case 0:case 11:case 15:Zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ga(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fl=r;else a:for(n=e;fl!==null;){r=fl;var i=r.sibling,a=r.return;if(hl(r),r===n){fl=null;break a}if(i!==null){i.return=a,fl=i;break a}fl=a}}}var Kl={getCacheForType:function(e){var t=M(ma),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return M(ma).controller.signal}},ql=typeof WeakMap==`function`?WeakMap:Map,Jl=0,Yl=null,L=null,R=0,Xl=0,Zl=null,Ql=!1,$l=!1,eu=!1,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=0,cu=null,lu=null,uu=!1,du=0,fu=0,pu=1/0,mu=null,hu=null,gu=0,_u=null,vu=null,yu=0,bu=0,xu=null,Su=null,Cu=0,wu=null;function Tu(){return Jl&2&&R!==0?R&-R:k.T===null?dt():wd()}function Eu(){if(ou===0)if(!(R&536870912)||j){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),ou=e}else ou=536870912;return e=uo.current,e!==null&&(e.flags|=32),ou}function Du(e,t,n){(e===Yl&&(Xl===2||Xl===9)||e.cancelPendingCommit!==null)&&(Pu(e,0),ju(e,R,ou,!1)),it(e,n),(!(Jl&2)||e!==Yl)&&(e===Yl&&(!(Jl&2)&&(iu|=n),nu===4&&ju(e,R,ou,!1)),gd(e))}function Ou(e,t,n){if(Jl&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),i=r?Hu(e,t):Bu(e,t,!0),o=r;do{if(i===0){$l&&!r&&ju(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Au(n)){i=Bu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=cu;var l=c.current.memoizedState.isDehydrated;if(l&&(Pu(c,s).flags|=256),s=Bu(c,s,!1),s!==2){if(eu&&!l){c.errorRecoveryDisabledLanes|=o,iu|=o,i=4;break a}o=lu,lu=i,o!==null&&(lu===null?lu=o:lu.push.apply(lu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Pu(e,0),ju(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:ju(r,t,ou,!Ql);break a;case 2:lu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=du+300-Ne(),10<i)){if(ju(r,t,ou,!Ql),$e(r,0,!0)!==0)break a;yu=t,r.timeoutHandle=sf(ku.bind(null,r,n,lu,mu,uu,t,ou,iu,su,Ql,o,`Throttled`,-0,0),i);break a}ku(r,n,lu,mu,uu,t,ou,iu,su,Ql,o,null,-0,0)}}break}while(1);gd(e)}function ku(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cn},Bl(t,a,d);var m=(a&62914560)===a?du-Ne():(a&4194048)===a?fu-Ne():0;if(m=sp(d,m),m!==null){yu=a,e.cancelPendingCommit=m(Yu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ju(e,a,o,!l);return}}Yu(e,t,a,n,r,i,o,s,c)}function Au(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ar(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ju(e,t,n,r){t&=~au,t&=~iu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function Mu(){return Jl&6?!0:(_d(0,!1),!1)}function Nu(){if(L!==null){if(Xl===0)var e=L.return;else e=L,ta=ea=null,Lo(e),za=null,Ba=0,e=L;for(;e!==null;)Yc(e.alternate,e),e=e.return;L=null}}function Pu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),yu=0,Nu(),Yl=e,L=n=vi(e.current,null),R=t,Xl=0,Zl=null,Ql=!1,$l=et(e,t),eu=!1,su=ou=au=iu=ru=nu=0,lu=cu=null,uu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return tu=t,ci(),n}function Fu(e,t){P=null,k.H=qs,t===ka||t===ja?(t=La(),Xl=3):t===Aa?(t=La(),Xl=4):Xl=t===dc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Zl=t,L===null&&(nu=1,ac(e,Ei(t,e.current)))}function Iu(){var e=uo.current;return e===null?!0:(R&4194048)===R?fo===null:(R&62914560)===R||R&536870912?e===fo:!1}function Lu(){var e=k.H;return k.H=qs,e===null?qs:e}function Ru(){var e=k.A;return k.A=Kl,e}function zu(){nu=4,Ql||(R&4194048)!==R&&uo.current!==null||($l=!0),!(ru&134217727)&&!(iu&134217727)||Yl===null||ju(Yl,R,ou,!1)}function Bu(e,t,n){var r=Jl;Jl|=2;var i=Lu(),a=Ru();(Yl!==e||R!==t)&&(mu=null,Pu(e,t)),t=!1;var o=nu;a:do try{if(Xl!==0&&L!==null){var s=L,c=Zl;switch(Xl){case 8:Nu(),o=6;break a;case 3:case 2:case 9:case 6:uo.current===null&&(t=!0);var l=Xl;if(Xl=0,Zl=null,Ku(e,s,c,l),n&&$l){o=0;break a}break;default:l=Xl,Xl=0,Zl=null,Ku(e,s,c,l)}}Vu(),o=nu;break}catch(t){Fu(e,t)}while(1);return t&&e.shellSuspendCounter++,ta=ea=null,Jl=r,k.H=i,k.A=a,L===null&&(Yl=null,R=0,ci()),o}function Vu(){for(;L!==null;)Wu(L)}function Hu(e,t){var n=Jl;Jl|=2;var r=Lu(),i=Ru();Yl!==e||R!==t?(mu=null,pu=Ne()+500,Pu(e,t)):$l=et(e,t);a:do try{if(Xl!==0&&L!==null){t=L;var o=Zl;b:switch(Xl){case 1:Xl=0,Zl=null,Ku(e,t,o,1);break;case 2:case 9:if(Na(o)){Xl=0,Zl=null,Gu(t);break}t=function(){Xl!==2&&Xl!==9||Yl!==e||(Xl=7),gd(e)},o.then(t,t);break a;case 3:Xl=7;break a;case 4:Xl=5;break a;case 7:Na(o)?(Xl=0,Zl=null,Gu(t)):(Xl=0,Zl=null,Ku(e,t,o,7));break;case 5:var s=null;switch(L.tag){case 26:s=L.memoizedState;case 5:case 27:var c=L;if(s?ip(s):c.stateNode.complete){Xl=0,Zl=null;var l=c.sibling;if(l!==null)L=l;else{var u=c.return;u===null?L=null:(L=u,qu(u))}break b}}Xl=0,Zl=null,Ku(e,t,o,5);break;case 6:Xl=0,Zl=null,Ku(e,t,o,6);break;case 8:Nu(),nu=6;break a;default:throw Error(a(462))}}Uu();break}catch(t){Fu(e,t)}while(1);return ta=ea=null,k.H=r,k.A=i,Jl=n,L===null?(Yl=null,R=0,ci(),nu):0}function Uu(){for(;L!==null&&!je();)Wu(L)}function Wu(e){var t=Bc(e.alternate,e,tu);e.memoizedProps=e.pendingProps,t===null?qu(e):L=t}function Gu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wc(n,t,t.pendingProps,t.type,void 0,R);break;case 11:t=wc(n,t,t.pendingProps,t.type.render,t.ref,R);break;case 5:Lo(t);default:Yc(n,t),t=L=yi(t,tu),t=Bc(n,t,tu)}e.memoizedProps=e.pendingProps,t===null?qu(e):L=t}function Ku(e,t,n,r){ta=ea=null,Lo(t),za=null,Ba=0;var i=t.return;try{if(uc(e,i,t,n,R)){nu=1,ac(e,Ei(n,e.current)),L=null;return}}catch(t){if(i!==null)throw L=i,t;nu=1,ac(e,Ei(n,e.current)),L=null;return}t.flags&32768?(j||r===1?e=!0:$l||R&536870912?e=!1:(Ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=uo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ju(t,e)):qu(t)}function qu(e){var t=e;do{if(t.flags&32768){Ju(t,Ql);return}e=t.return;var n=qc(t.alternate,t,tu);if(n!==null){L=n;return}if(t=t.sibling,t!==null){L=t;return}L=t=e}while(t!==null);nu===0&&(nu=5)}function Ju(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,L=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){L=e;return}L=e=n}while(e!==null);nu=6,L=null}function Yu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do ed();while(gu!==0);if(Jl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=si,at(e,n,o,s,c,l),e===Yl&&(L=Yl=null,R=0),vu=t,_u=e,yu=n,bu=o,xu=i,Su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ld(Le,function(){return td(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=k.T,k.T=null,i=A.p,A.p=2,s=Jl,Jl|=4;try{pl(e,t,n)}finally{Jl=s,A.p=i,k.T=r}}gu=1,Xu(),Zu(),Qu()}}function Xu(){if(gu===1){gu=0;var e=_u,t=vu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=Jl;Jl|=4;try{El(t,e);var a=$d,o=Fr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Pr(s.ownerDocument.documentElement,s)){if(c!==null&&Ir(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Nr(s,h),v=Nr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}xp=!!Qd,$d=Qd=null}finally{Jl=i,A.p=r,k.T=n}}e.current=t,gu=2}}function Zu(){if(gu===2){gu=0;var e=_u,t=vu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=Jl;Jl|=4;try{ml(e,t.alternate,t)}finally{Jl=i,A.p=r,k.T=n}}gu=3}}function Qu(){if(gu===4||gu===3){gu=0,Me();var e=_u,t=vu,n=yu,r=Su;t.subtreeFlags&10256||t.flags&10256?gu=5:(gu=0,vu=_u=null,$u(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(hu=null),ut(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=k.T,i=A.p,A.p=2,k.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{k.T=t,A.p=i}}yu&3&&ed(),gd(e),i=e.pendingLanes,n&261930&&i&42?e===wu?Cu++:(Cu=0,wu=e):Cu=0,_d(0,!1)}}function $u(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ga(t)))}function ed(){return Xu(),Zu(),Qu(),td()}function td(){if(gu!==5)return!1;var e=_u,t=bu;bu=0;var n=ut(yu),r=k.T,i=A.p;try{A.p=32>n?32:n,k.T=null,n=xu,xu=null;var o=_u,s=yu;if(gu=0,vu=_u=null,yu=0,Jl&6)throw Error(a(331));var c=Jl;if(Jl|=4,Ul(o.current),Fl(o,o.current,s,n),Jl=c,_d(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{A.p=i,k.T=r,$u(e,t)}}function nd(e,t,n){t=Ei(n,t),t=sc(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(it(e,2),gd(e))}function rd(e,t,n){if(e.tag===3)nd(e,e,n);else for(;t!==null;){if(t.tag===3){nd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(hu===null||!hu.has(r))){e=Ei(n,e),n=cc(2),r=Za(t,n,2),r!==null&&(lc(n,r,t,e),it(r,2),gd(r));break}}t=t.return}}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ql;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(eu=!0,i.add(n),e=ad.bind(null,e,t,n),t.then(e,e))}function ad(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yl===e&&(R&n)===n&&(nu===4||nu===3&&(R&62914560)===R&&300>Ne()-du?!(Jl&2)&&Pu(e,0):au|=n,su===R&&(su=0)),gd(e)}function od(e,t){t===0&&(t=nt()),e=di(e,t),e!==null&&(it(e,t),gd(e))}function sd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),od(e,n)}function cd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),od(e,n)}function ld(e,t){return ke(e,t)}var ud=null,dd=null,fd=!1,pd=!1,md=!1,hd=0;function gd(e){e!==dd&&e.next===null&&(dd===null?ud=dd=e:dd=dd.next=e),pd=!0,fd||(fd=!0,Cd())}function _d(e,t){if(!md&&pd){md=!0;do for(var n=!1,r=ud;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Sd(r,a))}else a=R,a=$e(r,r===Yl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,Sd(r,a));r=r.next}while(n);md=!1}}function vd(){yd()}function yd(){pd=fd=!1;var e=0;hd!==0&&of()&&(e=hd);for(var t=Ne(),n=null,r=ud;r!==null;){var i=r.next,a=bd(r,t);a===0?(r.next=null,n===null?ud=i:n.next=i,i===null&&(dd=n)):(n=r,(e!==0||a&3)&&(pd=!0)),r=i}gu!==0&&gu!==5||_d(e,!1),hd!==0&&(hd=0)}function bd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yl,n=R,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Xl===2||Xl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=xd.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function xd(e,t){if(gu!==0&&gu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ed()&&e.callbackNode!==n)return null;var r=R;return r=$e(e,e===Yl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ou(e,r,t),bd(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?xd.bind(null,e):null)}function Sd(e,t){if(ed())return null;Ou(e,t,!0)}function Cd(){uf(function(){Jl&6?ke(Fe,vd):yd()})}function wd(){if(hd===0){var e=ya;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),hd=e}return hd}function Td(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+e)}function Ed(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Dd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Td((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?Td(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(hd!==0){var e=o?Ed(i,o):new FormData(i);Ns(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Ed(i,o):new FormData(i),Ns(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Od=0;Od<ni.length;Od++){var kd=ni[Od];ri(kd.toLowerCase(),`on`+(kd[0].toUpperCase()+kd.slice(1)))}ri(Jr,`onAnimationEnd`),ri(Yr,`onAnimationIteration`),ri(Xr,`onAnimationStart`),ri(`dblclick`,`onDoubleClick`),ri(`focusin`,`onFocus`),ri(`focusout`,`onBlur`),ri(Zr,`onTransitionRun`),ri(Qr,`onTransitionStart`),ri($r,`onTransitionCancel`),ri(ei,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ad=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),jd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ad));function Md(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ii(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ii(e)}i.currentTarget=null,a=c}}}}function z(e,t){var n=t[_t];n===void 0&&(n=t[_t]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(jd.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Op(t)){case 2:var i=Sp;break;case 8:i=Cp;break;default:i=wp}n=i.bind(null,t,n,e),i=void 0,!vn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=Ct(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}hn(function(){var r=a,i=un(n),o=[];a:{var s=ti.get(e);if(s!==void 0){var l=kn,u=e;switch(e){case`keypress`:if(wn(n)===0)break a;case`keydown`:case`keyup`:l=qn;break;case`focusin`:u=`focus`,l=Rn;break;case`focusout`:u=`blur`,l=Rn;break;case`beforeblur`:case`afterblur`:l=Rn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=In;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Ln;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Yn;break;case Jr:case Yr:case Xr:l=zn;break;case ei:l=Xn;break;case`scroll`:case`scrollend`:l=jn;break;case`wheel`:l=Zn;break;case`copy`:case`cut`:case`paste`:l=Bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Jn;break;case`toggle`:case`beforetoggle`:l=Qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=gn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ct(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=In,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Jn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:Tt(l),h=u==null?s:Tt(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,Ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(o,s,l,d,!1),u!==null&&f!==null&&Vd(o,f,u,d,!0)}}a:{if(s=r?Tt(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=vr;else if(fr(s))if(yr)v=Or;else{v=Er;var y=Tr}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&rn(r.elementType)&&(v=vr):v=Dr;if(v&&=v(e,r)){pr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Yt(s,`number`,s.value)}switch(y=r?Tt(r):window,e){case`focusin`:(fr(y)||y.contentEditable===`true`)&&(Rr=y,zr=r,Br=null);break;case`focusout`:Br=zr=Rr=null;break;case`mousedown`:Vr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Vr=!1,Hr(o,n,i);break;case`selectionchange`:if(Lr)break;case`keydown`:case`keyup`:Hr(o,n,i)}var b;if(er)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else cr?or(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(rr&&n.locale!==`ko`&&(cr||x!==`onCompositionStart`?x===`onCompositionEnd`&&cr&&(b=Cn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,cr=!0)),y=zd(r,x),0<y.length&&(x=new Vn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=sr(n),b!==null&&(x.data=b)))),(b=nr?lr(e,n):ur(e,n))&&(x=zd(r,`onBeforeInput`),0<x.length&&(y=new Vn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),Dd(o,e,r,n,i)}Md(o,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=gn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=gn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=gn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\r\n?/g,Ud=/\u0000|\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`
|
|
10
|
-
`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Lt(e,`class`,r);break;case`tabIndex`:Lt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Lt(e,n,r);break;case`style`:nn(e,r,o);break;case`data`:if(t!==`object`){Lt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,i.name,i,null),Kd(e,t,`formEncType`,i.formEncType,i,null),Kd(e,t,`formMethod`,i.formMethod,i,null),Kd(e,t,`formTarget`,i.formTarget,i,null)):(Kd(e,t,`encType`,i.encType,i,null),Kd(e,t,`method`,i.method,i,null),Kd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`onScroll`:r!=null&&z(`scroll`,e);break;case`onScrollEnd`:r!=null&&z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=sn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:z(`beforetoggle`,e),z(`toggle`,e),It(e,`popover`,r);break;case`xlinkActuate`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:It(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=an.get(n)||n,It(e,n,r))}}function qd(e,t,n,r,i,o){switch(n){case`style`:nn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(e,``+r);break;case`onScroll`:r!=null&&z(`scroll`,e);break;case`onScrollEnd`:r!=null&&z(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ht]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):It(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:z(`error`,e),z(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Kd(e,t,o,s,n,null)}}i&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:z(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Kd(e,t,r,d,n,null)}}Jt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in z(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Kd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(e,!!r,t,!1);return;case`textarea`:for(s in z(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Kd(e,t,s,c,n,null)}Qt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Kd(e,t,l,r,n,null)}return;case`dialog`:z(`beforetoggle`,e),z(`toggle`,e),z(`cancel`,e),z(`close`,e);break;case`iframe`:case`object`:z(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ad.length;r++)z(Ad[r],e);break;case`image`:z(`error`,e),z(`load`,e);break;case`details`:z(`toggle`,e);break;case`embed`:case`source`:case`link`:z(`error`,e),z(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Kd(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}qt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Kd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Kd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Kd(e,t,s,i,r,o)}Zt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Kd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Kd(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Xd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function nf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function rf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),qp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Df(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Df(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Df(e.ownerDocument.body);n=i}while(n);qp(t)}function mf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:hf(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[xt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Sf(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Sf(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Sf(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Cf=null;function wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=ef(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Df(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var Of=new Map,kf=new Set;function Af(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jf=A.d;A.d={f:Mf,r:Nf,D:If,C:Lf,L:Rf,m:zf,X:Vf,S:Bf,M:Hf};function Mf(){var e=jf.f(),t=Mu();return e||t}function Nf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?Fs(t):jf.r(e)}var Pf=typeof document>`u`?null:document;function Ff(e,t,n){var r=Pf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),kf.has(i)||(kf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function If(e){jf.D(e),Ff(`dns-prefetch`,e,null)}function Lf(e,t){jf.C(e,t),Ff(`preconnect`,e,t)}function Rf(e,t,n){jf.L(e,t,n);var r=Pf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Wf(e);break;case`script`:a=Jf(e)}Of.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Of.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gf(a))||t===`script`&&r.querySelector(Yf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function zf(e,t){jf.m(e,t);var n=Pf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jf(e)}if(!Of.has(a)&&(e=h({rel:`modulepreload`,href:e},t),Of.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Yf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Bf(e,t,n){jf.S(e,t,n);var r=Pf;if(r&&e){var i=Et(r).hoistableStyles,a=Wf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Of.get(a))&&Qf(e,n);var c=o=r.createElement(`link`);Dt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vf(e,t){jf.X(e,t);var n=Pf;if(n&&e){var r=Et(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=h({src:e,async:!0},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Dt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t){jf.M(e,t);var n=Pf;if(n&&e){var r=Et(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Dt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t,n,r){var i=(i=he.current)?Af(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Wf(n.href),n=Et(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wf(n.href);var o=Et(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Gf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Of.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Of.set(e,n),o||qf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Jf(n),n=Et(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Wf(e){return`href="`+Kt(e)+`"`}function Gf(e){return`link[rel="stylesheet"][`+e+`]`}function Kf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function qf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Jf(e){return`[src="`+Kt(e)+`"]`}function Yf(e){return`script[async]`+e}function Xf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Jd(r,`style`,i),Zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Wf(n.href);var o=e.querySelector(Gf(i));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Kf(n),(i=Of.get(i))&&Qf(r,i),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case`script`:return o=Jf(n.src),(i=e.querySelector(Yf(o)))?(t.instance=i,Dt(i),i):(r=n,(i=Of.get(o))&&(r=h({},n),$f(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Dt(i),Jd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ep=null;function tp(e,t,n){if(ep===null){var r=new Map,i=ep=new Map;i.set(n,r)}else i=ep,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[xt]||a[mt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function np(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ip(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ap(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wf(r.href),a=t.querySelector(Gf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=cp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Kf(r),(i=Of.get(i))&&Qf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=cp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var op=0;function sp(e,t){return e.stylesheets&&e.count===0&&up(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&up(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&op===0&&(op=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&up(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>op?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function cp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)up(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var lp=null;function up(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lp=new Map,t.forEach(dp,e),lp=null,cp.call(e))}function dp(e,t){if(!(t.state.loading&4)){var n=lp.get(e);if(n)var r=n.get(null);else{n=new Map,lp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=cp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var fp={$$typeof:C,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function pp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function mp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new pp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=gi(3,null,null,t),e.current=a,a.stateNode=e,t=ha(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ja(a),e}function hp(e){return e?(e=mi,e):mi}function gp(e,t,n,r,i,a){i=hp(i),r.context===null?r.context=i:r.pendingContext=i,r=Xa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Za(e,r,t),n!==null&&(Du(n,e,t),Qa(n,e,t))}function _p(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vp(e,t){_p(e,t),(e=e.alternate)&&_p(e,t)}function yp(e){if(e.tag===13||e.tag===31){var t=di(e,67108864);t!==null&&Du(t,e,67108864),vp(e,67108864)}}function bp(e){if(e.tag===13||e.tag===31){var t=Tu();t=lt(t);var n=di(e,t);n!==null&&Du(n,e,t),vp(e,t)}}var xp=!0;function Sp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,wp(e,t,n,r)}finally{A.p=a,k.T=i}}function Cp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,wp(e,t,n,r)}finally{A.p=a,k.T=i}}function wp(e,t,n,r){if(xp){var i=Tp(r);if(i===null)Ld(e,t,r,Ep,n),Lp(e,r);else if(zp(i,e,t,n,r))r.stopPropagation();else if(Lp(e,r),t&4&&-1<Ip.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}gd(a),!(Jl&6)&&(pu=Ne()+500,_d(0,!1))}}break;case 31:case 13:s=di(a,2),s!==null&&Du(s,a,2),Mu(),vp(a,2)}if(a=Tp(r),a===null&&Ld(e,t,r,Ep,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function Tp(e){return e=un(e),Dp(e)}var Ep=null;function Dp(e){if(Ep=null,e=Ct(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ep=e,null}function Op(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var kp=!1,Ap=null,jp=null,Mp=null,Np=new Map,Pp=new Map,Fp=[],Ip=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Lp(e,t){switch(e){case`focusin`:case`focusout`:Ap=null;break;case`dragenter`:case`dragleave`:jp=null;break;case`mouseover`:case`mouseout`:Mp=null;break;case`pointerover`:case`pointerout`:Np.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Pp.delete(t.pointerId)}}function Rp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&yp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zp(e,t,n,r,i){switch(t){case`focusin`:return Ap=Rp(Ap,e,t,n,r,i),!0;case`dragenter`:return jp=Rp(jp,e,t,n,r,i),!0;case`mouseover`:return Mp=Rp(Mp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Np.set(a,Rp(Np.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Pp.set(a,Rp(Pp.get(a)||null,e,t,n,r,i)),!0}return!1}function Bp(e){var t=Ct(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,ft(e.priority,function(){bp(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,ft(e.priority,function(){bp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&yp(t),e.blockedOn=n,!1;t.shift()}return!0}function Hp(e,t,n){Vp(e)&&n.delete(t)}function Up(){kp=!1,Ap!==null&&Vp(Ap)&&(Ap=null),jp!==null&&Vp(jp)&&(jp=null),Mp!==null&&Vp(Mp)&&(Mp=null),Np.forEach(Hp),Pp.forEach(Hp)}function Wp(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Up)))}var Gp=null;function Kp(e){Gp!==e&&(Gp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Gp===e&&(Gp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Dp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ns(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function qp(e){function t(t){return Wp(t,e)}Ap!==null&&Wp(Ap,e),jp!==null&&Wp(jp,e),Mp!==null&&Wp(Mp,e),Np.forEach(t),Pp.forEach(t);for(var n=0;n<Fp.length;n++){var r=Fp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Fp.length&&(n=Fp[0],n.blockedOn===null);)Bp(n),n.blockedOn===null&&Fp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ht]||null;if(typeof a==`function`)o||Kp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(Dp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Kp(n)}}}function Jp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Yp(e){this._internalRoot=e}Xp.prototype.render=Yp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;gp(n,Tu(),e,t,null,null)},Xp.prototype.unmount=Yp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gp(e.current,2,null,e,null,null),Mu(),t[gt]=null}};function Xp(e){this._internalRoot=e}Xp.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fp.length&&t!==0&&t<Fp[n].priority;n++);Fp.splice(n,0,e),n===0&&Bp(e)}};var Zp=r.version;if(Zp!==`19.2.8`)throw Error(a(527,Zp,`19.2.8`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Qp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var $p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$p.isDisabled&&$p.supportsFiber)try{He=$p.inject(Qp),Ue=$p}catch{}}t.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=nc,s=rc,c=ic;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=mp(e,1,!1,null,null,n,r,null,i,s,c,Jp),e[gt]=t.current,Fd(e),new Yp(t)}})),d=r(((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=u()})),f=t(e(),1),p=d(),m=`modulepreload`,h=function(e){return`/`+e},g={},_=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,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=h(t,n),t=s(t),t in g)return;g[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`:m,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)})},v=e=>{throw TypeError(e)},y=(e,t,n)=>t.has(e)||v(`Cannot `+n),b=(e,t,n)=>(y(e,t,`read from private field`),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?v(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),S=(e,t,n,r)=>(y(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),C=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,w=/^[\\/]{2}/;function T(e,t){return t+e.replace(/\\/g,`/`)}var E=`popstate`;function ee(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function te(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=oe(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),ie(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:ae(t))}function r(e,t){O(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return k(t,n,r,e)}function D(e,t){if(e===!1||e==null)throw Error(t)}function O(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ne(){return Math.random().toString(36).substring(2,10)}function re(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ie(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?oe(t):t,state:n,key:t&&t.key||r||ne(),mask:i}}function ae({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function oe(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function k(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=ee(e)?e:ie(h.location,e,t);n&&n(r,e),l=u()+1;let d=re(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=ee(e)?e:ie(h.location,e,t);n&&n(r,e),l=u();let i=re(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return A(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(E,d),c=e,()=>{i.removeEventListener(E,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function A(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),D(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:ae(t);return i=i.replace(/ $/,`%20`),!n&&w.test(i)&&(i=r+i),new URL(i,r)}var se,ce=class{constructor(e){if(x(this,se,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(b(this,se).has(e))return b(this,se).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){b(this,se).set(e,t)}};se=new WeakMap;var le=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function ue(e){return le.has(e)}var de=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function fe(e){return de.has(e)}function pe(e){return e.index===!0}function me(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(D(e.index!==!0||!e.children,`Cannot specify children on an index route`),D(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),pe(e)){let n={...e,id:s};return r[s]=he(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=he(n,t(n)),e.children&&(n.children=me(e.children,t,o,r,i)),n}})}function he(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ge(e,t,n=`/`){return _e(e,t,n,!1)}function _e(e,t,n,r,i){let a=Le((typeof t==`string`?oe(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ye(e),s=null,c=Ie(a);for(let e=0;s==null&&e<o.length;++e)s=Me(o[e],c,r);return s}function ve(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ye(e){let t=be(e);return Se(t),t}function be(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;D(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=qe([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(D(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),be(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Ae(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Fe(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of xe(e.path))a(e,t,!0,n)}),t}function xe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=xe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Se(e){e.sort((e,t)=>e.score===t.score?je(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Ce=/^:[\w-]+$/,we=3,Te=2,Ee=1,De=10,Oe=-2,ke=e=>e===`*`;function Ae(e,t){let n=e.split(`/`),r=n.length;return n.some(ke)&&(r+=Oe),t&&(r+=Te),n.filter(e=>!ke(e)).reduce((e,t)=>e+(Ce.test(t)?we:t===``?Ee:De),r)}function je(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Me(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Pe(u,l,s.matcher,s.compiledParams):Ne(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:qe([a,d.pathname]),pathnameBase:Ye(qe([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=qe([a,d.pathnameBase]))}return o}function Ne(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Fe(e.path,e.caseSensitive,e.end);return Pe(e,t,n,r)}function Pe(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Fe(e,t=!1,n=!0){O(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ie(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return O(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Le(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Re({basename:e,pathname:t}){return t===`/`?e:qe([e,t])}var ze=e=>C.test(e);function Be(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?oe(e):e,a;return n?(n=Ke(n),a=n.startsWith(`/`)?Ve(n.substring(1),`/`):Ve(n,t)):a=t,{pathname:a,search:Xe(r),hash:Ze(i)}}function Ve(e,t){let n=Je(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function He(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ue(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function We(e){let t=Ue(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ge(e,t,n,r=!1){let i;typeof e==`string`?i=oe(e):(i={...e},D(!i.pathname||!i.pathname.includes(`?`),He(`?`,`pathname`,`search`,i)),D(!i.pathname||!i.pathname.includes(`#`),He(`#`,`pathname`,`hash`,i)),D(!i.search||!i.search.includes(`#`),He(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Be(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ke=e=>e.replace(/[\\/]{2,}/g,`/`),qe=e=>Ke(e.join(`/`)),Je=e=>e.replace(/\/+$/,``),Ye=e=>Je(e).replace(/^\/*/,`/`),Xe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ze=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Qe=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],$e=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function et(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function tt(e){return qe(e.map(e=>e.route.path).filter(Boolean))||`/`}var nt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function rt(e,t){let n=e;if(typeof n!=`string`||!C.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(nt)try{let e=new URL(window.location.href),r=w.test(n)?new URL(T(n,e.protocol)):new URL(n),a=Le(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{O(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var it=Symbol(`Uninstrumented`);function at(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=st(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=st(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[it]??i,a=st(n[e],t,(...e)=>lt(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[it]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[it]??e,r=st(n.middleware,t,(...e)=>lt(e[0]));return r?(r[it]=t,r):e})),r}function ot(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[it]??e.navigate,r=st(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?ae(n):`.`,...ut(e,r??{})}});r&&(r[it]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[it]??e.fetch,r=st(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...ut(e,i??{})}});r&&(r[it]=t,e.fetch=r)}return e}function st(e,t,n){return e.length===0?null:async(...r)=>{let i=await ct(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function ct(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=ct(e,t,n,r-1),a=await o,D(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function lt(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:dt(t),params:{...r},pattern:i,context:ft(n)}}function ut(e,t){return{currentUrl:ae(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function dt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ft(e){if(mt(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var pt=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function mt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===pt}var ht=[`POST`,`PUT`,`PATCH`,`DELETE`],gt=new Set(ht),_t=[`GET`,...ht],vt=new Set(_t),yt=new Set([301,302,303,307,308]),bt=new Set([307,308]),xt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},St={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ct={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},wt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Tt=`remix-router-transitions`,Et=Symbol(`ResetLoaderData`),Dt,Ot,kt,At,jt=class{constructor(e){x(this,Dt),x(this,Ot),x(this,kt),x(this,At),S(this,Dt,e),S(this,Ot,ye(e))}get stableRoutes(){return b(this,Dt)}get activeRoutes(){return b(this,kt)??b(this,Dt)}get branches(){return b(this,At)??b(this,Ot)}get hasHMRRoutes(){return b(this,kt)!=null}setRoutes(e){S(this,Dt,e),S(this,Ot,ye(e))}setHmrRoutes(e){S(this,kt,e),S(this,At,ye(e))}commitHmrRoutes(){b(this,kt)&&(S(this,Dt,b(this,kt)),S(this,Ot,b(this,At)),S(this,kt,void 0),S(this,At,void 0))}};Dt=new WeakMap,Ot=new WeakMap,kt=new WeakMap,At=new WeakMap;function Mt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;D(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||wt,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...at(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new jt(me(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Yt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=_e(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=xn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=bn(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&pt(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=pt(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Lt(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Rt(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:xt,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,ee=!1,te,ne=!1,re=new Map,ae=null,k=!1,se=!1,le=new Set,ue=new Map,de=0,fe=-1,pe=new Map,he=new Set,ge=new Map,ye=new Map,be=new Set,xe=new Map,Se,Ce=null;function we(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(Se){Se(),Se=void 0;return}O(xe.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=st({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{Se=e});e.history.go(r*-1),it(i,{state:`blocked`,location:n,proceed(){it(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,Ct),De({blockers:e})}}),E?.resolve(),E=null;return}return je(t,n)}),n){Gn(t,re);let e=()=>Kn(t,re);t.addEventListener(`pagehide`,e),ae=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||je(`POP`,w.location,{initialHydration:!0}),C}function Te(){d&&d(),ae&&ae(),f.clear(),te&&te.abort(),w.fetchers.forEach((e,t)=>Ye(w.fetchers,t)),w.blockers.forEach((e,t)=>rt(t))}function Ee(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function De(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(be.has(t)?n.push(t):r.push(t))}),be.forEach(e=>{!w.fetchers.has(e)&&!ue.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ye(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function Oe(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&In(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?_n(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Ct)));let l=k?!1:ft(t,n.matches||w.matches),u=ee===!0||w.navigation.formMethod!=null&&In(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),k||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`){let e=re.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:re.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(ne){let e=re.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),re.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}De({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:xt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,ee=!1,ne=!1,k=!1,se=!1,E?.resolve(),E=null,Ce?.resolve(),Ce=null}async function ke(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=qn();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Ft(!1,Pt(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?oe(n.mask):{...w.location.mask,...n.mask}});let s=w.location,l=ie(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&In(i.formMethod)&&i.formAction===w.location.pathname+w.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=st({currentLocation:s,nextLocation:l,historyAction:d});if(m){it(m,{state:`blocked`,location:l,proceed(){it(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),ke(t,n)},reset(){let e=new Map(w.blockers);e.set(m,Ct),De({blockers:e})}});return}await je(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function Ae(){Ce||=qn(),We(),De({revalidation:`loading`});let e=Ce.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(je(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(je(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:ne===!0}),e)}async function je(t,n,r){te&&te.abort(),te=null,T=t,k=(r&&r.startUninterruptedRevalidation)===!0,dt(w.location,w.matches),ee=(r&&r.preventScrollReset)===!0,ne=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:_e(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!se&&wn(w.location,n)&&!(r&&r.submission&&In(r.submission.formMethod))){Oe(n,{matches:a},{flushSync:o});return}let l=pt(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=ct(n.pathname);Oe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;te=new AbortController;let d=dn(e.history,n,te.signal,r&&r.submission),f=e.getContext?await e.getContext():new ce,p;if(r&&r.pendingError)p=[yn(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&In(r.submission.formMethod)){let i=await Me(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(kn(t)&&et(t.error)&&t.error.status===404){te=null,Oe(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Bn(n,a,t,r.submission),o=!1,l.active=!1,d=dn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Ne(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(te=null,Oe(n,{matches:h||a,...vn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Me(t,n,i,l,u,d,f,p,m={}){if(We(),De({navigation:Vn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await mt(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=bn(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=yn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=ct(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Rn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:xn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await He(t,n,tn(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(An(h)){let n;return n=m&&m.replace!=null?m.replace:un(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Ve(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(kn(h)){let e=yn(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Ne(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Bn(n,i,l,p),x=p||m||zn(b),S=!k&&!g;if(d){if(S){let e=Pe(v);De({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await mt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=bn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=yn(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=ct(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=It(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,se,le,be,ge,he,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(fe=++de,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=$e(e);return Oe(n,{matches:i,loaderData:{},errors:v&&kn(v[1])?{[v[0]]:v[1].error}:null,...vn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Pe(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=Fe(E)),De(e,{flushSync:_})}E.forEach(e=>{Ze(e.key),e.controller&&ue.set(e.key,e.controller)});let ee=()=>E.forEach(e=>Ze(e.key));te&&te.signal.addEventListener(`abort`,ee);let{loaderResults:D,fetcherResults:O}=await Ue(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};te&&te.signal.removeEventListener(`abort`,ee),E.forEach(e=>ue.delete(e.key));let ne=Sn(D);if(ne)return await Ve(t,ne.result,!0,{replace:h}),{shortCircuited:!0};if(ne=Sn(O),ne)return he.add(ne.key),await Ve(t,ne.result,!0,{replace:h}),{shortCircuited:!0};let re=new Map(w.fetchers),{loaderData:ie,errors:ae}=gn(w,i,D,v,E,O,re);g&&w.errors&&(ae={...w.errors,...ae});let oe=$e(re),A=tt(fe,re),ce=oe||A||E.length>0;return{matches:i,loaderData:ie,errors:ae,...ce?{workingFetchers:re}:{}}}function Pe(e){if(e&&!kn(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function Fe(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Hn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Ie(t,n,r,i){Ze(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=Pt(w.location,w.matches,c,r,n,i?.relative),u=_e(o,l,c,!1,s.branches),d=pt(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Ke(t,n,xn(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Ft(!0,l,i);if(m){Ke(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ce,g=(i&&i.preventScrollReset)===!0;if(p&&In(p.formMethod)){await Re(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ge.set(t,{routeId:n,path:f}),await Be(t,n,f,u,h,d.active,a,g,p)}async function Re(t,n,i,l,u,d,f,p,m,h){We(),ge.delete(t),Ge(t,Un(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=dn(e.history,i,g.signal,m);if(d){let e=await mt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ke(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{Ke(t,n,xn(404,{pathname:i}),{flushSync:f});return}}let v=Rn(l,i);if(!v.route.action&&!v.route.lazy){Ke(t,n,xn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}ue.set(t,g);let y=de,b=tn(a,o,_,i,l,v,r,u),x=await He(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){ue.get(t)===g&&ue.delete(t);return}if(be.has(t)){if(An(S)||kn(S)){Ge(t,Wn(void 0));return}}else{if(An(S))if(ue.delete(t),fe>y){Ge(t,Wn(void 0));return}else return he.add(t),Ge(t,Hn(m)),Ve(_,S,!1,{fetcherSubmission:m,preventScrollReset:p});if(kn(S)){Ke(t,n,S.error);return}}let C=w.navigation.location||w.location,E=dn(e.history,C,g.signal),ee=s.activeRoutes,O=w.navigation.state===`idle`?w.matches:_e(ee,w.navigation.location,c,!1,s.branches);D(O,`Didn't find any matches after fetcher action`);let ne=++de;pe.set(t,ne);let{dsMatches:re,revalidatingFetchers:ie}=It(E,u,a,o,e.history,w,O,m,C,r,!1,se,le,be,ge,he,ee,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ae=Hn(m,S.data),oe=new Map(w.fetchers);oe.set(t,ae),ie.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=oe.get(t),r=Hn(void 0,n?n.data:void 0);oe.set(t,r),Ze(t),e.controller&&ue.set(t,e.controller)}),De({fetchers:oe});let k=()=>ie.forEach(e=>Ze(e.key));g.signal.addEventListener(`abort`,k);let{loaderResults:A,fetcherResults:ce}=await Ue(re,ie,E,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,k),pe.delete(t),ue.delete(t),ie.forEach(e=>ue.delete(e.key));let me=w.fetchers.has(t),ve=e=>{if(!me)return e;let n=new Map(e.fetchers);return n.set(t,Wn(S.data)),{...e,fetchers:n}},ye=Sn(A);if(ye)return w=ve(w),Ve(E,ye.result,!1,{preventScrollReset:p});if(ye=Sn(ce),ye)return he.add(ye.key),w=ve(w),Ve(E,ye.result,!1,{preventScrollReset:p});let xe=new Map(w.fetchers);me&&xe.set(t,Wn(S.data));let{loaderData:Se,errors:Ce}=gn(w,O,A,void 0,ie,ce,xe);tt(ne,xe),w.navigation.state===`loading`&&ne>fe?(D(T,`Expected pending action`),te&&te.abort(),Oe(w.navigation.location,{matches:O,loaderData:Se,errors:Ce,fetchers:xe})):(De({errors:Ce,loaderData:_n(w.loaderData,Se,O,Ce),fetchers:xe}),se=!1)}async function Be(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Ge(t,Hn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=dn(e.history,i,m.signal);if(l){let e=await mt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ke(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{Ke(t,n,xn(404,{pathname:i}),{flushSync:u});return}}let g=Rn(s,i);ue.set(t,m);let _=de,v=await He(h,i,tn(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(ue.get(t)===m&&ue.delete(t),!h.signal.aborted){if(be.has(t)){Ge(t,Wn(void 0));return}if(An(y))if(fe>_){Ge(t,Wn(void 0));return}else{he.add(t),await Ve(h,y,!1,{preventScrollReset:d});return}if(kn(y)){Ke(t,n,y.error);return}Ge(t,Wn(y.data))}}async function Ve(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(se=!0);let d=i.response.headers.get(`Location`);D(d,`Expected a Location header on the redirect Response`),d=un(d,new URL(r.url),c,e.history);let f=ie(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(ze(d)){let n=A(t,d,!0);e=n.origin!==t.location.origin||Le(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}te=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=w.navigation;!o&&!s&&m&&h&&g&&(o=zn(w.navigation));let _=o||s;bt.has(i.response.status)&&_&&In(_.formMethod)?await je(p,f,{submission:{..._,formAction:d},preventScrollReset:l||ee,enableViewTransition:a?ne:void 0}):await je(p,f,{overrideNavigation:Bn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||ee,enableViewTransition:a?ne:void 0})}async function He(e,t,n,r,i){let a,o={};try{a=await nn(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!In(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!w.loaderData.hasOwnProperty(e.route.id)&&(!w.errors||!w.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(On(r)){let i=r.result;o[t]={type:`redirect`,response:sn(i,e,t,n,c)}}else o[t]=await on(r);return o}async function Ue(e,t,n,r,i){let a=He(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await He(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:xn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function We(){se=!0,ge.forEach((e,t)=>{ue.has(t)&&le.add(t),Ze(t)})}function Ge(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),De({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Ke(e,t,n,r={}){let i=yn(w.matches,t),a=new Map(w.fetchers);Ye(a,e),De({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function qe(e){return ye.set(e,(ye.get(e)||0)+1),be.has(e)&&be.delete(e),w.fetchers.get(e)||St}function Je(e,t){Ze(e,t?.reason),Ge(e,Wn(null))}function Ye(e,t){let n=w.fetchers.get(t);ue.has(t)&&!(n&&n.state===`loading`&&pe.has(t))&&Ze(t),ge.delete(t),pe.delete(t),he.delete(t),be.delete(t),le.delete(t),e.delete(t)}function Xe(e){let t=(ye.get(e)||0)-1;t<=0?(ye.delete(e),be.add(e)):ye.set(e,t),De({fetchers:new Map(w.fetchers)})}function Ze(e,t){let n=ue.get(e);n&&(n.abort(t),ue.delete(e))}function Qe(e,t){for(let n of e){let e=t.get(n);D(e,`Expected fetcher: ${n}`);let r=Wn(e.data);t.set(n,r)}}function $e(e){let t=[],n=!1;for(let r of he){let i=e.get(r);D(i,`Expected fetcher: ${r}`),i.state===`loading`&&(he.delete(r),t.push(r),n=!0)}return Qe(t,e),n}function tt(e,t){let n=[];for(let[r,i]of pe)if(i<e){let e=t.get(r);D(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ze(r),pe.delete(r),n.push(r))}return Qe(n,t),n.length>0}function nt(e,t){let n=w.blockers.get(e)||Ct;return xe.get(e)!==t&&xe.set(e,t),n}function rt(e){w.blockers.delete(e),xe.delete(e)}function it(e,t){let n=w.blockers.get(e)||Ct;D(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),De({blockers:r})}function st({currentLocation:e,nextLocation:t,historyAction:n}){if(xe.size===0)return;xe.size>1&&O(!1,`A router only supports one blocker at a time`);let r=Array.from(xe.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function ct(e){let t=xn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=bn(n);return{notFoundMatches:r,route:i,error:t}}function lt(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===xt){_=!0;let e=ft(w.location,w.matches);e!=null&&De({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function ut(e,t){return h&&h(e,t.map(e=>ve(e,w.loaderData)))||e.key}function dt(e,t){if(m&&g){let n=ut(e,t);m[n]=g()}}function ft(e,t){if(m){let n=ut(e,t),r=m[n];if(typeof r==`number`)return r}return null}function pt(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:_e(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:_e(n,r,c,!0,e)}}return{active:!1,matches:null}}async function mt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Ht(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=_e(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=_e(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ht(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=_e(s.activeRoutes,n,c,!0,u),!f||ht(l,f))return{type:`success`,matches:null};l=f}}function ht(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function gt(e){o={},s.setHmrRoutes(me(e,a,void 0,o))}function _t(e,t,n=!1){Ht(e,t,s,o,a,n),s.hasHMRRoutes||De({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:we,subscribe:Ee,enableScrollRestoration:lt,navigate:ke,fetch:Ie,revalidate:Ae,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:qe,resetFetcher:Je,deleteFetcher:Xe,dispose:Te,getBlocker:nt,deleteBlocker:rt,patchRoutes:_t,_internalFetchControllers:ue,_internalSetRoutes:gt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){De(e)}},e.instrumentations&&(C=ot(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Nt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Pt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ge(r||`.`,We(o),Le(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Ln(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Re({basename:n,pathname:c.pathname})),ae(c)}function Ft(e,t,n){if(!n||!Nt(n))return{path:t};if(n.formMethod&&!Fn(n.formMethod))return{path:t,error:xn(405,{method:n.formMethod})};let r=()=>({path:t,error:xn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Cn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!In(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
11
|
-
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!In(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}D(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=pn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=pn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=mn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=mn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(In(c.formMethod))return{path:t,submission:c};let l=oe(t);return e&&l.search&&Ln(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:ae(l),submission:c}}function It(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?kn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&kn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,ee=E&&E>=400,te={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},D=tt(o),O=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Lt(s))f=!1;else if(u){let{shouldLoad:e}=Rt(s,a.loaderData,a.errors);f=e}else zt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return en(n,r,e,c,D,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:ee?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Bt(a.matches[o],i)&&(p=!0):p=!0;let m={...te,defaultShouldRevalidate:p};return en(n,r,e,c,D,i,l,t,Vt(i,m),m,x)}),ne=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=_e(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;ne.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Rn(b,e.path),C=new AbortController,w=dn(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=tn(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=tn(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:ee?!1:d;let a={...te,defaultShouldRevalidate:i};Vt(S,a)&&(T=tn(n,r,w,e.path,b,S,l,t,a))}T&&ne.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:O,revalidatingFetchers:ne}}function Lt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Rt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Lt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function zt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Bt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Vt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Ht(e,t,n,r,i,a){let o;if(e){let t=r[e];D(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Ut(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=me(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=me([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Ut(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Ut(e,t)))??!1:!1}var Wt=new WeakMap,Gt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(D(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Wt.get(i);o||(o={},Wt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=ue(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)O(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)O(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Kt=new WeakMap;function qt(e,t,n,r,i){let a=n[e.id];if(D(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Kt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{D(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=fe(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?O(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?O(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Kt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Gt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Jt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Yt(e){return e.matches.some(e=>e.route.middleware)?Xt(e,()=>Jt(e)):Jt(e)}function Xt(e,t){return Zt(e,t,e=>{if(Pn(e))throw e;return e},En,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=yn(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Zt(e,t,n,r,i){let{matches:a,...o}=e;return await Qt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Qt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Qt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function $t(e,t,n,r,i){let a=Gt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=qt(r.route,In(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function en(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=$t(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Vt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Vt(a,{...l,defaultShouldRevalidate:e}):Vt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!In(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(In(n.method)||!p)?rn({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function tn(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?en(e,t,n,r,tt(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:$t(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function nn(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:fn(t,n),pattern:tt(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Xt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function rn({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=In(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:fn(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw xn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw xn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function an(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function on(e){let{result:t,type:n}=e;if(Mn(t)){let e;try{e=await an(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new $e(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?jn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Tn(t),statusCode:et(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:et(t)?t.status:void 0}:jn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function sn(e,t,n,r,i){let a=e.headers.get(`Location`);if(D(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!ze(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Pt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var cn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ln(e){try{return cn.includes(new URL(e).protocol)}catch{return!1}}function un(e,t,n,r){if(ze(e)){let r=e,i=w.test(r)?new URL(T(r,t.protocol)):new URL(r);if(ln(i.toString()))throw Error(`Invalid redirect location`);let a=Le(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Ke(i.pathname)+i.search+i.hash}try{if(ln(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function dn(e,t,n,r){let i=e.createURL(Cn(t)).toString(),a={signal:n};if(r&&In(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=pn(r.formData):a.body=r.formData}return new Request(i,a)}function fn(e,t){let n=new URL(e.url),r=typeof t==`string`?oe(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function pn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function mn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function hn(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&kn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(D(!An(f),`Cannot handle redirect results in processLoaderData`),kn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=yn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Et),c||(c=!0,s=et(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function gn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=hn(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(D(s,`Did not find corresponding fetcher result`),kn(s)){let t=yn(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(An(s))D(!1,`Unhandled fetcher revalidation redirect`);else{let e=Wn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function _n(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Et).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function vn(e){return e?kn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function yn(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function bn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function xn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new $e(e||500,o,Error(s),!0)}function Sn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(An(r))return{key:n,result:r}}}function Cn(e){return ae({...typeof e==`string`?oe(e):e,hash:``})}function wn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Tn(e){return new $e(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function En(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Dn(t))}function Dn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function On(e){return Mn(e.result)&&yt.has(e.result.status)}function kn(e){return e.type===`error`}function An(e){return(e&&e.type)===`redirect`}function jn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Mn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Nn(e){return yt.has(e)}function Pn(e){return Mn(e)&&Nn(e.status)&&e.headers.has(`Location`)}function Fn(e){return vt.has(e.toUpperCase())}function In(e){return gt.has(e.toUpperCase())}function Ln(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Rn(e,t){let n=typeof t==`string`?oe(t).search:t.search;if(e[e.length-1].route.index&&Ln(n||``))return e[e.length-1];let r=Ue(e);return r[r.length-1]}function zn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Bn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Vn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Hn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Un(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Wn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Gn(e,t){try{let n=e.sessionStorage.getItem(Tt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Kn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Tt,JSON.stringify(n))}catch(e){O(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function qn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Jn=f.createContext(null);Jn.displayName=`DataRouter`;var Yn=f.createContext(null);Yn.displayName=`DataRouterState`;var Xn=f.createContext(!1);function Zn(){return f.useContext(Xn)}var Qn=f.createContext({isTransitioning:!1});Qn.displayName=`ViewTransition`;var $n=f.createContext(new Map);$n.displayName=`Fetchers`;var er=f.createContext(null);er.displayName=`Await`;var tr=f.createContext(null);tr.displayName=`Navigation`;var nr=f.createContext(null);nr.displayName=`Location`;var rr=f.createContext({outlet:null,matches:[],isDataRoute:!1});rr.displayName=`Route`;var ir=f.createContext(null);ir.displayName=`RouteError`;var ar=`REACT_ROUTER_ERROR`,or=`REDIRECT`,sr=`ROUTE_ERROR_RESPONSE`;function cr(e){if(e.startsWith(`${ar}:${or}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function lr(e){if(e.startsWith(`${ar}:${sr}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new $e(t.status,t.statusText,t.data)}catch{}}function ur(e,{relative:t}={}){D(dr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=f.useContext(tr),{hash:i,pathname:a,search:o}=br(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:qe([n,a])),r.createHref({pathname:s,search:o,hash:i})}function dr(){return f.useContext(nr)!=null}function fr(){return D(dr(),`useLocation() may be used only in the context of a <Router> component.`),f.useContext(nr).location}var pr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function mr(e){f.useContext(tr).static||f.useLayoutEffect(e)}function hr(){let{isDataRoute:e}=f.useContext(rr);return e?Rr():gr()}function gr(){D(dr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=f.useContext(Jn),{basename:t,navigator:n}=f.useContext(tr),{matches:r}=f.useContext(rr),{pathname:i}=fr(),a=JSON.stringify(We(r)),o=f.useRef(!1);return mr(()=>{o.current=!0}),f.useCallback((r,s={})=>{if(O(o.current,pr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ge(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:qe([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var _r=f.createContext(null);function vr(e){let t=f.useContext(rr).outlet;return f.useMemo(()=>t&&f.createElement(_r.Provider,{value:e},t),[t,e])}function yr(){let{matches:e}=f.useContext(rr);return e[e.length-1]?.params??{}}function br(e,{relative:t}={}){let{matches:n}=f.useContext(rr),{pathname:r}=fr(),i=JSON.stringify(We(n));return f.useMemo(()=>Ge(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function xr(e,t,n){D(dr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=f.useContext(tr),{matches:i}=f.useContext(rr),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Br(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
12
|
-
|
|
13
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=fr(),d;if(t){let e=typeof t==`string`?oe(t):t;D(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let p=d.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ge(e,{pathname:m});O(l||h!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),O(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Or(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:qe([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:qe([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?f.createElement(nr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},g):g}function Sr(){let e=Lr(),t=et(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=f.createElement(f.Fragment,null,f.createElement(`p`,null,`💿 Hey developer 👋`),f.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,f.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,f.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),f.createElement(f.Fragment,null,f.createElement(`h2`,null,`Unexpected Application Error!`),f.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?f.createElement(`pre`,{style:i},n):null,o)}var Cr=f.createElement(Sr,null),wr=class extends f.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=lr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:f.createElement(rr.Provider,{value:this.props.routeContext},f.createElement(ir.Provider,{value:e,children:this.props.component}));return this.context?f.createElement(Er,{error:e},t):t}};wr.contextType=Xn;var Tr=new WeakMap;function Er({children:e,error:t}){let{basename:n}=f.useContext(tr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=cr(t.digest);if(e){let r=Tr.get(t);if(r)throw r;let i=rt(e.location,n),a=i.absoluteURL||i.to;if(ln(a))throw Error(`Invalid redirect location`);if(nt&&!Tr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Tr.set(t,n),n}return f.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Dr({routeContext:e,match:t,children:n}){let r=f.useContext(Jn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),f.createElement(rr.Provider,{value:e},n)}function Or(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);D(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:tt(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,p=null,m=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Cr,o&&(s<0&&c===0?(Br(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,m=null):s===c&&(d=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?p:d?m:n.route.Component?f.createElement(n.route.Component,null):n.route.element?n.route.element:e,f.createElement(Dr,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?f.createElement(wr,{location:r.location,revalidation:r.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function kr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ar(e){let t=f.useContext(Jn);return D(t,kr(e)),t}function jr(e){let t=f.useContext(Yn);return D(t,kr(e)),t}function Mr(e){let t=f.useContext(rr);return D(t,kr(e)),t}function Nr(e){let t=Mr(e),n=t.matches[t.matches.length-1];return D(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Pr(){return Nr(`useRouteId`)}function Fr(){let e=jr(`useNavigation`);return f.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Ir(){let{matches:e,loaderData:t}=jr(`useMatches`);return f.useMemo(()=>e.map(e=>ve(e,t)),[e,t])}function Lr(){let e=f.useContext(ir),t=jr(`useRouteError`),n=Nr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Rr(){let{router:e}=Ar(`useNavigate`),t=Nr(`useNavigate`),n=f.useRef(!1);return mr(()=>{n.current=!0}),f.useCallback(async(r,i={})=>{O(n.current,pr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var zr={};function Br(e,t,n){!t&&!zr[e]&&(zr[e]=!0,O(!1,n))}var Vr={};function Hr(e,t){!e&&!Vr[t]&&(Vr[t]=!0,console.warn(t))}var Ur=f.useOptimistic,Wr=()=>void 0;function Gr(e){return Ur?Ur(e):[e,Wr]}function Kr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&O(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:f.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&O(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:f.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&O(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var qr=[`HydrateFallback`,`hydrateFallbackElement`],Jr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Yr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Zn()||r;let[i,a]=f.useState(e.state),[o,s]=Gr(i),[c,l]=f.useState(),[u,d]=f.useState({isTransitioning:!1}),[p,m]=f.useState(),[h,g]=f.useState(),[_,v]=f.useState(),y=f.useRef(new Map),b=f.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:_})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:tt(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),Hr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Hr(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&u?t(()=>a(i)):r===!1?a(i):f.startTransition(()=>{r===!0&&s(e=>Xr(e,i)),a(i)});return}if(t&&u){t(()=>{h&&(p?.resolve(),h.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,s,n]);f.useLayoutEffect(()=>e.subscribe(b),[e,b]),f.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new Jr)},[u]),f.useEffect(()=>{if(p&&c&&e.window){let t=c,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):f.startTransition(()=>{r===!0&&s(e=>Xr(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),l(void 0),d({isTransitioning:!1})}),g(i)}},[c,p,e.window,r,s]),f.useEffect(()=>{p&&c&&o.location.key===c.location.key&&p.resolve()},[p,h,o.location,c]),f.useEffect(()=>{!u.isTransitioning&&_&&(l(_.state),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[u.isTransitioning,_]);let x=f.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=f.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return f.createElement(f.Fragment,null,f.createElement(Jn.Provider,{value:C},f.createElement(Yn.Provider,{value:o},f.createElement($n.Provider,{value:y.current},f.createElement(Qn.Provider,{value:u},f.createElement(ei,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},f.createElement(Zr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Xr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Zr=f.memo(Qr);function Qr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return xr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function $r({to:e,replace:t,state:n,relative:r}){D(dr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=f.useContext(tr);O(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=f.useContext(rr),{pathname:o}=fr(),s=hr(),c=Ge(e,We(a),o,r===`path`),l=JSON.stringify(c);return f.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function ei({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){D(!dr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=f.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=oe(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:p=null,key:m=`default`,mask:h}=n,g=f.useMemo(()=>{let e=Le(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:p,key:m,mask:h},navigationType:r}},[s,l,u,d,p,m,r,h]);return O(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:f.createElement(tr.Provider,{value:c},f.createElement(nr.Provider,{children:t,value:g}))}f.Component;var ti=`get`,ni=`application/x-www-form-urlencoded`;function ri(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ii(e){return ri(e)&&e.tagName.toLowerCase()===`button`}function ai(e){return ri(e)&&e.tagName.toLowerCase()===`form`}function oi(e){return ri(e)&&e.tagName.toLowerCase()===`input`}function si(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ci(e,t){return e.button===0&&(!t||t===`_self`)&&!si(e)}var li=null;function ui(){if(li===null)try{new FormData(document.createElement(`form`),0),li=!1}catch{li=!0}return li}var di=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function fi(e){return e!=null&&!di.has(e)?(O(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ni}"`),null):e}function pi(e,t){let n,r,i,a,o;if(ai(e)){let o=e.getAttribute(`action`);r=o?Le(o,t):null,n=e.getAttribute(`method`)||ti,i=fi(e.getAttribute(`enctype`))||ni,a=new FormData(e)}else if(ii(e)||oi(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Le(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||ti,i=fi(e.getAttribute(`formenctype`))||fi(o.getAttribute(`enctype`))||ni,a=new FormData(o,e),!ui()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ri(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=ti,r=null,i=ni,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var mi={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},hi=/[&><\u2028\u2029]/g;function gi(e){return e.replace(hi,e=>mi[e])}function _i(e,t){if(e===!1||e==null)throw Error(t)}function vi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Le(i.pathname,t)===`/`?i.pathname=`${Je(t)}/_root.${r}`:i.pathname=`${Je(i.pathname)}.${r}`,i}async function yi(e,t){if(e.id in t)return t[e.id];try{let n=await _(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function bi(e){return e!=null&&typeof e.page==`string`}function xi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Si(e,t,n){return Di((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await yi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(xi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Ci(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function wi(e,t,{includeHydrateFallback:n}={}){return Ti(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ti(e){return[...new Set(e)]}function Ei(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Di(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!bi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ei(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Oi(){let e=f.useContext(Jn);return _i(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ki(){let e=f.useContext(Yn);return _i(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ai=f.createContext(void 0);Ai.displayName=`FrameworkContext`;function ji(){let e=f.useContext(Ai);return _i(e,`You must render this element inside a <HydratedRouter> element`),e}function Mi(e,t){let n=f.useContext(Ai),[r,i]=f.useState(!1),[a,o]=f.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,p=f.useRef(null);f.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),f.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:Ni(s,m),onBlur:Ni(c,h),onMouseEnter:Ni(l,m),onMouseLeave:Ni(u,h),onTouchStart:Ni(d,m)}]:[a,p,{}]:[!1,p,{}]}function Ni(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Pi({page:e,...t}){let n=Zn(),{nonce:r}=ji(),{router:i}=Oi(),a=f.useMemo(()=>ge(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?f.createElement(Ii,{page:e,matches:a,...t}):f.createElement(Li,{page:e,matches:a,...t})):null}function Fi(e){let{manifest:t,routeModules:n}=ji(),[r,i]=f.useState([]);return f.useEffect(()=>{let r=!1;return Si(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ii({page:e,matches:t,...n}){let r=fr(),{future:i}=ji(),{basename:a}=Oi(),o=f.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=vi(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return f.createElement(f.Fragment,null,o.map(e=>f.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Li({page:e,matches:t,...n}){let r=fr(),{future:i,manifest:a,routeModules:o}=ji(),{basename:s}=Oi(),{loaderData:c,matches:l}=ki(),u=f.useMemo(()=>Ci(e,t,l,a,r,`data`),[e,t,l,a,r]),d=f.useMemo(()=>Ci(e,t,l,a,r,`assets`),[e,t,l,a,r]),p=f.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=vi(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),m=f.useMemo(()=>wi(d,a),[d,a]),h=Fi(d);return f.createElement(f.Fragment,null,p.map(e=>f.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>f.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>f.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ri(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}f.Component;var zi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{zi&&(window.__reactRouterVersion=`7.18.2`)}catch{}function Bi(e,t){return Mt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:te({window:t?.window}),hydrationData:t?.hydrationData||Vi(),routes:e,mapRouteProperties:Kr,hydrationRouteProperties:qr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Vi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Hi(e.errors)}),e}function Hi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new $e(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Qe.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function j({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=f.useState({action:n.action,location:n.location}),o=f.useCallback(e=>{r===!1?a(e):f.startTransition(()=>a(e))},[r]);return f.useLayoutEffect(()=>n.listen(o),[n,o]),f.createElement(ei,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}j.displayName=`unstable_HistoryRouter`;var Ui=f.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=f.useContext(tr),y=typeof l==`string`&&C.test(l),b=rt(l,g);l=b.to;let x=ur(l,{relative:r}),S=fr(),w=null;if(o){let e=Ge(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:qe([g,e.pathname])),w=_.createHref(e)}let[T,E,ee]=Mi(n,m),te=Xi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:p,useTransitions:v});function D(t){e&&e(t),t.defaultPrevented||te(t)}let O=!(b.isExternal||i),ne=f.createElement(`a`,{...m,...ee,href:(O?w:void 0)||b.absoluteURL||x,onClick:O?D:e,ref:Ri(h,E),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return T&&!y?f.createElement(f.Fragment,null,ne,f.createElement(Pi,{page:x})):ne});Ui.displayName=`Link`;var Wi=f.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=br(a,{relative:c.relative}),d=fr(),p=f.useContext(Yn),{navigator:m,basename:h}=f.useContext(tr),g=p!=null&&oa(u)&&o===!0,_=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=Le(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return f.createElement(Ui,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Wi.displayName=`NavLink`;var Gi=f.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=ti,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=f.useContext(tr),_=$i(),v=ea(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&C.test(s);return f.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p});g&&n!==!1?f.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Gi.displayName=`Form`;function Ki({getKey:e,storageKey:t,...n}){let r=f.useContext(Ai),{basename:i}=f.useContext(tr),a=fr(),o=Ir();ia({getKey:e,storageKey:t});let s=f.useMemo(()=>{if(!r||!e)return null;let t=ra(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),f.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${gi(JSON.stringify(t||ta))}, ${gi(JSON.stringify(s))})`}})}Ki.displayName=`ScrollRestoration`;function qi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ji(e){let t=f.useContext(Jn);return D(t,qi(e)),t}function Yi(e){let t=f.useContext(Yn);return D(t,qi(e)),t}function Xi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=hr(),d=fr(),p=br(e,{relative:o});return f.useCallback(m=>{if(ci(m,t)){m.preventDefault();let t=n===void 0?ae(d)===ae(p):n,h=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?f.startTransition(()=>h()):h()}},[d,u,p,n,r,i,t,e,a,o,s,c,l])}var Zi=0,Qi=()=>`__${String(++Zi)}__`;function $i(){let{router:e}=Ji(`useSubmit`),{basename:t}=f.useContext(tr),n=Pr(),r=e.fetch,i=e.navigate;return f.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=pi(e,t);a.navigate===!1?await r(a.fetcherKey||Qi(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ea(e,{relative:t}={}){let{basename:n}=f.useContext(tr),r=f.useContext(rr);D(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...br(e||`.`,{relative:t})},o=fr();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:qe([n,a.pathname])),ae(a)}var ta=`react-router-scroll-positions`,na={};function ra(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Le(e.pathname,n)||e.pathname},t)),i??=e.key,i}function ia({getKey:e,storageKey:t}={}){let{router:n}=Ji(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Yi(`useScrollRestoration`),{basename:a}=f.useContext(tr),o=fr(),s=Ir(),c=Fr();f.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),aa(f.useCallback(()=>{if(c.state===`idle`){let t=ra(o,s,a,e);na[t]=window.scrollY}try{sessionStorage.setItem(t||ta,JSON.stringify(na))}catch(e){O(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(f.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||ta);e&&(na=JSON.parse(e))}catch{}},[t]),f.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(na,()=>window.scrollY,e?(t,n)=>ra(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),f.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{O(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function aa(e,t){let{capture:n}=t||{};f.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function oa(e,{relative:t}={}){let n=f.useContext(Qn);D(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ji(`useViewTransitionState`),i=br(e,{relative:t});if(!n.isTransitioning)return!1;let a=Le(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Le(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ne(i.pathname,o)!=null||Ne(i.pathname,a)!=null}var sa=t(l(),1);function ca(e){return f.createElement(Yr,{flushSync:sa.flushSync,...e})}var M=e=>typeof e==`string`,la=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},ua=e=>e==null?``:``+e,da=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},fa=/###/g,pa=e=>e&&e.indexOf(`###`)>-1?e.replace(fa,`.`):e,ma=e=>!e||M(e),ha=(e,t,n)=>{let r=M(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(ma(e))return{};let t=pa(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ma(e)?{}:{obj:e,k:pa(r[i])}},ga=(e,t,n)=>{let{obj:r,k:i}=ha(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=ha(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=ha(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},_a=(e,t,n,r)=>{let{obj:i,k:a}=ha(e,t,Object);i[a]=i[a]||[],i[a].push(n)},va=(e,t)=>{let{obj:n,k:r}=ha(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ya=(e,t,n)=>{let r=va(e,n);return r===void 0?va(t,n):r},ba=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?M(e[r])||e[r]instanceof String||M(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ba(e[r],t[r],n):e[r]=t[r]);return e},xa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Sa={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ca=e=>M(e)?e.replace(/[&<>"'\/]/g,e=>Sa[e]):e,wa=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Ta=[` `,`,`,`?`,`!`,`;`],Ea=new wa(20),Da=(e,t,n)=>{t||=``,n||=``;let r=Ta.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Ea.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Oa=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},ka=e=>e?.replace(/_/g,`-`),Aa={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},ja=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Aa,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(M(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Ma=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Na=class extends Ma{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):M(n)&&i?o.push(...n.split(i)):o.push(n)));let s=va(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!M(n)?s:Oa(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),ga(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(M(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=va(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ba(s,n,i):s={...s,...n},ga(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Pa={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Fa=Symbol(`i18next/PATH_KEY`);function Ia(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Fa?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function La(e,t){let{[Fa]:n}=e(Ia()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Ra={},za=e=>!M(e)&&typeof e!=`boolean`&&typeof e!=`number`,Ba=class e extends Ma{constructor(e,t={}){super(),da([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=ja.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=za(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Da(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:M(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:M(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=La(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?La(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!M(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let ee=za(E),te=Object.prototype.toString.apply(E);if(y&&E&&ee&&_.indexOf(te)<0&&!(M(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:za(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&M(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=M(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!M(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=M(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Pa.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return M(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?La(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!M(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(M(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Ra[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Ra[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!M(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},Va=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ja.create(`languageUtils`)}getScriptPartFromCode(e){if(e=ka(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=ka(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(M(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),M(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return M(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):M(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Ha={zero:0,one:1,two:2,few:3,many:4,other:5},Ua={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Wa=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ja.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=ka(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Ua;if(!e.match(/-|_/))return Ua;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Ha[e]-Ha[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Ga=(e,t,n,r=`.`,i=!0)=>{let a=ya(e,t,n);return!a&&i&&M(n)&&(a=Oa(e,n,r),a===void 0&&(a=Oa(t,n,r))),a},Ka=e=>e.replace(/\$/g,`$$$$`),qa=class{constructor(e={}){this.logger=ja.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Ca:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?xa(i):a||`{{`,this.suffix=o?xa(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?xa(d):f||xa(`$t(`),this.nestingSuffix=p?xa(p):m||xa(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Ga(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Ga(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Ka(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ka(this.escape(e)):Ka(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=M(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!M(a)&&!this.useRawValueToEscape&&(a=ua(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${xa(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!M(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!M(i))return i;M(i)||(i=ua(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Ja=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Ya=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(ka(r),i),t[o]=s),s(n)}},Xa=e=>(t,n,r)=>e(ka(n),r)(t),Za=class{constructor(e={}){this.logger=ja.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Ya:Xa;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ya(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Ja(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Qa=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},$a=class extends Ma{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ja.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{_a(n.loaded,[i],a),Qa(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();M(e)&&(e=this.languageUtils.toResolveHierarchy(e)),M(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},eo=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),M(e[1])&&(t.defaultValue=e[1]),M(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),to=e=>(M(e.ns)&&(e.ns=[e.ns]),M(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),M(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),no=()=>{},ro=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},io=`__i18next_supportNoticeShown`,ao=()=>!!(typeof globalThis<`u`&&globalThis[io]||typeof process<`u`&&{}.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`),oo=()=>{typeof globalThis<`u`&&(globalThis[io]=!0)},so=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),co=class e extends Ma{constructor(e={},t){if(super(),this.options=to(e),this.services={},this.logger=ja,this.modules={external:[]},ro(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(M(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=eo();this.options={...n,...this.options,...to(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!so(this)&&!ao()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),oo());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?ja.init(r(this.modules.logger),this.options):ja.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Za;let t=new Va(this.options);this.store=new Na(this.options.resources,this.options);let i=this.services;i.logger=ja,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Wa(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new qa(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new $a(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Ba(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=no,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=la(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=no){let n=t,r=M(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=la();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=no,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Pa.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=la();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=M(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(M(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=La(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=La(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=La(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return M(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=la();return this.options.ns?(M(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=la();M(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Va(eo());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=no){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Na(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...eo().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new qa(n)}return a.translator=new Ba(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();co.createInstance,co.dir,co.init,co.loadResources,co.reloadResources,co.use,co.changeLanguage,co.getFixedT,co.t,co.exists,co.setDefaultNamespace,co.hasLoadedNamespace,co.loadNamespaces,co.loadLanguages;var lo={en:{translation:{"app.failed":`NiceEval View failed to load`,"nav.experiments":`Experiments`,"nav.language":`Language`,"nav.pages":`Report pages`,"insight.title":`NiceEval Insight`,"insight.navigation":`Insight`,"insight.chart.cost":`Cost`,"insight.chart.passRate":`Pass rate`,"insight.chart.score":`Score`,"insight.chart.noData":`No chartable data`,"insight.chart.partial":`partial data`,"insight.chart.openExperiment":`open experiment`,"verdict.passed":`passed`,"verdict.failed":`failed`,"verdict.errored":`errored`,"verdict.skipped":`skipped`,"cell.missing":`no data`,"cell.unscorable":`unscorable`,"cell.noCurrentResult":`no result for current config`,"cell.metricFailed":`failed`,"cell.metricUnavailable":`unavailable`,"cell.metricUnsupported":`unsupported`,"cell.metricMigrationRequired":`migration required`,"cell.measuredTitle":`{{samples}}/{{total}} attempts measured`,"cell.noneMeasurableTitle":`0/{{total}} attempts measurable`,"cell.coverageTitle":`coverage {{samples}}/{{total}}: this metric is null for the remaining attempts`,"cell.coverageDetail":`Result coverage {{samples}}/{{total}}`,"cell.evidence":`{{n}} attempts`,"table.model":`Model`,"cell.mixedExecution":`mixed`,"table.agent":`Agent`,"table.filterPlaceholder":`Filter rows…`,"experimentList.experiment":`Experiment`,"experimentList.avgDuration":`Avg. time`,"experimentList.passRate":`Pass rate`,"experimentList.totalScore":`Total score`,"experimentList.missedScoreItems":`{{n}} missed checks`,"experimentList.tokens":`Tokens`,"experimentList.cost":`Cost`,"experimentList.result":`Result`,"experimentList.status":`Status`,"experimentList.filterPlaceholder":`Filter experiments…`,"report.close":`Close`,"report.details":`Details`,"report.loading":`Loading…`,"report.loadingDetails":`Loading details…`,"report.backToResults":`Back to results`,"report.retry":`Retry`,"report.unableToLoad":`Unable to load this page.`,"report.unableToLoadDetails":`Unable to load details.`,"attempt.title":`Attempt`,"attempt.experiment":`Experiment`,"attempt.eval":`Eval`,"attempt.score":`Score`,"attempt.started":`Started`,"attempt.duration":`Duration`,"attempt.cost":`Cost`,"attempt.assertions":`Assertions`,"attempt.traceDetails":`Trace details`,"attempt.traceItem":`item {{id}}`,"attempt.traceTool":`tool {{id}}`,"attempt.traceCommand":`command {{id}}`,"attempt.executionTimeline":`Execution timeline`,"attempt.usage":`Usage`,"attempt.sources":`Sources`,"attempt.fileChanges":`File changes`,"attempt.artifacts":`Artifacts`,"attempt.loadOnDemand":`Expand or select to load.`,"attempt.artifactsNone":`No artifacts were recorded.`,"attempt.artifactsRetained_one":`{{count}} retained content item`,"attempt.artifactsRetained_other":`{{count}} retained content items`,"attempt.truncated":`(truncated)`,"attempt.verdict.passed":`passed`,"attempt.verdict.failed":`failed`,"attempt.verdict.errored":`errored`,"attempt.verdict.skipped":`skipped`,"attempt.verdict.unknown":`unknown`,"refresh.action":`Refresh`,"refresh.available":`An update with newer sealed results is available.`,"refresh.failed":`Refresh failed. The current result is still available.`,"refresh.working":`Refreshing…`,"refresh.selectionChanged":`The previous selection is no longer available. Showing the nearest available result.`}},"zh-CN":{translation:{"app.failed":`NiceEval 视图载入失败`,"nav.experiments":`实验`,"nav.language":`语言`,"nav.pages":`报告页面`,"insight.title":`NiceEval Insight`,"insight.navigation":`洞察`,"insight.chart.cost":`成本`,"insight.chart.passRate":`通过率`,"insight.chart.score":`得分`,"insight.chart.noData":`暂无可绘制的数据`,"insight.chart.partial":`部分数据`,"insight.chart.openExperiment":`打开实验`,"verdict.passed":`通过`,"verdict.failed":`失败`,"verdict.errored":`错误`,"verdict.skipped":`跳过`,"cell.missing":`无数据`,"cell.unscorable":`测不出`,"cell.noCurrentResult":`当前配置下无结果`,"cell.metricFailed":`读取失败`,"cell.metricUnavailable":`不可用`,"cell.metricUnsupported":`不支持`,"cell.metricMigrationRequired":`需要迁移`,"cell.measuredTitle":`{{samples}}/{{total}} 次 attempt 测得`,"cell.noneMeasurableTitle":`0/{{total}} 次 attempt 可测`,"cell.coverageTitle":`覆盖率 {{samples}}/{{total}}:其余 attempt 测不了这个指标`,"cell.coverageDetail":`结果完整度 {{samples}}/{{total}}`,"cell.evidence":`{{n}} 个 Attempt`,"table.model":`模型`,"cell.mixedExecution":`混合`,"table.agent":`Agent`,"table.filterPlaceholder":`筛选行…`,"experimentList.experiment":`实验`,"experimentList.avgDuration":`平均耗时`,"experimentList.passRate":`通过率`,"experimentList.totalScore":`总分`,"experimentList.missedScoreItems":`{{n}} 项未满足`,"experimentList.tokens":`Tokens`,"experimentList.cost":`成本`,"experimentList.result":`结果`,"experimentList.status":`状态`,"experimentList.filterPlaceholder":`筛选实验…`,"report.close":`关闭`,"report.details":`详情`,"report.loading":`正在加载…`,"report.loadingDetails":`正在加载详情…`,"report.backToResults":`返回结果`,"report.retry":`重试`,"report.unableToLoad":`无法加载此页面。`,"report.unableToLoadDetails":`无法加载详情。`,"attempt.title":`尝试`,"attempt.experiment":`实验`,"attempt.eval":`评测`,"attempt.score":`得分`,"attempt.started":`开始时间`,"attempt.duration":`耗时`,"attempt.cost":`成本`,"attempt.assertions":`断言`,"attempt.traceDetails":`轨迹详情`,"attempt.traceItem":`项目 {{id}}`,"attempt.traceTool":`工具 {{id}}`,"attempt.traceCommand":`命令 {{id}}`,"attempt.executionTimeline":`执行时间轴`,"attempt.usage":`用量`,"attempt.sources":`来源`,"attempt.fileChanges":`文件变更`,"attempt.artifacts":`产物`,"attempt.loadOnDemand":`展开或选择后载入。`,"attempt.artifactsNone":`未记录产物。`,"attempt.artifactsRetained_one":`保留了 {{count}} 项内容`,"attempt.artifactsRetained_other":`保留了 {{count}} 项内容`,"attempt.truncated":`(已截断)`,"attempt.verdict.passed":`通过`,"attempt.verdict.failed":`失败`,"attempt.verdict.errored":`错误`,"attempt.verdict.skipped":`跳过`,"attempt.verdict.unknown":`未知`,"refresh.action":`刷新`,"refresh.available":`有更新的封存结果可用。`,"refresh.failed":`刷新失败,当前结果仍可继续查看。`,"refresh.working":`正在刷新…`,"refresh.selectionChanged":`之前的选择已不存在,现已显示最近的可用结果。`}}},uo=`niceeval:report:locale`;co.use(i).init({resources:lo,lng:(()=>{try{let e=localStorage.getItem(uo);if(e===`en`||e===`zh-CN`)return e}catch{}return navigator.language.toLowerCase().startsWith(`zh`)?`zh-CN`:`en`})(),fallbackLng:`en`,supportedLngs:[`en`,`zh-CN`],interpolation:{escapeValue:!1},returnNull:!1}),co.on(`languageChanged`,e=>{document.documentElement.lang=e;try{localStorage.setItem(uo,e)}catch{}}),document.documentElement.lang=co.resolvedLanguage??`en`;var fo=co,N=a(),po=f.createContext(void 0),mo=e=>{let t=f.useContext(po);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ho=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,N.jsx)(po.Provider,{value:e,children:t})),go=f.createContext(!1),_o=()=>f.useContext(go);go.Provider;function vo(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yo=f.createContext(vo()),P=()=>f.useContext(yo),bo={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xo=new class{#e=bo;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function So(e){setTimeout(e,0)}var Co=typeof window>`u`||`Deno`in globalThis;function wo(){}function To(e,t){return typeof e==`function`?e(t):e}function Eo(e){return typeof e==`number`&&e>=0&&e!==1/0}function Do(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Oo(e,t){return typeof e==`function`?e(t):e}function ko(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==jo(o,t.options))return!1}else if(!No(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ao(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Mo(t.options.mutationKey)!==Mo(a))return!1}else if(!No(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function jo(e,t){return(t?.queryKeyHashFn||Mo)(e)}function Mo(e){return JSON.stringify(e,(e,t)=>Ro(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function No(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!No(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!No(e[r],t[r]))return!1;return!0}return!1}var Po=Object.prototype.hasOwnProperty;function Fo(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Lo(e)&&Lo(t);if(!r&&!(Ro(e)&&Ro(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Po.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Fo(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Io(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Lo(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ro(e){if(!zo(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!zo(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function zo(e){return Object.prototype.toString.call(e)===`[object Object]`}function Bo(e){return new Promise(t=>{xo.setTimeout(t,e)})}function Vo(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Fo(e,t)}function Ho(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Uo(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Wo=Symbol();function Go(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wo?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ko(e,t){return typeof e==`function`?e(...t):!!e}function qo(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Jo=So;function Yo(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Jo,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Xo=Yo(),Zo=()=>Co,Qo=()=>Zo(),$o=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},es=new class extends $o{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ts=new class extends $o{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ns(e){return Math.min(1e3*2**e,3e4)}function rs(e){return(e??`online`)===`online`?ts.isOnline():!0}var is=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function as(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(wo);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new is(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>es.isFocused()&&(e.networkMode===`always`||ts.isOnline())&&e.canRun(),p=()=>rs(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Qo()?0:3),a=e.retryDelay??ns,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),Bo(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var os=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Eo(this.gcTime)&&(this.#e=xo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qo()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(xo.clearTimeout(this.#e),this.#e=void 0)}};function ss(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{qo(e,()=>t.signal,()=>n=!0)},u=Go(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Uo:Ho;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?ls:cs,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:cs(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function cs(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ls(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var us=class extends os{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ps(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ps(this.options);e.data!==void 0&&(this.setState(fs(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Vo(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(wo).catch(wo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Oo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wo||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Oo(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Do(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Go(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?ss(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=as({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof is&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof is){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ds(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...fs(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Xo.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ds(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rs(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function fs(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ps(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ms=class extends $o{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),gs(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _s(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _s(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Oo(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Io(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&vs(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Oo(this.options.enabled,this.#t)!==Oo(t.enabled,this.#t)||Oo(this.options.staleTime,this.#t)!==Oo(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Oo(this.options.enabled,this.#t)!==Oo(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Io(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(wo)),t}#h(e){return!Qo()&&Oo(this.options.enabled,this.#t)!==!1&&Eo(e)}#g(){this.#b();let e=Oo(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Do(this.#r.dataUpdatedAt,e)+1;this.#u=xo.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=xo.setInterval(()=>{(this.options.refetchIntervalInBackground||es.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(xo.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(xo.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&gs(e,t),o=i&&vs(e,n,t,r);(a||o)&&(l={...l,...ds(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Vo(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Vo(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ys(e,t),refetch:this.refetch,isEnabled:Oo(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Io(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Xo.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function hs(e,t){return Oo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&Oo(t.retryOnMount,e)===!1)}function gs(e,t){return hs(e,t)||e.state.data!==void 0&&_s(e,t,t.refetchOnMount)}function _s(e,t,n){if(Oo(t.enabled,e)!==!1&&Oo(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ys(e,t)}return!1}function vs(e,t,n,r){return(e!==t||Oo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ys(e,n)}function ys(e,t){return Oo(t.enabled,e)!==!1&&e.isStaleByTime(Oo(t.staleTime,e))}var bs=class extends os{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||xs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=as({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Xo.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function xs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ss=class extends $o{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new bs({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Cs(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Cs(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Cs(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Cs(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Xo.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ao(t,e))}findAll(e={}){return this.getAll().filter(t=>Ao(e,t))}notify(e){Xo.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Xo.batch(()=>Promise.all(e.map(e=>e.continue().catch(wo))))}};function Cs(e){return e.options.scope?.id}var ws=class extends $o{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??jo(r,t),a=this.get(i);return a||(a=new us({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Xo.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ko(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ko(e,t)):t}notify(e){Xo.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Xo.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Xo.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ts=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ws,this.#t=e.mutationCache||new Ss,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=es.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ts.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Oo(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=To(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Xo.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Xo.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Xo.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Xo.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(wo).catch(wo)}invalidateQueries(e,t={}){return Xo.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Xo.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(wo)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(wo)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Oo(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Oo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wo).catch(wo)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wo).catch(wo)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ts.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Mo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{No(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Mo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{No(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=jo(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Wo&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Es=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Ko(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ds=e=>{f.useEffect(()=>{e.clearReset()},[e])},Os=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Ko(n,[e.error,r])),ks=(e,t)=>t.state.data===void 0,As=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},js=(e,t)=>e?.suspense&&t.isPending,Ms=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ns(e,t,n){let r=_o(),i=P(),a=mo(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,As(o),Es(o,i,s),Ds(i);let[l]=f.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(f.useSyncExternalStore(f.useCallback(e=>{let t=d?l.subscribe(Xo.batchCalls(e)):wo;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f.useEffect(()=>{l.setOptions(o)},[o,l]),js(o,u))throw Ms(o,l,i);if(Os({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Ps(e,t){return Ns(e,ms,t)}function Fs(e){return e}var Is=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},Ls={pipe(){return Is(this,arguments)}},Rs=function(){function e(){}return e.prototype=Ls,e}(),zs=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},Bs=e=>e,Vs=(e=>()=>e)(void 0),Hs=Vs;function Us(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}function Ws(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),t.set(i,i),i}}var Gs=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},Ks=new WeakSet;function qs(e){return typeof e==`string`}function Js(e){return typeof e==`number`}function Ys(e){return typeof e==`boolean`}function Xs(e){return typeof e==`symbol`}function Zs(e){return qs(e)||Js(e)||Xs(e)}function Qs(e){return typeof e==`function`}function $s(e){return e!==void 0}function ec(e){return e!=null}function tc(e){return!1}function nc(e){return!0}function rc(e){return typeof e==`object`&&!!e||Qs(e)}var ic=zs(2,(e,t)=>rc(e)&&t in e),ac=`~effect/interfaces/Hash`,oc=e=>{switch(typeof e){case`number`:return dc(e);case`bigint`:return F(e.toString(10));case`boolean`:return F(String(e));case`symbol`:return F(String(e));case`string`:return F(e);case`undefined`:return F(`undefined`);case`function`:case`object`:if(e===null)return F(`null`);if(e instanceof Date)return Number.isNaN(e.getTime())?F(`Invalid Date`):F(e.toISOString());if(e instanceof RegExp)return F(e.toString());{if(Ks.has(e))return sc(e);if(yc.has(e))return yc.get(e);let t=xc(e,()=>uc(e)?e[ac]():typeof e==`function`?sc(e):e instanceof DataView?hc(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):Array.isArray(e)||ArrayBuffer.isView(e)?hc(e):e instanceof Map?gc(e):e instanceof Set?_c(e):pc(e));return yc.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},sc=e=>(vc.has(e)||vc.set(e,dc(Math.floor(Math.random()*(2**53-1)))),vc.get(e)),cc=zs(2,(e,t)=>e*53^t),lc=e=>e&3221225471|e>>>1&1073741824,uc=e=>ic(e,ac),dc=e=>{if(e!==e)return F(`NaN`);if(e===1/0)return F(`Infinity`);if(e===-1/0)return F(`-Infinity`);let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return lc(t)},F=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return lc(t)},fc=(e,t)=>{let n=12289;for(let r of t)n^=cc(oc(r),oc(e[r]));return lc(n)},pc=e=>fc(e,Gs(e)),mc=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return lc(r)},hc=mc(6151,oc),gc=mc(F(`Map`),([e,t])=>cc(oc(e),oc(t))),_c=mc(F(`Set`),oc),vc=new WeakMap,yc=new WeakMap,bc=new WeakSet;function xc(e,t){if(bc.has(e))return F(`[Circular]`);bc.add(e);let n=t();return bc.delete(e),n}var Sc=`~effect/interfaces/Equal`;function Cc(){return arguments.length===1?e=>wc(e,arguments[0]):wc(arguments[0],arguments[1])}function wc(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||Ks.has(e)||Ks.has(t)?!1:kc(e,t,Oc):!1}function Tc(e,t,n){let r=Ec.has(e),i=Dc.has(t);if(r&&i)return!0;if(r||i)return!1;Ec.add(e),Dc.add(t);let a=n();return Ec.delete(e),Dc.delete(t),a}var Ec=new WeakSet,Dc=new WeakSet;function Oc(e,t){if(oc(e)!==oc(t))return!1;if(e instanceof Date){if(!(t instanceof Date))return!1;let n=e.getTime(),r=t.getTime();return n===r||Number.isNaN(n)&&Number.isNaN(r)}else if(e instanceof RegExp)return t instanceof RegExp?e.toString()===t.toString():!1;let n=Rc(e),r=Rc(t);if(n!==r)return!1;let i=n&&r;return typeof e==`function`&&!i?!1:Tc(e,t,()=>{if(i)return e[Sc](t);if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:jc(e,t);if(ArrayBuffer.isView(e)){let n=e instanceof DataView;if(!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||n!==t instanceof DataView)return!1;if(n){let n=t;return Mc(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}return Mc(e,t)}else if(e instanceof Map)return!(t instanceof Map)||e.size!==t.size?!1:Fc(e,t);else if(e instanceof Set)return!(t instanceof Set)||e.size!==t.size?!1:Lc(e,t);return Nc(e,t)})}function kc(e,t,n){let r=Ac.get(e);if(!r)r=new WeakMap,Ac.set(e,r);else if(r.has(t))return r.get(t);let i=n(e,t);r.set(t,i);let a=Ac.get(t);return a||(a=new WeakMap,Ac.set(t,a)),a.set(e,i),i}var Ac=new WeakMap;function jc(e,t){for(let n=0;n<e.length;n++)if(!wc(e[n],t[n]))return!1;return!0}function Mc(e,t){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 Nc(e,t){let n=Gs(e),r=Gs(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!wc(e[i],t[i]))return!1;return!0}function Pc(e,t){return function(n,r){let i=Array.from(r);for(let[r,a]of n){let n=!1;for(let o=0;o<i.length;o++){let[s,c]=i[o];if(e(r,s)&&t(a,c)){i[o]=i[i.length-1],i.pop(),n=!0;break}}if(!n)return!1}return!0}}var Fc=Pc(wc,wc);function Ic(e){return function(t,n){let r=Array.from(n);for(let n of t){let t=!1;for(let i=0;i<r.length;i++){let a=r[i];if(e(n,a)){r[i]=r[r.length-1],r.pop(),t=!0;break}}if(!t)return!1}return!0}}var Lc=Ic(wc),Rc=e=>ic(e,Sc),zc=Symbol.for(`~effect/Redactable`),Bc=e=>ic(e,zc);function Vc(e){return Bc(e)?Hc(e):e}function Hc(e){return e[zc](globalThis[`~effect/Fiber/currentFiber`]?.context??Gc)}var Uc=`~effect/Fiber/currentFiber`,Wc=new Map,Gc={"~effect/Context":{},base:Wc,depth:0,mapUnsafe:Wc,pipe(){return Is(this,arguments)}};function Kc(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,n=0){if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return qc;r.add(e);let l;if(zc in e)l=c(Hc(e),n);else if(Array.isArray(e))l=!i||e.length<=1?`[${e.map(e=>c(e,n)).join(`,`)}]`:`[\n${a(n+1)}${e.map(e=>c(e,n+1)).join(`,
|
|
14
|
-
`+a(n+1))}\n${a(n)}]`;else if(e instanceof Date)l=Xc(e);else if(!t?.ignoreToString&&ic(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=Zc(e);l=e instanceof Error&&e.cause?`${t} (cause: ${c(e.cause,n)})`:t}else if(Symbol.iterator in e)l=`${e.constructor.name}(${c(Array.from(e),n)})`;else{let t=s(e);l=!i||t.length<=1?o(e,`{${t.map(t=>`${Jc(t)}:${c(e[t],n)}`).join(`,`)}}`):o(e,`{\n${t.map(t=>`${a(n+1)}${Jc(t)}: ${c(e[t],n+1)}`).join(`,
|
|
15
|
-
`)}\n${a(n)}}`)}return r.delete(e),l}return String(e)}return c(e,0)}var qc=`[Circular]`;function Jc(e){return typeof e==`string`?JSON.stringify(e):String(e)}function Yc(e){return e.map(e=>`[${Jc(e)}]`).join(``)}function Xc(e){try{return e.toISOString()}catch{return`Invalid Date`}}function Zc(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}var Qc=Symbol.for(`nodejs.util.inspect.custom`),$c=e=>{try{return e=Vc(e),ic(e,`toJSON`)&&Qs(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map($c):e}catch{return`[toJSON threw]`}},el=class e{called=!1;self;constructor(e){this.self=e}next(e){return this.called?{value:e,done:!0}:(this.called=!0,{value:this.self,done:!1})}[Symbol.iterator](){return new e(this.self)}},tl=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})();function nl(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function rl(e,t){for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&nl(e,n,t[n])}var il=`~effect/Effect`,al=`~effect/Exit`,ol={_A:Bs,_E:Bs,_R:Bs},sl=`${il}/identifier`,I=`${il}/args`,cl=`${il}/evaluate`,ll=`${il}/successCont`,ul=`${il}/failureCont`,dl=`${il}/ensureCont`,fl=Symbol.for(`effect/Effect/Yield`),pl={pipe(){return Is(this,arguments)},toJSON(){return{...this}},toString(){return Kc(this.toJSON(),{ignoreToString:!0,space:2})},[Qc](){return this.toJSON()}},ml={[il]:ol,...pl,[Symbol.iterator](){return new el(this)},toJSON(){return{_id:`Effect`,op:this[sl],...I in this?{args:this[I]}:void 0}}},hl=e=>ic(e,al),gl=`~effect/Cause`,_l=`~effect/Cause/Reason`,vl=e=>ic(e,gl),yl=class{[gl];reasons;constructor(e){this[gl]=gl,this.reasons=e}pipe(){return Is(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${Kc(this.reasons)})`}[Qc](){return this.toJSON()}[Sc](e){return vl(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>Cc(t,e.reasons[n]))}[ac](){return hc(this.reasons)}},bl=new WeakMap,xl=class{[_l];annotations;_tag;constructor(e,t,n){if(this[_l]=_l,this._tag=e,t!==Sl&&typeof n==`object`&&n&&t.size>0){let e=bl.get(n);e&&(t=new Map([...e,...t])),bl.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return Is(this,arguments)}toString(){return Kc(this)}[Qc](){return this.toString()}},Sl=new Map,Cl=class extends xl{error;constructor(e,t=Sl){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${Kc(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[Sc](e){return kl(e)&&Cc(this.error,e.error)&&Cc(this.annotations,e.annotations)}[ac](){return cc(F(this._tag))(cc(oc(this.error))(oc(this.annotations)))}},wl=e=>new yl(e),Tl=e=>new yl([new Cl(e)]),El=class extends xl{defect;constructor(e,t=Sl){super(`Die`,t,e),this.defect=e}toString(){return`Die(${Kc(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[Sc](e){return Al(e)&&Cc(this.defect,e.defect)&&Cc(this.annotations,e.annotations)}[ac](){return cc(F(this._tag))(cc(oc(this.defect))(oc(this.annotations)))}},Dl=e=>new yl([new El(e)]),Ol=zs(e=>vl(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new yl(e.reasons.map(e=>e.annotate(t,n)))),kl=e=>e._tag===`Fail`,Al=e=>e._tag===`Die`,jl=e=>e._tag===`Interrupt`;function Ml(e){return Vl(`Effect.evaluate: Not implemented`)}var Nl=e=>({...ml,[sl]:e.op,[cl]:e[cl]??Ml,[ll]:e[ll],[ul]:e[ul],[dl]:e[dl]}),Pl=e=>{let t=Nl(e);return function(){let n=Object.create(t);return n[I]=e.single===!1?arguments:arguments[0],n}},Fl=e=>{let t={[al]:al,_tag:e.op,get[e.prop](){return this[I]},...Nl(e),toString(){return`${e.op}(${Kc(this[I])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[I]}},[Sc](e){return hl(e)&&e._tag===this._tag&&Cc(this[I],e[I])},[ac](){return cc(F(e.op),oc(this[I]))}};return function(e){let n=Object.create(t);return n[I]=e,n}},Il=Fl({op:`Success`,prop:`value`,[cl](e){let t=e.getCont(ll);return t?t[ll](this[I],e,this):e.yieldWith(this)}}),Ll={key:`effect/Cause/StackTrace`},Rl={key:`effect/Cause/InterruptorStackTrace`},zl=Fl({op:`Failure`,prop:`cause`,[cl](e){let t=this[I],n=!1;e.currentStackFrame&&(t=Ol(t,{mapUnsafe:new Map([[Ll.key,e.currentStackFrame]])}),n=!0);let r=e.getCont(ul);for(;e.interruptible&&e._interruptedCause&&r;)r=e.getCont(ul);return r?r[ul](t,e,n?void 0:this):e.yieldWith(n?zl(t):this)}}),Bl=e=>zl(Tl(e)),Vl=e=>zl(Dl(e)),Hl=Pl({op:`WithFiber`,[cl](e){return this[I](e)}}),Ul=function(){class e extends globalThis.Error{}let t=Nl({op:`YieldableError`,[cl](){return Bl(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),Wl=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends Ul{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(rl(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),Gl=e=>{class t extends Wl{_tag=e}return t.prototype.name=e,t};Gl(`NoSuchElementError`);var Kl=e=>Nl({op:e.label,[cl]:e.evaluate}),ql=e=>(t,n)=>t===n||e(t,n),Jl=`~effect/data/Option`,Yl={[Jl]:{_A:e=>e},...pl,[Symbol.iterator](){return new el(this)}},L=Object.defineProperty(Object.assign(Object.create(Yl),{_tag:`Some`,_op:`Some`,[Sc](e){return Zl(e)&&$l(e)&&Cc(this.value,e.value)},[ac](){return cc(oc(this._tag))(oc(this.value))},toString(){return`some(${Kc(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:$c(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),R=oc(`None`),Xl=Object.assign(Object.create(Yl),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[Sc](e){return Zl(e)&&Ql(e)},[ac](){return R},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),Zl=e=>ic(e,Jl),Ql=e=>e._tag===`None`,$l=e=>e._tag===`Some`,eu=Object.create(Xl),tu=e=>{let t=Object.create(L);return t.value=e,t},nu=`~effect/data/Result`,ru={[nu]:{_A:e=>e,_E:e=>e},...pl,[Symbol.iterator](){return new el(this)}},iu=Object.assign(Object.create(ru),{_tag:`Success`,_op:`Success`,[Sc](e){return ou(e)&&cu(e)&&Cc(this.success,e.success)},[ac](){return cc(oc(this._tag))(oc(this.success))},toString(){return`success(${Kc(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:$c(this.success)}}}),au=Object.assign(Object.create(ru),{_tag:`Failure`,_op:`Failure`,[Sc](e){return ou(e)&&su(e)&&Cc(this.failure,e.failure)},[ac](){return cc(oc(this._tag))(oc(this.failure))},toString(){return`failure(${Kc(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:$c(this.failure)}}}),ou=e=>ic(e,nu),su=e=>e._tag===`Failure`,cu=e=>e._tag===`Success`,lu=e=>{let t=Object.create(au);return t.failure=e,t},uu=e=>{let t=Object.create(iu);return t.success=e,t},du=()=>eu,fu=tu,pu=Ql,mu=$l,hu=zs(2,(e,t)=>pu(e)?du():fu(t(e.value))),gu=zs(2,(e,t)=>pu(e)?du():t(e.value)?fu(e.value):du()),_u=`~effect/Context/Service`,vu=function(){function e(){}let t=e;Object.setPrototypeOf(t,yu);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[xu]=xu,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&bu.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},yu={[_u]:_u,...Kl({label:`Service`,evaluate(e){return Il(Vu(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return Lu(this,e)},use(e){return Hl(t=>e(Vu(t.context,this)))},useSync(e){return Hl(t=>Il(e(Vu(t.context,this))))}},bu=new Set,xu=`~effect/Context/Reference`,Su=`~effect/Context`,Cu=8,wu=8,Tu=(e,t,n,r)=>{let i=Object.create(ju);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},Eu=(e,t)=>{t&&(Eu(e,t.parent),e.set(t.key,t.value))},Du=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return Eu(t,e.overlay),e._flat=t},Ou=Symbol(),ku=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?Ou:(n.overlay&&++n.baseHits>=wu&&(n.base=Du(n),n.overlay=void 0,n.depth=0),r)},Au=e=>Tu(void 0,e,void 0,0),ju={get mapUnsafe(){return Du(this)},...pl,[Su]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[Sc](e){if(!Nu(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!Cc(r,n.get(e)))return!1;return!0},[ac](){return dc(this.mapUnsafe.size)}},Mu=(e,t)=>e.cacheRoot===t.cacheRoot,Nu=e=>ic(e,Su),Pu=e=>!!e[xu],Fu=()=>Iu,Iu=Au(new Map),Lu=(e,t)=>Au(new Map([[e.key,t]])),Ru=zs(3,(e,t,n)=>zu(e,t.key,n)),zu=(e,t,n)=>{let r=e,i=bu.has(t)?void 0:r.cacheRoot;if(r.depth>=Cu){let e=new Map(r.mapUnsafe);return e.set(t,n),Tu(i,e,void 0,0)}return Tu(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},Bu=(e,t)=>{let n=ku(e,t);return n===Ou?void 0:n},Vu=zs(2,(e,t)=>{let n=ku(e,t.key);if(n===Ou){if(Pu(t))return Uu(t);throw Wu(t)}return n}),Hu=`~effect/Context/defaultValue`,Uu=e=>Hu in e?e[Hu]:e[Hu]=e.defaultValue(),Wu=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
|
|
16
|
-
`);e.splice(1,3),t.stack=e.join(`
|
|
17
|
-
`)}return t},Gu=vu,Ku=e=>e.length>0,qu=uu,Ju=lu,Yu=su,Xu=cu,Zu=zs(2,(e,t)=>Yu(e)?Ju(t(e.failure)):e),Qu=globalThis.Array,$u=e=>Qu.isArray(e)?e:Qu.from(e),ed=zs(2,(e,t)=>[...e,t]),td=zs(2,(e,t)=>$u(e).concat($u(t)));Qu.isArray;var nd=Ku,rd=Ku,id=(e,t)=>{let n=oc(t),r=e.get(n);if(r===void 0)return e.set(n,[t]),!0;for(let e of r)if(Cc(e,t))return!1;return r.push(t),!0},ad=zs(2,(e,t)=>{let n=$u(e),r=$u(t);return rd(n)?rd(r)?cd(td(n,r)):n:r}),od=()=>[],sd=zs(2,(e,t)=>e.map(t)),cd=e=>{let t=$u(e);if(t.length<2)return[...t];let n=new Map,r=[];for(let e of t)id(n,e)&&r.push(e);return r},ld=Gu(`effect/Scheduler`,{fiberCached:!0,defaultValue:()=>new pd}),ud=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},dd=e=>{let t=!1;return Promise.resolve().then(()=>{t||e()}),()=>{t=!0}},fd=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},pd=class{executionMode;setImmediate;constructor(e=`async`,t){this.executionMode=e,this.setImmediate=t??(e===`sync`?dd:ud)}shouldYield(e){return e.currentOpCount>=e.maxOpsBeforeYield}makeDispatcher(){return new md(this.setImmediate)}},md=class{tasks=new fd;running=void 0;setImmediate;constructor(e=ud){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},hd=Gu(`effect/Scheduler/MaxOpsBeforeYield`,{fiberCached:!0,defaultValue:()=>2048}),gd=Gu(`effect/Scheduler/PreventSchedulerYield`,{fiberCached:!0,defaultValue:()=>!1}),_d=Gl;_d(`EncodingError`);var vd=[];for(let e=0;e<256;e++)vd.push(e.toString(16).padStart(2,`0`));var yd=`effect/Tracer/ParentSpan`;vu()(yd,{fiberCached:!0});var bd=`effect/Tracer`,xd=`effect/observability/Metric/FiberRuntimeMetricsKey`,Sd=Gu(`effect/References/CurrentStackFrame`,{fiberCached:!0,defaultValue:Vs}),Cd=Gu(`effect/References/CurrentLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),wd=Gu(`effect/References/MinimumLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),Td=(()=>{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.hasOwn(e,`writable`)?e.writable===!0:e.set!==void 0})(),Ed=()=>Error.stackTraceLimit,Dd=e=>{Td&&(Error.stackTraceLimit=e)},Od=class extends xl{fiberId;constructor(e,t=Sl){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[Sc](e){return jl(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[ac](){return cc(F(`${this._tag}:${this.fiberId}`))(sc(this.annotations))}},kd=e=>new yl([new Od(e)]),Ad=e=>e.reasons.some(jl),jd=zs(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new yl(ad(e.reasons,t.reasons));return Cc(e,n)?e:n}),Md=zs(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>kl(e)?(n=!0,new Cl(t(e.error),e.annotations)):e);return n?wl(r):e}),z=`~effect/Fiber`,Nd={_A:Bs,_E:Bs},Pd={id:0},Fd=()=>globalThis[Uc],Id=class{constructor(e,t=!0){this[z]=Nd,this.setContext(e),this.id=++Pd.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)}[z];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 Vu(this.context,e)}addObserver(e){return this._exit?(e(this._exit),Hs):(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=kd(e);this.currentStackFrame&&(n=Ol(n,Lu(Ll,this.currentStackFrame))),t&&(n=Ol(n,t)),this._interruptedCause=this._interruptedCause?jd(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(Ud(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===fl)return;let n=Rd.interruptChildren&&Rd.interruptChildren(this);if(n!==void 0)return this.evaluate(of(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=Fu()}runLoop(e){let t=globalThis[Uc];globalThis[Uc]=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=Ud(this._interruptedCause)),this.currentOpCount++,!r&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){r=!0;let e=i;i=of(qd,()=>e)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[cl](this),i===fl){let e=this._yielded;if(al in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return fl}}}catch(e){return ic(i,cl)?this.runLoop(Vl(e)):Vl(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{this._running=n,globalThis[Uc]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,Ld;for(;;){let t=this._stack.pop();if(!t)return;let n=t[dl]&&t[dl](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,fl}children(){return this._children??=new Set}pipe(){return Is(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&Mu(t,e))return;let n=this.getRef(ld);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=Bu(e,yd),this.currentLogLevel=this.getRef(Cd),this.minimumLogLevel=this.getRef(wd),this.currentStackFrame=this.getRef(Sd),this.maxOpsBeforeYield=this.getRef(hd),this.currentPreventYield=this.getRef(gd),this.runtimeMetrics=Bu(e,xd);let r=Bu(e,bd);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},Ld={[ll](e,t){return Ud(t._interruptedCause)},[ul](e,t){return Ud(t._interruptedCause)}},Rd={interruptChildren:void 0},zd=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(Rl.key,e.currentStackFrame),Au(t)},Bd=e=>$d(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(Hd(r))}return a(),Gd(()=>i?.())}),Vd=e=>Hl(t=>{let n=zd(t),r=od();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return af(Bd(r))}),Hd=Il,Ud=zl,Wd=Bl,Gd=Pl({op:`Sync`,[cl](e){let t=this[I](),n=e.getCont(ll);return n?n[ll](t,e):e.yieldWith(Il(t))}}),Kd=Pl({op:`Suspend`,[cl](e){return this[I]()}}),qd=Pl({op:`Yield`,[cl](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(mf)},this[I]??0),e.yieldWith(()=>{t=!0})}})(0),Jd=e=>Kd(()=>Ud(tl(e))),Yd=e=>Vl(e),Xd=Hd(void 0),Zd=Pl({op:`Async`,single:!1,[cl](e){let t=tl(()=>this[I][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[I][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(Qd(()=>(n=!0,i?.abort(),a??mf))),fl):r}}),Qd=Pl({op:`AsyncFinalizer`,[dl](e){e.interruptible&&(e.interruptible=!1,e._stack.push(xf))},[ul](e,t){return Ad(e)?of(this[I](),()=>Ud(e)):Ud(e)}}),$d=e=>Zd(e,e.length>=2),ef=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),tf=(e,...t)=>ef(e.length,t.length===0?function(){return nf(()=>e.apply(this,arguments))}:function(){let n=nf(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),nf=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return Hd(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}else if(i&&i._tag===`Failure`)return r.value;else{let n=!0;return Kd(()=>n?(n=!1,of(r.value,e=>rf(t,e))):Kd(()=>rf(e())))}}}catch(e){return Yd(e)}},rf=Pl({op:`Iterator`,single:!1,[ll](e,t){let n=this[I][0];for(;;){let r=n.next(e);if(r.done)return Hd(r.value);if(!cf(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[cl](e){return this[ll](this[I][1],e)}}),af=e=>of(e,e=>mf),of=zs(2,(e,t)=>{let n=Object.create(sf);return n[I]=e,n[ll]=t.length===1?t:e=>t(e),n}),sf=Nl({op:`OnSuccess`,[cl](e){return e._stack.push(this),this[I]}}),cf=e=>al in e,lf=zs(2,(e,t)=>cf(e)?e._tag===`Success`?t(e.value):e:of(e,t)),uf=zs(2,(e,t)=>of(e,e=>Hd(tl(()=>t(e))))),df=zs(2,(e,t)=>cf(e)?hf(e,t):uf(e,t)),ff=e=>e._tag===`Success`,pf=e=>e._tag===`Failure`,mf=Il(void 0),hf=zs(2,(e,t)=>e._tag===`Success`?Il(t(e.value)):e),gf=zs(2,(e,t)=>{let n=Object.create(_f);return n[I]=e,n[ul]=t.length===1?t:e=>t(e),n}),_f=Nl({op:`OnFailure`,[cl](e){return e._stack.push(this),this[I]}}),vf=e=>cf(e)?Il(e):yf(e),yf=Pl({op:`Exit`,[cl](e){return e._stack.push(this),this[I]},[ll](e,t,n){return Hd(n??Il(e))},[ul](e,t,n){return Hd(n??zl(e))}}),bf=e=>Hl(t=>t.interruptible?(t.interruptible=!1,t._stack.push(xf),e):e),xf=Pl({op:`SetInterruptible`,[dl](e){if(e.interruptible=this[I],e._interruptedCause&&e.interruptible)return()=>Ud(e._interruptedCause)}})(!0),Sf=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(!cf(c))return of(vf(c),t=>n(e,s,t,a)??r(e,i,a+1,o)??Xd);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=Vl(e);return h=t,u=!0,m=!0,f&&f.size>0?of(bf(Vd(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(cf(a)){if(h=b(r,a,o),h)break}else if(d){g=void 0;let e=wf(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=zl(wl([e]))}else{let e=b(r,i,t);e&&(h=e._tag===`Failure`?zl(wl(e.cause.reasons.slice())):e,x())}if(n){let e=x();e&&p(e)}else u&&f.size===0&&p(h??Xd)}catch(e){p(y(e))}}),f.size<c)continue;n=!0,o++;return}else return $d(e=>{d=Fd(),f=new Set,g=a,p=e;let t;try{t=x()}catch(t){return e(y(t))}return t?e(t):Kd(()=>(h=mf,m=!0,f?Vd(f):Xd))})}if(u=!0,h){if(f&&f.size>0){let e=zd(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(Xd);else return mf};return x()}},Cf=()=>Sf,wf=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new Id(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},Tf=e=>(t,n)=>{let r=new Id(n?.scheduler?Ru(e,ld,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},Ef=(e=>{let t=Tf(e);return e=>{if(cf(e))return e;let n=t(e,{scheduler:new pd(`sync`)});return n._dispatcher?.flush(),n._exit??Vl(new Of(n))}})(Fu());Gl(`TimeoutError`),Gl(`IllegalArgumentError`),Gl(`ExceededCapacityError`);var Df=`~effect/Cause/AsyncFiberError`,Of=class extends Gl(`AsyncFiberError`){[Df]=Df;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}};Gl(`UnknownError`);var kf={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};kf.gray,kf.blue,kf.green,kf.yellow,kf.red,kf.bgBrightRed,kf.black;var Af=kl,jf=Md;vu()(`effect/Cause/StackTrace`),vu()(`effect/Cause/InterruptorStackTrace`);var Mf=Il,Nf=zl,Pf=Bl,Ff=mf,If=ff,Lf=pf,Rf=`~effect/BigDecimal`,zf={[Rf]:Rf,[ac](){let e=Kf(this);return cc(oc(e.value),dc(e.scale))},[Sc](e){return Bf(e)&&Xf(this,e)},toString(){return`BigDecimal(${Zf(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Qc](){return this.toJSON()},pipe(){return Is(this,arguments)}},Bf=e=>ic(e,Rf),Vf=(e,t)=>{let n=Object.create(zf);return n.value=e,n.scale=t,n},Hf=(e,t)=>{if(e!==Uf&&e%Wf===Uf)throw RangeError(`Value must be normalized`);let n=Vf(e,t);return n.normalized=n,n},Uf=BigInt(0),Wf=BigInt(10),Gf=Hf(Uf,0),Kf=e=>{if(e.normalized===void 0)if(e.value===Uf)e.normalized=Gf;else{let t=`${e.value}`,n=0;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)n++;n===0&&(e.normalized=e),e.normalized=Hf(BigInt(t.substring(0,t.length-n)),e.scale-n)}return e.normalized},qf=zs(2,(e,t)=>t>e.scale?Vf(e.value*Wf**BigInt(t-e.scale),t):t<e.scale?Vf(e.value/Wf**BigInt(e.scale-t),t):e),Jf=e=>e.value<Uf?Vf(-e.value,e.scale):e,Yf=ql((e,t)=>e.scale>t.scale?qf(t,e.scale).value===e.value:e.scale<t.scale?qf(e,t.scale).value===t.value:e.value===t.value),Xf=zs(2,(e,t)=>Yf(e,t)),Zf=e=>{let t=Kf(e);if(Math.abs(t.scale)>=16)return Qf(t);let n=t.value<Uf,r=n?`${t.value}`.substring(1):`${t.value}`,i,a;if(t.scale>=r.length)i=`0`,a=`0`.repeat(t.scale-r.length)+r;else{let e=r.length-t.scale;if(e>r.length){let t=e-r.length;i=`${r}${`0`.repeat(t)}`,a=``}else a=r.slice(e),i=r.slice(0,e)}let o=a===``?i:`${i}.${a}`;return n?`-${o}`:o},Qf=e=>{if($f(e))return`0e+0`;let t=Kf(e),n=`${Jf(t).value}`,r=n.slice(0,1),i=n.slice(1),a=`${ep(t)?`-`:``}${r}`;i!==``&&(a+=`.${i}`);let o=i.length-t.scale;return`${a}e${o>=0?`+`:``}${o}`},$f=e=>e.value===Uf,ep=e=>e.value<Uf,tp=`~effect/time/DateTime`,np=`~effect/time/DateTime/TimeZone`,rp={[tp]:tp,pipe(){return Is(this,arguments)},[Qc](){return this.toString()},toJSON(){return ap(this).toJSON()}};({...rp}),{...rp};var ip={[np]:np,[Qc](){return this.toString()}};({...ip}),{...ip};var ap=e=>new Date(e.epochMilliseconds),op=Hd,sp=Wd,cp=Jd,lp=Yd,up=of,dp=vf,fp=gf,pp=Ef;vu()(`effect/Effect/Transaction`);var mp=df,hp=lf,gp=tf;vu()(`effect/DateTime/CurrentTimeZone`);function _p(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function vp(e){return t=>_p(t)?.[e]}var yp=`~structural`,bp=`~sentinels`,xp=`~constructor`,Sp=vp(`brands`),Cp=Us(e=>{let t=_p(e)?.identifier;return typeof t==`string`?t:e.getExpected(Cp)}),wp=Symbol(),Tp=Mf,Ep=Tp(wp),Dp=Tp(wp),Op=e=>e===wp?du():fu(e),kp=e=>e._tag===`None`?Ep:Tp(e.value),Ap=`~effect/SchemaIssue/Issue`;function jp(e){return ic(e,Ap)&&e[Ap]===Ap}function Mp(e){return Object.hasOwn(e,`input`)}var Np=class{[Ap]=Ap;constructor(e,t){t?.reportInput===!0&&e!==wp&&(this.input=e)}},Pp=class extends Np{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},Fp=class extends Np{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},Ip=class extends Np{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Lp=class extends Np{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},Rp=class extends Np{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},zp=class extends Np{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Bp=class extends Np{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Vp=class extends Np{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Hp=class extends Np{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Up=class extends Np{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Wp(e,t,n){if(jp(e))return e;if(typeof e==`string`)return new Vp({message:e},t,n);let r=typeof e.issue==`string`?new Vp({message:e.issue},t,n):e.issue;return new Ip(e.path,r)}function Gp(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new Vp(void 0,t,n):Wp(e,t,n)}function Kp(e,t,n,r){return Array.isArray(t)?rd(t)?t.length===1?Wp(t[0],n,r):new zp(e,sd(t,e=>Wp(e,n,r)),n,r):void 0:Gp(t,n,r)}var qp=e=>{let t=im(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Qp(Cp(e.ast),e);case`InvalidValue`:{let t=Zp(e);if(t!==void 0)return Qp(t,e);let n=Xp(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Xp(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Xp(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Jp=e=>im(e.issue)??im(e);function Yp(e){return t=>({issues:$p(t,[],e?.leafHook??qp,e?.checkHook??Jp)})}function Xp(e){return Mp(e)?Kc(e.input):void 0}function Zp(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function Qp(e,t){let n=Xp(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function $p(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 $p(e.issue,t,n,r);let a=Zp(e.issue);return[{path:t,message:a===void 0?Qp(em(e.filter),e):Qp(a,e.issue)}]}case`Encoding`:return $p(e.issue,t,n,r);case`Pointer`:return $p(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>$p(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:im(e)??Qp(Cp(e.ast),e)}]:e.issues.flatMap(e=>$p(e,t,n,r));default:return[{path:t,message:n(e)}]}}function em(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=>em(e)).join(` & `)}}function tm(){return e=>rm(e,``)}var nm=tm();function rm(e,t){let n;switch(e._tag){case`Filter`:{let r=Jp(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return rm(e.issue,t);let r=Zp(e.issue);n=r===void 0?Qp(em(e.filter),e):Qp(r,e.issue)}break}case`Encoding`:return rm(e.issue,t);case`Pointer`:return rm(e.issue,t+Yc(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>rm(e,t)).join(`
|
|
18
|
-
`);n=im(e)??Qp(Cp(e.ast),e);break;default:n=qp(e);break}return t?`${n}\n at ${t}`:n}function im(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return im(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 am(e){let t;for(let n of e.reasons){if(!Af(n)||!jp(n.error))return;t??=n.error}return t}function om(e,t){let n=am(e);if(n===void 0)throw Error(t,{cause:e});return n}var sm=class e extends Rs{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(mp(hu(t))))}compose(t){return lm(this)?t:lm(t)?this:new e((e,n)=>this.run(e,n).pipe(hp(e=>t.run(e,n))))}},cm=new sm(op);function lm(e){return e.run===cm.run}function um(){return cm}function dm(e){return fm(hu(e))}function fm(e){return new sm(t=>op(e(t)))}function pm(e){return new sm(t=>{let n=gu(t,$s);return mu(n)?op(n):mp(e,fu)})}function mm(){return dm(globalThis.String)}function hm(){return dm(globalThis.Number)}var gm=`~effect/SchemaTransformation/Transformation`,_m=class e{[gm]=gm;_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 vm(e){return ic(e,gm)&&e[gm]===gm}var ym=e=>vm(e)?e:new _m(e.decode,e.encode);function bm(e){return new _m(dm(e.decode),dm(e.encode))}var xm=new _m(um(),um());function Sm(){return xm}var Cm=new _m(hm(),mm());function wm(e){return t=>t._tag===e}var Tm=wm(`Declaration`),Em=wm(`Never`),Dm=wm(`Literal`),Om=wm(`UniqueSymbol`),km=wm(`Arrays`),Am=wm(`Objects`),jm=wm(`Suspend`),Mm=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},Nm={},Pm=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}},Fm=`~effect/Schema`,Im=class{[Fm]=Fm;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}>`}},Lm=class e extends Im{_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===wp?Ep:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(t,n,r,i,a){let o=$h(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>`}},Rm=new class extends Im{_tag=`Null`;getParser(){return gg(this,null)}getExpected(){return`null`}},zm=class extends Im{_tag=`Undefined`;getParser(){return gg(this,void 0)}toCodecJson(){return Hh(this,[Bm])}getExpected(){return`undefined`}},Bm=new Mm(Rm,new _m(dm(()=>void 0),dm(()=>null))),Vm=new zm,Hm=new class extends Im{_tag=`Never`;getParser(){return _g(this,tc)}getExpected(){return`never`}},Um=new class extends Im{_tag=`Unknown`;getParser(){return _g(this,nc)}getExpected(){return`unknown`}},Wm=class extends Im{_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 ${Kc(e)}`);this.literal=e}getParser(){return gg(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Gm(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Gm(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Gm(e){let t=globalThis.String(e.literal);return Hh(e,[new Mm(new Wm(t),new _m(dm(()=>e.literal),dm(()=>t)))])}var Km=new class extends Im{_tag=`String`;getParser(){return _g(this,qs)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&Tg(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},qm=class extends Im{_tag=`Number`;getParser(){return _g(this,Js)}matchKey(e,t){return this._match(bg,e,t)}matchPart(e,t){return this._match(yg,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:Tg(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(Jm(this.checks,`effect/schema/isFinite`)||Jm(this.checks,`effect/schema/isInt`))?this:Hh(this,[Lh])}toCodecStringTree(){return this.toCodecJson()===this?Hh(this,[Cg]):Hh(this,[wg])}getExpected(){return`number`}};function Jm(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&Jm(e.checks,t))}var Ym=new qm,Xm=new class extends Im{_tag=`Boolean`;getParser(){return _g(this,Ys)}getExpected(){return`boolean`}},Zm=class e extends Im{_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(cg(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(cg(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 gp(function*(e,c){if(e===wp)return wp;if(!Array.isArray(e))return yield*sp(new Bp(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=Qm(u,e,{concurrency:$m(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 Rp(n,e[t],c),i=new Ip([t],r);if(c.errors===`all`)u.issues?u.issues.push(i):u.issues=[i];else return yield*sp(new zp(n,[i],e,c))}return u.issues?yield*sp(new zp(n,u.issues,e,c)):u.output})}_rebuild(t,n,r){let i=$h(this.elements,t),a=$h(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`}},Qm=Cf()({onItem(e,t,n){let r=n<e.len?t:wp;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return eh(e,e.ast,r,n);let i=n===Dp?t:n[I];if(i!==wp)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(cg(t.ast))return;let n=new Ip([r],new Lp(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return Pf(new zp(e.ast,[n],e.input,e.options))}}}),$m=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),eh=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=am(r.cause);if(i===void 0)return Nf(jf(r.cause,r=>new zp(t,[new Ip([n],r)],e.input,e.options)));let a=new Ip([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Pf(new zp(t,[a],e.input,e.options))},th=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function nh(e,t,n=Nm){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(vg(fg(t)))}var rh=class{name;type;constructor(e,t){this.name=e,this.type=t}};function ih(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(ih);default:return!1}}function ah(e){return ih(e)&&ih(fg(e))}var oh=class{parameter;type;constructor(e,t){if(!ah(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,cg(t)&&!hg(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},sh=class e extends Im{_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 _g(n,ec);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return eh(e,n,t,s)??Ff;let c=s===Dp?a:s[I];if(r!==wp&&c!==wp){if(i&&(o.has(t)||o.has(r)))return Ff;nl(e.out,r,c)}return Ff},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!cf(n))return up(dp(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return eh(e,n,t,i)??Ff;let a=i===Dp?t:i[I],o=e.input[t],s=r.parserValue(o,e.options);return cf(s)?l(e,t,a,o,s):up(dp(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return cf(i)?l(e,t,t,r,i):up(dp(i),n=>l(e,t,t,r,n))},f=a?Cf()({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(vg(n.parameter)),parserValue:t(n.type)})):void 0),s),m=gp(function*(e,t){if(e===wp)return wp;if(!(typeof e==`object`&&e&&!Array.isArray(e)))return yield*sp(new Bp(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 Rp(n,l[i],t),a=new Ip([i],r);if(g){h.issues?h.issues.push(a):h.issues=[a];continue}else return yield*sp(new zp(n,[a],e,t))}else nl(m,i,l[i])}}let b=$m(t?.concurrency);if(i){let e=lh(h,s,b);e&&(yield*e)}if(a&&!b)for(let e=0;e<a;e++){let n=c[e],r=n.is.parameter===Km?d:u,i=n.is.parameter===Km?Object.keys(l):nh(l,n.is.parameter,t);for(let e=0;e<i.length;e++){let t=r(h,i[e],n);if(!cf(t))yield*t;else if(t._tag===`Failure`)return yield*t}}else if(f){let e=od();for(let n=0;n<a;n++){let r=c[n],i=nh(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*sp(new zp(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)&&nl(t,n,m[n]);return t}return m});if(a)return m;let h=(e,t,n)=>{let r=s[t];return up(dp(n),n=>{let i=ch(e,r,n);if(i)return i;let a=()=>Tp(e.out),o=lh(e,s.slice(t+1));return o?hp(o,a):a()})};return(e,t)=>{if(e===wp)return Ep;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 sp(new Bp(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]:wp,u=n.parser(l,t);if(!cf(u))return h(o,e,u);if(u===Dp){c&&nl(a,s,l);continue}let d=ch(o,n,u);if(d)return d}}catch(e){return lp(e)}return Tp(a)}}_rebuild(t,n,r,i){let a=$h(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new rh(e.name,n)}),o=$h(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new oh(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 ch(e,t,n){if(n._tag===`Failure`)return eh(e,e.ast,t.name,n);if(n===Dp)return;let r=n[I];if(r!==wp){nl(e.out,t.name,r);return}if(delete e.out[t.name],!cg(t.type)){let n=new Ip([t.name],new Lp(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}else return Pf(new zp(e.ast,[n],e.input,e.options))}}var lh=Cf()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser(wp,e.options);let n=e.input[t.name];return nl(e.out,t.name,n),t.parser(n,e.options)},step:ch});function uh(e,t){return e?t?[...e,...t]:e:t}function dh(e,t,n){return new sh(Reflect.ownKeys(e).map(t=>new rh(t,e[t].ast)),[],n,t)}function fh(e){return e.ast}function ph(e,t=void 0){return new Zm(!1,e.map(e=>e.ast),[],void 0,t)}function mh(e,t,n){return new Ch(e.map(fh),t,void 0,n)}var hh=Ws(e=>{for(;;){if(jm(e))return Um;let t=e.encoding;if(!t)return e.recur?.(hh,Bs)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==Bs))return Um;e=t[t.length-1].to}});function gh(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(gh)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function _h(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[bp];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!cg(t)){if(Dm(t))return[{key:e.name,literal:t.literal}];if(Om(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!cg(e)){if(Dm(e))return[{key:t,literal:e.literal}];if(Om(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>_h(hh(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return _h(e.thunk())}}var vh=new WeakMap,yh=Object.freeze([]);function bh(e){let t=vh.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=hh(s);if(Em(c))continue;if(o)if(Dm(c)||Om(c)){a??=new Map;let e=Dm(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1;let l=_h(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=gh(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??yh;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(rc(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??yh;if(n)return e}return yh}}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]??yh;if(!rc(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]??yh).map(t=>e[t]).filter(xh(t));return vh.set(e,t),t}function xh(e){return t=>{let n=hh(t);return n._tag===`Literal`?n.literal===e:n._tag===`UniqueSymbol`?n.symbol===e:!0}}function Sh(e,t,n=!1){return bh(t)(e,n)}var Ch=class e extends Im{_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===wp)return Ep;let a=Sh(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:cf(t)?wh(n,t.cause,r,i):fp(t,e=>wh(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=$m(i?.concurrency),c=Th(o,a,s?{...s,orderedStep:!0}:void 0);return c?hp(c,e=>o.out===Dp?op(r):o.out?o.out:sp(new Hp(n,o.issues??[],r,i))):o.out?o.out:sp(new Hp(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=$h(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=fg(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(Dm);if(t.length>0)return`${Dh(n.isMutable)}[ ${t.map(t=>e(t)+Oh(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>Dm(e.type));if(t.length>0)return`{ ${t.map(t=>`${Dh(t.type.context?.isMutable)}${Jc(t.name)}${Oh(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function wh(e,t,n,r){let i=am(t);return i?Pf(new Hp(e,[i],n,r)):Nf(t)}var Th=Cf()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=am(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),Pf(new Up(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return Ff}}}),Eh=new Ch([new Wm(`Infinity`),new Wm(`-Infinity`),new Wm(`NaN`)],`anyOf`);function Dh(e){return e?``:`readonly `}function Oh(e){return e?`?`:``}function kh(e){let t=!1,n;return()=>t?n:(n=e(),t=!0,n)}var Ah=class e extends Im{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i),this.thunk=kh(e)}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(t){return new e(()=>t(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},jh=class e extends Rs{_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 Mh([this,e],t)}},Mh=class e extends Rs{_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 Nh(e,t,n=!1){return new jh((t,n,r)=>Kp(n,e(t,n,r),t,r),t,n)}function Ph(e,t){return new jh((t,n,r)=>e(t)?void 0:new Vp(void 0,t,r),t,!0)}function Fh(e){return Nh(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 Ih=Kh(Ym,[Fh()]),Lh=new Mm(new Ch([Ih,Eh],`anyOf`),new _m(hm(),dm(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Rh(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return Nh(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 zh(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var Bh=new WeakMap;function Vh(e){return Bh.get(e)??e}function Hh(e,t){return e.encoding===t?e:zh(e,e=>{e.encoding.value=t})}function Uh(e,t){if(e.context===t)return e;let n=Vh(e);if(n.context===t)return n;let r=zh(e,e=>{e.context.value=t});return Bh.set(r,n),r}function Wh(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return Gh(e,ed(e.checks.slice(0,-1),n.annotate(t)))}return zh(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function Gh(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:zh(e,e=>{e.checks.value=t})}function Kh(e,t){return Gh(e,uh(e.checks,t))}function qh(e,t){let n=t(e.to);return n===e.to?e:new Mm(n,e.transformation)}function Jh(e,t){let n=e,r=n[n.length-1],i=qh(r,t);return i===r?e:ed(e.slice(0,e.length-1),i)}function Yh(e){return t=>t.encoding?Hh(t,Jh(t.encoding,e)):t}function Xh(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:Hh(r,Jh(r.encoding,n))}return e(r)}return Ws(n)}function Zh(e,t,n){let r=new Mm(e,t);return Hh(n,n.encoding?[...n.encoding,r]:[r])}function Qh(e,t){let n=Sp(e);return Wh(e,{brands:n?[...n,t]:[t]})}function $h(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 eg(e,t){return Uh(e,e.context?new Pm(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Pm(!1,!1,void 0,t))}var tg=Ws(e=>ng(Uh(e,e.context?e.context.isOptional===!1?new Pm(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Pm(!0,!1)))),ng=Yh(tg),rg=Us(e=>tg(new Ch([e,Vm],`anyOf`)));function ig(e,t){let n=new Mm(Um,new _m(pm(t),um()));return Uh(e,e.context?new Pm(e.context.isOptional,e.context.isMutable,n,e.context.annotations):new Pm(!1,!1,n))}function ag(e,t,n){return Zh(e,n,t)}function og(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Zs(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 sg(e,t){let{literals:n,parameters:r}=og(e);return new sh(n.map(e=>new rh(e,t)),r.map(e=>new oh(e,t)))}function cg(e){return e.context?.isOptional??!1}function lg(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(lg)}function ug(e){function t(e){return lg(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return nd(n)?n:void 0}var dg=Ws(e=>{if(e.encoding)return dg(Hh(e,void 0));let t=e,n=t.recur?.(dg)??t,r=n.encodingChecks;if(r){let t=n===e?r:km(n)||Am(n)||Tm(n)&&n.typeParameters.length>0?ug(r):void 0;return zh(n,e=>{e.encodingChecks.value=void 0,e.checks.value=uh(n.checks,t)})}return n}),fg=Ws(e=>dg(mg(e)));function pg(e,t){let n=t,r=n.length,i=n[r-1],a=[new Mm(mg(Hh(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new Mm(mg(n[e-1].to),n[e].transformation.flip()));let o=mg(i.to);return o.encoding?Hh(o,[...o.encoding,...a]):Hh(o,a)}var mg=Us(e=>{if(e.encoding)return pg(e,e.encoding);let t=e;return t.flip?.(mg)??t.recur?.(mg)??t});function hg(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(hg);default:return!1}}function gg(e,t){let n=Tp(t);return(r,i)=>r===wp?Ep:r===t?n:sp(new Bp(e,r,i))}function _g(e,t){return(n,r)=>n===wp?Ep:t(n)?Dp:sp(new Bp(e,n,r))}var vg=Xh(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(vg)}}),yg=new globalThis.RegExp(`^${th}$`),bg=new globalThis.RegExp(`^(?:${th}|Infinity|-Infinity|NaN)$`);function xg(e){return Rh(yg,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:yg.source}),...e})}var Sg=Kh(Km,[xg()]),Cg=new Mm(Sg,Cm),wg=new Mm(new Ch([Sg,Eh],`anyOf`),Cm);function Tg(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=Tg(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 Pp(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function Eg(e){if(!Tm(e))return;let t=e.annotations?.[xp];return Qs(t)?t(e.typeParameters):void 0}function Dg(e){let t=Rg(Hg,dg(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function Og(e){let t=Dg(e);return(e,n)=>{let r=pp(t(e,n));return If(r)?fu(r.value):(om(r.cause,`Option adapter can only return none for schema issues`),du())}}function kg(e){let t=Dg(e);return(e,n)=>{let r=pp(t(e,n));if(If(r))return r.value;let i=om(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function Ag(e,t){let n=Lg(e.ast);return t===void 0?n:(e,r)=>n(e,Fg(t,r))}function jg(e,t){return zg(Ag(e,t))}function Mg(e,t){return Bg(Ag(e,t))}function Ng(e,t){let n=Lg(mg(e.ast));return t===void 0?n:(e,r)=>n(e,Fg(t,r))}function Pg(e,t){return zg(Ng(e,t))}var Fg=(e,t)=>t?{...e,...t}:e,Ig=e=>e===wp?sp(new Vp):op(e);function Lg(e){return Rg(Vg,e)}function Rg(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??Nm);return a===Dp?op(r):cf(a)?a[I]===wp?Ig(wp):a:hp(a,Ig)}}function zg(e){return(t,n)=>pp(e(t,n))}function Bg(e){let t=zg(e);return(e,n)=>{let r=t(e,n);return If(r)?qu(r.value):Ju(om(r.cause,`Result adapter can only return schema issues`))}}var Vg=Us(e=>qg(e,Vg)),Hg=Us(e=>qg(e,Hg,Wg)),Ug=Us(e=>qg(e,Hg,Wg,e.context?.constructorDefault));function Wg(e){return e.context?.constructorDefault?Ug(e):Hg(e)}function Gg(e,t,n,r){let i;if(cf(e)&&e._tag===`Success`){let a=Op(e===Dp?t:e[I]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(Tp(a),r)}else i=n._tag===`Transformation`?hp(e,e=>n.decode.run(Op(e),r)):n.decode(mp(e,Op),r);return cf(i)&&i._tag===`Success`?kp(i[I]):hp(i,kp)}function Kg(e,t){let n;return(r,i)=>r===wp?Ep:e.isConstructed(r)?Dp:Gg((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function qg(e,t,n,r){let i=n?Eg(e):void 0,a=i?Kg(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,Fg(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks)if(cf(r)){if(r._tag===`Success`){let i=r===Dp?t:r[I];if(t!==wp&&i!==wp){let i=Tg(c,t,void 0,e,n);i&&(r=sp(new zp(e,i,t,n)))}}}else r=up(r,r=>{if(t!==wp&&r!==wp){let r=Tg(c,t,void 0,e,n);if(r)return sp(new zp(e,r,t,n))}return op(r)});if(o&&!n.disableChecks)if(cf(r)){if(r._tag===`Success`){let i=r===Dp?t:r[I];if(i===wp)return r;let a=Tg(o,i,void 0,e,n);a&&(r=sp(new zp(e,a,i,n)))}}else r=up(r,t=>{if(t!==wp){let r=Tg(o,t,void 0,e,n);if(r)return sp(new zp(e,r,t,n))}return op(t)});return r};return s?(n,r)=>{l&&(r=Fg(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=Gg(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[I],o=t(a,r)):o=hp(o,e=>{let n=t(e,r);return n===Dp?Tp(e):n})}if(o._tag===`Success`){let e=o[I],t=d(e,r);return t===Dp?o:t}return o=fp(o,t=>cp(()=>jf(t,t=>new Fp(e,t,n,r)))),hp(o,e=>{let t=d(e,r);return t===Dp?Tp(e):t})}:l?(e,t)=>d(e,Fg(t,l)):d}var Jg=`~effect/Schema/Schema`,Yg={[Jg]:Jg,pipe(){return Is(this,arguments)},annotate(e){return this.rebuild(Wh(this.ast,e))},annotateKey(e){return this.rebuild(eg(this.ast,e))},check(...e){return this.rebuild(Kh(this.ast,e))}};function Xg(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,Yg),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>Xg(e,t),r.makeEffect=Dg(r),r.make=kg(r),r.makeOption=Og(r),r}var Zg=zs(2,(e,t)=>({...e,...t})),Qg=zs(2,(e,t)=>e_(e,(e,n)=>[Object.hasOwn(t,e)?t[e]:e,n])),$g=e=>e;function e_(e,t){let n={};for(let r of Reflect.ownKeys(e)){if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;let i=t(r,e[r]);if(i){let[e,t]=i;nl(n,e,t)}}return n}var t_=Jg;function n_(){return(e,t,n)=>d_(new Lm(e.map(fh),e=>t(e.map(e=>d_(e))),n))}function r_(e,t){return n_()([],()=>(t,n,r)=>e(t)?op(t):sp(new Bp(n,t,r)),t)}var i_=`~effect/SchemaError/SchemaError`,a_=class extends _d(`SchemaError`){[i_]=i_;constructor(e){let t=Ed();Dd(0);try{super({issue:e})}finally{Dd(t)}}get message(){return nm(this.issue)}toString(){return`SchemaError(${this.message})`}};function o_(e){return ic(e,i_)&&e[i_]===i_}function s_(e,t){let n=jg(e,t);return(e,t)=>c_(n(e,t))}function c_(e){return If(e)?e:Nf(jf(e.cause,e=>new a_(e)))}function l_(e,t){let n=Mg(e,t);return(e,t)=>Zu(n(e,t),e=>new a_(e))}function u_(e,t){let n=Pg(e,t);return(e,t)=>c_(n(e,t))}var d_=Xg;function f_(e){return ic(e,t_)&&e[t_]===t_}var B=$g(e=>{let t=E_(e);return d_(rg(e.ast),{schema:t})}),V=$g(e=>d_(dg(e.ast),{schema:e})),p_=$g(e=>d_(fg(e.ast),{schema:e}));function H(e){let t=d_(new Wm(e),{literal:e,transform(n){return t.pipe(k_(H(n),{decode:dm(()=>n),encode:dm(()=>e)}))}});return t}var m_=d_(Hm),h_=d_(Rm),g_=d_(Vm),U=d_(Km),W=d_(Ym),G=d_(Xm);function __(e,t){return d_(e,{fields:t,mapFields(e,t){let n=e(this.fields);return __(dh(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function K(e){return __(dh(e,void 0),e)}function v_(e){return $g(t=>t.mapFields(Zg(e)))}var y_=e=>typeof e==`symbol`?e:globalThis.String(e);function b_(e){return function(t){let n={},r=Object.create(null),i=Object.create(null),a=new Set;for(let o of Reflect.ownKeys(t.fields)){let s=p_(t.fields[o]),c=Object.hasOwn(e,o),l=c?e[o]:o,u=y_(l);if(a.has(u))throw new globalThis.Error(`Duplicate encoded keys: ${Jc(l)}`);a.add(u),nl(n,l,s),c&&(r[o]=l,i[l]=o)}return K(n).pipe(k_(t,bm({decode:Qg(i),encode:Qg(r)})))}}function x_(e,t){return d_(sg(e.ast,t.ast),{key:e,value:t})}function S_(e,t){return d_(e,{elements:t,mapElements(e,t){let n=e(this.elements);return S_(ph(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function C_(e){return S_(ph(e),e)}var q=$g(e=>d_(new Zm(!1,[],[e.ast]),{value:e})),w_=$g(e=>d_(new Zm(!1,[e.ast],[e.ast]),{value:e}));function T_(e,t){return d_(e,{members:t,mapMembers(e,t){let n=e(this.members);return T_(mh(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function J(e,t){return T_(mh(e,t?.mode??`anyOf`,void 0),e)}function Y(e){let t=e.map(H);return d_(mh(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return J(e(this.members))},pick(e){return Y(e)},transform(e){return J(t.map((t,n)=>t.transform(e[n])))}})}var X=$g(e=>J([e,h_])),E_=$g(e=>J([e,g_]));function D_(e){return d_(new Ah(()=>e().ast))}function Z(...e){return t=>t.check(...e)}function O_(e,t){return n=>d_(Kh(n.ast,[Ph(e,t)]),{schema:n})}function Q(e){return t=>d_(Qh(t.ast,e),{schema:t,identifier:e})}function k_(e,t){return n=>d_(ag(n.ast,e.ast,t?ym(t):Sm()),{from:n,to:e})}function A_(e){return t=>d_(ig(t.ast,e),{schema:t})}function j_(e){return H(e).pipe(A_(op(e)))}function M_(e,t){return K({_tag:j_(e),...t})}var $=Nh,N_=d_(Ih);function P_(e,t){return e=Math.max(0,Math.floor(e)),$(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})`}),[yp]:!0,arbitrary:{constraint:{minLength:e}},...t})}globalThis.RegExp,globalThis.URL,globalThis.File,globalThis.FormData,globalThis.URLSearchParams,globalThis.Uint8Array;var F_=globalThis.Symbol.for(`immer-draftable`),I_={};function L_(e,t,n,r,i){let a=B_(n,t,r),o=z_(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===I_?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:I_,value:i}})}static[t_]=t_;get[o](){return o}static[F_]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return Is(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return new this(e,t)}static makeOption(e,t){return Og(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(Wh(this.ast,e))}static annotateKey(e){return this.rebuild(eg(this.ast,e))}static check(...e){return this.rebuild(Kh(this.ast,e))}static extend(e){return(t,r)=>{let a=V_(t)?t:K(t),o={...n.fields,...a.fields},s=dh(o,n.ast.checks,{identifier:e});return L_(this,e,__(Kh(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function R_(e){return new _m(dm(t=>new e(t,{"~payload":{token:I_,value:t}})),um())}function z_(e){return`~effect/Schema/Class/${e}`}function B_(e,t,n){let r;return i=>{if(r!==void 0)return r;let a=z_(t),o=e=>e instanceof i||ic(e,a),s=R_(i);return r=k_(d_(new Lm([e.ast],()=>(e,t,n)=>o(e)?op(e):sp(new Bp(t,e,n)),{identifier:t,[xp]:([e])=>({isConstructed:o,link:new Mm(e,s)}),toCodec:([e])=>new Mm(e.ast,s),toArbitrary:([e])=>()=>({arbitrary:e.arbitrary.map(e=>new i(e)),terminal:e.terminal?.map(e=>new i(e))}),toFormatter:([e])=>t=>`${i.identifier}(${e(t)})`,[bp]:_h(e.ast),...n})),s)(e)}}function V_(e){return f_(e)}var H_=e=>(t,n)=>L_(Wl,e,V_(t)?t:K(t),n,e=>({name:e})),U_=e=>(t,n,r)=>{let i=V_(n)?n.mapFields(e=>({_tag:j_(t),...e}),{unsafePreserveChecks:!0}):M_(t,n);return H_(e??t)(i,r)},W_=new WeakMap,G_=new WeakMap,K_=new WeakMap;function q_(e,t){let n=r_(t=>Z_(t)&&W_.get(t)?.kind===e,{identifier:e===`text`?`RecordTextContent`:`RecordBytesContent`});return G_.set(n,Object.freeze({kind:e,maximumBytes:t})),G_.set(n.ast,Object.freeze({kind:e,maximumBytes:t})),K_.set(n.ast.run,Object.freeze({kind:e,maximumBytes:t})),n}var J_=q_(`text`,void 0),Y_=q_(`bytes`,void 0),X_=Object.freeze({maximumBytes(e){if(!Number.isSafeInteger(e)||e<0)throw TypeError(`Record content maximumBytes must be a non-negative safe integer`);return t=>{let n=G_.get(t);if(n===void 0)throw TypeError(`Record content maximumBytes requires a package-owned content declaration`);return q_(n.kind,e)}}});function Z_(e){return typeof e==`object`&&!!e&&W_.has(e)}var Q_=Object.freeze({entries:4096,groupDepth:16,displayCodePoints:256,jsonDepth:8,jsonObjectKeys:64,jsonArrayItems:256,stringBytes:8*1024,diagnosticDepth:2,diagnosticNodes:64,diagnosticBytes:64*1024,collectionDiagnosticCandidates:8}),$_=[`less-than`,`at-most`,`greater-than`,`at-least`],ev=`@niceeval/assertions/AssertionEntryId`,tv=64*1024;Object.freeze({errors:`all`,onExcessProperty:`error`});var nv=new TextEncoder,rv=/[\p{Cc}]/u,iv=/^ae_[a-z0-9]{20}$/,av=/^[\x21-\x7e]+$/;function ov(e){return nv.encode(e).byteLength}function sv(e){return Array.from(e).length}function cv(e){return ov(e)<=Q_.stringBytes}function lv(e){return!rv.test(e)&&sv(e)<=Q_.displayCodePoints}function uv(e){return ov(e)<=128&&av.test(e)}function dv(e){return Number.isFinite(e)&&Number.isInteger(e)&&e>=0}function fv(e){return Number.isFinite(e)&&e>=0}function pv(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function mv(e){return Object.keys(e).length<=Q_.jsonObjectKeys}function hv(e){return e.length<=Q_.jsonArrayItems}function gv(e){return iv.test(e)}function _v(e){try{let t=JSON.stringify(e);return typeof t==`string`&&ov(t)<=4194304}catch{return!1}}function vv(e){let t=new Set;for(let n of e.entries){if(t.has(n.entryId))return!1;t.add(n.entryId)}return!0}function yv(e){let t=e.coverage;return t.state===`complete`?e.limitations.length===0:t.state===`partial`?e.limitations.some(e=>e.kind===t.reason):!0}var bv=U.check($(cv,{identifier:`AssertionsBoundedJsonString`,description:`a UTF-8 string no longer than 8 KiB`})),xv=U.check($(lv,{identifier:`AssertionDisplayText`,description:`text without control characters and at most 256 code points`})),Sv=bv.check($(e=>e.length>0&&!rv.test(e),{identifier:`MatcherSourceIdentity`,description:`a non-empty bounded source identity without control characters`})),Cv=U.check($(uv,{identifier:`AssertionCriterionIdentifier`,description:`a non-empty printable ASCII identifier no longer than 128 bytes`})),wv=N_.check($(dv,{identifier:`AssertionNonNegativeInteger`,description:`a finite non-negative integer`})),Tv=N_.check($(e=>Number.isSafeInteger(e)&&e>0,{identifier:`AssertionPositiveInteger`,description:`a positive safe integer`})),Ev=N_.check($(e=>Number.isSafeInteger(e)&&e>=0,{identifier:`AssertionNonNegativeSafeInteger`,description:`a non-negative safe integer`})),Dv=N_.check($(fv,{identifier:`AssertionNonNegativeNumber`,description:`a finite non-negative number`}));function Ov(e){if(e===`0`)return!0;if(!/^[1-9][0-9]*$/.test(e))return!1;let t=Number(e);return Number.isSafeInteger(t)&&t>=0&&t<4294967295}function kv(e,t,n){if(e===null||typeof e==`boolean`)return!0;if(typeof e==`number`)return Number.isFinite(e);if(typeof e==`string`)return cv(e);if(typeof e!=`object`||t>=Q_.jsonDepth)return!1;try{if(n.has(e))return!1;if(n.add(e),Array.isArray(e)){if(Object.getPrototypeOf(e)!==Array.prototype||!hv(e))return!1;for(let t of Reflect.ownKeys(e)){if(t===`length`)continue;if(typeof t!=`string`||!Ov(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);if(n===void 0||!n.enumerable||!(`value`in n))return!1}for(let r=0;r<e.length;r+=1)if(!Object.prototype.hasOwnProperty.call(e,r)||!kv(e[r],t+1,n))return!1;return!0}let r=e;if(!pv(r)||!mv(r))return!1;for(let e of Reflect.ownKeys(r)){if(typeof e!=`string`||!cv(e))return!1;let i=Object.getOwnPropertyDescriptor(r,e);if(i===void 0||!i.enumerable||!(`value`in i)||!kv(i.value,t+1,n))return!1}return!0}catch{return!1}finally{n.delete(e)}}function Av(e){return kv(e,0,new WeakSet)}function jv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&kv(e,0,new WeakSet)}var Mv=D_(()=>J([h_,G,N_,bv,q(Mv),x_(bv,Mv)]).check($(Av,{identifier:`AssertionsBoundedJsonValue`,description:`a recursive JSON value within the Assertions limits`}))),Nv=Mv,Pv=x_(bv,Mv).check($(jv,{identifier:`AssertionsBoundedJsonObject`,description:`a recursive JSON object within the Assertions limits`})),Fv=U.check($(gv,{identifier:`AssertionEntryId`,description:`an attachment-local ae_ identifier with 20 lowercase base-36 characters`})).pipe(Q(ev)),Iv=K({key:B(xv),label:B(xv),groupPath:q(xv).check($(e=>e.length<=Q_.groupDepth,{identifier:`AssertionDisplayGroupPath`,description:`a group path no deeper than 16 segments`}))}),Lv=K({kind:H(`builtin`),id:Cv,data:Nv}),Rv=K({name:Cv,schemaId:Cv,data:Nv});J([Lv,Rv]);var zv=J([J([K({kind:H(`builtin`),id:H(`value-match/v1`),data:K({subject:H(`explicit-value`),matcher:J([K({state:H(`declared`),name:bv}),K({state:H(`unavailable`)})])})}),K({kind:H(`builtin`),id:H(`numeric-comparison/v1`),data:K({comparator:Y($_),threshold:N_,subject:J([K({kind:H(`explicit-value`)}),K({kind:H(`scope-metric`),metric:H(`tokens`),scope:Y([`turn`,`session`,`attempt`]),unit:H(`tokens`)}),K({kind:H(`scope-metric`),metric:H(`cost`),scope:Y([`turn`,`session`,`attempt`]),unit:H(`usd`)}),K({kind:H(`collection-cardinality`),collection:H(`tool-calls`),scope:Y([`turn`,`session`,`attempt`])})])})}),K({kind:H(`builtin`),id:H(`scope-status/v1`),data:K({scope:Y([`turn`,`session`,`attempt`]),assertion:Y([`succeeded`,`no-failed-actions`])})}),K({kind:H(`builtin`),id:H(`occurrence/v1`),data:K({scope:Y([`turn`,`session`,`attempt`]),occurrence:Y([`tool`,`skill`,`event`]),assertion:Y([`present`,`absent`,`count`,`order`]),matcher:B(bv),quantifier:B(J([K({kind:H(`absent`)}),K({kind:Y([`at-least`,`exact`]),count:Tv})]))})}),K({kind:H(`builtin`),id:H(`occurrence/v2`),data:K({scope:Y([`turn`,`session`,`attempt`]),occurrence:Y([`tool`,`skill`,`event`]),assertion:Y([`present`,`absent`,`count`,`order`]),matcher:B(bv),quantifier:B(J([K({kind:H(`absent`)}),K({kind:H(`exact`),count:Tv}),K({kind:Y([`at-least`,`less-than`,`at-most`,`greater-than`]),count:Ev})]))})}),K({kind:H(`builtin`),id:H(`judge-measurement/v1`),data:K({recipe:Y([`closed-qa`,`factuality`,`summarizes`]),scale:H(`unit-interval`)})}),J([K({kind:H(`builtin`),id:H(`sandbox-result/v1`),data:K({operation:H(`changed-paths`),paths:q(bv)})}),K({kind:H(`builtin`),id:H(`sandbox-result/v1`),data:K({operation:H(`no-changes`)})}),K({kind:H(`builtin`),id:H(`sandbox-result/v1`),data:K({operation:H(`file-changed`),path:bv,status:B(Y([`added`,`modified`,`deleted`])),before:B(bv),after:B(bv)})}),K({kind:H(`builtin`),id:H(`sandbox-result/v1`),data:K({operation:H(`file-deleted`),path:bv})}),K({kind:H(`builtin`),id:H(`sandbox-result/v1`),data:K({operation:H(`not-in-diff`),pattern:bv,flags:bv,content:Y([`added`,`removed`,`both`])})})]),K({kind:H(`builtin`),id:H(`direct-score/v1`),data:K({source:H(`author`)})})]),Rv]),Bv=J([K({state:H(`complete`)}),K({state:H(`partial`),reason:Y([`sampled`,`truncated`,`redacted`,`provider-limited`])}),K({state:H(`unavailable`),reason:Y([`not-collected`,`source-unavailable`,`producer-failed`])}),K({state:H(`not-applicable`),reason:Y([`optional-material`,`unsupported-subject`])})]),Vv=J([K({kind:H(`redacted`),fieldCount:wv}),K({kind:H(`sampled`),captured:wv,knownTotal:B(wv)}),K({kind:H(`truncated`),omittedBytes:wv}),K({kind:H(`provider-limited`)})]),Hv=K({state:H(`not-scored`)}),Uv=K({state:H(`earned`),points:Dv,earned:Dv}).check($(e=>e.earned<=e.points,{identifier:`AssertionEarnedScore`,description:`an earned score no greater than its points`})),Wv=K({state:H(`unavailable`),points:Dv,reason:Y([`source-unavailable`,`evaluation-errored`,`not-applicable`])});function Gv(e){return e.matched+e.mismatched+e.unavailable!==e.examined||e.knownTotal!==null&&e.examined>e.knownTotal||e.complete&&e.knownTotal===null?!1:!e.exhaustive||e.knownTotal!==null&&e.examined===e.knownTotal}var Kv=K({examined:wv,matched:wv,mismatched:wv,unavailable:wv,knownTotal:X(wv),complete:G,exhaustive:G,decisive:G}).check($(Gv,{identifier:`AssertionCollectionReceipt`,description:`a collection receipt whose counts and completion boundary agree`})),qv=D_(()=>J([K({kind:H(`unavailable`),reason:Y([`not-recorded`,`not-declared`,`source-unavailable`])}),K({kind:H(`value`),value:J([h_,G,N_,bv])}),K({kind:H(`text`),text:bv}),K({kind:H(`list`),items:q(qv)}),K({kind:H(`fields`),fields:q(K({label:bv,value:qv}))})])),Jv=J([K({state:H(`exact`)}),K({state:H(`unavailable`),reason:Y([`historical-not-recorded`,`source-unavailable`,`ambiguous`])})]),Yv=J([K({kind:H(`tool-occurrence`),toolOccurrenceId:Sv,relation:Jv}),K({kind:H(`event`),eventId:Sv,toolOccurrenceId:B(Sv),relation:Jv})]),Xv=q(K({locator:Yv,result:Y([`matched`,`mismatched`,`unavailable`,`not-evaluated`]),difference:B(qv)})).check($(e=>e.length<=8,{identifier:`MatcherRetainedRows`,description:`at most eight representative matcher rows`})),Zv=K({step:Tv,summary:qv}),Qv=K({family:H(`niceeval.agent-turns`),schemaVersion:Tv}),$v=Y([`complete`,`partial`,`unavailable`]),ey=K({scope:H(`turn`),sessionId:Sv,turnId:Sv,scopeId:Sv,throughSessionSequence:wv,source:Qv,collectionAtCut:$v}),ty=K({scope:H(`session`),sessionId:Sv,scopeId:Sv,throughSessionSequence:wv,source:Qv,collectionAtCut:$v}),ny=J([ey,ty,K({scope:H(`attempt`),scopeId:Sv,sessions:q(K({sessionId:Sv,throughSessionSequence:wv})).check($(e=>e.every((t,n)=>n===0||e[n-1].sessionId<t.sessionId),{identifier:`MatcherAttemptVectorCut`,description:`a unique vector cut in canonical session identity order`})),source:Qv,collectionAtCut:$v})]),ry=K({sourceRows:wv,comparisons:wv,unavailableComparisons:wv,definitePrefixLength:wv,possiblePrefixLength:wv,stepReceipts:q(K({step:Tv,comparisons:wv,matched:wv,mismatched:wv,unavailable:wv}).check($(e=>e.matched+e.mismatched+e.unavailable===e.comparisons,{identifier:`MatcherOrderStepReceipt`,description:`an order step receipt whose result counts equal its comparisons`}))),complete:G,exhaustive:G,decisive:G}),iy=K({step:Tv,locator:Yv,sessionId:Sv,sessionSequence:Tv,result:Y([`matched`,`unavailable`])}),ay=K({longestDefinitePrefix:q(iy),longestPossiblePrefix:q(iy),firstBlockingStep:Tv,suffixChecked:Kv,representatives:Xv});function oy(e,t,n,r){if(e.length!==n)return!1;let i=0;for(let[n,a]of e.entries()){if(a.step!==n+1||a.sessionId!==t.sessionId||a.sessionSequence<=i||a.sessionSequence>t.throughSessionSequence||r===`matched`&&a.result!==`matched`||a.result===`matched`&&a.locator.relation.state!==`exact`)return!1;i=a.sessionSequence}return!0}function sy(e){let t=e.querySteps.length,n=e.receipt;if(e.querySteps.some((e,t)=>e.step!==t+1)||n.stepReceipts.length!==t||n.stepReceipts.some((e,t)=>e.step!==t+1)||n.definitePrefixLength>n.possiblePrefixLength||n.possiblePrefixLength>t||n.comparisons!==n.stepReceipts.reduce((e,t)=>e+t.comparisons,0)||n.unavailableComparisons!==n.stepReceipts.reduce((e,t)=>e+t.unavailable,0)||n.complete!==(e.sourceSnapshot.collectionAtCut===`complete`)||n.stepReceipts.some(e=>e.comparisons>n.sourceRows)||n.stepReceipts.some((e,t)=>t>0&&e.comparisons!==n.stepReceipts[0].comparisons)||n.exhaustive&&n.stepReceipts.some(e=>e.comparisons!==n.sourceRows))return!1;switch(e.result.state){case`matched`:return n.definitePrefixLength===t&&n.possiblePrefixLength===t&&n.decisive&&oy(e.result.witnessPath,e.sourceSnapshot,t,`matched`);case`mismatched`:{let r=e.result.failureFrontier;return n.complete&&n.exhaustive&&n.decisive&&n.possiblePrefixLength<t&&r.firstBlockingStep===n.possiblePrefixLength+1&&r.suffixChecked.complete&&r.suffixChecked.exhaustive&&r.suffixChecked.decisive&&r.suffixChecked.knownTotal===r.suffixChecked.examined&&r.suffixChecked.matched===0&&r.suffixChecked.unavailable===0&&oy(r.longestDefinitePrefix,e.sourceSnapshot,n.definitePrefixLength,`matched`)&&oy(r.longestPossiblePrefix,e.sourceSnapshot,n.possiblePrefixLength,`possible`)}case`unavailable`:return e.result.reason.length>0&&!n.decisive}}var cy=K({kind:H(`collection-filter`),sourceSnapshot:ny,query:Zv,receipt:Kv,retainedRows:Xv}).check($(e=>e.query.step===1&&e.receipt.knownTotal!==null&&e.receipt.complete===(e.sourceSnapshot.collectionAtCut===`complete`),{identifier:`MatcherCollectionFilterArtifact`,description:`a collection matcher artifact with one query and a matching source cut`})),ly=J([K({state:H(`matched`),witnessPath:q(iy)}),K({state:H(`mismatched`),failureFrontier:ay}),K({state:H(`unavailable`),reason:Sv})]),uy=K({kind:H(`ordered-sequence`),sourceSnapshot:J([ey,ty]),querySteps:q(Zv).check($(e=>e.length>=2&&e.length<=64,{identifier:`MatcherOrderQuerySteps`,description:`between two and 64 ordered matcher query steps`})),receipt:ry,result:ly,retainedRows:Xv}).check($(sy,{identifier:`MatcherOrderedSequenceArtifact`,description:`an ordered matcher artifact with consistent receipts, paths, and cut`}));function dy(e){try{return ov(JSON.stringify(e))<=tv}catch{return!1}}var fy=J([cy,uy]).check($(dy,{identifier:`MatcherQueryArtifactSize`,description:`a matcher query artifact no larger than 64 KiB`})),py=J([K({kind:H(`boolean`),expected:H(!0)}),K({kind:H(`at-least`),threshold:Dv}),K({kind:H(`record-only`)})]),my=K({requirement:J([K({state:H(`available`),value:Y([`required`,`optional`])}),K({state:H(`unavailable`),reason:H(`not-recorded`)})]),condition:J([K({state:H(`available`),value:py}),K({state:H(`unavailable`),reason:H(`not-recorded`)})])});J([K({state:H(`matched`),gate:Y([`not-gate`,`satisfied`]),score:J([Hv,Uv]),diagnostic:B(Pv),receipt:B(Kv)}),K({state:H(`mismatched`),reason:H(`condition-not-met`),gate:Y([`not-gate`,`failed`]),score:J([Hv,Uv]),diagnostic:B(Pv),receipt:B(Kv)}),K({state:H(`unavailable`),reason:Y([`evidence-unavailable`,`source-unavailable`,`redacted`]),gate:Y([`not-gate`,`unavailable`]),score:J([Hv,Wv]),diagnostic:B(Pv),receipt:B(Kv)}),K({state:H(`errored`),reason:Y([`evaluator-failed`,`producer-interrupted`,`invalid-subject`]),gate:Y([`not-gate`,`unavailable`]),score:J([Hv,Wv]),diagnostic:B(Pv),receipt:B(Kv)}),K({state:H(`not-applicable`),reason:H(`coverage-not-applicable`),gate:Y([`not-gate`,`not-applicable`]),score:J([Hv,Wv]),diagnostic:B(Pv),receipt:B(Kv)})]);function hy(e){let t=q(e),n=q(V(Vv)),r=K({source:e,evidence:t,coverage:V(Bv),limitations:n}).check($(e=>yv(e),{identifier:`AssertionCoverageLimitations`,description:`coverage and limitations with a consistent sealed relationship`})),i=K({observed:V(qv),receipt:B(V(Kv))}),a=J([K({kind:H(`ordinary`),observed:V(qv),receipt:B(V(Kv))}),K({kind:H(`matcher-current`),observed:V(qv),artifact:V(fy),receipt:B(m_)}),K({kind:H(`matcher-legacy`),observed:V(qv),reason:H(`historical-not-recorded`),legacyDiagnostic:B(V(qv)),receipt:B(m_)})]),o=K({result:Y([`matched`,`mismatched`,`unavailable`,`errored`,`not-applicable`]),reason:X(Y([`condition-not-met`,`evidence-unavailable`,`source-unavailable`,`redacted`,`evaluator-failed`,`producer-interrupted`,`invalid-subject`,`coverage-not-applicable`])),gate:Y([`not-gate`,`satisfied`,`failed`,`unavailable`,`not-applicable`])}),s=J([K({state:H(`retained`),value:V(qv)}),K({state:H(`unavailable`),reason:H(`not-recorded`)})]),c=K({entryId:V(Fv),display:V(Iv),criterion:J([K({state:H(`available`),value:V(Pv)}),K({state:H(`unavailable`),reason:H(`not-recorded`)})]),materials:r,evaluation:i,decision:o,policy:V(my),contribution:J([V(Hv),V(Uv),V(Wv)]),explanationRetention:s}),l=K({entryId:V(Fv),display:V(Iv),criterion:J([K({state:H(`available`),value:V(Pv)}),K({state:H(`unavailable`),reason:H(`not-recorded`)})]),materials:r,evaluation:a,decision:o,policy:V(my),contribution:J([V(Hv),V(Uv),V(Wv)]),explanationRetention:s}).check($(e=>e.evaluation.kind===`ordinary`||e.explanationRetention.state===`unavailable`,{identifier:`MatcherExplanationOwnership`,description:`matcher artifacts and legacy diagnostics are not duplicated in explanation retention`})),u=q(c).check($(e=>e.length<=Q_.entries,{identifier:`AssertionsEntryCount`,description:`at most 4,096 assertion entries`})),d=q(l).check($(e=>e.length<=Q_.entries,{identifier:`AssertionsEntryCount`,description:`at most 4,096 assertion entries`})),f=K({entries:d}).check($(vv,{identifier:`AssertionsUniqueEntryIds`,description:`unique attachment-local assertion entry IDs`}),$(_v,{identifier:`AssertionsDocumentSize`,description:`a JSON document no larger than 4 MiB`})),p=K({entryId:V(Fv),display:V(Iv),criterion:J([K({state:H(`available`),value:V(zv)}),K({state:H(`unavailable`),reason:H(`not-recorded`)})]),materials:r,evaluation:a,decision:o,policy:V(my),contribution:J([V(Hv),V(Uv),V(Wv)]),explanationRetention:s}),m=K({entries:q(p).check($(e=>e.length<=Q_.entries,{identifier:`AssertionsEntryCount`,description:`at most 4,096 assertion entries`}))}).check($(vv,{identifier:`AssertionsUniqueEntryIds`,description:`unique attachment-local assertion entry IDs`}),$(_v,{identifier:`AssertionsDocumentSize`,description:`a JSON document no larger than 4 MiB`}));return Object.freeze({material:e,entry:p,entries:d,historicalV2Entries:u,outerDocument:f,document:m})}Object.freeze({code:`assertions-document-invalid`});var gy=/^@1[0-9A-HJKMNP-TV-Z]{12}$/;U.pipe(O_(e=>gy.test(e),{identifier:`AttemptLocator`,description:`a canonical @-prefixed Attempt locator`})),new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);var _y=`@niceeval/record/RecordId`,vy=`@niceeval/record/RunId`,yy=`@niceeval/record/SlotId`,by=`@niceeval/record/AttemptId`,xy=`@niceeval/record/UtcMillis`,Sy=`@niceeval/record/RecordAttachmentName`,Cy=`@niceeval/record/RecordAttachmentSchemaId`,wy=`@niceeval/record/RecordFormatId`,Ty=`@niceeval/record/ExperimentId`,Ey=`@niceeval/record/EvalId`,Dy=`@niceeval/record/ExecutionIdentityDigest`,Oy=`@niceeval/record/Sha256Digest`,ky=`@niceeval/record/SourceItemId`,Ay=`@niceeval/record/FileChangeId`,jy=`@niceeval/record/ArtifactId`,My=`@niceeval/record/RecordBlobKey`,Ny=`@niceeval/record/SourceSegmentId`,Py=`@niceeval/record/CanonicalRunRelativePath`,Fy=`@niceeval/record/CanonicalProjectRelativePath`,Iy=`niceeval.record.attachments`,Ly=/^[A-Za-z0-9](?:[A-Za-z0-9._-]{0,253}[A-Za-z0-9])?$/,Ry=/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,zy=`[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?`,By=RegExp(`^(?:${zy}\\.)+${zy}$`),Vy=/^niceeval\.record\.attachments$/,Hy=/^[a-f0-9]{64}$/;function Uy(e){return Ly.test(e)&&!Ry.test(e)}function Wy(e,t){return e===t?0:e<t?-1:1}function Gy(e){return Number.isSafeInteger(e)&&e>=0}function Ky(e){return e.length>0&&e.length<=1024&&!/[\u0000-\u001f\u007f]/.test(e)}function qy(e){return Hy.test(e)}function Jy(e){return Uy(e)}function Yy(e){return/^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$/.test(e)}function Xy(e){return e.length>0&&e.length<=4096&&!e.startsWith(`/`)&&!e.startsWith(`\\`)&&!e.includes(`\\`)&&e.split(`/`).every(Uy)}function Zy(e){return e.length>0&&e.length<=4096&&!e.startsWith(`/`)&&!e.startsWith(`\\`)&&!e.includes(`\\`)&&!/[\u0000-\u001f\u007f]/.test(e)&&e.split(`/`).every(e=>e.length>0&&e!==`.`&&e!==`..`)}function Qy(e){return e.length<=255&&Uy(e)&&By.test(e)}function $y(e){return Qy(e)?{name:e,version:`1`}:void 0}function eb(e){let t=$y(e);return t!==void 0&&Qy(t.name)}function tb(e){return Vy.test(e)}var nb=U.check($(Uy,{identifier:`RecordPortableSegment`,description:`an ASCII portable file-name segment without path separators or reserved device names`})),rb=nb.pipe(Q(_y)),ib=nb.pipe(Q(vy)),ab=nb.pipe(Q(yy)),ob=nb.pipe(Q(by)),sb=U.check($(Ky,{identifier:`RecordDomainIdentity`,description:`a bounded durable identity without control characters`})),cb=sb.pipe(Q(Ty)),lb=sb.pipe(Q(Ey)),ub=U.check($(qy,{identifier:`ExecutionIdentityDigest`,description:`a lowercase hexadecimal SHA-256 execution identity digest`})).pipe(Q(Dy)),db=U.check($(qy,{identifier:`Sha256Digest`,description:`a lowercase hexadecimal SHA-256 digest`})).pipe(Q(Oy)),fb=nb.pipe(Q(ky)),pb=nb.pipe(Q(Ay)),mb=nb.pipe(Q(jy)),hb=U.check($(Jy,{identifier:`RecordBlobKey`,description:`an opaque portable Attachment blob key`})).pipe(Q(My));U.check($(Yy,{identifier:`SourceSegmentId`,description:`a bounded opaque source receipt segment identity`})).pipe(Q(Ny)),U.check($(Xy,{identifier:`CanonicalRunRelativePath`,description:`a slash-separated portable path inside one sealed Run`})).pipe(Q(Py));var gb=U.check($(Zy,{identifier:`CanonicalProjectRelativePath`,description:`a slash-separated project-relative path without dot segments`})).pipe(Q(Fy)),_b=W.check($(Gy,{identifier:`UtcMillis`,description:`a non-negative JSON-safe Unix-epoch millisecond value`})).pipe(Q(xy));U.check($(Qy,{identifier:`RecordAttachmentName`,description:`a lowercase reverse-domain portable Attachment name`})).pipe(Q(Sy)),U.check($(eb,{identifier:`RecordAttachmentSchemaId`,description:`a RecordAttachment name followed by /vN`})).pipe(Q(Cy)),U.check($(tb,{identifier:`RecordFormatId`,description:`the current generic Attachment Record format identity`})).pipe(Q(wy));var vb=Y([Iy]).pipe(Q(wy)),yb=new TextEncoder,bb=Object.freeze({"$niceeval.record.blob-ref":!0});function xb(e,t,n){e.failure===void 0&&(e.failure=Object.freeze({code:t,path:Object.freeze([...n])}))}function Sb(e,t){if(e===t)return 0;let n=yb.encode(e),r=yb.encode(t),i=Math.min(n.byteLength,r.byteLength);for(let e=0;e<i;e+=1){let t=n[e]-r[e];if(t!==0)return t}return n.byteLength-r.byteLength}function Cb(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(t+1>=e.length||n<56320||n>57343)return!1;t+=1}else if(n>=56320&&n<=57343)return!1}return!0}function wb(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Tb(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(!(n===void 0||!(`value`in n)||n.enumerable!==!0))return Object.freeze({value:n.value})}function Eb(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(!(n===void 0||!(`value`in n)))return Object.freeze({value:n.value})}function Db(e,t,n,r,i){if(t>r.maximumDepth||(i.nodes+=1,i.nodes>r.maximumNodes))return xb(i,`record-json-limit-exceeded`,n),!1;if(typeof e==`string`){if(!Cb(e))return xb(i,`record-json-invalid`,n),!1;if(yb.encode(e).byteLength>r.maximumStringUtf8Bytes)return xb(i,`record-json-limit-exceeded`,n),!1}return!0}function Ob(e,t,n,r){let i=Reflect.ownKeys(e);if(i.some(e=>typeof e!=`string`))return xb(r,`record-json-invalid`,t);if(i.length>n.maximumObjectKeys)return xb(r,`record-json-limit-exceeded`,t);let a=i;for(let e of a){if(!Cb(e))return xb(r,`record-json-invalid`,[...t,e]);if(e.length===0||yb.encode(e).byteLength>n.maximumKeyUtf8Bytes)return xb(r,`record-json-limit-exceeded`,[...t,e])}return Object.freeze([...a].sort(Sb))}function kb(e){let t=Object.create(null);for(let[n,r]of e)Object.defineProperty(t,n,{configurable:!1,enumerable:!0,value:r,writable:!1});return Object.freeze(t)}function Ab(e,t,n,r,i,a){if(e.length>r.maximumArrayItems)return xb(a,`record-json-limit-exceeded`,n);let o=new Set([`length`]);for(let t=0;t<e.length;t+=1)o.add(String(t));let s=Reflect.ownKeys(e);if(s.length!==o.size||s.some(e=>typeof e!=`string`||!o.has(e)))return xb(a,`record-json-invalid`,n);let c=Eb(e,`length`);if(c===void 0||c.value!==e.length)return xb(a,`record-json-invalid`,n);let l=[];for(let o=0;o<e.length;o+=1){let s=Tb(e,String(o));if(s===void 0)return xb(a,`record-json-invalid`,[...n,String(o)]);let c=Mb(s.value,t+1,[...n,String(o)],r,i,a);if(c===void 0)return;l.push(c)}return Object.freeze(l)}function jb(e,t,n,r,i,a){let o=Ob(e,n,r,a);if(o===void 0)return;let s=[];for(let c of o){let o=Tb(e,c);if(o===void 0)return xb(a,`record-json-invalid`,[...n,c]);let l=Mb(o.value,t+1,[...n,c],r,i,a);if(l===void 0)return;s.push([c,l])}return kb(s)}function Mb(e,t,n,r,i,a){if(Db(e,t,n,r,a)){if(e===null||typeof e==`boolean`||typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)&&!Object.is(e,-0)?e:xb(a,`record-json-invalid`,n);if(typeof e!=`object`)return xb(a,`record-json-invalid`,n);try{if(i.isBlobRef?.(e))return e;if(a.ancestors.has(e))return xb(a,`record-json-invalid`,n);a.ancestors.add(e);try{return Array.isArray(e)?Ab(e,t,n,r,i,a):wb(e)?jb(e,t,n,r,i,a):xb(a,`record-json-invalid`,n)}finally{a.ancestors.delete(e)}}catch{return xb(a,`record-json-invalid`,n)}}}function Nb(e,t){if(e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return e;if(typeof e!=`object`)return;if(t.isBlobRef?.(e))return bb;if(Array.isArray(e)){let n=[];for(let r of e){let e=Nb(r,t);if(e===void 0)return;n.push(e)}return Object.freeze(n)}if(!wb(e))return;let n=[];for(let r of Object.keys(e).sort(Sb)){let i=Nb(e[r],t);if(i===void 0)return;n.push([r,i])}return kb(n)}function Pb(e){let t=JSON.stringify(e);return t===void 0?void 0:yb.encode(t).byteLength}function Fb(e,t,n={}){let r={nodes:0,ancestors:new WeakSet,failure:void 0},i=Mb(e,0,[],t,n,r);if(i===void 0)return Ju(r.failure??Object.freeze({code:`record-json-invalid`,path:Object.freeze([])}));let a=Nb(i,n),o=a===void 0?void 0:Pb(a);return o===void 0||o>t.maximumJsonBytes?Ju(Object.freeze({code:`record-json-limit-exceeded`,path:Object.freeze([])})):qu(i)}var Ib=Object.freeze({errors:`all`,exact:!0,onExcessProperty:`error`}),Lb=Object.freeze({kind:`schema`,issues:Object.freeze([])});function Rb(e){try{let t=Yp()(e.issue).issues.map(e=>Object.freeze({path:Object.freeze((e.path??[]).map(e=>typeof e==`object`&&e&&`key`in e?e.key:e)),message:e.message}));return Object.freeze({kind:`schema`,issues:Object.freeze(t)})}catch{return Lb}}function zb(e){if(e.cause.reasons.length===1){let[t]=e.cause.reasons;if(t!==void 0&&Af(t)&&o_(t.error))return Rb(t.error)}throw e.cause}function Bb(e){return Object.freeze({kind:`canonical`,failure:e})}function Vb(e){for(let[t,n]of Object.entries(e))if(!Number.isSafeInteger(n)||n<=0)throw TypeError(`Record schema limit ${t} must be a positive safe integer`);return Object.freeze({...e})}function Hb(e){return e===null||typeof e==`boolean`||typeof e==`string`||typeof e==`number`&&Number.isFinite(e)&&!Object.is(e,-0)}function Ub(e,t){if(e.context?.isOptional!==!0)return Kb(e,t);if(e._tag===`Never`)return!0;if(e._tag!==`Union`)return Kb(e,t);let n=!1;for(let r of e.types){if(r._tag===`Undefined`||r._tag===`Never`){n=!0;continue}if(!Kb(r,t))return!1}return n}function Wb(e,t){return e.propertySignatures.every(e=>typeof e.name==`string`&&e.name.length>0&&Ub(e.type,t))&&e.indexSignatures.every(e=>e.parameter._tag===`String`&&Ub(e.type,t))}function Gb(e,t){if(e.encoding===void 0)return!0;if(e._tag!==`Objects`||e.encoding.length!==1)return!1;let n=e.encoding[0];return n.transformation._tag!==`Transformation`||n.to._tag!==`Objects`||e.propertySignatures.length!==n.to.propertySignatures.length||e.indexSignatures.length!==n.to.indexSignatures.length?!1:Wb(n.to,t)}function Kb(e,t){let n=t.states.get(e);if(n===`allowed`||n===`pending`)return!0;if(n===`rejected`)return!1;t.states.set(e,`pending`);let r;try{switch(e._tag){case`Literal`:r=Hb(e.literal);break;case`Null`:case`String`:case`Number`:case`Boolean`:r=!0;break;case`Objects`:r=Wb(e,t);break;case`Arrays`:r=e.elements.every(e=>Kb(e,t))&&e.rest.every(e=>Kb(e,t));break;case`Union`:r=e.types.every(e=>Kb(e,t));break;case`Suspend`:r=Kb(e.thunk(),t);break;case`Declaration`:r=t.declarations.has(e)||t.getAttachmentDeclaration?.(e)!==void 0;break;default:r=!1;break}}catch{r=!1}return r&&=Gb(e,t),!r&&t.failure===void 0&&(t.failure=e._tag),t.states.set(e,r?`allowed`:`rejected`),r}function qb(e){let t=[...e.attachmentDeclarations??[],...e.blobRef===void 0?[]:[{schema:e.blobRef.schema,isValue:e.blobRef.isBlobRef}]];if(t.some(e=>e.schema.ast._tag!==`Declaration`))throw TypeError(`Record Attachment opaque values must be Effect Schema Declarations`);let n={declarations:new Set(t.map(e=>e.schema.ast)),getAttachmentDeclaration:e.getAttachmentDeclaration,states:new WeakMap,failure:void 0};if(!Kb(e.schema.ast,n))throw TypeError(`Record schema may contain only canonical JSON nodes, Schema.encodeKeys transformations, and its minted Attachment BlobRef (rejected ${n.failure??`AST`})`)}function Jb(e,t,n,r=new WeakSet){if(r.has(e))return;r.add(e);let i=t.attachmentDeclarations?.find(t=>t.schema.ast===e)?.metadata,a=t.getAttachmentDeclaration?.(e);if(i!==void 0||a!==void 0){n.push(i??a?.metadata);return}switch(e._tag){case`Objects`:for(let i of e.propertySignatures)Jb(i.type,t,n,r);for(let i of e.indexSignatures)Jb(i.type,t,n,r);break;case`Arrays`:for(let i of e.elements)Jb(i,t,n,r);for(let i of e.rest)Jb(i,t,n,r);break;case`Union`:for(let i of e.types)Jb(i,t,n,r);break;case`Suspend`:Jb(e.thunk(),t,n,r);break}}function Yb(e,t,n=new WeakSet){if(typeof e!=`object`||!e||t?.(e)===!0||n.has(e))return e;n.add(e);for(let r of Object.values(Object.getOwnPropertyDescriptors(e)))`value`in r&&Yb(r.value,t,n);return Object.freeze(e),e}function Xb(e){qb(e);let t=Vb(e.limits),n=[...e.attachmentDeclarations??[],...e.blobRef===void 0?[]:[{schema:e.blobRef.schema,isValue:e.blobRef.isBlobRef}]],r=n.length===0?{}:{isBlobRef:t=>n.some(e=>e.isValue(t))||e.isAttachmentOpaque?.(t)!==void 0},i=s_(e.schema,Ib),a=u_(e.schema,Ib),o=s_(V(e.schema),Ib),s=[];Jb(e.schema.ast,e,s);let c=e=>{let n=Fb(e,t,r);return Yu(n)?Ju(Bb(n.failure)):qu(n.success)},l=(t,r,i)=>{let a=t=>{let r=n.find(e=>e.schema.ast===t);return r===void 0?e.getAttachmentDeclaration?.(t):{metadata:`metadata`in r?r.metadata:void 0}},o=new WeakMap,s=(e,t)=>{let n=a(e);if(n!==void 0){let e=r(t,n.metadata);return e._tag===`matched`?{matched:!0,value:e.value}:{matched:!1,value:t}}if(typeof t!=`object`||!t)return{matched:!1,value:t};let i=o.get(t)?.get(e);if(i!==void 0)return{matched:!1,value:i};switch(e._tag){case`Suspend`:return s(e.thunk(),t);case`Objects`:{let n={...t},r=o.get(t)??new WeakMap;r.set(e,n),o.set(t,r);let i=!1;for(let r of e.propertySignatures){if(typeof r.name!=`string`)continue;let e=Object.getOwnPropertyDescriptor(t,r.name);if(e!==void 0&&`value`in e){let t=s(r.type,e.value);i||=t.matched,n[r.name]=t.value}}return i?{matched:!0,value:n}:{matched:!1,value:t}}case`Arrays`:{if(!Array.isArray(t))return{matched:!1,value:t};let n=[...t],r=o.get(t)??new WeakMap;r.set(e,n),o.set(t,r);let i=!1;for(let r=0;r<e.elements.length;r+=1){let a=s(e.elements[r],t[r]);i||=a.matched,n[r]=a.value}if(e.rest.length>0)for(let r=e.elements.length;r<t.length;r+=1){let a=s(e.rest[0],t[r]);i||=a.matched,n[r]=a.value}return i?{matched:!0,value:n}:{matched:!1,value:t}}case`Union`:for(let n of e.types){let e=s(n,t);if(e.matched)return e}return{matched:!1,value:t};default:return{matched:!1,value:t}}};return s(i===`type`?e.schema.ast:fg(e.schema.ast),t).value};return Object.freeze({schema:e.schema,limits:t,opaqueDeclarationMetadata:Object.freeze(s),decode:e=>{let t=c(e);if(Yu(t))return Ju(t.failure);let n=i(t.success);if(Lf(n))return Ju(zb(n));let a=o(n.value);if(Lf(a))return Ju(zb(a));let s=c(a.value);if(Yu(s))return Ju(s.failure);let l=o(s.success);return Lf(l)?Ju(zb(l)):qu(Yb(l.value,r.isBlobRef))},enumerateOpaque:t=>{let r=[],i=new WeakMap,a=t=>{let r=n.find(e=>e.schema.ast===t);return r===void 0?e.getAttachmentDeclaration?.(t):{metadata:`metadata`in r?r.metadata:void 0,accepts:r.isValue}},o=(e,t)=>{let n=a(e);if(n!==void 0){typeof t==`object`&&t&&n.accepts(t)&&r.push(Object.freeze({value:t,metadata:n.metadata}));return}if(typeof t!=`object`||!t)return;let s=i.get(t)??new WeakSet;if(!s.has(e))switch(s.add(e),i.set(t,s),e._tag){case`Suspend`:o(e.thunk(),t);return;case`Objects`:for(let n of e.propertySignatures){if(typeof n.name!=`string`)continue;let e=Object.getOwnPropertyDescriptor(t,n.name);e!==void 0&&`value`in e&&o(n.type,e.value)}return;case`Arrays`:if(!Array.isArray(t))return;for(let n=0;n<e.elements.length;n+=1)o(e.elements[n],t[n]);if(e.rest.length>0)for(let n=e.elements.length;n<t.length;n+=1)o(e.rest[0],t[n]);return;case`Union`:for(let n of e.types)o(n,t);return}};return o(e.schema.ast,t),Object.freeze(r)},mapOpaque:(e,t)=>l(e,t,`type`),mapOpaqueEncoded:(e,t)=>l(e,t,`encoded`),encode:e=>{let t=c(e);if(Yu(t))return Ju(t.failure);let n=a(t.success);return Lf(n)?Ju(zb(n)):c(n.value)}})}var Zb=w_(K({code:Y(`record-schema-invalid.record-run-time-order-invalid.record-run-context-invalid.record-run-context-size-exceeded.record-run-context-experiment-mismatch.record-run-order-invalid.record-expected-slot-order-invalid.record-expected-slot-duplicate.record-run-duplicate.record-member-slot-order-invalid.record-member-slot-duplicate.record-member-slot-unexpected.record-member-slot-missing.record-member-action-invalid.record-attempt-order-invalid.record-attempt-duplicate.record-attempt-owner-invalid.record-attempt-slot-unexpected.record-attempt-slot-mismatch.record-attempt-eval-mismatch.record-attempt-digest-mismatch.record-attempt-reference-missing.record-origin-member-missing.record-origin-member-duplicate.record-attachment-schema-id-mismatch.record-fixed-family-owner-invalid`.split(`.`)),path:q(U)}));function Qb(e,t=[]){return Object.freeze({code:e,path:Object.freeze([...t])})}function $b(e){let[t,...n]=e;if(t===void 0)return;let r=[t,...n];return Object.freeze(r)}var ex=Y([`record`,`run`,`member`,`attempt`,`attachment-envelope`,`record-core`]),tx=Y([`record-schema-invalid`,`record-invariant-invalid`]);U_()(`RecordCodecError`,{code:tx,document:ex,issues:Zb}),U_()(`RecordCoreInvalid`,{code:H(`record-core-invalid`),issues:Zb}),U_()(`RecordReferenceInvalid`,{code:H(`record-reference-invalid`)}),U_()(`RecordAttachmentEnvelopeInvalid`,{code:H(`record-attachment-envelope-invalid`),issues:Zb});function nx(e){let t=Xb({schema:e.schema,limits:e.limits});return Object.freeze({...t,kind:`core`})}var rx=[`completed`,`errored`,`cancelled`,`interrupted`],ix=[`executed`,`carried`,`accepted`,`not-dispatched`,`interrupted`],ax=[`executed`,`carried`,`accepted`],ox=[`not-dispatched`,`interrupted`],sx=`niceeval.record-attachment`,cx=[`run`,`attempt`];function lx(e){return`${e.originRunId}\u0000${e.attemptId}`}var ux=`niceeval.run/v1`,dx=W.pipe(Z($(e=>Number.isSafeInteger(e)&&e>=0))),fx=Y([`active`,`completed`,`interrupted`,`failed`]),px=Y([`early-exit-satisfied`,`budget-exhausted`,`stopped-by-failure`,`interrupted-before-publication`,`dispatch-failed`]),mx=K({state:H(`pending`)}),hx=K({state:H(`published`),action:Y([`executed`,`carried`,`accepted`]),attemptId:U,attemptLocator:U,originRunId:U,originSlotId:U}),gx=K({state:H(`absent`),reason:px}),_x=K({slotId:U,evalId:U,attemptOrdinal:dx,executionIdentityDigest:U,publication:J([mx,hx,gx])}),vx=K({published:dx,expected:dx,missing:dx}),yx=K({runId:U,invocationId:U,experimentId:U,state:fx,startedAt:U,completedAt:B(U),coverage:vx}),bx=yx.pipe(v_({slots:q(_x)}));K({identity:U,revision:dx}),J([K({protocol:H(ux),operation:H(`run.list`),runs:q(yx),continuation:B(U)}),K({protocol:H(ux),operation:H(`run.get`),run:bx})]);var xx=Object.freeze({maximumJsonBytes:256*1024,maximumDepth:8,maximumNodes:4096,maximumObjectKeys:64,maximumArrayItems:256,maximumKeyUtf8Bytes:256,maximumStringUtf8Bytes:8*1024}),Sx=D_(()=>J([h_,G,W,U,q(Sx),x_(U,Sx)])),Cx=x_(U,Sx),wx=nx({schema:K({experimentId:cb,execution:K({agentId:U.pipe(Z(P_(1))),model:X(U),reasoningEffort:X(U),flags:Cx}),labels:x_(U,U)}),limits:xx}),Tx=wx.schema;function Ex(e){let t=$b([e.kind===`canonical`?Qb(e.failure.code===`record-json-limit-exceeded`?`record-run-context-size-exceeded`:`record-run-context-invalid`,e.failure.path):Qb(`record-run-context-invalid`)]);if(t===void 0)throw Error(`Run context failure must contain one issue`);return t}function Dx(e){let t=wx.decode(e);return Yu(t)?Ju(Ex(t.failure)):qu(t.success)}function Ox(e){let t=Dx(e);return Yu(t)?t.failure:Object.freeze([])}function kx(e,t,n){for(let r of n)e.push(Qb(r.code,[...t,...r.path]))}function Ax(e,t){return e===void 0||Wy(e,t)<0}function jx(e){let t=[],n=new Set,r=new Set,i;for(let[a,o]of e.entries()){let e=[`expectedSlots`,String(a),`slotId`];Ax(i,o.slotId)||t.push(Qb(i===o.slotId?`record-expected-slot-duplicate`:`record-expected-slot-order-invalid`,e)),n.has(o.slotId)&&i!==o.slotId&&t.push(Qb(`record-expected-slot-duplicate`,e));let s=`${o.evalId}\u0000${String(o.attemptOrdinal)}`;r.has(s)&&t.push(Qb(`record-expected-slot-duplicate`,[`expectedSlots`,String(a),`attemptOrdinal`])),n.add(o.slotId),r.add(s),i=o.slotId}return Object.freeze(t)}function Mx(e){let t=[];e.completedAt<e.startedAt&&t.push(Qb(`record-run-time-order-invalid`,[`completedAt`])),kx(t,[`context`],Ox(e.context));let n=Dx(e.context);return Xu(n)&&n.success.experimentId!==e.experimentId&&t.push(Qb(`record-run-context-experiment-mismatch`,[`context`,`experimentId`])),kx(t,[],jx(e.expectedSlots)),Object.freeze(t)}function Nx(e){return(e.action===`executed`||e.action===`carried`||e.action===`accepted`)==(e.attempt!==null)?Object.freeze([]):Object.freeze([Qb(`record-member-action-invalid`,[`attempt`])])}function Px(e){return Object.freeze([])}function Fx(e){return[`runs`,String(e)]}function Ix(e,t){return[...Fx(e),`members`,String(t)]}function Lx(e,t){return[...Fx(e),`attempts`,String(t)]}function Rx(e){return lx(e)}function zx(e){return new Map(e.expectedSlots.map(e=>[e.slotId,e]))}function Bx(e,t){return e.slotId===t.slotId&&e.evalId===t.evalId&&e.attemptOrdinal===t.attemptOrdinal&&e.executionIdentityDigest===t.executionIdentityDigest}function Vx(e,t,n){let r=zx(e.run),i=new Set,a;for(let[o,s]of e.members.entries()){let e=Ix(t,o);kx(n,e,Nx(s)),Ax(a,s.slotId)||n.push(Qb(a===s.slotId?`record-member-slot-duplicate`:`record-member-slot-order-invalid`,[...e,`slotId`])),i.has(s.slotId)&&a!==s.slotId&&n.push(Qb(`record-member-slot-duplicate`,[...e,`slotId`])),r.has(s.slotId)||n.push(Qb(`record-member-slot-unexpected`,[...e,`slotId`])),i.add(s.slotId),a=s.slotId}for(let[r,a]of e.run.expectedSlots.entries())i.has(a.slotId)||n.push(Qb(`record-member-slot-missing`,[...Fx(t),`run`,`expectedSlots`,String(r),`slotId`]))}function Hx(e){let t=[],n=new Map,r=new Map,i;for(let[a,o]of e.runs.entries()){let e=o.run.runId,s=Fx(a);Ax(i,e)||t.push(Qb(i===e?`record-run-duplicate`:`record-run-order-invalid`,[...s,`run`,`runId`])),n.has(e)&&i!==e&&t.push(Qb(`record-run-duplicate`,[...s,`run`,`runId`])),n.set(e,a),i=e,kx(t,[...s,`run`],Mx(o.run)),Vx(o,a,t);let c=zx(o.run),l;for(let[n,i]of o.attempts.entries()){let o=Lx(a,n);if(kx(t,o,Px(i)),Ax(l,i.attemptId)||t.push(Qb(l===i.attemptId?`record-attempt-duplicate`:`record-attempt-order-invalid`,[...o,`attemptId`])),l=i.attemptId,i.originRunId!==e){t.push(Qb(`record-attempt-owner-invalid`,[...o,`originRunId`]));continue}let s=c.get(i.slotId);s===void 0?t.push(Qb(`record-attempt-slot-unexpected`,[...o,`slotId`])):(s.evalId!==i.evalId&&t.push(Qb(`record-attempt-eval-mismatch`,[...o,`evalId`])),s.executionIdentityDigest!==i.executionIdentityDigest&&t.push(Qb(`record-attempt-digest-mismatch`,[...o,`executionIdentityDigest`])));let u=Rx({originRunId:e,attemptId:i.attemptId});r.has(u)?t.push(Qb(`record-attempt-duplicate`,[...o,`attemptId`])):r.set(u,{runIndex:a,attemptIndex:n,attempt:i})}}let a=new Map;for(let[n,i]of e.runs.entries())for(let[o,s]of i.members.entries()){if(s.attempt===null)continue;let c=Ix(n,o),l=r.get(Rx(s.attempt));if(l===void 0){t.push(Qb(`record-attempt-reference-missing`,[...c,`attempt`]));continue}if(s.action!==`accepted`){let n=zx(i.run).get(s.slotId),r=zx(e.runs[l.runIndex].run).get(l.attempt.slotId);(n===void 0||r===void 0||!Bx(n,r))&&t.push(Qb(`record-attempt-slot-mismatch`,[...c,`attempt`]))}if(s.action===`executed`){if(s.attempt.originRunId!==i.run.runId){t.push(Qb(`record-member-action-invalid`,[...c,`action`]));continue}let e=Rx(s.attempt);a.set(e,(a.get(e)??0)+1)}else s.attempt.originRunId===i.run.runId&&t.push(Qb(`record-member-action-invalid`,[...c,`action`]))}for(let[e,n]of r.entries()){let r=a.get(e)??0,i=Lx(n.runIndex,n.attemptIndex);r===0?t.push(Qb(`record-origin-member-missing`,i)):r>1&&t.push(Qb(`record-origin-member-duplicate`,i))}return Object.freeze(t)}var Ux=Object.freeze({maximumJsonBytes:1024*1024,maximumDepth:8,maximumNodes:4096,maximumObjectKeys:64,maximumArrayItems:256,maximumKeyUtf8Bytes:256,maximumStringUtf8Bytes:8*1024}),Wx=Object.freeze({...Ux,maximumJsonBytes:8*1024*1024,maximumNodes:32768,maximumArrayItems:4096});function Gx(e){return e.length===0?void 0:e.map(e=>({path:e.path,issue:e.code}))}var Kx=Y(rx),qx=W.pipe(Z($(e=>Number.isSafeInteger(e)&&e>=0,{identifier:`RecordAttemptOrdinal`,description:`a zero-based non-negative JSON-safe attempt ordinal`}))),Jx=nx({schema:K({originRunId:ib,attemptId:ob}),limits:Ux}).schema,Yx=nx({schema:K({slotId:ab,evalId:lb,attemptOrdinal:qx,executionIdentityDigest:ub}),limits:Ux}).schema,Xx=nx({schema:K({format:vb,recordId:rb}),limits:Ux}).schema,Zx=nx({schema:K({runId:ib,experimentId:cb,context:Tx,startedAt:_b,completedAt:_b,expectedSlots:q(Yx)}).pipe(Z($(e=>Gx(Mx(e)),{identifier:`RecordRunDocumentInvariant`,description:`a Run document with valid chronology, context, and expected Slots`}))),limits:Ux}).schema,Qx=nx({schema:J([K({slotId:ab,action:Y(ax),attempt:Jx}),K({slotId:ab,action:Y(ox),attempt:h_,absenceReason:px})]).pipe(Z($(e=>Gx(Nx(e)),{identifier:`RecordMemberDocumentInvariant`,description:`a Member action paired with its required Attempt reference`}))),limits:Ux}).schema,$x=nx({schema:K({attemptId:ob,originRunId:ib,slotId:ab,evalId:lb,executionIdentityDigest:ub,outcome:Kx}).pipe(Z($(e=>Gx(Px(e)),{identifier:`RecordAttemptDocumentInvariant`,description:`an Attempt document satisfying its local invariant`}))),limits:Ux}).schema,eS=nx({schema:K({run:Zx,members:q(Qx),attempts:q($x)}),limits:Wx}).schema;nx({schema:K({record:Xx,runs:q(eS)}).pipe(Z($(e=>Gx(Hx(e)),{identifier:`RecordCoreInvariant`,description:`a complete Record Core with consistent Run, Member, and Attempt documents`}))),limits:Wx}).schema;var tS=Yx,nS=Zx,rS=Qx,iS=$x;l_(J([K({format:H(`niceeval.attempt-publication-closure/v1`),originRun:nS}),K({originRun:nS})]),{errors:`all`,onExcessProperty:`error`}),Y(ix);var aS=W.pipe(Z($(e=>Number.isSafeInteger(e)&&e>=0))),oS=W.pipe(Z($(e=>Number.isSafeInteger(e)&&e>0))),sS=K({sha256:db,byteLength:aS}),cS=K({key:hb,sha256:db,byteLength:aS}),lS=K({owner:Y(cx),family:U.pipe(Z($(Qy)))});function uS(e){let t;for(let n of e.contents){if(t!==void 0&&t>=n.key)return!1;t=n.key}let n;for(let t of e.references){let e=`${t.owner}\u0000${t.family}`;if(n!==void 0&&n>=e)return!1;n=e}return!0}K({format:Y([sx]),ownerKind:Y(cx),family:U.pipe(Z($(Qy))),schemaVersion:oS,payload:sS,contents:q(cS),references:q(lS)}).pipe(Z($(uS)));var dS=Y([`record-attachment-owner-invalid`,`record-attachment-schema-id-mismatch`,`record-attachment-schema-invalid`,`record-attachment-payload-invalid`,`record-attachment-json-invalid`,`record-attachment-blob-refs-invalid`,`record-attachment-blob-ref-illegal`,`record-attachment-blob-ref-missing`,`record-attachment-blob-ref-extra`,`record-attachment-blob-ref-duplicate`,`record-attachment-closure-mismatch`,`record-attachment-snapshot-bytes-invalid`,`record-attachment-blob-budget-exceeded`,`record-attachment-materialized-invalid`,`record-attachment-family-invalid`]),fS=class extends Error{code;cause;constructor(e=`invalid-family-definition`,t){super(e===`migration-chain-invalid`?`Invalid Record Attachment migration chain`:`Invalid Record Attachment family definition`,{cause:t}),this.code=e,this.cause=t,this.name=`RecordAttachmentSpiDefinitionError`}},pS=new WeakMap,mS=new WeakMap,hS=new WeakMap,gS=new WeakMap,_S=new WeakMap;function vS(e){throw new fS(`invalid-family-definition`,e)}Object.freeze({to(e,t){let n=bS(e);n===void 0&&vS();let r=r_(e=>{let r=xS(e)?hS.get(e):void 0;return r!==void 0&&r.definition===n&&(t===void 0||!Yu(l_(t)(r.value)))},{identifier:`RecordAttachmentReference<${n.owner}:${n.family}>`});return gS.set(r,Object.freeze({definition:n,valueSchema:t})),gS.set(r.ast,Object.freeze({definition:n,valueSchema:t})),_S.set(r.ast.run,Object.freeze({definition:n,valueSchema:t})),r}});function yS(e){return typeof e==`object`&&!!e&&pS.has(e)}function bS(e){return yS(e)?e:typeof e==`object`&&e||typeof e==`function`?mS.get(e):void 0}function xS(e){return typeof e==`object`&&!!e&&hS.has(e)}Object.freeze({run:`run`,attempt:`attempt`}),Object.freeze({maximumJsonBytes:16*1024*1024,maximumDepth:32,maximumNodes:2e5,maximumObjectKeys:5e4,maximumArrayItems:1e5,maximumKeyUtf8Bytes:256,maximumStringUtf8Bytes:1024*1024});var SS=W.pipe(Z($(e=>Number.isSafeInteger(e)&&e>=0,{identifier:`RecordNonNegativeSafeInteger`,description:`a non-negative JSON-safe integer`}))),CS=W.pipe(Z($(e=>Number.isSafeInteger(e)&&e>0,{identifier:`RecordPositiveSafeInteger`,description:`a positive JSON-safe integer`})));W.pipe(Z($(e=>Number.isFinite(e)&&e>=0,{identifier:`RecordFiniteNonNegativeNumber`,description:`a finite non-negative JSON number`})));var wS=U.pipe(Z($(e=>new TextEncoder().encode(e).byteLength<=16384&&!/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/.test(e),{identifier:`RecordSafeText`,description:`bounded text without NUL or unsafe control characters`}))),TS=U.pipe(Z($(e=>/^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$/.test(e),{identifier:`RecordSafeIdentifier`,description:`a bounded ASCII identifier`}))),ES=U.pipe(Z($(e=>e.length>0&&e.length<=255&&/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+(?:;[!#$%&'*+.^_`|~0-9A-Za-z-]+=[!#$%&'*+.^_`|~0-9A-Za-z-]+)*$/.test(e),{identifier:`RecordMediaType`,description:`a bounded MIME media type without free-form parameters`}))),DS=J([K({code:Y([`capture-failed`,`capture-interrupted`]),stage:TS}),K({code:Y([`collection-cap-reached`,`unsupported-input`]),omittedAtLeast:CS})]),OS=C_([]).pipe(Z($(e=>e.length===0,{identifier:`RecordEmptyArray`,description:`an exact empty array`}))),kS=J([K({state:H(`complete`),limitations:OS}),K({state:H(`partial`),limitations:w_(DS)})]),AS=Object.freeze({maximumArtifacts:4e3,maximumContentBytes:64*1024*1024}),jS=K({artifactId:mb,mediaType:V(ES),label:V(wS),byteLength:SS,sha256:db,content:Y_.pipe(X_.maximumBytes(AS.maximumContentBytes))}),MS=K({collection:V(kS),artifacts:q(jS)}).pipe(b_({collection:`collection-data`,artifacts:`artifacts-data`}));Object.freeze({conversation:Object.freeze({maxPayloadBytes:2097152,maxItems:2048,maxTurns:256,maxClosureBytes:0}),commands:Object.freeze({maxPayloadBytes:2097152,maxItems:256,maxClosureBytes:33554432}),usage:Object.freeze({maxPayloadBytes:1048576,maxItems:2048,maxClosureBytes:0}),timing:Object.freeze({maxPayloadBytes:1048576,maxItems:4096,maxClosureBytes:0}),diagnostics:Object.freeze({maxPayloadBytes:524288,maxItems:512,maxClosureBytes:0})});var NS=`@niceeval/o11y/NonNegativeSafeInteger`,PS=`@niceeval/o11y/PositiveSafeInteger`,FS=`@niceeval/o11y/SafeIdentifier`,IS=`@niceeval/o11y/SourceNativeToolName`,LS=`@niceeval/o11y/StableLabel`,RS=`@niceeval/o11y/SafeText`,zS=`@niceeval/o11y/CanonicalDecimal`,BS=`@niceeval/o11y/CurrencyCode`,VS=new TextEncoder,HS=/^[a-z][a-z0-9.-]{0,63}$/,US=/^(?:0|[1-9][0-9]*)(?:\.[0-9]*[1-9])?$/,WS=/^[A-Z]{3}$/,GS=/[\u0000-\u0009\u000B-\u001F]/u;function KS(e){return VS.encode(e).byteLength}function qS(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n<56320||n>57343)return!1;t+=1}else if(n>=56320&&n<=57343)return!1}return!0}function JS(e){return Number.isSafeInteger(e)&&e>=0}function YS(e){return Number.isSafeInteger(e)&&e>0}function XS(e){return JS(e)?e:void 0}function ZS(e){return YS(e)?e:void 0}function QS(e){return KS(e)<=64&&HS.test(e)}function $S(e){return KS(e)<=64&&HS.test(e)}function eC(e){return e.length>0&&!e.includes(`
|
|
19
|
-
`)&&nC(e,256)}function tC(e){return qS(e)&&!GS.test(e)}function nC(e,t){return Number.isSafeInteger(t)&&t>=0&&tC(e)&&KS(e)<=t}function rC(e){return KS(e)<=64&&US.test(e)}function iC(e){return WS.test(e)}var aC=`@niceeval/o11y/TurnId`,oC=`@niceeval/o11y/ItemId`,sC=`@niceeval/o11y/CallId`,cC=`@niceeval/o11y/EventId`,lC=`@niceeval/o11y/ToolOccurrenceId`,uC=`@niceeval/o11y/SessionScopeId`,dC=`@niceeval/o11y/LegacySourceLocalCallId`,fC=`@niceeval/o11y/CommandId`,pC=`@niceeval/o11y/UsageObservationId`,mC=`@niceeval/o11y/IntervalId`,hC=`@niceeval/o11y/DiagnosticId`;Object.freeze([`turn`,`item`,`call`,`event`,`tool-occurrence`,`session-scope`,`command`,`usage-observation`,`interval`,`diagnostic`]);var gC=`[0123456789abcdefghjkmnpqrstvwxyz]`,_C=Object.freeze({turn:`turn_`,item:`item_`,call:`call_`,event:`event_`,"tool-occurrence":`tool_`,"session-scope":`session_`,command:`command_`,"usage-observation":`usage_`,interval:`interval_`,diagnostic:`diagnostic_`});function vC(e){return RegExp(`^${e}${gC}{26}$`)}var yC=vC(_C.turn),bC=vC(_C.item),xC=vC(_C.call),SC=vC(_C.event),CC=vC(_C[`tool-occurrence`]),wC=vC(_C[`session-scope`]),TC=vC(_C.command),EC=vC(_C[`usage-observation`]),DC=vC(_C.interval),OC=vC(_C.diagnostic);function kC(e){return yC.test(e)}function AC(e){return bC.test(e)}function jC(e){return xC.test(e)}function MC(e){return SC.test(e)}function NC(e){return CC.test(e)}function PC(e){return wC.test(e)}function FC(e){return xC.test(e)}function IC(e){return TC.test(e)}function LC(e){return EC.test(e)}function RC(e){return DC.test(e)}function zC(e){return OC.test(e)}Object.freeze([`niceeval.agent-turns`,`niceeval.sandbox-commands`,`niceeval.runner-activities`,`niceeval.runner-diagnostics`]),Object.freeze([`niceeval.runner-activities`,`niceeval.runner-diagnostics`]);function BC(e){return typeof e==`object`&&!!e}function VC(e,t){let n=Object.getOwnPropertyDescriptor(e,t);return n!==void 0&&`value`in n?n.value:void 0}function HC(e){if(!BC(e))return!1;let t=VC(e,`family`),n=VC(e,`kind`),r=VC(e,`id`);return typeof t==`string`&&typeof n==`string`&&typeof r==`string`}function UC(e){if(!HC(e))return!1;switch(e.kind){case`turn`:return e.family===`niceeval.agent-turns`&&kC(e.id);case`item`:return e.family===`niceeval.agent-turns`&&AC(e.id);case`call`:return e.family===`niceeval.agent-turns`&&jC(e.id);case`event`:return e.family===`niceeval.agent-turns`&&MC(e.id);case`tool-occurrence`:return e.family===`niceeval.agent-turns`&&NC(e.id);case`session-scope`:return e.family===`niceeval.agent-turns`&&PC(e.id);case`command`:return e.family===`niceeval.sandbox-commands`&&IC(e.id);case`usage-observation`:return e.family===`niceeval.agent-turns`&&LC(e.id);case`interval`:return e.family===`niceeval.runner-activities`&&RC(e.id);case`diagnostic`:return e.family===`niceeval.runner-diagnostics`&&zC(e.id);default:return!1}}function WC(e){return HC(e)?e.family===`niceeval.runner-activities`&&e.kind===`interval`&&RC(e.id)||e.family===`niceeval.runner-diagnostics`&&e.kind===`diagnostic`&&zC(e.id):!1}function GC(e,t){return e===t?0:e<t?-1:1}function KC(e,t){let n=GC(e.family,t.family);if(n!==0)return n;let r=GC(e.kind,t.kind);return r===0?GC(e.id,t.id):r}function qC(e,t){if(e.length>16)return!1;let n;for(let t of e){if(!UC(t)||n!==void 0&&KC(n,t)>=0)return!1;n=t}return!0}function JC(e,t){if(e.length>16)return!1;let n;for(let t of e){if(!WC(t)||n!==void 0&&KC(n,t)>=0)return!1;n=t}return!0}var YC=Object.freeze([`conversation-item`,`conversation-text`,`command-manifest`,`command-stdout`,`command-stderr`,`usage-observation`,`timing-interval`,`diagnostic`]),XC=Object.freeze([`adapter`,`command-capture`,`usage-capture`,`timing-capture`,`diagnostic-capture`,`attempt-finalizer`,`run-teardown`]);function ZC(e,t){return e.some(e=>e===t)}function QC(e){return ZC(YC,e)}function $C(e){return ZC(XC,e)}function ew(e){switch(e.code){case`stream-truncated`:case`invalid-utf8-replaced`:case`unsafe-control-stripped`:return e.stream===`stdout`?`command-stdout`:`command-stderr`;default:return e.target}}function tw(e){switch(e.code){case`text-truncated`:return e.target===`conversation-text`?e.itemId:e.target===`command-manifest`?e.commandId:e.diagnosticId;case`stream-truncated`:case`invalid-utf8-replaced`:case`unsafe-control-stripped`:return e.commandId;default:return``}}function nw(e){return e.code===`capture-failed`||e.code===`capture-interrupted`?e.stage:``}function rw(e){return[e.code,ew(e),tw(e),nw(e)].join(`\0`)}function iw(e,t){let n=GC(e.code,t.code);if(n!==0)return n;let r=GC(ew(e),ew(t));if(r!==0)return r;let i=GC(tw(e),tw(t));return i===0?GC(nw(e),nw(t)):i}function aw(e){return e===`stdout`||e===`stderr`}function ow(e){switch(e.code){case`capture-failed`:case`capture-interrupted`:return $C(e.stage)&&QC(e.target);case`collection-cap-reached`:return QC(e.target)&&JS(e.retained)&&YS(e.omittedAtLeast);case`unsupported-input`:return QC(e.target)&&YS(e.omittedAtLeast);case`text-truncated`:return JS(e.retainedBytes)&&YS(e.omittedBytes)&&(e.target===`conversation-text`&&AC(e.itemId)||e.target===`command-manifest`&&IC(e.commandId)||e.target===`diagnostic`&&zC(e.diagnosticId));case`stream-truncated`:return IC(e.commandId)&&aw(e.stream)&&JS(e.retainedBytes)&&YS(e.omittedBytes);case`invalid-utf8-replaced`:return IC(e.commandId)&&aw(e.stream)&&YS(e.replacementCount);case`unsafe-control-stripped`:return IC(e.commandId)&&aw(e.stream)&&YS(e.strippedCount);case`redacted`:return QC(e.target)&&YS(e.replacementCount)}}function sw(e){let t=[];(e.state===`complete`&&e.limitations.length!==0||e.state===`partial`&&e.limitations.length===0)&&t.push(Object.freeze({code:`observability-collection-state-invalid`}));let n,r=new Set;for(let[i,a]of e.limitations.entries()){let e=XS(i);if(e===void 0)throw Error(`Array index must be a safe integer`);if(!ow(a)){t.push(Object.freeze({code:`observability-limitation-invalid`,index:e}));continue}if(n!==void 0&&iw(n,a)>=0){let e=ZS(i);if(e===void 0)throw Error(`Non-first array index must be positive`);t.push(Object.freeze({code:`observability-limitation-order-invalid`,index:e}))}let o=rw(a);if(r.has(o)){let e=ZS(i);if(e===void 0)throw Error(`Duplicate cannot be at index zero`);t.push(Object.freeze({code:`observability-limitation-duplicate`,index:e}))}r.add(o),n=a}return Object.freeze(t)}var cw=`niceeval.query/v1`,lw=K({state:H(`available`),byteLength:W,sha256:U,base64:U}),uw=hy(J([K({kind:H(`unavailable`),reason:H(`not-recorded`)}),K({kind:H(`content`),content:lw,encoding:Y([`json`,`utf-8`,`binary`]),byteLength:W,preview:X(U)})])).entry,dw=K({entryId:Fv,sourceOrder:W,role:Y([`declaration`,`threshold`,`score`,`gate`,`optional`,`stop`]),source:K({sourceItemId:U,sha256:U}),start:K({line:W,column:W}),end:K({line:W,column:W})}),fw=J([qv,py]),pw=Y([`condition-not-met`,`evidence-unavailable`,`source-unavailable`,`redacted`,`evaluator-failed`,`producer-interrupted`,`invalid-subject`,`coverage-not-applicable`,`not-recorded`,`not-declared`]),mw=D_(()=>K({label:U,state:U,expected:X(fw),observed:X(qv),reason:X(pw),anchor:X(qv),children:q(mw)})),hw=Y([`historical-not-recorded`,`source-unavailable`,`ambiguous`]),gw=J([K({state:H(`exact`),turnId:U,eventId:U,anchor:U}),K({state:H(`unavailable`),reason:hw})]),_w=J([K({kind:H(`tool-occurrence`),toolOccurrenceId:U}),K({kind:H(`event`),eventId:U})]),vw=K({kind:Y([`tool`,`event`,`legacy-source-row`]),rowId:U,number:U,phase:Y([`at-evaluation`,`outside-evaluation-snapshot`,`historical`]),summary:U,detail:qv,locator:B(_w),evaluation:K({result:Y([`matched`,`mismatched`,`unavailable`,`not-evaluated`,`not-retained`,`outside-snapshot`,`legacy`]),difference:B(qv)}),conversationTarget:gw}),yw=J([K({state:H(`unavailable`),reason:hw,rows:C_([]),limitations:C_([])}),K({state:Y([`complete`,`partial`]),rows:q(vw),limitations:q(qv)})]),bw=J([K({kind:H(`collection-filter`),summary:qv}),K({kind:H(`ordered-sequence`),summaries:q(qv)})]),xw=K({step:W,summary:qv,state:Y([`matched`,`possible`,`blocked`,`not-reached`]),sourceRow:B(U),conversationTarget:B(gw)}),Sw=J([K({state:H(`legacy`),subject:Y([`tool`,`event`,`source-row`]),query:K({state:H(`unavailable`),reason:H(`historical-not-recorded`)}),source:K({final:yw,atEvaluation:yw}),identityRelation:K({state:H(`unavailable`),reason:H(`historical-not-recorded`)}),overlayRetention:H(`unavailable`),steps:C_([]),legacyDiagnostic:B(qv)}),K({state:H(`current`),subject:Y([`tool`,`event`,`source-row`]),query:bw,receipt:J([Kv,ry]),source:K({final:yw,atEvaluation:yw}),identityRelation:J([K({state:H(`exact`)}),K({state:H(`unavailable`),reason:Y([`source-unavailable`,`ambiguous`])})]),overlayRetention:Y([`complete`,`partial`,`unavailable`]),steps:q(xw)})]),Cw=K({state:H(`unavailable`),reason:H(`not-recorded`)}),ww=K({state:H(`missing`),sourceState:Y([`not-recorded`,`invalid`]),comparator:h_,sourceLedger:h_,receipt:h_,result:h_,targets:C_([]),debugger:h_,sandboxCommandJoin:Cw}),Tw=J([ww,K({state:H(`ordinary`),sourceState:h_,comparator:h_,sourceLedger:X(Kv),receipt:X(Kv),result:h_,targets:C_([]),debugger:h_,sandboxCommandJoin:Cw}),K({state:H(`legacy`),sourceState:H(`unavailable`),comparator:h_,sourceLedger:h_,receipt:h_,result:h_,targets:C_([]),reason:H(`historical-not-recorded`),debugger:Sw,sandboxCommandJoin:Cw}),K({state:H(`available`),sourceState:Y([`complete`,`partial`,`unavailable`]),comparator:X(J([Zv,q(Zv)])),sourceLedger:K({sourceSnapshot:ny,receipt:J([Kv,ry])}),receipt:J([Kv,ry]),result:X(ly),targets:q(K({state:Y([`matched`,`mismatched`,`unavailable`,`not-evaluated`]),anchor:_w,difference:X(qv)})),debugger:Sw,sandboxCommandJoin:Cw})]),Ew=V(J([K({entryId:U,state:Y([`not-recorded`,`invalid`]),issues:B(q(K({code:dS,path:q(U)}))),sourceSites:C_([]),check:mw,matcher:ww}),K({entryId:Fv,display:V(Iv),entry:V(uw),sourceSites:q(dw),check:mw,matcher:Tw})])),Dw=Object.freeze({completed:`completed`,failed:`failed`,cancelled:`cancelled`,interrupted:`interrupted`}),Ow=[Dw.completed,Dw.failed,Dw.cancelled,Dw.interrupted],kw=Object.freeze({attemptSetup:`attempt.setup`,sandboxPrepare:`sandbox.prepare`,agentEnsure:`agent.ensure`,evalRun:`eval.run`,agentSend:`agent.send`,sandboxCommand:`sandbox.command`,assertionEvaluate:`assertion.evaluate`,verdictFold:`verdict.fold`,attemptTeardown:`attempt.teardown`,runSetup:`run.setup`,runDiscovery:`run.discovery`,runPlan:`run.plan`,runDispatch:`run.dispatch`,runTeardown:`run.teardown`,collection:`collection`}),Aw=[kw.attemptSetup,kw.sandboxPrepare,kw.agentEnsure,kw.evalRun,kw.agentSend,kw.sandboxCommand,kw.assertionEvaluate,kw.verdictFold,kw.attemptTeardown];kw.attemptSetup,kw.sandboxPrepare,kw.agentEnsure,kw.evalRun,kw.sandboxCommand,kw.assertionEvaluate,kw.verdictFold,kw.attemptTeardown;var jw=[kw.runSetup,kw.runDiscovery,kw.runPlan,kw.runDispatch,kw.runTeardown],Mw=[kw.collection];[...Aw,...Mw],[...jw,...Mw];var Nw=[kw.attemptSetup,kw.sandboxPrepare,kw.agentEnsure,kw.evalRun,kw.sandboxCommand,kw.attemptTeardown],Pw=Object.freeze({...Dw,unknown:`unknown`}),Fw=[Pw.completed,Pw.failed,Pw.cancelled,Pw.interrupted,Pw.unknown],Iw=Object.freeze({timeout:`timeout`,cancelled:`cancelled`,transportLost:`transport-lost`}),Lw=[Iw.timeout,Iw.cancelled,Iw.transportLost],Rw=Object.freeze({spawnFailed:`spawn-failed`,cancelledBeforeStart:`cancelled-before-start`}),zw=[Rw.spawnFailed,Rw.cancelledBeforeStart];Object.freeze({errors:`all`,onExcessProperty:`error`});var Bw=W.pipe(Z($(JS,{identifier:`ObservabilityNonNegativeSafeInteger`,description:`a JSON-safe non-negative integer`})),Q(NS)),Vw=W.pipe(Z($(YS,{identifier:`ObservabilityPositiveSafeInteger`,description:`a positive JSON-safe integer`})),Q(PS)),Hw=U.pipe(Z($(QS,{identifier:`ObservabilitySafeIdentifier`,description:`a lowercase ASCII identifier no longer than 64 bytes`})),Q(FS));U.pipe(Z($($S,{identifier:`ObservabilityStableLabel`,description:`a provider-neutral lowercase ASCII label no longer than 64 bytes`})),Q(LS));var Uw=U.pipe(Z($(tC,{identifier:`ObservabilitySafeText`,description:`strict UTF-8 text without NUL or C0 controls other than LF`})),Q(RS)),Ww=U.pipe(Z($(eC,{identifier:`ObservabilitySourceNativeToolName`,description:`a non-empty source-native tool name no longer than 256 UTF-8 bytes`})),Q(IS));U.pipe(Z($(rC,{identifier:`ObservabilityCanonicalDecimal`,description:`a non-negative canonical decimal string no longer than 64 bytes`})),Q(zS));var Gw=U.pipe(Z($(iC,{identifier:`ObservabilityCurrencyCode`,description:`an uppercase three-letter currency code`})),Q(BS)),Kw=U.pipe(Z($(kC,{identifier:`ObservabilityTurnId`,description:`a turn_ identifier with 26 lowercase Crockford base-32 characters`})),Q(aC)),qw=U.pipe(Z($(AC,{identifier:`ObservabilityItemId`,description:`an item_ identifier with 26 lowercase Crockford base-32 characters`})),Q(oC)),Jw=U.pipe(Z($(jC,{identifier:`ObservabilityCallId`,description:`a call_ identifier with 26 lowercase Crockford base-32 characters`})),Q(sC)),Yw=U.pipe(Z($(FC,{identifier:`ObservabilityLegacySourceLocalCallId`,description:`a v1 source-local call identifier`})),Q(dC)),Xw=U.pipe(Z($(MC,{identifier:`ObservabilityEventId`,description:`an event_ identifier with 26 lowercase Crockford base-32 characters`})),Q(cC)),Zw=U.pipe(Z($(NC,{identifier:`ObservabilityToolOccurrenceId`,description:`a tool_ identifier with 26 lowercase Crockford base-32 characters`})),Q(lC)),Qw=U.pipe(Z($(PC,{identifier:`ObservabilitySessionScopeId`,description:`a session_ identifier with 26 lowercase Crockford base-32 characters`})),Q(uC)),$w=U.pipe(Z($(IC,{identifier:`ObservabilityCommandId`,description:`a command_ identifier with 26 lowercase Crockford base-32 characters`})),Q(fC)),eT=U.pipe(Z($(LC,{identifier:`ObservabilityUsageObservationId`,description:`a usage_ identifier with 26 lowercase Crockford base-32 characters`})),Q(pC)),tT=U.pipe(Z($(RC,{identifier:`ObservabilityIntervalId`,description:`an interval_ identifier with 26 lowercase Crockford base-32 characters`})),Q(mC)),nT=U.pipe(Z($(zC,{identifier:`ObservabilityDiagnosticId`,description:`a diagnostic_ identifier with 26 lowercase Crockford base-32 characters`})),Q(hC)),rT=Y([`conversation-item`,`conversation-text`,`command-manifest`,`command-stdout`,`command-stderr`,`usage-observation`,`timing-interval`,`diagnostic`]).pipe(Z($(QC,{identifier:`ObservabilityCollectionTarget`,description:`a closed Observability collection target`}))),iT=Y([`adapter`,`command-capture`,`usage-capture`,`timing-capture`,`diagnostic-capture`,`attempt-finalizer`,`run-teardown`]).pipe(Z($($C,{identifier:`ObservabilityCollectionStage`,description:`a closed Observability capture stage`}))),aT=J([K({code:H(`capture-failed`),stage:iT,target:rT}),K({code:H(`capture-interrupted`),stage:iT,target:rT}),K({code:H(`collection-cap-reached`),target:rT,retained:Bw,omittedAtLeast:Vw}),K({code:H(`unsupported-input`),target:rT,omittedAtLeast:Vw}),K({code:H(`text-truncated`),target:H(`conversation-text`),itemId:qw,retainedBytes:Bw,omittedBytes:Vw}),K({code:H(`text-truncated`),target:H(`command-manifest`),commandId:$w,retainedBytes:Bw,omittedBytes:Vw}),K({code:H(`text-truncated`),target:H(`diagnostic`),diagnosticId:nT,retainedBytes:Bw,omittedBytes:Vw}),K({code:H(`stream-truncated`),commandId:$w,stream:Y([`stdout`,`stderr`]),retainedBytes:Bw,omittedBytes:Vw}),K({code:H(`invalid-utf8-replaced`),commandId:$w,stream:Y([`stdout`,`stderr`]),replacementCount:Vw}),K({code:H(`unsafe-control-stripped`),commandId:$w,stream:Y([`stdout`,`stderr`]),strippedCount:Vw}),K({code:H(`redacted`),target:rT,replacementCount:Vw})]).pipe(Z($(ow,{identifier:`ObservabilityLimitation`,description:`a semantically valid closed Observability limitation`})));J([K({state:H(`complete`),limitations:C_([])}),K({state:H(`partial`),limitations:w_(aT)})]).pipe(Z($(e=>sw(e).length===0,{identifier:`ObservabilityCollection`,description:`a complete empty or partial canonically ordered limitation collection`})));var oT=K({family:H(`niceeval.agent-turns`),kind:H(`turn`),id:Kw}),sT=K({family:H(`niceeval.agent-turns`),kind:H(`item`),id:qw}),cT=K({family:H(`niceeval.agent-turns`),kind:H(`call`),id:Jw}),lT=K({family:H(`niceeval.agent-turns`),kind:H(`event`),id:Xw}),uT=K({family:H(`niceeval.agent-turns`),kind:H(`tool-occurrence`),id:Zw}),dT=K({family:H(`niceeval.agent-turns`),kind:H(`session-scope`),id:Qw}),fT=K({family:H(`niceeval.sandbox-commands`),kind:H(`command`),id:$w}),pT=K({family:H(`niceeval.agent-turns`),kind:H(`usage-observation`),id:eT}),mT=K({family:H(`niceeval.runner-activities`),kind:H(`interval`),id:tT}),hT=K({family:H(`niceeval.runner-diagnostics`),kind:H(`diagnostic`),id:nT}),gT=J([oT,sT,cT,lT,uT,dT,fT,pT,mT,hT]),_T=J([mT,hT]);q(gT).pipe(Z($(e=>e.length<=16&&qC(e,`niceeval.agent-turns`)))),q(gT).pipe(Z($(e=>e.length<=16&&qC(e,`niceeval.sandbox-commands`)))),q(gT).pipe(Z($(e=>e.length<=16&&qC(e,`niceeval.agent-turns`)))),q(gT).pipe(Z($(e=>e.length<=16&&qC(e,`niceeval.runner-activities`)))),q(gT).pipe(Z($(e=>e.length<=16&&qC(e,`niceeval.runner-diagnostics`)))),q(_T).pipe(Z($(e=>e.length<=16&&JC(e,`niceeval.runner-activities`)))),q(_T).pipe(Z($(e=>e.length<=16&&JC(e,`niceeval.runner-diagnostics`))));var vT=TS,yT=Y([`adapter`,`session-manager`,`sandbox-wrapper`,`runner-clock`,`runner-diagnostic-sink`,`attempt-finalizer`,`run-teardown`]),bT=Y([`turn`,`turn-item`,`usage-observation`,`turn-context`,`command`,`stdout`,`stderr`,`activity`,`diagnostic`,`diagnostic-cause`,`value-byte`,`content-byte`]),xT=J([K({code:Y([`capture-failed`,`capture-interrupted`]),stage:yT,target:bT}),K({code:Y([`collection-cap-reached`,`unsupported-input`]),target:bT,omittedAtLeast:CS}),K({code:Y([`text-truncated`,`redacted`,`invalid-utf8-replaced`,`unsafe-control-stripped`]),target:bT,replacementOrOmittedCount:CS})]);function ST(e){switch(e.code){case`capture-failed`:case`capture-interrupted`:return[e.code,e.stage,e.target].join(`\0`);case`collection-cap-reached`:case`unsupported-input`:return[e.code,e.target,String(e.omittedAtLeast)].join(`\0`);case`text-truncated`:case`redacted`:case`invalid-utf8-replaced`:case`unsafe-control-stripped`:return[e.code,e.target,String(e.replacementOrOmittedCount)].join(`\0`)}}function CT(e){let t,n=new Set;for(let r of e){let e=ST(r);if(n.has(e)||t!==void 0&&t>=e)return!1;n.add(e),t=e}return!0}var wT=J([K({state:H(`complete`),limitations:OS}),K({state:H(`partial`),limitations:w_(xT).pipe(Z($(CT)))})]);Object.freeze({maximumBlobs:1,maximumBlobBytes:1,maximumTotalBytes:1});var TT={itemId:qw,eventId:Xw,sessionSequence:Vw},ET=J([K({state:H(`exact`),toolOccurrenceId:Zw}),K({state:H(`unavailable`),reason:Y([`orphan-finish`,`ambiguous-operation`])})]),DT=J([K({...TT,kind:H(`message`),role:Y([`user`,`assistant`]),text:Uw}),K({...TT,kind:H(`tool-start`),toolOccurrenceId:Zw,tool:Ww,inputSummary:Uw}),K({...TT,kind:H(`tool-finish`),occurrence:ET,outcome:Y([`completed`,`rejected`,`failed`,`cancelled`]),outputSummary:Uw}),K({...TT,kind:Y([`thinking-summary`,`compaction`,`context-injection`]),summary:Uw}),K({...TT,kind:H(`subagent`),state:Y([`started`,`completed`,`failed`]),label:Hw,summary:Uw}),K({...TT,kind:H(`input-request`),state:Y([`requested`,`answered`,`cancelled`]),promptSummary:Uw,responseSummary:X(Uw)}),K({...TT,kind:Y([`skill-load`,`conversation-error`]),code:Hw,summary:Uw})]),OT={itemId:qw,sequence:CS},kT=J([K({...OT,kind:H(`message`),role:Y([`user`,`assistant`]),text:Uw}),K({...OT,kind:H(`tool-call`),callId:Yw,tool:Ww,inputSummary:Uw}),K({...OT,kind:H(`tool-result`),callId:Yw,outcome:Y([`completed`,`rejected`,`failed`,`cancelled`]),outputSummary:Uw}),K({...OT,kind:Y([`thinking-summary`,`compaction`,`context-injection`]),summary:Uw}),K({...OT,kind:H(`subagent`),state:Y([`started`,`completed`,`failed`]),label:Hw,summary:Uw}),K({...OT,kind:H(`input-request`),state:Y([`requested`,`answered`,`cancelled`]),promptSummary:Uw,responseSummary:X(Uw)}),K({...OT,kind:Y([`skill-load`,`conversation-error`]),code:Hw,summary:Uw})]),AT=J([K({usageObservationId:eT,kind:H(`token-bucket`),provider:Hw,bucket:Y([`input`,`output`,`cache-read`,`cache-write`,`reasoning`,`other`]),tokens:Bw}),K({usageObservationId:eT,kind:H(`request`),provider:Hw,requestKind:Y([`model`,`tool`])}),K({usageObservationId:eT,kind:H(`provider-cost`),provider:Hw,amount:U.pipe(Z($(e=>/^(?:0|[1-9][0-9]*)(?:\.[0-9]*[1-9])?$/u.test(e)))),currency:Gw})]),jT=Y([`complete`,`partial`,`unavailable`]),MT=U.pipe(Z($(e=>e.trim().length>0&&!!nC(e,16384),{identifier:`AgentTurnEvidenceCoverageReason`,description:`non-empty durable coverage reason within the conversation text limit`}))),NT=J([K({status:H(`complete`)}),K({status:Y([`partial`,`unavailable`]),reason:MT})]),PT=K({events:NT,actions:NT,messages:NT,usage:NT,status:NT,data:NT}),FT=J([K({state:H(`recorded`),status:Y([`completed`,`failed`,`waiting`]),evidenceCoverage:K({events:jT,actions:jT,messages:jT,usage:jT,status:jT,data:jT})}),K({state:H(`unavailable`),reason:Y([`send-failed`,`send-interrupted`])})]),IT=J([K({state:H(`recorded`),status:Y([`completed`,`failed`,`waiting`]),evidenceCoverage:PT}),K({state:H(`unavailable`),reason:Y([`send-failed`,`send-interrupted`])})]),LT={segmentId:vT,turnId:Kw,sequence:CS,outcome:Y(Ow),usage:q(AT)},RT=K({...LT,sessionId:Qw,terminal:IT,items:q(DT)}),zT=K({...LT,terminal:IT,items:q(kT)}),BT=K({...LT,sessionId:Qw,terminal:FT,items:q(DT)}),VT=K({...LT,terminal:FT,items:q(kT)});K({collection:wT,segments:q(VT)}).pipe(b_({collection:`collection-data`,segments:`segments-data`})),J([K({state:H(`current`),collection:wT,segments:q(BT)}).pipe(b_({collection:`collection-data`,segments:`segments-data`})),K({state:H(`legacy`),collection:wT,segments:q(VT)}).pipe(b_({collection:`collection-data`,segments:`segments-data`}))]),J([K({state:H(`current`),collection:wT,segments:q(RT)}).pipe(b_({collection:`collection-data`,segments:`segments-data`})),K({state:H(`legacy`),collection:wT,segments:q(zT)}).pipe(b_({collection:`collection-data`,segments:`segments-data`}))]);var HT=Object.freeze({maximumWindows:256,maximumChangesPerWindow:1e4,maximumRetainedChanges:1e4,maximumTextRevisionBytes:1024*1024,maximumContents:2e4,maximumContentBytes:1024*1024,maximumTotalContentBytes:128*1024*1024,maximumPayloadJsonBytes:16*1024*1024,maximumPolicyEntries:256,maximumPolicyEntryUtf8Bytes:4096}),UT=new TextEncoder;function WT(e){return UT.encode(e).byteLength}function GT(e){let t,n=new Set;for(let r of e){if(n.has(r)||t!==void 0&&Wy(t,r)>=0)return!1;n.add(r),t=r}return!0}function KT(e){return GT(e.map(QT))}var qT=U.pipe(Z($(e=>/^(?:turn[1-9][0-9]*|session[1-9][0-9]*\/turn[1-9][0-9]*)$/.test(e),{identifier:`FileChangesWindowId`,description:`a canonical agent send-window id`}))),JT=q(U.pipe(Z($(e=>WT(e)<=HT.maximumPolicyEntryUtf8Bytes,{identifier:`FileChangesPolicyEntry`,description:`a File Changes include or ignore entry within its UTF-8 budget`})))).pipe(Z($(e=>e.length<=HT.maximumPolicyEntries&>(e),{identifier:`FileChangesPolicyEntries`,description:`an ASCII-canonical, deduplicated bounded policy entry sequence`}))),YT=K({kind:H(`agent-send-window-endpoints`),policy:K({defaultPolicy:H(`niceeval.sandbox-ledger/default-excludes/v1`),include:JT,ignore:JT})}),XT=Y([`checkpoint`,`export`,`finalizer-export`,`normalize`]),ZT=J([K({code:Y([`capture-failed`,`capture-interrupted`]),stage:XT,atWindowId:X(qT)}),K({code:H(`collection-cap-reached`),target:Y([`window`,`change`,`content`,`value`,`content-byte`]),omittedAtLeast:CS,atWindowId:X(qT)}),K({code:H(`unsupported-input`),target:H(`endpoint-metadata`),omittedAtLeast:CS})]);function QT(e){switch(e.code){case`capture-failed`:case`capture-interrupted`:return[e.code,e.stage,e.atWindowId??``].join(`\0`);case`collection-cap-reached`:return[e.code,e.target,e.atWindowId??``,String(e.omittedAtLeast)].join(`\0`);case`unsupported-input`:return[e.code,e.target,String(e.omittedAtLeast)].join(`\0`)}}var $T=J([K({state:H(`complete`),limitations:OS}),K({state:H(`partial`),limitations:w_(ZT).pipe(Z($(KT,{identifier:`FileChangesPartialLimitations`,description:`a deterministic deduplicated File Changes limitation sequence`})))})]),eE=J([K({kind:H(`text`),sha256:db,byteLength:SS.pipe(Z($(e=>e<=HT.maximumTextRevisionBytes,{identifier:`FileChangesTextRevisionByteLength`,description:`a retained text revision within the File Changes text budget`}))),content:J([K({state:H(`available`),content:J_.pipe(X_.maximumBytes(HT.maximumContentBytes))}),K({state:H(`omitted`),reason:H(`collection-cap`)})])}),K({kind:H(`elided`),reason:Y([`binary`,`oversized-text`]),byteLength:SS}),K({kind:H(`unavailable`),reason:Y([`unsupported-input`,`capture-failed`,`capture-interrupted`])})]),tE=J([K({state:H(`absent`)}),K({state:H(`present`),revision:eE})]);K({attribution:YT,collection:$T,windows:q(K({windowId:qT,sequence:CS,changes:q(K({changeId:pb,path:gb,kind:Y([`created`,`modified`,`deleted`]),before:tE,after:tE}).pipe(Z($(e=>{switch(e.kind){case`created`:return e.before.state===`absent`&&e.after.state===`present`;case`modified`:return e.before.state===`present`&&e.after.state===`present`;case`deleted`:return e.before.state===`present`&&e.after.state===`absent`}},{identifier:`FileChange`,description:`a coherent created, modified, or deleted endpoint transition`})))).pipe(Z($(e=>e.length<=HT.maximumChangesPerWindow&>(e.map(e=>e.path)),{identifier:`FileChangesWindowChanges`,description:`a bounded ASCII-path-canonical unique window change sequence`})))}))}).pipe(b_({attribution:`attribution-data`,collection:`collection-data`,windows:`windows-data`}));var nE=Y([`available`,`partial`,`unavailable`,`empty`,`unsupported`,`failed`]),rE=U.pipe(Z($(AC))),iE=U.pipe(Z($(NC))),aE=U.pipe(Z($(IC))),oE=J([K({kind:H(`redacted`),fieldCount:W}),K({kind:H(`sampled`),captured:W,knownTotal:B(W)}),K({kind:H(`truncated`),omittedBytes:W}),K({kind:H(`provider-limited`)})]),sE=J([K({code:Y([`assertions-not-recorded`,`assertions-revision-unsupported`,`assertions-current-invalid`]),locator:U}),K({code:Y([`attempt-origin-missing`,`attempt-not-observed`]),runId:U,slotId:U,evalId:U,attemptOrdinal:W}),K({code:H(`score-contribution-unavailable`),locator:U,entryId:U,reason:Y([`source-unavailable`,`evaluation-errored`,`not-applicable`])}),K({code:H(`score-partial`),locator:X(U)})]),cE=K({identity:K({kind:H(`attempt`),locator:U})}),lE=K({state:nE,value:X(W),samples:W,total:W,basis:Y([`slot`,`eval`]),issues:q(sE),refs:q(cE),unit:B(Y([`points`,`USD`,`ms`,`tokens`])),bounds:B(K({min:W,max:W}))}),uE=K({...lE.fields,source:X(Y([`observed`,`estimated`]))}),dE=J([K({identity:K({kind:H(`attempt`),locator:U}),state:Y([`not-recorded`,`unsupported`,`failed`])}),K({identity:K({kind:H(`attempt`),locator:U}),entryId:U,groupPath:q(U),state:Y([`complete`,`partial`,`unavailable`,`not-applicable`]),reason:B(Y([`sampled`,`truncated`,`redacted`,`provider-limited`,`not-collected`,`source-unavailable`,`producer-failed`,`optional-material`,`unsupported-subject`])),limitations:q(oE)})]),fE={evaluationKind:Y([`pass`,`points`,`mixed`]),denominator:K({expected:W,observed:W,classified:W,missing:W}),verdict:K({tally:K({passed:W,failed:W,errored:W,skipped:W}),passRate:lE}),score:lE,costUSD:uE,durationMs:lE,tokens:lE,coverage:q(dE),issues:q(sE)},pE=K({runId:U,slotId:U,evalId:U,attemptOrdinal:W,publication:J([mx,K({...hx.fields,score:lE,costUSD:uE,durationMs:lE,tokens:lE}),gx])}),mE=K({groupPath:q(U),...fE}),hE=K({experimentId:U,agent:J([K({state:H(`available`),value:U}),K({state:H(`mixed`)}),K({state:H(`unavailable`)})]),model:J([K({state:H(`available`),value:U}),K({state:H(`mixed`)}),K({state:H(`unavailable`)})]),groups:q(mE),...fE}),gE=K({experimentId:U,evalId:U,groupPath:q(U),members:q(pE),...fE}),_E=K({totals:K(fE),experiments:q(hE),cells:q(gE)}),vE=K({experiment:hE,cells:q(gE)}),yE=K({value:nS,members:q(rS),attempts:q(iS)});q(K({runId:ib,state:H(`completed`),experimentId:cb,invocationId:h_,startedAt:_b,completedAt:_b,coverage:K({published:W,expected:W})}));var bE=J([K({state:H(`not-scored`)}),K({state:H(`complete`),earned:W,possible:W}),K({state:H(`unavailable`),earned:W,possible:W,unavailable:W})]),xE=X(Y([`passed`,`failed`,`errored`,`skipped`])),SE=K({runs:q(nS),denominator:K({expected:W,observed:W}),members:q(K({runId:U,slotId:U,evalId:U,attemptOrdinal:W,executionIdentityDigest:U,state:Y([`executed`,`carried`,`accepted`,`not-dispatched`,`interrupted`,`missing`]),locator:X(U),outcome:X(Y([`completed`,`errored`,`cancelled`,`interrupted`])),verdict:xE,score:B(bE)}))}),CE=K({channel:Y([`events`,`actions`,`messages`,`usage`,`status`,`data`]),status:Y([`complete`,`partial`,`unavailable`]),reason:B(U)}),wE=J([CE,K({owner:H(`assertion-material`),state:H(`partial`),reason:Y([`sampled`,`truncated`,`redacted`,`provider-limited`]),limitations:q(oE)}),K({owner:H(`assertion-material`),state:H(`unavailable`),reason:Y([`not-collected`,`source-unavailable`,`producer-failed`]),limitations:q(oE)}),K({owner:H(`assertion-material`),state:H(`not-applicable`),reason:Y([`optional-material`,`unsupported-subject`]),limitations:q(oE)})]),TE=K({state:Y([`available`,`not-recorded`,`partial`,`unavailable`])}),EE=K({assertions:TE,trace:TE,sources:TE,diff:TE,artifacts:TE,timing:TE,usage:TE,conversation:TE,commands:TE,diagnostics:TE}),DE=K({state:Y([`available`,`not-recorded`,`invalid`]),entries:q(K({entryId:U,display:K({label:B(U),key:B(U),groupPath:q(U)})}))}),OE=J([K({state:H(`not-recorded`),entryCount:H(0)}),K({state:H(`available`),entryCount:W,sourceSiteCount:W}),K({state:Y([`unsupported`,`failed`,`invalid`]),entryCount:H(0)})]),kE=K({core:iS,locator:U,originRun:nS,targets:q(K({runId:U,member:rS})),evidence:OE,assertions:DE,sections:EE,verdict:xE,score:bE,evidenceCoverage:q(CE),limitations:q(wE)}),AE=J([K({state:H(`available`),text:U}),K({state:H(`omitted`),reason:H(`inspection-result-byte-limit`),byteLength:W,byteLimit:W})]),jE=J([K({state:H(`mapped`),sourceItemId:U,sha256:U}),K({state:H(`unmapped`),reason:Y([`source-snapshot-not-recorded`,`position-unrepresentable`])})]),ME=K({entryId:U,sourceOrder:W,role:Y([`declaration`,`threshold`,`score`,`gate`,`optional`,`stop`]),start:K({line:W,column:W}),end:K({line:W,column:W}),source:jE}),NE=J([K({state:Y([`not-recorded`,`invalid`]),sourceSites:C_([]),hasMoreSourceSites:H(!1),omittedSourceSiteCount:H(0)}),K({state:H(`available`),sourceSites:q(ME),hasMoreSourceSites:G,omittedSourceSiteCount:W})]),PE=K({state:Y([`available`,`not-recorded`,`invalid`]),items:q(K({sourceItemId:U,path:U,byteLength:W,sha256:U,content:AE})),hasMore:G,omittedItemCount:W,assertions:NE}),FE=Y([`complete`,`partial`,`not-recorded`,`invalid`]),IE=J([xT,K({issue:U}),K({source:H(`agent-turns`),turnId:Kw,channel:Y([`conversation`,`events`,`actions`,`messages`,`status`,`data`]),state:Y([`partial`,`unavailable`]),reason:U}),K({source:H(`turn-contexts`),state:Y([`partial`,`not-recorded`,`invalid`]),limitations:q(J([xT,K({issue:U})]))})]),LE=Y(Ow),RE=J([K({state:H(`not-recorded`)}),K({state:H(`unmapped`),reason:Y([`location-not-captured`,`source-snapshot-not-recorded`,`position-unrepresentable`]),sessionIndex:W,turnIndex:W,sourceOrder:X(W)}),K({state:H(`mapped`),sourceItemId:fb,sha256:db,start:K({line:W,column:W}),end:K({line:W,column:W}),sessionIndex:W,turnIndex:W,sourceOrder:W})]),zE=J([K({state:H(`complete`)}),K({state:Y([`partial`,`unavailable`]),reason:U})]),BE=J([K({state:H(`recorded`),status:Y([`completed`,`failed`,`waiting`]),coverage:K({events:zE,actions:zE,messages:zE,status:zE,data:zE})}),K({state:H(`unavailable`),reason:Y([`send-failed`,`send-interrupted`]),coverage:K({state:H(`unavailable`),reason:Y([`send-failed`,`send-interrupted`])})})]),VE=J([xT,K({issue:U})]),HE=K({sourceItemId:fb,sha256:db,start:K({line:W,column:W}),end:K({line:W,column:W})}),UE=K({state:FE,limitations:q(VE),limitationsTruncated:G,omittedLimitationCount:W,items:q(K({diagnosticId:U,sequence:W,turnId:X(U),phase:Y([`attempt.setup`,`sandbox.prepare`,`agent.ensure`,`eval.run`,`agent.send`,`sandbox.command`,`assertion.evaluate`,`verdict.fold`,`attempt.teardown`]),kind:Y([`advisory`,`execution-error`]),code:U,summary:U,summaryTruncated:G,causes:q(K({code:U,summary:U,summaryTruncated:G})),causesTruncated:G,omittedCauseCount:W,redaction:J([K({state:H(`none`)}),K({state:H(`applied`),replacements:W})]),sourceFrame:X(HE)})),hasMore:G,omittedDiagnosticCount:W}),WE={itemId:rE,turnId:U,sequence:W},GE=J([K({...WE,kind:H(`message`),role:Y([`user`,`assistant`]),text:U,textTruncated:G}),K({...WE,kind:H(`tool-call`),tool:U,input:U,inputTruncated:G,toolOccurrenceId:B(iE)}),K({...WE,kind:H(`tool-result`),outcome:Y([`completed`,`rejected`,`failed`,`cancelled`]),output:U,outputTruncated:G,toolOccurrenceId:B(iE)}),K({...WE,kind:Y([`thinking-summary`,`compaction`,`context-injection`]),summary:U,summaryTruncated:G}),K({...WE,kind:H(`subagent`),state:Y([`started`,`completed`,`failed`]),label:U,summary:U,summaryTruncated:G}),K({...WE,kind:H(`input-request`),state:Y([`requested`,`answered`,`cancelled`]),prompt:U,promptTruncated:G,response:X(U),responseTruncated:G}),K({...WE,kind:Y([`skill-load`,`conversation-error`]),code:U,summary:U,summaryTruncated:G})]),KE=J([K({kind:H(`exited`),exitCode:W}),K({kind:H(`terminated`),reason:Y(Lw)}),K({kind:H(`not-started`),reason:Y(zw)})]),qE=K({conversation:K({state:FE,limitations:q(IE),limitationsTruncated:G,omittedLimitationCount:W,turns:q(K({turnId:U,sequence:W,sessionId:B(Qw),outcome:LE,terminal:BE,context:RE})),turnsTruncated:G,omittedTurnCount:W,items:q(GE),itemsTruncated:G,omittedItemCount:W}),commands:K({state:FE,limitations:q(IE),limitationsTruncated:G,omittedLimitationCount:W,items:q(K({commandId:aE,phase:Y(Nw),outcome:KE})),hasMore:G,omittedCommandCount:W}),diagnostics:UE,identityIndex:K({itemIds:q(rE),toolOccurrenceIds:K({ids:q(iE)}),commandIds:q(aE)})}),JE={itemId:rE,turnId:U,turnSequence:W,turnOutcome:LE,sessionId:B(U),eventId:B(U),sequence:B(W)},YE=J([K({...JE,kind:H(`message`),role:Y([`user`,`assistant`]),text:U}),K({...JE,kind:H(`tool-call`),toolOccurrenceId:B(iE),tool:U,input:U}),K({...JE,kind:H(`tool-result`),toolOccurrenceId:B(iE),outcome:Y([`completed`,`rejected`,`failed`,`cancelled`]),output:U}),K({...JE,kind:Y([`thinking-summary`,`compaction`,`context-injection`]),summary:U}),K({...JE,kind:H(`subagent`),state:Y([`started`,`completed`,`failed`]),label:U,summary:U}),K({...JE,kind:H(`input-request`),state:Y([`requested`,`answered`,`cancelled`]),prompt:U,response:X(U)}),K({...JE,kind:Y([`skill-load`,`conversation-error`]),code:U,summary:U})]),XE=K({turnId:U,sequence:W,outcome:LE}),ZE=J([K({kind:H(`shell`),command:U}),K({kind:H(`argv`),executable:U,arguments:q(U)})]),QE=J([K({kind:H(`sandbox-default`)}),K({kind:H(`project-relative`),path:U}),K({kind:H(`redacted`)})]),$E=K({text:U,retainedBytes:W,totalSafeUtf8Bytes:W,sha256:U,truncation:K({state:Y([`not-truncated`,`truncated`]),omittedSafeUtf8Bytes:W})}),eD=J([K({kind:H(`item`),itemId:rE,item:YE}),K({kind:H(`tool-occurrence`),toolOccurrenceId:iE,call:X(YE),result:X(YE),turn:K({call:X(XE),result:X(XE)})}),K({kind:H(`command`),commandId:aE,invocation:ZE,workingDirectory:QE,outcome:KE,turnId:X(U),phase:Y([`attempt.setup`,`sandbox.prepare`,`agent.ensure`,`eval.run`,`sandbox.command`,`attempt.teardown`]),sequence:W,stdout:$E,stderr:$E})]),tD=J([xT,K({issue:U})]),nD=J([K({state:H(`complete`)}),K({state:Y([`partial`,`unavailable`]),reason:U})]),rD=J([tD,K({source:H(`agent-turns`),turnId:U,channel:H(`usage`),state:Y([`partial`,`unavailable`]),reason:U})]),[iD,aD,oD]=AT.members,sD=J([K({turnId:Kw,...iD.fields}),K({turnId:Kw,...aD.fields}),K({turnId:Kw,...oD.fields})]),cD=K({state:Y([`available`,`partial`,`unavailable`]),value:X(W),observationCount:W}),lD=K({currency:U,value:U,observationCount:W}),uD=K({inputTokens:cD,outputTokens:cD,requests:cD,providerCosts:K({state:Y([`available`,`partial`,`unavailable`]),values:q(lD),observationCount:W})}),dD=K({state:FE,limitations:q(rD),limitationsTruncated:G,omittedLimitationCount:W,turns:q(K({turnId:U,coverage:nD})),turnsTruncated:G,omittedTurnCount:W,observations:q(sD),totals:uD,hasMore:G,omittedObservationCount:W}),fD=Y([`complete`,`partial`,`not-recorded`,`invalid`,`unavailable`]),pD=K({state:fD,facts:q(CE),limitations:q(wE)}),mD=K({state:fD,summary:X(K({turnCount:W,observationCount:W})),totals:uD,limitations:q(rD),limitationsTruncated:G,omittedLimitationCount:W}),hD=J([K({kind:H(`member-not-observed`),state:Y([`missing`,`not-dispatched`,`interrupted`])}),K({kind:H(`attempt-unresolved`),originRunId:U,attemptId:U}),K({kind:H(`coverage`),detail:wE}),K({kind:H(`usage`),detail:rD})]),gD=K({slot:tS,state:Y([`executed`,`carried`,`accepted`,`not-dispatched`,`interrupted`,`missing`]),locator:X(U),relation:X(Y([`origin`,`reference`])),outcome:X(Y([`completed`,`errored`,`cancelled`,`interrupted`])),verdict:xE,score:X(bE),coverage:pD,usage:mD,limitations:q(hD)}),_D=K({slotId:U,locator:X(U),limitation:hD}),vD=K({identity:K({runId:ib,experimentId:cb}),startedAt:_b,completedAt:_b,denominator:K({expected:W,observed:W}),members:q(gD),coverage:K({state:fD,expectedMemberCount:W,observedMemberCount:W,completeMemberCount:W,factCount:W,limitations:q(_D)}),usage:K({state:fD,expectedMemberCount:W,observedMemberCount:W,recordedAttemptCount:W,totals:uD,limitations:q(_D)}),limitations:q(_D)}),yD=K({state:FE,limitations:q(tD),limitationsTruncated:G,omittedLimitationCount:W,activities:q(K({activityId:U,sequence:W,parentActivityId:X(U),turnId:X(U),phase:U,label:U,startOffsetMs:W,durationMs:W,outcome:Y(Fw)})),hasMore:G,omittedActivityCount:W}),bD=J([K({kind:H(`text`),sha256:U,byteLength:W,content:Y([`available`,`omitted`])}),K({kind:H(`elided`),reason:Y([`binary`,`oversized-text`]),byteLength:W}),K({kind:H(`unavailable`),reason:Y([`unsupported-input`,`capture-failed`,`capture-interrupted`])})]),xD=J([K({state:H(`absent`)}),K({state:H(`present`),revision:bD})]),SD=K({windowId:U,sequence:W,changes:q(K({changeId:U,path:U,kind:Y([`created`,`modified`,`deleted`]),before:xD,after:xD}))}),CD=J([K({state:H(`not-recorded`),windows:C_([])}),K({state:H(`invalid`),issues:q(U),windows:C_([])}),K({state:Y([`complete`,`partial`]),limitations:q(ZT),windows:q(SD)})]),wD=U.pipe(O_(e=>gy.test(e),{identifier:`AttemptLocator`,description:`a canonical @-prefixed Attempt locator`})),TD=U.pipe(Z($(AC))),ED=U.pipe(Z($(NC))),DD=U.pipe(Z($(IC))),OD=q(ib),kD=(e,t)=>K({kind:H(e),...t}),AD=K({kind:Y([`project-record`,`external-record`]),sealedCutoffIdentity:U}),jD=K({kind:H(`inspection-sealed-cutoff`),identity:U,runCount:W,runs:q(K({runId:U,logicalSealIdentity:U}))}),MD=K({requestedRunIds:q(U),selectedRunIds:q(U),missingRunIds:q(U)}),ND=K({protocol:H(cw),outcome:H(`success`),source:AD,sealedCutoff:jD,selection:MD,issues:C_([]),evidence:K({refs:q(U)})}),PD=K({protocol:H(cw),outcome:H(`success`),source:AD,sealedCutoff:K({kind:H(`inspection-sealed-cutoff`),identity:U,runCount:W}),selection:K({requestedRunIds:q(U),selectedRunIds:q(U),missingRunIds:q(U),returnedRunCount:W,totalRunCount:W,truncated:G}),issues:C_([]),evidence:K({refs:q(U)})}),FD=J([K({code:H(`selection-run-missing`),side:Y([`left`,`right`]),runId:U}),K({code:H(`comparison-member-set-mismatch`)})]),ID=ND.pipe(v_({issues:q(FD)})),LD=J([K({state:H(`not-recorded`)}),K({state:H(`available`),value:V(MS),collection:K({state:Y([`complete-page`,`bounded-page`]),items:q(V(jS)),hasMore:G}),contents:q(K({logicalHandle:U,byteLength:W,digest:U})),contentsTruncated:G})]),RD=K({runId:U,writerGeneration:U,startedAt:U,logicalSealIdentity:U,slotCount:W,memberCount:W,attemptCount:W,attachmentCount:W,contentCount:W,contentByteLength:W,sealEntryCount:W}),zD=K({key:U,runId:U,slotId:U,evalId:U,attemptOrdinal:W,locator:U}),BD=K({mode:Y([`side-by-side`,`exact`,`paired`]),left:K({runs:q(nS),members:q(zD)}),right:K({runs:q(nS),members:q(zD)}),exactMemberSet:G,pairs:q(K({key:U,left:zD,right:zD}))}),VD=e=>Object.freeze(e),HD=Object.freeze({"overview.get":VD({request:kD(`overview.get`,{runIds:B(OD)}),result:{overview:_E},factKinds:[`core`,`assertions`,`attempt-cost`]}),"experiment.get":VD({request:kD(`experiment.get`,{experimentId:cb}),result:{experiment:vE},factKinds:[`core`,`assertions`,`attempt-cost`]}),"runs.list":VD({request:kD(`runs.list`,{continuation:B(U)}),result:{runs:q(RD),continuation:B(U)},factKinds:[`core`]}),"run.get":VD({request:kD(`run.get`,{runId:ib}),result:{run:yE},factKinds:[`core`]}),"run.summary":VD({request:kD(`run.summary`,{runId:ib}),result:{summary:SE},factKinds:[`core`,`assertions`,`agent-turns`]}),"run.overview":VD({request:kD(`run.overview`,{runId:ib}),result:{runOverview:vD},factKinds:[`core`,`assertions`,`agent-turns`]}),"attempt.get":VD({request:kD(`attempt.get`,{locator:wD}),result:{attempt:kE},factKinds:[`core`,`assertions`]}),"attempt.assertion.detail":VD({request:kD(`attempt.assertion.detail`,{locator:wD,entryId:Fv}),result:{assertion:Ew},factKinds:[`assertions`,`agent-turns`,`sources`]}),"attempt.trace":VD({request:kD(`attempt.trace`,{locator:wD}),result:{trace:qE},factKinds:[`agent-turns`,`turn-contexts`,`sandbox-commands`,`runner-activities`,`runner-diagnostics`]}),"attempt.trace.detail":VD({request:kD(`attempt.trace.detail`,{locator:wD,selector:J([kD(`item`,{itemId:TD}),kD(`tool-occurrence`,{toolOccurrenceId:ED}),kD(`command`,{commandId:DD})])}),result:{detail:eD},factKinds:[`agent-turns`,`sandbox-commands`]}),"attempt.timing":VD({request:kD(`attempt.timing`,{locator:wD}),result:{timing:yD},factKinds:[`runner-activities`]}),"attempt.usage":VD({request:kD(`attempt.usage`,{locator:wD}),result:{usage:dD},factKinds:[`agent-turns`]}),"attempt.diff":VD({request:kD(`attempt.diff`,{locator:wD}),result:{diff:CD},factKinds:[`file-changes`]}),"attempt.sources":VD({request:kD(`attempt.sources`,{locator:wD}),result:{sources:PE},factKinds:[`assertions`,`sources`]}),"attempt.artifacts":VD({request:kD(`attempt.artifacts`,{locator:wD}),result:{artifacts:LD},factKinds:[`artifacts`]}),"runs.compare":VD({request:kD(`runs.compare`,{mode:Y([`side-by-side`,`exact`,`paired`]),leftRunIds:OD,rightRunIds:OD}),result:{comparison:BD},factKinds:[`core`]})}),UD=Y(Object.freeze(Object.keys(HD))),WD=Object.entries(HD),GD=K({protocol:H(cw),operation:J(WD.map(([,e])=>e.request))}),KD=(e,t)=>{let n=v_({operation:H(e),...t.result});return e===`runs.list`?PD.pipe(n):e===`runs.compare`?ID.pipe(n):ND.pipe(n)},qD=J(WD.map(([e,t])=>KD(e,t))),JD=(e,t)=>{let n=v_({outcome:H(`explanation`),operation:H(e),factKinds:C_(t.factKinds.map(e=>H(e)))});return e===`runs.list`?PD.pipe(n):ND.pipe(n)},YD=J(WD.map(([e,t])=>JD(e,t))),XD=J(WD.map(([e])=>K({id:H(e)}))),ZD=J([K({protocol:H(cw),outcome:H(`discovery`),operations:q(XD)}),qD,YD,K({protocol:H(cw),outcome:H(`failure`),operation:X(UD),failure:K({code:Y([`inspection-request-invalid`,`inspection-selection-missing`,`inspection-source-invalid`,`inspection-record-integrity-failure`,`inspection-operation-failed`,`inspection-result-invalid`]),reason:U,identity:B(K({runId:U})),correction:Y([`fix-request`,`choose-existing-selection`,`fix-record-source`,`retry`,`upgrade-or-report`])})})]);function QD(e){let t=l_(ZD,{errors:`all`,onExcessProperty:`error`})(e);return Xu(t)?{success:!0,value:e}:{success:!1,reason:String(t.failure)}}function $D(e,t){return e.outcome===`success`&&e.operation===t?{success:!0,value:e}:{success:!1,reason:`expected success ${t}, received ${e.outcome}${`operation`in e?` ${e.operation}`:``}`}}var eO=l_(GD,{onExcessProperty:`error`});function tO(e){let t=eO({protocol:cw,operation:e});return Yu(t)?Ju(Object.freeze({classification:`protocol/query`,code:`inspection-request-invalid`,reason:String(t.failure)})):qu(t.success.operation)}l_(GD,{onExcessProperty:`error`});function nO(e){let t=new Set,n=(e,r)=>{if(e===null||typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:rO(r,`numbers must be finite`);if(Array.isArray(e)){if(t.has(e))return rO(r,`cyclic arrays are not encodable`);t.add(e);let i=[];for(let[t,a]of e.entries()){let e=n(a,[...r,String(t)]);if(iO(e))return e;i.push(e)}return t.delete(e),Object.freeze(i)}if(typeof e!=`object`||!e)return rO(r,`unsupported ${typeof e} value`);if(t.has(e))return rO(r,`cyclic objects are not encodable`);let i=Object.getPrototypeOf(e);if(i!==Object.prototype&&i!==null)return rO(r,`only plain objects may cross Inspection delivery`);t.add(e);let a={};for(let t of Object.keys(e).sort(oO)){let i=n(Reflect.get(e,t),[...r,t]);if(iO(i))return i;a[t]=i}return t.delete(e),Object.freeze(a)};return n(e,[])}function rO(e,t){return Object.freeze({code:`inspection-result-invalid`,reason:`${e.length===0?`$`:e.join(`.`)}: ${t}`})}function iO(e){return aO(e)&&e.code===`inspection-result-invalid`&&typeof e.reason==`string`}function aO(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function oO(e,t){return e<t?-1:+(e>t)}function sO(e){let t=nO(e);return lO(t)?Ju(t):qu(`${cO(t)}\n`)}function cO(e){if(e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(cO).join(`,`)}]`;let t=e;return`{${Object.keys(t).sort(uO).map(e=>`${JSON.stringify(e)}:${cO(t[e])}`).join(`,`)}}`}function lO(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Reflect.get(e,`code`)===`inspection-result-invalid`&&typeof Reflect.get(e,`reason`)==`string`}function uO(e,t){return e<t?-1:+(e>t)}function dO(e,t){let n=sO(t);if(Yu(n))throw Error(`Inspection operation query key is invalid: ${n.failure.reason}`);return[`inspection`,e,`${t.kind}:${n.success}`]}function fO(e,t){return Fs({queryKey:dO(e.identity,t),queryFn:()=>e.inspectRepository(t)})}var pO=(0,f.createContext)(null);function mO({runtime:e,children:t}){let n=(0,f.useSyncExternalStore)(t=>e.subscribe(t),()=>e.current,()=>e.current);if(n===void 0)throw Error(`No View generation has been committed.`);return(0,N.jsx)(pO.Provider,{value:n.binding,children:(0,N.jsx)(ho,{client:n.queryClient,children:t})})}function hO(){let e=(0,f.useContext)(pO);if(e===null)throw Error(`useCurrentGeneration must be used inside InspectionRuntimeProvider.`);return e}function gO(e,t={}){let n=(0,f.useContext)(pO);if(n===null)throw Error(`useInspectionQuery must be used inside InspectionRuntimeProvider.`);let r=(t.enabled??!0)&&e!==null;if(e===null)return Ps({queryKey:[`inspection`,n.identity,`disabled`],queryFn:Wo,enabled:!1});let i=fO(n,e);return Ps({queryKey:i.queryKey,queryFn:i.queryFn,enabled:r,...t.select===void 0?{}:{select:t.select}})}var _O=class{generation;#e=!1;constructor(e){this.generation=e}get identity(){return this.generation.identity}inspect(e){return this.#e?Promise.reject(Error(`Generation lease is released.`)):this.generation.queryClient.fetchQuery(fO(this.generation,e))}release(){this.#e||(this.#e=!0,this.generation.releaseLease())}},vO=class{repository;identity;queryClient=new Ts({defaultOptions:{queries:{gcTime:5*6e4,retry:1,staleTime:1/0,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1}}});#e=`preparing`;#t=0;#n=0;#r;binding;constructor(e){this.repository=e,this.identity=e.generationId;let t=this;this.binding=Object.freeze({identity:this.identity,queryClient:this.queryClient,get snapshot(){return t.snapshot},inspectRepository(e){return t.inspectRepository(e)}})}get status(){return this.#e}get snapshot(){if(this.#r===void 0)throw Error(`View generation snapshot is not ready.`);return this.#r}attachSnapshot(e){if(this.#e!==`preparing`||this.#r!==void 0)throw Error(`A View generation snapshot can only be attached once while preparing.`);this.#r=e}acquire(){if(this.#e===`retiring`||this.#e===`closed`)throw Error(`View generation is ${this.#e}.`);return this.#t+=1,new _O(this)}inspectRepository(e){if(this.#e===`retiring`||this.#e===`closed`)return Promise.reject(Error(`View generation is ${this.#e}.`));this.#n+=1;let t;try{t=this.repository.inspect(e)}catch(e){return this.#i(),Promise.reject(e)}return t.finally(()=>this.#i())}publish(){if(this.#e!==`preparing`)throw Error(`Only a preparing generation can be published.`);this.#e=`current`}drain(){this.#e===`retiring`||this.#e===`closed`||(this.#e=`retiring`,this.queryClient.clear(),this.#a())}close(){this.#t=0,this.#o()}releaseLease(){this.#t>0&&--this.#t,this.#a()}#i(){this.#n>0&&--this.#n,this.#a()}#a(){this.#e===`retiring`&&this.#t===0&&this.#n===0&&this.#o()}#o(){this.#e!==`closed`&&(this.#e=`closed`,this.queryClient.clear(),this.repository.close())}},yO=class{#e;#t=new Set;#n=new Set;get current(){return this.#e}acquireCurrent(){let e=this.#e;if(e===void 0)throw Error(`No View generation has been committed.`);return e.acquire()}subscribe(e){return this.#n.add(e),()=>this.#n.delete(e)}prepare(e){let t=new vO(e);try{let e={generation:t,lease:t.acquire()};return this.#t.add(t),e}catch(e){throw t.close(),e}}attachSnapshot(e,t){if(!this.#t.has(e.generation))throw Error(`Only a prepared View generation can receive a snapshot.`);e.generation.attachSnapshot(t)}commit(e){if(!this.#t.delete(e.generation)||e.generation.status!==`preparing`)throw e.lease.release(),e.generation.close(),Error(`Only an open View generation can be committed.`);let t=this.#e;e.generation.snapshot,e.generation.publish(),this.#e=e.generation,e.lease.release();for(let e of this.#n)e();return t}retire(e){e!==void 0&&e!==this.#e&&e.drain()}reject(e){this.#t.delete(e.generation),e.lease.release(),e.generation.close()}close(){let e=this.#e;this.#e=void 0,e?.close();for(let e of this.#t)e.close();this.#t.clear()}dispose(){this.close()}},bO=class extends Error{classification=`route-input`;translationKey=`report.unableToLoad`},xO=class extends Error{classification=`selection`;translationKey=`report.unableToLoad`};function SO(e){let t=tO(e);if(Yu(t))throw new bO(`Invalid Insight route input.`);return t.success}function CO(e=[]){let t=SO({kind:`overview.get`,...e.length===0?{}:{runIds:e}});if(t.kind!==`overview.get`)throw new bO(`Invalid overview operation.`);return t}function wO(e){let t=SO({kind:`run.get`,runId:e}),n=SO({kind:`run.summary`,runId:e});if(t.kind!==`run.get`||n.kind!==`run.summary`)throw new bO(`Invalid run route.`);return[t,n]}function TO(e){let t=SO({kind:`attempt.get`,locator:e}),n=SO({kind:`attempt.trace`,locator:e});if(t.kind!==`attempt.get`||n.kind!==`attempt.trace`)throw new bO(`Invalid attempt route.`);return[t,n]}function EO(e){let t=SO(e);switch(t.kind){case`attempt.assertion.detail`:case`attempt.trace.detail`:case`attempt.timing`:case`attempt.usage`:case`attempt.sources`:case`attempt.diff`:case`attempt.artifacts`:return t;default:throw new bO(`Invalid Attempt detail operation.`)}}function DO(e){return Object.freeze({state:`available`,value:e})}function OO(){return Object.freeze({state:`unavailable`})}function kO(e){return e===`complete`?`available`:e===`partial`?`partial`:e===`not-recorded`?`not-recorded`:`unavailable`}function AO(e,t){let n=e.attempt.originRun.expectedSlots.find(({slotId:t})=>t===e.attempt.core.slotId),r=e.attempt.score,i=r.state===`complete`?r.earned:void 0;return Object.freeze({locator:e.attempt.locator,runId:e.attempt.originRun.runId,experimentId:e.attempt.originRun.experimentId,evalId:e.attempt.core.evalId,summary:Object.freeze({experimentId:e.attempt.originRun.experimentId,identity:Object.freeze({runId:e.attempt.originRun.runId,evalId:e.attempt.core.evalId,attempt:n===void 0?OO():DO(n.attemptOrdinal)}),verdict:e.attempt.verdict??`unknown`,startedAt:new Date(e.attempt.originRun.startedAt).toISOString(),durationMs:OO(),capabilities:Object.freeze({source:e.attempt.sections.sources.state,execution:kO(t.trace.conversation.state),timing:e.attempt.sections.timing.state,diff:e.attempt.sections.diff.state}),...i===void 0?{}:{totalScore:i}}),assertionEntryIds:Object.freeze(e.attempt.assertions.entries.map(({entryId:e})=>e)),traceItemIds:Object.freeze([...t.trace.identityIndex.itemIds]),toolOccurrenceIds:Object.freeze([...t.trace.identityIndex.toolOccurrenceIds.ids]),commandIds:Object.freeze([...t.trace.identityIndex.commandIds])})}function jO(e,t){let[n,r]=TO(t);return Fs({queryKey:[`insight-attempt`,e.identity,t],queryFn:async()=>{let[t,i]=await Promise.all([e.queryClient.fetchQuery(fO(e,n)),e.queryClient.fetchQuery(fO(e,r))]);return AO(t,i)}})}function MO(e,t,n,r,i){return Fs({queryKey:[`insight-results`,e.identity,r??null,i??null],queryFn:async()=>{let e=t.groups.find(({identity:e})=>e.kind===r&&(e.kind===`named`?e.groupId===i:e.experimentId===i));if(e===void 0&&t.groups.length>0)throw new xO(`Results selection is unavailable.`);let a=e?.members??[];return Object.freeze({overview:n,selectedExperiments:a,selectionTitle:e?.label??`Results`})}})}function NO(e,t,n){return Fs({queryKey:[`insight-experiment`,e.identity,n],queryFn:async()=>{if(!t.catalog.experiments.includes(n))throw new xO(`Experiment selection is unavailable.`);let e=[n];return Object.freeze({overview:t,selectedExperiments:Object.freeze(e),selectionTitle:e[0]??`Results`})}})}function PO(e){let t=e.overview.cells.map(e=>Object.freeze({experimentId:e.experimentId,evalId:e.evalId,evaluationKind:e.evaluationKind,passRate:FO(e.verdict.passRate),score:FO(e.score),costUSD:FO(e.costUSD),durationMs:FO(e.durationMs),tokens:FO(e.tokens),tally:Object.freeze({...e.verdict.tally}),members:Object.freeze(e.members.map(e=>Object.freeze({runId:e.runId,attemptOrdinal:e.attemptOrdinal,publication:e.publication.state===`published`?Object.freeze({state:`published`,locator:e.publication.attemptLocator,score:FO(e.publication.score),costUSD:FO(e.publication.costUSD),durationMs:FO(e.publication.durationMs),tokens:FO(e.publication.tokens)}):e.publication})))})),n=e.overview.experiments.map(e=>Object.freeze({experimentId:e.experimentId,evaluationKind:e.evaluationKind,passRate:FO(e.verdict.passRate),score:FO(e.score),costUSD:FO(e.costUSD),durationMs:FO(e.durationMs),tokens:FO(e.tokens),agent:e.agent,model:e.model,groups:Object.freeze(e.groups.map(e=>Object.freeze({groupPath:Object.freeze([...e.groupPath]),evaluationKind:e.evaluationKind,passRate:FO(e.verdict.passRate),score:FO(e.score),costUSD:FO(e.costUSD),durationMs:FO(e.durationMs),tokens:FO(e.tokens)})))})),r=n.map(({experimentId:e})=>e),i=BO(t.flatMap(e=>e.members.map(t=>({runId:t.runId,experimentId:e.experimentId}))),({runId:e})=>e),a=BO(t.flatMap(e=>e.members.flatMap(t=>t.publication.state===`published`?[{locator:t.publication.locator,experimentId:e.experimentId}]:[])),({locator:e})=>e);return Object.freeze({cells:Object.freeze(t),experiments:Object.freeze(n),catalog:Object.freeze({experiments:Object.freeze(r),runExperiments:Object.freeze(i),attemptExperiments:Object.freeze(a)})})}function FO(e){return Object.freeze({value:e.value,state:e.state,samples:e.samples,total:e.total,basis:e.basis,issues:Object.freeze(e.issues),refs:Object.freeze(e.refs.map(e=>Object.freeze({identity:Object.freeze({kind:e.identity.kind,locator:e.identity.locator})}))),...e.unit===void 0?{}:{unit:e.unit},...`source`in e&&(e.source===`observed`||e.source===`estimated`||e.source===null)?{source:e.source}:{},...e.bounds===void 0?{}:{bounds:Object.freeze({...e.bounds})}})}function IO(e,t){let n=new Set(t),r=e.cells.filter(({experimentId:e})=>n.has(e)),i=[...new Set(r.map(({evalId:e})=>e))];return t.flatMap(t=>{let n=e.experiments.find(e=>e.experimentId===t);if(n===void 0)return[];let a=r.filter(e=>e.experimentId===t);if(a.length===0)return[];let o=a.map(LO),s=n.evaluationKind,c=i.filter(e=>!a.some(t=>t.evalId===e));return[Object.freeze({experimentId:t,agent:n.agent,model:n.model,flags:null,evaluationKind:s,score:n.score,costUSD:n.costUSD,durationMs:n.durationMs,tokens:n.tokens,endToEndPassRate:n.passRate,missingEvalIds:Object.freeze(c),groupMetrics:RO(n.groups),evalRows:Object.freeze(o),href:`#/experiment/${encodeURIComponent(t)}`})]})}function LO(e){let t=e.members.flatMap(t=>{if(t.publication.state!==`published`)return[];let n=e.members.length===1?zO(e.tally):null;return[Object.freeze({locator:t.publication.locator,experimentId:e.experimentId,evalId:e.evalId,attemptOrdinal:t.attemptOrdinal,verdict:n,failureSummary:null,evaluationKind:e.evaluationKind===`pass`?`pass`:`points`,score:t.publication.score,costUSD:t.publication.costUSD,durationMs:t.publication.durationMs,tokens:t.publication.tokens,startedAt:null,href:`#/attempt/${t.publication.locator.startsWith(`@`)?t.publication.locator.slice(1):t.publication.locator}`})]});return Object.freeze({evalId:e.evalId,evaluationKind:e.evaluationKind===`pass`?`pass`:`points`,score:e.score,costUSD:e.costUSD,durationMs:e.durationMs,tokens:e.tokens,endToEndPassRate:e.passRate,attempts:Object.freeze(t)})}function RO(e){return new Map(e.map(e=>[e.groupPath.join(`/`),Object.freeze({passRate:e.passRate,score:e.score,costUSD:e.costUSD,durationMs:e.durationMs,tokens:e.tokens})]))}function zO(e){return e.passed===1&&e.failed===0&&e.errored===0&&e.skipped===0?`passed`:e.passed===0&&e.failed===1&&e.errored===0&&e.skipped===0?`failed`:e.passed===0&&e.failed===0&&e.errored===1&&e.skipped===0?`errored`:e.passed===0&&e.failed===0&&e.errored===0&&e.skipped===1?`skipped`:null}function BO(e,t){let n=new Map;for(let r of e)n.set(t(r),r);return Object.freeze([...n.values()])}function VO(e,t){return Object.freeze({runId:e.run.value.runId,experimentId:e.run.value.experimentId,members:Object.freeze(t.summary.members.map((e,t)=>Object.freeze({key:`${e.slotId}:${t}`,slotId:e.slotId,evalId:e.evalId,attemptOrdinal:e.attemptOrdinal,state:e.state,locator:e.locator,outcome:e.outcome,verdict:e.verdict})))})}function HO(e,t){let[n,r]=wO(t);return Fs({queryKey:[`insight-run`,e.identity,t],queryFn:async()=>{let[t,i]=await Promise.all([e.queryClient.fetchQuery(fO(e,n)),e.queryClient.fetchQuery(fO(e,r))]);return VO(t,i)}})}function UO({checkForUpdate:e,refresh:t}){let n=hO(),{manifest:r,routeGuard:i}=n.snapshot,a=fr(),o=(0,f.useRef)(void 0);return i!==void 0&&a.pathname===i&&(o.current=n.identity),i!==void 0&&o.current!==n.identity&&a.pathname!==i?(0,N.jsx)($r,{to:i,replace:!0,state:null}):(0,N.jsx)(WO,{manifest:r,refresh:t,checkForUpdate:e})}function WO({checkForUpdate:e,manifest:t,refresh:r}){let i=hO(),[a,o]=(0,f.useState)(!1),[s,c]=(0,f.useState)(),[l,u]=(0,f.useState)(!1),{i18n:d,t:p}=n(),m=fr(),h=hr(),g=Ir(),_=vr(),v=Ps({queryKey:[`view`,`update-available`,i.identity],queryFn:e,refetchInterval:500,staleTime:0,retry:!1}),y=m.state?.background,b=g.at(-1)?.handle,x=(0,f.useRef)(_);(b?.presentation!==`overlay`||y===void 0)&&(x.current=_);let S=d.resolvedLanguage??`en`;(0,f.useEffect)(()=>{document.title=p(`insight.title`)},[p]);let C=t.experimentSelection?.options??[],w=C.find(({route:e})=>m.pathname===e)??C[0];return(0,N.jsxs)(`div`,{onClickCapture:(0,f.useCallback)(e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target instanceof Element?e.target.closest(`a[href]`):null;if(t===null||t.target&&t.target!==`_self`||t.hasAttribute(`download`))return;let n=new URL(t.href,document.baseURI);if(n.origin!==window.location.origin||!n.hash.startsWith(`#/`))return;let r=n.hash.slice(1);!r.startsWith(`/attempt/`)&&!r.startsWith(`/run/`)&&!r.startsWith(`/experiment/`)||(e.preventDefault(),h(r,{state:{background:y??m}}))},[y,m,h]),children:[(0,N.jsxs)(`header`,{className:`niceeval-view-shell`,children:[(0,N.jsxs)(`a`,{className:`niceeval-view-brand`,href:`https://niceeval.com/?utm_source=insight&utm_medium=brand`,target:`_blank`,rel:`noopener`,children:[(0,N.jsx)(`span`,{className:`niceeval-view-mark`,"aria-hidden":`true`}),(0,N.jsx)(`span`,{children:`NiceEval`})]}),(0,N.jsx)(`nav`,{className:`niceeval-view-nav`,"aria-label":p(`nav.pages`),children:(0,N.jsx)(`a`,{href:`#${t.defaultRoute}`,"aria-current":b?.presentation===`page`?`page`:void 0,children:p(`insight.navigation`)})}),(0,N.jsxs)(`div`,{className:`niceeval-view-controls`,children:[w===void 0?null:(0,N.jsxs)(`label`,{className:`niceeval-view-experiment`,children:[(0,N.jsx)(`span`,{children:p(`nav.experiments`)}),(0,N.jsx)(`select`,{value:w.route,onChange:e=>h(e.target.value),children:C.map(e=>(0,N.jsx)(`option`,{value:e.route,children:e.label},e.route))})]}),(0,N.jsx)(`label`,{className:`niceeval-view-language`,children:(0,N.jsxs)(`select`,{"aria-label":p(`nav.language`),value:S,onChange:e=>void d.changeLanguage(e.target.value),children:[(0,N.jsx)(`option`,{value:`en`,children:`EN`}),(0,N.jsx)(`option`,{value:`zh-CN`,children:`中文`})]})}),(0,N.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>{o(!0),u(!1),c(void 0),r().then(e=>{c(e.noticeKey)}).catch(()=>u(!0)).finally(()=>o(!1))},children:p(a?`refresh.working`:`refresh.action`)}),v.data===!0&&!a?(0,N.jsx)(`span`,{role:`status`,children:p(`refresh.available`)}):null,s===void 0?null:(0,N.jsx)(`span`,{role:`status`,children:p(s)}),l?(0,N.jsx)(`span`,{role:`alert`,children:p(`refresh.failed`)}):null]})]}),(0,N.jsx)(`main`,{className:`niceeval-view-main`,children:y===void 0?_:(0,N.jsxs)(N.Fragment,{children:[x.current,_]})})]})}function GO(e){let t=e.indexOf(`/`);if(t===-1)return Object.freeze({kind:`singleton`,experimentId:e,key:`singleton/${e}`});let n=e.slice(0,t);return Object.freeze({kind:`named`,groupId:n,key:`named/${n}`})}function KO(e,t=[]){let n=new Map;for(let t of[...new Set(e.experiments)].sort(ZO)){let e=GO(t),r=n.get(e.key)??{identity:e,members:[]};r.members.push(t),n.set(e.key,r)}let r=Object.freeze([...n.values()].sort((e,t)=>ZO(e.identity.key,t.identity.key)).map(({identity:e,members:t})=>Object.freeze({identity:e,members:Object.freeze(t),route:qO(e),label:e.key}))),i=t.map(t=>e.runExperiments.find(e=>e.runId===t)?.experimentId).find(e=>e!==void 0),a=i===void 0?r[0]:r.find(({members:e})=>e.includes(i))??r[0],o=a?.route??`/`,s=r.map(e=>XO({pageId:`group:${e.identity.key}`,route:e.route,title:{en:`NiceEval Insight`,"zh-CN":`NiceEval Insight`},navigation:!1,presentation:`page`,target:e.identity.kind===`named`?{kind:`group`,groupKind:`named`,key:e.identity.groupId}:{kind:`group`,groupKind:`singleton`,key:e.identity.experimentId}}));for(let{experimentId:t}of e.experiments.map(e=>({experimentId:e})))s.push(XO({pageId:`experiment:${t}`,route:`/experiment/${encodeURIComponent(t)}`,title:{en:`Experiment`,"zh-CN":`实验`},navigation:!1,presentation:`overlay`,target:{kind:`experiment`,experimentId:t}}));for(let{runId:t}of YO(e.runExperiments,({runId:e})=>e))s.push(XO({pageId:`run:${t}`,route:`/run/${encodeURIComponent(t)}`,title:{en:`Run`,"zh-CN":`运行`},navigation:!1,presentation:`overlay`,target:{kind:`run`,runId:t}}));for(let{locator:t}of YO(e.attemptExperiments,({locator:e})=>e))s.push(XO({pageId:`attempt:${t}`,route:`/attempt/${JO(t)}`,title:{en:`Attempt`,"zh-CN":`尝试`},navigation:!1,presentation:`overlay`,target:{kind:`attempt`,locator:t}}));return s.unshift(XO({pageId:`overview`,route:`/`,title:{en:`NiceEval Insight`,"zh-CN":`NiceEval Insight`},navigation:!0,presentation:`page`,target:a===void 0?{kind:`group`,groupKind:`singleton`,key:``}:a.identity.kind===`named`?{kind:`group`,groupKind:`named`,key:a.identity.groupId}:{kind:`group`,groupKind:`singleton`,key:a.identity.experimentId}})),Object.freeze({title:{en:`NiceEval Insight`,"zh-CN":`NiceEval Insight`},defaultRoute:o,experimentSelection:{options:r.map(({route:e,label:t})=>Object.freeze({route:e,label:t}))},pages:Object.freeze(s),groups:r})}function qO(e){return e.kind===`named`?`/group/named/${encodeURIComponent(e.groupId)}`:`/group/singleton/${encodeURIComponent(e.experimentId)}`}function JO(e){return encodeURIComponent(e.startsWith(`@`)?e.slice(1):e)}function YO(e,t){let n=new Map;for(let r of e)n.set(t(r),r);return[...n.values()]}function XO(e){return Object.freeze(e)}function ZO(e,t){return e<t?-1:+(e>t)}var QO=K({generationId:U,sourceCutoffIdentity:U,refreshSupported:G,stale:G});K({generationId:U}),K({generationId:U,request:GD});var $O=K({code:Y([`view-request-invalid`,`view-generation-not-found`,`view-generation-stale`,`view-inspection-failed`]),reason:U,correction:Y([`fix-request`,`refresh-generation`,`retry`])}),ek={errors:`all`,onExcessProperty:`error`},tk=l_(QO,ek),nk=l_($O,ek),rk=class extends Error{status;code;correction;classification=`view-http`;constructor(e,t,n,r,i){super(r,i),this.status=e,this.code=t,this.correction=n,this.name=`ViewHttpError`}},ik=class{descriptor;generationId;#e=new AbortController;#t=!1;constructor(e){this.descriptor=e,this.generationId=e.generationId}async inspect(e){if(this.#t)throw Error(`HTTP Inspection repository is closed.`);let t=tO(e);if(Yu(t))throw Error(t.failure.reason);let n=await lk(`/_niceeval/inspection`,{method:`POST`,signal:this.#e.signal,headers:{"content-type":`application/json`},body:JSON.stringify({generationId:this.descriptor.generationId,request:{protocol:cw,operation:t.success}})}),r=await uk(n);if(!n.ok)throw dk(n.status,r);let i=QD(r);if(!i.success)throw new rk(n.status,`view-response-invalid`,`retry`,i.reason);let a=$D(i.value,e.kind);if(!a.success)throw new rk(n.status,`view-response-invalid`,`retry`,a.reason);return a.value}close(){this.#t||(this.#t=!0,this.#e.abort())}};async function ak(){return ck(`/_niceeval/generation`,{method:`GET`})}async function ok(){return ck(`/_niceeval/generation/refresh`,{method:`POST`})}async function sk(e){return ck(`/_niceeval/generation/commit`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({generationId:e})})}async function ck(e,t){let n=await lk(e,t),r=await uk(n);if(!n.ok)throw dk(n.status,r);let i=tk(r);if(Yu(i))throw new rk(n.status,`view-response-invalid`,`retry`,String(i.failure));return i.success}function lk(e,t){return fetch(new URL(e,document.baseURI),{...t,cache:`no-store`,credentials:`same-origin`})}async function uk(e){try{return await e.json()}catch(t){throw new rk(e.status,`view-response-invalid`,`retry`,`View HTTP response is not JSON.`,{cause:t})}}function dk(e,t){let n=nk(t);return Yu(n)?new rk(e,`view-response-invalid`,`retry`,`View HTTP request failed (${e}).`):new rk(e,n.success.code,n.success.correction,n.success.reason)}var fk=class extends Error{classification=`generation-prepare`;translationKey=`report.unableToLoad`};async function pk(){let e=new URL(document.baseURI).searchParams.getAll(`run`),t=new yO;window.addEventListener(`pagehide`,()=>t.dispose(),{once:!0});let n=await ak(),r=t.prepare(new ik(n)),i,a;try{a=PO(await r.lease.inspect(CO(e))),i=KO(a.catalog);let n=mk();await yk(r.lease,i,a,n??i.defaultRoute),t.attachSnapshot(r,bk(i,a)),t.commit(r)}catch(e){throw t.reject(r),new fk(`Unable to prepare initial generation.`,{cause:e})}let o=e=>async()=>{let n=t.acquireCurrent();try{return await e(n)}finally{n.release()}},s=(e,t)=>{let n=e[t];if(!n)throw new bO(`Insight route parameter is missing.`);try{return decodeURIComponent(n)}catch{throw new bO(`Insight route parameter is malformed.`)}},c=0,l=Bi([{path:`/`,element:(0,N.jsx)(mO,{runtime:t,children:(0,N.jsx)(UO,{checkForUpdate:async()=>(await ok()).generationId!==t.current?.identity,refresh:async()=>{let n=c,r=l.state.location.pathname,i=l.state.location.state?.background?.pathname,a=await ok(),o=t.prepare(new ik(a)),s,u,d;try{if(s=PO(await o.lease.inspect(CO(e))),u=KO(s.catalog),d=_k(t.current.snapshot.overview,s,u,r),await yk(o.lease,u,s,d.route),i!==void 0&&await yk(o.lease,u,s,i),c!==n||l.state.location.pathname!==r)throw new fk(`View location changed while refresh was preparing.`);if(t.attachSnapshot(o,bk(u,s,d.fallback?d.route:void 0)),(await sk(a.generationId)).generationId!==a.generationId)throw new fk(`View Host committed an unexpected generation.`)}catch(e){throw t.reject(o),new fk(`Unable to prepare refreshed generation.`,{cause:e})}let f=t.commit(o);return t.retire(f),Object.freeze({manifest:u,...d.fallback?{fallbackRoute:d.route,noticeKey:`refresh.selectionChanged`}:{}})}})}),errorElement:(0,N.jsx)(hk,{}),children:[{index:!0,element:(0,N.jsx)($r,{to:i.defaultRoute,replace:!0})},{path:`group/:groupKind/:key`,handle:{presentation:`page`},loader:({params:e})=>o(async t=>{let n=t.generation.binding;return await n.queryClient.fetchQuery(MO(n,n.snapshot.manifest,n.snapshot.overview,s(e,`groupKind`),s(e,`key`))),null})(),lazy:async()=>({Component:(await _(async()=>{let{ResultsRoute:e}=await import(`./ResultsPage-BfH9vA6y.js`);return{ResultsRoute:e}},__vite__mapDeps([0,1,2,3]))).ResultsRoute})},{path:`experiment/:experimentId`,handle:{presentation:`overlay`},loader:({params:e})=>o(async t=>{let n=t.generation.binding;return await n.queryClient.fetchQuery(NO(n,n.snapshot.overview,s(e,`experimentId`))),null})(),lazy:async()=>({Component:(await _(async()=>{let{ResultsRoute:e}=await import(`./ResultsPage-BfH9vA6y.js`);return{ResultsRoute:e}},__vite__mapDeps([0,1,2,3]))).ResultsRoute})},{path:`run/:runId`,handle:{presentation:`overlay`},loader:({params:e})=>o(async t=>{let n=t.generation.binding;return await n.queryClient.fetchQuery(HO(n,s(e,`runId`))),null})(),lazy:async()=>({Component:(await _(async()=>{let{RunRoute:e}=await import(`./RunPage-XiJvNLB-.js`);return{RunRoute:e}},__vite__mapDeps([4,1,2,5,3]))).RunRoute})},{path:`attempt/:locator`,handle:{presentation:`overlay`},loader:({params:e})=>o(async t=>{let n=t.generation.binding;return await n.queryClient.fetchQuery(jO(n,`@${s(e,`locator`)}`)),null})(),lazy:async()=>({Component:(await _(async()=>{let{AttemptRoute:e}=await import(`./AttemptRoute-DN6R4719.js`);return{AttemptRoute:e}},__vite__mapDeps([6,1,2,5]))).AttemptRoute})},{path:`*`,element:(0,N.jsx)($r,{to:i.defaultRoute,replace:!0})}]}]),u=l.state.location;return l.subscribe(e=>{e.location!==u&&(u=e.location,c+=1)}),l}function mk(){let e=window.location.hash;if(e.startsWith(`#/`))return e.slice(1)}function hk(){let e=Lr(),{t}=n(),r=typeof e==`object`&&e&&`translationKey`in e&&(e.translationKey===`report.unableToLoad`||e.translationKey===`report.unableToLoadDetails`)?e.translationKey:`report.unableToLoad`;return(0,N.jsxs)(`main`,{className:`niceeval-view-main`,role:`alert`,children:[(0,N.jsx)(`h1`,{children:t(`report.unableToLoad`)}),(0,N.jsx)(`p`,{children:t(r)}),(0,N.jsx)(`a`,{href:`#/`,children:t(`report.backToResults`)})]})}async function gk(e,t,n){let r=t.groups[0],i=e.generation.binding;await i.queryClient.fetchQuery(MO(i,t,n,r?.identity.kind,r?.identity.kind===`named`?r.identity.groupId:r?.identity.experimentId))}function _k(e,t,n,r){let i;try{i=r.split(`/`).filter(Boolean).map(decodeURIComponent)}catch{return{route:n.defaultRoute,fallback:!0}}if(i[0]===`attempt`&&i[1]){let a=`@${i[1]}`;if(t.catalog.attemptExperiments.some(e=>e.locator===a))return{route:r,fallback:!1};let o=e.catalog.attemptExperiments.find(e=>e.locator===a)?.experimentId,s=t.catalog.runExperiments.filter(e=>e.experimentId===o).sort((e,t)=>vk(e.runId,t.runId))[0];return s===void 0?{route:n.defaultRoute,fallback:!0}:{route:`/run/${encodeURIComponent(s.runId)}`,fallback:!0}}return i[0]===`run`&&i[1]?t.catalog.runExperiments.some(e=>e.runId===i[1])?{route:r,fallback:!1}:{route:n.defaultRoute,fallback:!0}:i[0]===`experiment`&&i[1]?t.catalog.experiments.includes(i[1])?{route:r,fallback:!1}:{route:n.defaultRoute,fallback:!0}:i[0]===`group`&&n.pages.some(e=>e.route===r)?{route:r,fallback:!1}:{route:n.defaultRoute,fallback:r!==n.defaultRoute}}function vk(e,t){return e<t?-1:+(e>t)}async function yk(e,t,n,r){let i;try{i=r.split(`/`).filter(Boolean).map(decodeURIComponent)}catch{throw new bO(`Insight route is malformed.`)}let a=e.generation.binding;i[0]===`attempt`&&i[1]?await a.queryClient.fetchQuery(jO(a,`@${i[1]}`)):i[0]===`run`&&i[1]?await a.queryClient.fetchQuery(HO(a,i[1])):i[0]===`experiment`&&i[1]?await a.queryClient.fetchQuery(NO(a,n,i[1])):i[0]===`group`?await a.queryClient.fetchQuery(MO(a,t,n,i[1],i[2])):await gk(e,t,n)}function bk(e,t,n){return Object.freeze({manifest:e,overview:t,...n===void 0?{}:{routeGuard:n}})}var xk=document.getElementById(`root`);if(xk===null)throw Error(`NiceEval View root is missing`);var Sk=pk();function Ck(){return(0,N.jsx)(ca,{router:(0,f.use)(Sk)})}function wk(){let e=window.location.hash.startsWith(`#/attempt/`);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`main`,{className:`niceeval-view-main`,children:e?(0,N.jsx)(`h1`,{children:`NiceEval Insight`}):(0,N.jsx)(`p`,{role:`status`,children:fo.t(`report.loading`)})}),e?(0,N.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`niceeval-bootstrap-attempt-title`,className:`niceeval-view-dialog`,children:[(0,N.jsx)(`div`,{className:`niceeval-view-dialog-head`,children:(0,N.jsx)(`h2`,{id:`niceeval-bootstrap-attempt-title`,className:`niceeval-view-dialog-title`,children:fo.t(`attempt.title`)})}),(0,N.jsx)(`p`,{role:`status`,children:fo.t(`report.loadingDetails`)})]}):null]})}var Tk=class extends f.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){}render(){return this.state.failed?(0,N.jsx)(`main`,{className:`niceeval-view-main`,role:`alert`,children:(0,N.jsx)(`h1`,{children:fo.t(`app.failed`)})}):this.props.children}};(0,p.createRoot)(xk).render((0,N.jsx)(f.StrictMode,{children:(0,N.jsx)(Tk,{children:(0,N.jsx)(f.Suspense,{fallback:(0,N.jsx)(wk,{}),children:(0,N.jsx)(Ck,{})})})}));export{hr as A,Fo as C,mo as D,_o as E,_ as M,l as N,fo as O,wo as S,P as T,Os as _,jO as a,$o as b,fO as c,Ns as d,ks as f,Es as g,js as h,MO as i,yr as j,fr as k,hO as l,Ms as m,IO as n,TO as o,As as p,NO as r,EO as s,HO as t,gO as u,Ds as v,Io as w,Xo as x,ms as y};
|