agentv 4.16.0 → 4.17.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/dist/{chunk-TA2KF32T.js → chunk-MQCJCM3I.js} +1921 -148
- package/dist/chunk-MQCJCM3I.js.map +1 -0
- package/dist/{chunk-NENUAMR5.js → chunk-YA2D37ZO.js} +2 -2
- package/dist/{chunk-NENUAMR5.js.map → chunk-YA2D37ZO.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{interactive-IWGFP7T2.js → interactive-3GW5UCBK.js} +2 -2
- package/dist/studio/assets/index-Bhv1TEO2.js +116 -0
- package/dist/studio/assets/index-DcpbFwI5.css +1 -0
- package/dist/studio/assets/{index-CEDEXdPp.js → index-vZYHIvCH.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-TA2KF32T.js.map +0 -1
- package/dist/studio/assets/index-C0HOd-aF.js +0 -65
- package/dist/studio/assets/index-_W-FWSZU.css +0 -1
- /package/dist/{interactive-IWGFP7T2.js.map → interactive-3GW5UCBK.js.map} +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var ay=n=>{throw TypeError(n)};var Jo=(n,l,i)=>l.has(n)||ay("Cannot "+i);var E=(n,l,i)=>(Jo(n,l,"read from private field"),i?i.call(n):l.get(n)),ue=(n,l,i)=>l.has(n)?ay("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,i),ne=(n,l,i,r)=>(Jo(n,l,"write to private field"),r?r.call(n,i):l.set(n,i),i),xe=(n,l,i)=>(Jo(n,l,"access private method"),i);var hc=(n,l,i,r)=>({set _(o){ne(n,l,o,i)},get _(){return E(n,l,r)}});(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(o){if(o.ep)return;o.ep=!0;const f=i(o);fetch(o.href,f)}})();function Pv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Io={exports:{}},Ni={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ny;function Fv(){if(ny)return Ni;ny=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,f){var h=null;if(f!==void 0&&(h=""+f),o.key!==void 0&&(h=""+o.key),"key"in o){f={};for(var g in o)g!=="key"&&(f[g]=o[g])}else f=o;return o=f.ref,{$$typeof:n,type:r,key:h,ref:o!==void 0?o:null,props:f}}return Ni.Fragment=l,Ni.jsx=i,Ni.jsxs=i,Ni}var sy;function Jv(){return sy||(sy=1,Io.exports=Fv()),Io.exports}var u=Jv(),Wo={exports:{}},ye={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ly;function Iv(){if(ly)return ye;ly=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function j(M){return M===null||typeof M!="object"?null:(M=S&&M[S]||M["@@iterator"],typeof M=="function"?M:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function w(M,X,ee){this.props=M,this.context=X,this.refs=T,this.updater=ee||N}w.prototype.isReactComponent={},w.prototype.setState=function(M,X){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,X,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function B(){}B.prototype=w.prototype;function K(M,X,ee){this.props=M,this.context=X,this.refs=T,this.updater=ee||N}var O=K.prototype=new B;O.constructor=K,R(O,w.prototype),O.isPureReactComponent=!0;var k=Array.isArray;function W(){}var P={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function J(M,X,ee){var Y=ee.ref;return{$$typeof:n,type:M,key:X,ref:Y!==void 0?Y:null,props:ee}}function q(M,X){return J(M.type,X,M.props)}function I(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function te(M){var X={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return X[ee]})}var le=/\/+/g;function ce(M,X){return typeof M=="object"&&M!==null&&M.key!=null?te(""+M.key):X.toString(36)}function se(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(W,W):(M.status="pending",M.then(function(X){M.status==="pending"&&(M.status="fulfilled",M.value=X)},function(X){M.status==="pending"&&(M.status="rejected",M.reason=X)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function z(M,X,ee,Y,fe){var ve=typeof M;(ve==="undefined"||ve==="boolean")&&(M=null);var be=!1;if(M===null)be=!0;else switch(ve){case"bigint":case"string":case"number":be=!0;break;case"object":switch(M.$$typeof){case n:case l:be=!0;break;case v:return be=M._init,z(be(M._payload),X,ee,Y,fe)}}if(be)return fe=fe(M),be=Y===""?"."+ce(M,0):Y,k(fe)?(ee="",be!=null&&(ee=be.replace(le,"$&/")+"/"),z(fe,X,ee,"",function(ca){return ca})):fe!=null&&(I(fe)&&(fe=q(fe,ee+(fe.key==null||M&&M.key===fe.key?"":(""+fe.key).replace(le,"$&/")+"/")+be)),X.push(fe)),1;be=0;var Pe=Y===""?".":Y+":";if(k(M))for(var He=0;He<M.length;He++)Y=M[He],ve=Pe+ce(Y,He),be+=z(Y,X,ee,ve,fe);else if(He=j(M),typeof He=="function")for(M=He.call(M),He=0;!(Y=M.next()).done;)Y=Y.value,ve=Pe+ce(Y,He++),be+=z(Y,X,ee,ve,fe);else if(ve==="object"){if(typeof M.then=="function")return z(se(M),X,ee,Y,fe);throw X=String(M),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return be}function V(M,X,ee){if(M==null)return M;var Y=[],fe=0;return z(M,Y,"","",function(ve){return X.call(ee,ve,fe++)}),Y}function ae(M){if(M._status===-1){var X=M._result;X=X(),X.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=X)}if(M._status===1)return M._result.default;throw M._result}var me=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},oe={map:V,forEach:function(M,X,ee){V(M,function(){X.apply(this,arguments)},ee)},count:function(M){var X=0;return V(M,function(){X++}),X},toArray:function(M){return V(M,function(X){return X})||[]},only:function(M){if(!I(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return ye.Activity=x,ye.Children=oe,ye.Component=w,ye.Fragment=i,ye.Profiler=o,ye.PureComponent=K,ye.StrictMode=r,ye.Suspense=p,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ye.__COMPILER_RUNTIME={__proto__:null,c:function(M){return P.H.useMemoCache(M)}},ye.cache=function(M){return function(){return M.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(M,X,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var Y=R({},M.props),fe=M.key;if(X!=null)for(ve in X.key!==void 0&&(fe=""+X.key),X)!F.call(X,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&X.ref===void 0||(Y[ve]=X[ve]);var ve=arguments.length-2;if(ve===1)Y.children=ee;else if(1<ve){for(var be=Array(ve),Pe=0;Pe<ve;Pe++)be[Pe]=arguments[Pe+2];Y.children=be}return J(M.type,fe,Y)},ye.createContext=function(M){return M={$$typeof:h,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:f,_context:M},M},ye.createElement=function(M,X,ee){var Y,fe={},ve=null;if(X!=null)for(Y in X.key!==void 0&&(ve=""+X.key),X)F.call(X,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(fe[Y]=X[Y]);var be=arguments.length-2;if(be===1)fe.children=ee;else if(1<be){for(var Pe=Array(be),He=0;He<be;He++)Pe[He]=arguments[He+2];fe.children=Pe}if(M&&M.defaultProps)for(Y in be=M.defaultProps,be)fe[Y]===void 0&&(fe[Y]=be[Y]);return J(M,ve,fe)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(M){return{$$typeof:g,render:M}},ye.isValidElement=I,ye.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:ae}},ye.memo=function(M,X){return{$$typeof:m,type:M,compare:X===void 0?null:X}},ye.startTransition=function(M){var X=P.T,ee={};P.T=ee;try{var Y=M(),fe=P.S;fe!==null&&fe(ee,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(W,me)}catch(ve){me(ve)}finally{X!==null&&ee.types!==null&&(X.types=ee.types),P.T=X}},ye.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ye.use=function(M){return P.H.use(M)},ye.useActionState=function(M,X,ee){return P.H.useActionState(M,X,ee)},ye.useCallback=function(M,X){return P.H.useCallback(M,X)},ye.useContext=function(M){return P.H.useContext(M)},ye.useDebugValue=function(){},ye.useDeferredValue=function(M,X){return P.H.useDeferredValue(M,X)},ye.useEffect=function(M,X){return P.H.useEffect(M,X)},ye.useEffectEvent=function(M){return P.H.useEffectEvent(M)},ye.useId=function(){return P.H.useId()},ye.useImperativeHandle=function(M,X,ee){return P.H.useImperativeHandle(M,X,ee)},ye.useInsertionEffect=function(M,X){return P.H.useInsertionEffect(M,X)},ye.useLayoutEffect=function(M,X){return P.H.useLayoutEffect(M,X)},ye.useMemo=function(M,X){return P.H.useMemo(M,X)},ye.useOptimistic=function(M,X){return P.H.useOptimistic(M,X)},ye.useReducer=function(M,X,ee){return P.H.useReducer(M,X,ee)},ye.useRef=function(M){return P.H.useRef(M)},ye.useState=function(M){return P.H.useState(M)},ye.useSyncExternalStore=function(M,X,ee){return P.H.useSyncExternalStore(M,X,ee)},ye.useTransition=function(){return P.H.useTransition()},ye.version="19.2.4",ye}var iy;function Vi(){return iy||(iy=1,Wo.exports=Iv()),Wo.exports}var Q=Vi();const zi=Pv(Q);var ed={exports:{}},Ri={},td={exports:{}},ad={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var ry;function Wv(){return ry||(ry=1,(function(n){function l(z,V){var ae=z.length;z.push(V);e:for(;0<ae;){var me=ae-1>>>1,oe=z[me];if(0<o(oe,V))z[me]=V,z[ae]=oe,ae=me;else break e}}function i(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var V=z[0],ae=z.pop();if(ae!==V){z[0]=ae;e:for(var me=0,oe=z.length,M=oe>>>1;me<M;){var X=2*(me+1)-1,ee=z[X],Y=X+1,fe=z[Y];if(0>o(ee,ae))Y<oe&&0>o(fe,ee)?(z[me]=fe,z[Y]=ae,me=Y):(z[me]=ee,z[X]=ae,me=X);else if(Y<oe&&0>o(fe,ae))z[me]=fe,z[Y]=ae,me=Y;else break e}}return V}function o(z,V){var ae=z.sortIndex-V.sortIndex;return ae!==0?ae:z.id-V.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var h=Date,g=h.now();n.unstable_now=function(){return h.now()-g}}var p=[],m=[],v=1,x=null,S=3,j=!1,N=!1,R=!1,T=!1,w=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function O(z){for(var V=i(m);V!==null;){if(V.callback===null)r(m);else if(V.startTime<=z)r(m),V.sortIndex=V.expirationTime,l(p,V);else break;V=i(m)}}function k(z){if(R=!1,O(z),!N)if(i(p)!==null)N=!0,W||(W=!0,te());else{var V=i(m);V!==null&&se(k,V.startTime-z)}}var W=!1,P=-1,F=5,J=-1;function q(){return T?!0:!(n.unstable_now()-J<F)}function I(){if(T=!1,W){var z=n.unstable_now();J=z;var V=!0;try{e:{N=!1,R&&(R=!1,B(P),P=-1),j=!0;var ae=S;try{t:{for(O(z),x=i(p);x!==null&&!(x.expirationTime>z&&q());){var me=x.callback;if(typeof me=="function"){x.callback=null,S=x.priorityLevel;var oe=me(x.expirationTime<=z);if(z=n.unstable_now(),typeof oe=="function"){x.callback=oe,O(z),V=!0;break t}x===i(p)&&r(p),O(z)}else r(p);x=i(p)}if(x!==null)V=!0;else{var M=i(m);M!==null&&se(k,M.startTime-z),V=!1}}break e}finally{x=null,S=ae,j=!1}V=void 0}}finally{V?te():W=!1}}}var te;if(typeof K=="function")te=function(){K(I)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ce=le.port2;le.port1.onmessage=I,te=function(){ce.postMessage(null)}}else te=function(){w(I,0)};function se(z,V){P=w(function(){z(n.unstable_now())},V)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(z){switch(S){case 1:case 2:case 3:var V=3;break;default:V=S}var ae=S;S=V;try{return z()}finally{S=ae}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(z,V){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ae=S;S=z;try{return V()}finally{S=ae}},n.unstable_scheduleCallback=function(z,V,ae){var me=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?me+ae:me):ae=me,z){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=ae+oe,z={id:v++,callback:V,priorityLevel:z,startTime:ae,expirationTime:oe,sortIndex:-1},ae>me?(z.sortIndex=ae,l(m,z),i(p)===null&&z===i(m)&&(R?(B(P),P=-1):R=!0,se(k,ae-me))):(z.sortIndex=oe,l(p,z),N||j||(N=!0,W||(W=!0,te()))),z},n.unstable_shouldYield=q,n.unstable_wrapCallback=function(z){var V=S;return function(){var ae=S;S=V;try{return z.apply(this,arguments)}finally{S=ae}}}})(ad)),ad}var cy;function eb(){return cy||(cy=1,td.exports=Wv()),td.exports}var nd={exports:{}},yt={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var uy;function tb(){if(uy)return yt;uy=1;var n=Vi();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(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 f(p,m,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:p,containerInfo:m,implementation:v}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yt.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return f(p,m,null,v)},yt.flushSync=function(p){var m=h.T,v=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=v,r.d.f()}},yt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},yt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},yt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,x=g(v,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:j}):v==="script"&&r.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},yt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=g(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},yt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,x=g(v,m.crossOrigin);r.d.L(p,v,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},yt.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=g(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},yt.requestFormReset=function(p){r.d.r(p)},yt.unstable_batchedUpdates=function(p,m){return p(m)},yt.useFormState=function(p,m,v){return h.H.useFormState(p,m,v)},yt.useFormStatus=function(){return h.H.useHostTransitionStatus()},yt.version="19.2.4",yt}var oy;function pg(){if(oy)return nd.exports;oy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),nd.exports=tb(),nd.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var dy;function ab(){if(dy)return Ri;dy=1;var n=eb(),l=Vi(),i=pg();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 g(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 p(e){if(f(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,s=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(s=c.return,s!==null){a=s;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return p(c),e;if(d===s)return p(c),t;d=d.sibling}throw Error(r(188))}if(a.return!==s.return)a=c,s=d;else{for(var y=!1,b=c.child;b;){if(b===a){y=!0,a=c,s=d;break}if(b===s){y=!0,s=c,a=d;break}b=b.sibling}if(!y){for(b=d.child;b;){if(b===a){y=!0,a=d,s=c;break}if(b===s){y=!0,s=d,a=c;break}b=b.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),K=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case k:return"Suspense";case W:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case K:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case O:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var se=Array.isArray,z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},me=[],oe=-1;function M(e){return{current:e}}function X(e){0>oe||(e.current=me[oe],me[oe]=null,oe--)}function ee(e,t){oe++,me[oe]=e.current,e.current=t}var Y=M(null),fe=M(null),ve=M(null),be=M(null);function Pe(e,t){switch(ee(ve,t),ee(fe,e),ee(Y,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_0(t),e=E0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(Y),ee(Y,e)}function He(){X(Y),X(fe),X(ve)}function ca(e){e.memoizedState!==null&&ee(be,e);var t=Y.current,a=E0(t,e.type);t!==a&&(ee(fe,e),ee(Y,a))}function xa(e){fe.current===e&&(X(Y),X(fe)),be.current===e&&(X(be),vi._currentValue=ae)}var js,Cl;function va(e){if(js===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);js=t&&t[1]||"",Cl=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+js+e+Cl}var Ns=!1;function Rs(e,t){if(!e||Ns)return"";Ns=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(H){var U=H}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(H){U=H}e.call(Z.prototype)}}else{try{throw Error()}catch(H){U=H}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(H){if(H&&U&&typeof H.stack=="string")return[H.stack,U.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),y=d[0],b=d[1];if(y&&b){var _=y.split(`
|
|
44
|
-
`),L=b.split(`
|
|
45
|
-
`);for(c=s=0;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;for(;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;if(s===_.length||c===L.length)for(s=_.length-1,c=L.length-1;1<=s&&0<=c&&_[s]!==L[c];)c--;for(;1<=s&&0<=c;s--,c--)if(_[s]!==L[c]){if(s!==1||c!==1)do if(s--,c--,0>c||_[s]!==L[c]){var G=`
|
|
46
|
-
`+_[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=c);break}}}finally{Ns=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?va(a):""}function Pa(e,t){switch(e.tag){case 26:case 27:case 5:return va(e.type);case 16:return va("Lazy");case 13:return e.child!==t&&t!==null?va("Suspense Fallback"):va("Suspense");case 19:return va("SuspenseList");case 0:case 15:return Rs(e.type,!1);case 11:return Rs(e.type.render,!1);case 1:return Rs(e.type,!0);case 31:return va("Activity");default:return""}}function _s(e){try{var t="",a=null;do t+=Pa(e,a),a=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
-
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var aa=Object.prototype.hasOwnProperty,wl=n.unstable_scheduleCallback,Es=n.unstable_cancelCallback,Bc=n.unstable_shouldYield,Zi=n.unstable_requestPaint,Se=n.unstable_now,mt=n.unstable_getCurrentPriorityLevel,ua=n.unstable_ImmediatePriority,Pi=n.unstable_UserBlockingPriority,Fi=n.unstable_NormalPriority,wp=n.unstable_LowPriority,sf=n.unstable_IdlePriority,Ap=n.log,Op=n.unstable_setDisableYieldValue,Al=null,zt=null;function Fa(e){if(typeof Ap=="function"&&Op(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(Al,e)}catch{}}var Dt=Math.clz32?Math.clz32:Lp,zp=Math.log,Dp=Math.LN2;function Lp(e){return e>>>=0,e===0?32:31-(zp(e)/Dp|0)|0}var Ji=256,Ii=262144,Wi=4194304;function qn(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 er(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~d,s!==0?c=qn(s):(y&=b,y!==0?c=qn(y):a||(a=b&~e,a!==0&&(c=qn(a))))):(b=s&~d,b!==0?c=qn(b):y!==0?c=qn(y):a||(a=s&~e,a!==0&&(c=qn(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function Ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Up(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 lf(){var e=Wi;return Wi<<=1,(Wi&62914560)===0&&(Wi=4194304),e}function qc(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function zl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Bp(e,t,a,s,c,d){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,_=e.expirationTimes,L=e.hiddenUpdates;for(a=y&~a;0<a;){var G=31-Dt(a),Z=1<<G;b[G]=0,_[G]=-1;var U=L[G];if(U!==null)for(L[G]=null,G=0;G<U.length;G++){var H=U[G];H!==null&&(H.lane&=-536870913)}a&=~Z}s!==0&&rf(e,s,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function rf(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Dt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function cf(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-Dt(a),c=1<<s;c&t|e[s]&t&&(e[s]|=t),a&=~c}}function uf(e,t){var a=t&-t;return a=(a&42)!==0?1:Hc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Hc(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 Qc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function of(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:P0(e.type))}function df(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var Ja=Math.random().toString(36).slice(2),rt="__reactFiber$"+Ja,Nt="__reactProps$"+Ja,Ts="__reactContainer$"+Ja,Yc="__reactEvents$"+Ja,qp="__reactListeners$"+Ja,Hp="__reactHandles$"+Ja,ff="__reactResources$"+Ja,Dl="__reactMarker$"+Ja;function Gc(e){delete e[rt],delete e[Nt],delete e[Yc],delete e[qp],delete e[Hp]}function Ms(e){var t=e[rt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ts]||a[rt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=z0(e);e!==null;){if(a=e[rt])return a;e=z0(e)}return t}e=a,a=e.parentNode}return null}function Cs(e){if(e=e[rt]||e[Ts]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ll(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ws(e){var t=e[ff];return t||(t=e[ff]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Dl]=!0}var hf=new Set,mf={};function Hn(e,t){As(e,t),As(e+"Capture",t)}function As(e,t){for(mf[e]=t,e=0;e<t.length;e++)hf.add(t[e])}var Qp=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]*$"),yf={},gf={};function Yp(e){return aa.call(gf,e)?!0:aa.call(yf,e)?!1:Qp.test(e)?gf[e]=!0:(yf[e]=!0,!1)}function tr(e,t,a){if(Yp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ar(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ba(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}function kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gp(e,t,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kc(e){if(!e._valueTracker){var t=pf(e)?"checked":"value";e._valueTracker=Gp(e,t,""+e[t])}}function xf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=pf(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function nr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var kp=/[\n"\\]/g;function Kt(e){return e.replace(kp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Kc(e,t,a,s,c,d,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Vc(e,y,kt(t)):a!=null?Vc(e,y,kt(a)):s!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+kt(b):e.removeAttribute("name")}function vf(e,t,a,s,c,d,y,b){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){kc(e);return}a=a!=null?""+kt(a):"",t=t!=null?""+kt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),kc(e)}function Vc(e,t,a){t==="number"&&nr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Os(e,t,a,s){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&s&&(e[a].defaultSelected=!0)}else{for(a=""+kt(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,s&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function bf(e,t,a){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+kt(a):""}function Sf(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(r(92));if(se(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=kt(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),kc(e)}function zs(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Kp=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 jf(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||Kp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Nf(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var c in t)s=t[c],t.hasOwnProperty(c)&&a[c]!==s&&jf(e,c,s)}else for(var d in t)t.hasOwnProperty(d)&&jf(e,d,t[d])}function Xc(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 Vp=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"]]),Xp=/^[\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 sr(e){return Xp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sa(){}var $c=null;function Zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ds=null,Ls=null;function Rf(e){var t=Cs(e);if(t&&(e=t.stateNode)){var a=e[Nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Kc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var c=s[Nt]||null;if(!c)throw Error(r(90));Kc(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&xf(s)}break e;case"textarea":bf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Os(e,!!a.multiple,t,!1)}}}var Pc=!1;function _f(e,t,a){if(Pc)return e(t,a);Pc=!0;try{var s=e(t);return s}finally{if(Pc=!1,(Ds!==null||Ls!==null)&&(Vr(),Ds&&(t=Ds,e=Ls,Ls=Ds=null,Rf(t),e)))for(t=0;t<e.length;t++)Rf(e[t])}}function Ul(e,t){var a=e.stateNode;if(a===null)return null;var s=a[Nt]||null;if(s===null)return null;a=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fc=!1;if(ja)try{var Bl={};Object.defineProperty(Bl,"passive",{get:function(){Fc=!0}}),window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{Fc=!1}var Ia=null,Jc=null,lr=null;function Ef(){if(lr)return lr;var e,t=Jc,a=t.length,s,c="value"in Ia?Ia.value:Ia.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var y=a-e;for(s=1;s<=y&&t[a-s]===c[d-s];s++);return lr=c.slice(e,1<s?1-s:void 0)}function ir(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 rr(){return!0}function Tf(){return!1}function Rt(e){function t(a,s,c,d,y){this._reactName=a,this._targetInst=c,this.type=s,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(d):d[b]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?rr:Tf,this.isPropagationStopped=Tf,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cr=Rt(Qn),ql=x({},Qn,{view:0,detail:0}),$p=Rt(ql),Ic,Wc,Hl,ur=x({},ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,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!==Hl&&(Hl&&e.type==="mousemove"?(Ic=e.screenX-Hl.screenX,Wc=e.screenY-Hl.screenY):Wc=Ic=0,Hl=e),Ic)},movementY:function(e){return"movementY"in e?e.movementY:Wc}}),Mf=Rt(ur),Zp=x({},ur,{dataTransfer:0}),Pp=Rt(Zp),Fp=x({},ql,{relatedTarget:0}),eu=Rt(Fp),Jp=x({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),Ip=Rt(Jp),Wp=x({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ex=Rt(Wp),tx=x({},Qn,{data:0}),Cf=Rt(tx),ax={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nx={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"},sx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sx[e])?!!t[e]:!1}function tu(){return lx}var ix=x({},ql,{key:function(e){if(e.key){var t=ax[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rx=Rt(ix),cx=x({},ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wf=Rt(cx),ux=x({},ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),ox=Rt(ux),dx=x({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),fx=Rt(dx),hx=x({},ur,{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}),mx=Rt(hx),yx=x({},Qn,{newState:0,oldState:0}),gx=Rt(yx),px=[9,13,27,32],au=ja&&"CompositionEvent"in window,Ql=null;ja&&"documentMode"in document&&(Ql=document.documentMode);var xx=ja&&"TextEvent"in window&&!Ql,Af=ja&&(!au||Ql&&8<Ql&&11>=Ql),Of=" ",zf=!1;function Df(e,t){switch(e){case"keyup":return px.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Us=!1;function vx(e,t){switch(e){case"compositionend":return Lf(t);case"keypress":return t.which!==32?null:(zf=!0,Of);case"textInput":return e=t.data,e===Of&&zf?null:e;default:return null}}function bx(e,t){if(Us)return e==="compositionend"||!au&&Df(e,t)?(e=Ef(),lr=Jc=Ia=null,Us=!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 Af&&t.locale!=="ko"?null:t.data;default:return null}}var Sx={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 Uf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sx[e.type]:t==="textarea"}function Bf(e,t,a,s){Ds?Ls?Ls.push(s):Ls=[s]:Ds=s,t=Ir(t,"onChange"),0<t.length&&(a=new cr("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Yl=null,Gl=null;function jx(e){v0(e,0)}function or(e){var t=Ll(e);if(xf(t))return e}function qf(e,t){if(e==="change")return t}var Hf=!1;if(ja){var nu;if(ja){var su="oninput"in document;if(!su){var Qf=document.createElement("div");Qf.setAttribute("oninput","return;"),su=typeof Qf.oninput=="function"}nu=su}else nu=!1;Hf=nu&&(!document.documentMode||9<document.documentMode)}function Yf(){Yl&&(Yl.detachEvent("onpropertychange",Gf),Gl=Yl=null)}function Gf(e){if(e.propertyName==="value"&&or(Gl)){var t=[];Bf(t,Gl,e,Zc(e)),_f(jx,t)}}function Nx(e,t,a){e==="focusin"?(Yf(),Yl=t,Gl=a,Yl.attachEvent("onpropertychange",Gf)):e==="focusout"&&Yf()}function Rx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return or(Gl)}function _x(e,t){if(e==="click")return or(t)}function Ex(e,t){if(e==="input"||e==="change")return or(t)}function Tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:Tx;function kl(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var c=a[s];if(!aa.call(t,c)||!Lt(e[c],t[c]))return!1}return!0}function kf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kf(e,t){var a=kf(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=kf(a)}}function Vf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=nr(e.document)}return t}function lu(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 Mx=ja&&"documentMode"in document&&11>=document.documentMode,Bs=null,iu=null,Kl=null,ru=!1;function $f(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ru||Bs==null||Bs!==nr(s)||(s=Bs,"selectionStart"in s&&lu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Kl&&kl(Kl,s)||(Kl=s,s=Ir(iu,"onSelect"),0<s.length&&(t=new cr("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=Bs)))}function Yn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var qs={animationend:Yn("Animation","AnimationEnd"),animationiteration:Yn("Animation","AnimationIteration"),animationstart:Yn("Animation","AnimationStart"),transitionrun:Yn("Transition","TransitionRun"),transitionstart:Yn("Transition","TransitionStart"),transitioncancel:Yn("Transition","TransitionCancel"),transitionend:Yn("Transition","TransitionEnd")},cu={},Zf={};ja&&(Zf=document.createElement("div").style,"AnimationEvent"in window||(delete qs.animationend.animation,delete qs.animationiteration.animation,delete qs.animationstart.animation),"TransitionEvent"in window||delete qs.transitionend.transition);function Gn(e){if(cu[e])return cu[e];if(!qs[e])return e;var t=qs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Zf)return cu[e]=t[a];return e}var Pf=Gn("animationend"),Ff=Gn("animationiteration"),Jf=Gn("animationstart"),Cx=Gn("transitionrun"),wx=Gn("transitionstart"),Ax=Gn("transitioncancel"),If=Gn("transitionend"),Wf=new Map,uu="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(" ");uu.push("scrollEnd");function na(e,t){Wf.set(e,t),Hn(t,[e])}var dr=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!==null&&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)},Vt=[],Hs=0,ou=0;function fr(){for(var e=Hs,t=ou=Hs=0;t<e;){var a=Vt[t];Vt[t++]=null;var s=Vt[t];Vt[t++]=null;var c=Vt[t];Vt[t++]=null;var d=Vt[t];if(Vt[t++]=null,s!==null&&c!==null){var y=s.pending;y===null?c.next=c:(c.next=y.next,y.next=c),s.pending=c}d!==0&&eh(a,c,d)}}function hr(e,t,a,s){Vt[Hs++]=e,Vt[Hs++]=t,Vt[Hs++]=a,Vt[Hs++]=s,ou|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function du(e,t,a,s){return hr(e,t,a,s),mr(e)}function kn(e,t){return hr(e,null,null,t),mr(e)}function eh(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,s=d.alternate,s!==null&&(s.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-Dt(a),e=d.hiddenUpdates,s=e[c],s===null?e[c]=[t]:s.push(t),t.lane=a|536870912),d):null}function mr(e){if(50<fi)throw fi=0,So=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qs={};function Ox(e,t,a,s){this.tag=e,this.key=a,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,a,s){return new Ox(e,t,a,s)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Na(e,t){var a=e.alternate;return a===null?(a=Ut(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function th(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yr(e,t,a,s,c,d){var y=0;if(s=e,typeof e=="function")fu(e)&&(y=1);else if(typeof e=="string")y=Bv(e,a,Y.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=Ut(31,a,t,c),e.elementType=J,e.lanes=d,e;case R:return Kn(a.children,c,d,t);case T:y=8,c|=24;break;case w:return e=Ut(12,a,t,c|2),e.elementType=w,e.lanes=d,e;case k:return e=Ut(13,a,t,c),e.elementType=k,e.lanes=d,e;case W:return e=Ut(19,a,t,c),e.elementType=W,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:y=10;break e;case B:y=9;break e;case O:y=11;break e;case P:y=14;break e;case F:y=16,s=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=Ut(y,a,t,c),t.elementType=e,t.type=s,t.lanes=d,t}function Kn(e,t,a,s){return e=Ut(7,e,s,t),e.lanes=a,e}function hu(e,t,a){return e=Ut(6,e,null,t),e.lanes=a,e}function ah(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function mu(e,t,a){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var nh=new WeakMap;function Xt(e,t){if(typeof e=="object"&&e!==null){var a=nh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:_s(t)},nh.set(e,t),t)}return{value:e,source:t,stack:_s(t)}}var Ys=[],Gs=0,gr=null,Vl=0,$t=[],Zt=0,Wa=null,oa=1,da="";function Ra(e,t){Ys[Gs++]=Vl,Ys[Gs++]=gr,gr=e,Vl=t}function sh(e,t,a){$t[Zt++]=oa,$t[Zt++]=da,$t[Zt++]=Wa,Wa=e;var s=oa;e=da;var c=32-Dt(s)-1;s&=~(1<<c),a+=1;var d=32-Dt(t)+c;if(30<d){var y=c-c%5;d=(s&(1<<y)-1).toString(32),s>>=y,c-=y,oa=1<<32-Dt(t)+c|a<<c|s,da=d+e}else oa=1<<d|a<<c|s,da=e}function yu(e){e.return!==null&&(Ra(e,1),sh(e,1,0))}function gu(e){for(;e===gr;)gr=Ys[--Gs],Ys[Gs]=null,Vl=Ys[--Gs],Ys[Gs]=null;for(;e===Wa;)Wa=$t[--Zt],$t[Zt]=null,da=$t[--Zt],$t[Zt]=null,oa=$t[--Zt],$t[Zt]=null}function lh(e,t){$t[Zt++]=oa,$t[Zt++]=da,$t[Zt++]=Wa,oa=t.id,da=t.overflow,Wa=e}var ct=null,Qe=null,Te=!1,en=null,Pt=!1,pu=Error(r(519));function tn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xl(Xt(t,e)),pu}function ih(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[rt]=e,t[Nt]=s,a){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(a=0;a<mi.length;a++)Ne(mi[a],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),vf(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),Sf(t,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||N0(t.textContent,a)?(s.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),s.onScroll!=null&&Ne("scroll",t),s.onScrollEnd!=null&&Ne("scrollend",t),s.onClick!=null&&(t.onclick=Sa),t=!0):t=!1,t||tn(e,!0)}function rh(e){for(ct=e.return;ct;)switch(ct.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:ct=ct.return}}function ks(e){if(e!==ct)return!1;if(!Te)return rh(e),Te=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Uo(e.type,e.memoizedProps)),a=!a),a&&Qe&&tn(e),rh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=O0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=O0(e)}else t===27?(t=Qe,gn(e.type)?(e=Yo,Yo=null,Qe=e):Qe=t):Qe=ct?Jt(e.stateNode.nextSibling):null;return!0}function Vn(){Qe=ct=null,Te=!1}function xu(){var e=en;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),en=null),e}function Xl(e){en===null?en=[e]:en.push(e)}var vu=M(null),Xn=null,_a=null;function an(e,t,a){ee(vu,t._currentValue),t._currentValue=a}function Ea(e){e._currentValue=vu.current,X(vu)}function bu(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function Su(e,t,a,s){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var b=d;d=c;for(var _=0;_<t.length;_++)if(b.context===t[_]){d.lanes|=a,b=d.alternate,b!==null&&(b.lanes|=a),bu(d.return,a,e),s||(y=null);break e}d=b.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(r(341));y.lanes|=a,d=y.alternate,d!==null&&(d.lanes|=a),bu(y,a,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function Ks(e,t,a,s){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var b=c.type;Lt(c.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(c===be.current){if(y=c.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(vi):e=[vi])}c=c.return}e!==null&&Su(t,e,a,s),t.flags|=262144}function pr(e){for(e=e.firstContext;e!==null;){if(!Lt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Xn=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ut(e){return ch(Xn,e)}function xr(e,t){return Xn===null&&$n(e),ch(e,t)}function ch(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},_a===null){if(e===null)throw Error(r(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return a}var zx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Dx=n.unstable_scheduleCallback,Lx=n.unstable_NormalPriority,Ie={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ju(){return{controller:new zx,data:new Map,refCount:0}}function $l(e){e.refCount--,e.refCount===0&&Dx(Lx,function(){e.controller.abort()})}var Zl=null,Nu=0,Vs=0,Xs=null;function Ux(e,t){if(Zl===null){var a=Zl=[];Nu=0,Vs=To(),Xs={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Nu++,t.then(uh,uh),t}function uh(){if(--Nu===0&&Zl!==null){Xs!==null&&(Xs.status="fulfilled");var e=Zl;Zl=null,Vs=0,Xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Bx(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(s.status="rejected",s.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),s}var oh=z.S;z.S=function(e,t){$m=Se(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ux(e,t),oh!==null&&oh(e,t)};var Zn=M(null);function Ru(){var e=Zn.current;return e!==null?e:qe.pooledCache}function vr(e,t){t===null?ee(Zn,Zn.current):ee(Zn,t.pool)}function dh(){var e=Ru();return e===null?null:{parent:Ie._currentValue,pool:e}}var $s=Error(r(460)),_u=Error(r(474)),br=Error(r(542)),Sr={then:function(){}};function fh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Sa,Sa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yh(e),e;default:if(typeof t.status=="string")t.then(Sa,Sa);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=s}},function(s){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yh(e),e}throw Fn=t,$s}}function Pn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Fn=a,$s):a}}var Fn=null;function mh(){if(Fn===null)throw Error(r(459));var e=Fn;return Fn=null,e}function yh(e){if(e===$s||e===br)throw Error(r(483))}var Zs=null,Pl=0;function jr(e){var t=Pl;return Pl+=1,Zs===null&&(Zs=[]),hh(Zs,e,t)}function Fl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nr(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function gh(e){function t(A,C){if(e){var D=A.deletions;D===null?(A.deletions=[C],A.flags|=16):D.push(C)}}function a(A,C){if(!e)return null;for(;C!==null;)t(A,C),C=C.sibling;return null}function s(A){for(var C=new Map;A!==null;)A.key!==null?C.set(A.key,A):C.set(A.index,A),A=A.sibling;return C}function c(A,C){return A=Na(A,C),A.index=0,A.sibling=null,A}function d(A,C,D){return A.index=D,e?(D=A.alternate,D!==null?(D=D.index,D<C?(A.flags|=67108866,C):D):(A.flags|=67108866,C)):(A.flags|=1048576,C)}function y(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function b(A,C,D,$){return C===null||C.tag!==6?(C=hu(D,A.mode,$),C.return=A,C):(C=c(C,D),C.return=A,C)}function _(A,C,D,$){var de=D.type;return de===R?G(A,C,D.props.children,$,D.key):C!==null&&(C.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===F&&Pn(de)===C.type)?(C=c(C,D.props),Fl(C,D),C.return=A,C):(C=yr(D.type,D.key,D.props,null,A.mode,$),Fl(C,D),C.return=A,C)}function L(A,C,D,$){return C===null||C.tag!==4||C.stateNode.containerInfo!==D.containerInfo||C.stateNode.implementation!==D.implementation?(C=mu(D,A.mode,$),C.return=A,C):(C=c(C,D.children||[]),C.return=A,C)}function G(A,C,D,$,de){return C===null||C.tag!==7?(C=Kn(D,A.mode,$,de),C.return=A,C):(C=c(C,D),C.return=A,C)}function Z(A,C,D){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=hu(""+C,A.mode,D),C.return=A,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case j:return D=yr(C.type,C.key,C.props,null,A.mode,D),Fl(D,C),D.return=A,D;case N:return C=mu(C,A.mode,D),C.return=A,C;case F:return C=Pn(C),Z(A,C,D)}if(se(C)||te(C))return C=Kn(C,A.mode,D,null),C.return=A,C;if(typeof C.then=="function")return Z(A,jr(C),D);if(C.$$typeof===K)return Z(A,xr(A,C),D);Nr(A,C)}return null}function U(A,C,D,$){var de=C!==null?C.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return de!==null?null:b(A,C,""+D,$);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case j:return D.key===de?_(A,C,D,$):null;case N:return D.key===de?L(A,C,D,$):null;case F:return D=Pn(D),U(A,C,D,$)}if(se(D)||te(D))return de!==null?null:G(A,C,D,$,null);if(typeof D.then=="function")return U(A,C,jr(D),$);if(D.$$typeof===K)return U(A,C,xr(A,D),$);Nr(A,D)}return null}function H(A,C,D,$,de){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return A=A.get(D)||null,b(C,A,""+$,de);if(typeof $=="object"&&$!==null){switch($.$$typeof){case j:return A=A.get($.key===null?D:$.key)||null,_(C,A,$,de);case N:return A=A.get($.key===null?D:$.key)||null,L(C,A,$,de);case F:return $=Pn($),H(A,C,D,$,de)}if(se($)||te($))return A=A.get(D)||null,G(C,A,$,de,null);if(typeof $.then=="function")return H(A,C,D,jr($),de);if($.$$typeof===K)return H(A,C,D,xr(C,$),de);Nr(C,$)}return null}function ie(A,C,D,$){for(var de=null,Ce=null,re=C,pe=C=0,_e=null;re!==null&&pe<D.length;pe++){re.index>pe?(_e=re,re=null):_e=re.sibling;var we=U(A,re,D[pe],$);if(we===null){re===null&&(re=_e);break}e&&re&&we.alternate===null&&t(A,re),C=d(we,C,pe),Ce===null?de=we:Ce.sibling=we,Ce=we,re=_e}if(pe===D.length)return a(A,re),Te&&Ra(A,pe),de;if(re===null){for(;pe<D.length;pe++)re=Z(A,D[pe],$),re!==null&&(C=d(re,C,pe),Ce===null?de=re:Ce.sibling=re,Ce=re);return Te&&Ra(A,pe),de}for(re=s(re);pe<D.length;pe++)_e=H(re,A,pe,D[pe],$),_e!==null&&(e&&_e.alternate!==null&&re.delete(_e.key===null?pe:_e.key),C=d(_e,C,pe),Ce===null?de=_e:Ce.sibling=_e,Ce=_e);return e&&re.forEach(function(Sn){return t(A,Sn)}),Te&&Ra(A,pe),de}function he(A,C,D,$){if(D==null)throw Error(r(151));for(var de=null,Ce=null,re=C,pe=C=0,_e=null,we=D.next();re!==null&&!we.done;pe++,we=D.next()){re.index>pe?(_e=re,re=null):_e=re.sibling;var Sn=U(A,re,we.value,$);if(Sn===null){re===null&&(re=_e);break}e&&re&&Sn.alternate===null&&t(A,re),C=d(Sn,C,pe),Ce===null?de=Sn:Ce.sibling=Sn,Ce=Sn,re=_e}if(we.done)return a(A,re),Te&&Ra(A,pe),de;if(re===null){for(;!we.done;pe++,we=D.next())we=Z(A,we.value,$),we!==null&&(C=d(we,C,pe),Ce===null?de=we:Ce.sibling=we,Ce=we);return Te&&Ra(A,pe),de}for(re=s(re);!we.done;pe++,we=D.next())we=H(re,A,pe,we.value,$),we!==null&&(e&&we.alternate!==null&&re.delete(we.key===null?pe:we.key),C=d(we,C,pe),Ce===null?de=we:Ce.sibling=we,Ce=we);return e&&re.forEach(function(Zv){return t(A,Zv)}),Te&&Ra(A,pe),de}function Be(A,C,D,$){if(typeof D=="object"&&D!==null&&D.type===R&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case j:e:{for(var de=D.key;C!==null;){if(C.key===de){if(de=D.type,de===R){if(C.tag===7){a(A,C.sibling),$=c(C,D.props.children),$.return=A,A=$;break e}}else if(C.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===F&&Pn(de)===C.type){a(A,C.sibling),$=c(C,D.props),Fl($,D),$.return=A,A=$;break e}a(A,C);break}else t(A,C);C=C.sibling}D.type===R?($=Kn(D.props.children,A.mode,$,D.key),$.return=A,A=$):($=yr(D.type,D.key,D.props,null,A.mode,$),Fl($,D),$.return=A,A=$)}return y(A);case N:e:{for(de=D.key;C!==null;){if(C.key===de)if(C.tag===4&&C.stateNode.containerInfo===D.containerInfo&&C.stateNode.implementation===D.implementation){a(A,C.sibling),$=c(C,D.children||[]),$.return=A,A=$;break e}else{a(A,C);break}else t(A,C);C=C.sibling}$=mu(D,A.mode,$),$.return=A,A=$}return y(A);case F:return D=Pn(D),Be(A,C,D,$)}if(se(D))return ie(A,C,D,$);if(te(D)){if(de=te(D),typeof de!="function")throw Error(r(150));return D=de.call(D),he(A,C,D,$)}if(typeof D.then=="function")return Be(A,C,jr(D),$);if(D.$$typeof===K)return Be(A,C,xr(A,D),$);Nr(A,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,C!==null&&C.tag===6?(a(A,C.sibling),$=c(C,D),$.return=A,A=$):(a(A,C),$=hu(D,A.mode,$),$.return=A,A=$),y(A)):a(A,C)}return function(A,C,D,$){try{Pl=0;var de=Be(A,C,D,$);return Zs=null,de}catch(re){if(re===$s||re===br)throw re;var Ce=Ut(29,re,null,A.mode);return Ce.lanes=$,Ce.return=A,Ce}finally{}}}var Jn=gh(!0),ph=gh(!1),nn=!1;function Eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(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 sn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ln(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ae&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,t=mr(e),eh(e,null,a),t}return hr(e,s,t,a),mr(e)}function Jl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,cf(e,a)}}function Mu(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Cu=!1;function Il(){if(Cu){var e=Xs;if(e!==null)throw e}}function Wl(e,t,a,s){Cu=!1;var c=e.updateQueue;nn=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var _=b,L=_.next;_.next=null,y===null?d=L:y.next=L,y=_;var G=e.alternate;G!==null&&(G=G.updateQueue,b=G.lastBaseUpdate,b!==y&&(b===null?G.firstBaseUpdate=L:b.next=L,G.lastBaseUpdate=_))}if(d!==null){var Z=c.baseState;y=0,G=L=_=null,b=d;do{var U=b.lane&-536870913,H=U!==b.lane;if(H?(Re&U)===U:(s&U)===U){U!==0&&U===Vs&&(Cu=!0),G!==null&&(G=G.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,he=b;U=t;var Be=a;switch(he.tag){case 1:if(ie=he.payload,typeof ie=="function"){Z=ie.call(Be,Z,U);break e}Z=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=he.payload,U=typeof ie=="function"?ie.call(Be,Z,U):ie,U==null)break e;Z=x({},Z,U);break e;case 2:nn=!0}}U=b.callback,U!==null&&(e.flags|=64,H&&(e.flags|=8192),H=c.callbacks,H===null?c.callbacks=[U]:H.push(U))}else H={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},G===null?(L=G=H,_=Z):G=G.next=H,y|=U;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;H=b,b=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);G===null&&(_=Z),c.baseState=_,c.firstBaseUpdate=L,c.lastBaseUpdate=G,d===null&&(c.shared.lanes=0),dn|=y,e.lanes=y,e.memoizedState=Z}}function xh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function vh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)xh(a[e],t)}var Ps=M(null),Rr=M(0);function bh(e,t){e=La,ee(Rr,e),ee(Ps,t),La=e|t.baseLanes}function wu(){ee(Rr,La),ee(Ps,Ps.current)}function Au(){La=Rr.current,X(Ps),X(Rr)}var Bt=M(null),Ft=null;function rn(e){var t=e.alternate;ee(Fe,Fe.current&1),ee(Bt,e),Ft===null&&(t===null||Ps.current!==null||t.memoizedState!==null)&&(Ft=e)}function Ou(e){ee(Fe,Fe.current),ee(Bt,e),Ft===null&&(Ft=e)}function Sh(e){e.tag===22?(ee(Fe,Fe.current),ee(Bt,e),Ft===null&&(Ft=e)):cn()}function cn(){ee(Fe,Fe.current),ee(Bt,Bt.current)}function qt(e){X(Bt),Ft===e&&(Ft=null),X(Fe)}var Fe=M(0);function _r(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Ho(a)||Qo(a)))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)!==0)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 Ta=0,ge=null,Le=null,We=null,Er=!1,Fs=!1,In=!1,Tr=0,ei=0,Js=null,qx=0;function Xe(){throw Error(r(321))}function zu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Lt(e[a],t[a]))return!1;return!0}function Du(e,t,a,s,c,d){return Ta=d,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?sm:Pu,In=!1,d=a(s,c),In=!1,Fs&&(d=Nh(t,a,s,c)),jh(e),d}function jh(e){z.H=ni;var t=Le!==null&&Le.next!==null;if(Ta=0,We=Le=ge=null,Er=!1,ei=0,Js=null,t)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&pr(e)&&(et=!0))}function Nh(e,t,a,s){ge=e;var c=0;do{if(Fs&&(Js=null),ei=0,Fs=!1,25<=c)throw Error(r(301));if(c+=1,We=Le=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}z.H=lm,d=t(a,s)}while(Fs);return d}function Hx(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?ti(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ge.flags|=1024),t}function Lu(){var e=Tr!==0;return Tr=0,e}function Uu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Bu(e){if(Er){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Er=!1}Ta=0,We=Le=ge=null,Fs=!1,ei=Tr=0,Js=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=e:We=We.next=e,We}function Je(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=We===null?ge.memoizedState:We.next;if(t!==null)We=t,Le=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},We===null?ge.memoizedState=We=e:We=We.next=e}return We}function Mr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ti(e){var t=ei;return ei+=1,Js===null&&(Js=[]),e=hh(Js,e,t),t=ge,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?sm:Pu),e}function Cr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ti(e);if(e.$$typeof===K)return ut(e)}throw Error(r(438,String(e)))}function qu(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=ge.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mr(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=q;return t.index++,a}function Ma(e,t){return typeof t=="function"?t(e):t}function wr(e){var t=Je();return Hu(t,Le,e)}function Hu(e,t,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var c=e.baseQueue,d=s.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}t.baseQueue=c=d,s.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var b=y=null,_=null,L=t,G=!1;do{var Z=L.lane&-536870913;if(Z!==L.lane?(Re&Z)===Z:(Ta&Z)===Z){var U=L.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Z===Vs&&(G=!0);else if((Ta&U)===U){L=L.next,U===Vs&&(G=!0);continue}else Z={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},_===null?(b=_=Z,y=d):_=_.next=Z,ge.lanes|=U,dn|=U;Z=L.action,In&&a(d,Z),d=L.hasEagerState?L.eagerState:a(d,Z)}else U={lane:Z,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},_===null?(b=_=U,y=d):_=_.next=U,ge.lanes|=Z,dn|=Z;L=L.next}while(L!==null&&L!==t);if(_===null?y=d:_.next=b,!Lt(d,e.memoizedState)&&(et=!0,G&&(a=Xs,a!==null)))throw a;e.memoizedState=d,e.baseState=y,e.baseQueue=_,s.lastRenderedState=d}return c===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Qu(e){var t=Je(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);Lt(d,t.memoizedState)||(et=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,s]}function Rh(e,t,a){var s=ge,c=Je(),d=Te;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=t();var y=!Lt((Le||c).memoizedState,a);if(y&&(c.memoizedState=a,et=!0),c=c.queue,ku(Th.bind(null,s,c,e),[e]),c.getSnapshot!==t||y||We!==null&&We.memoizedState.tag&1){if(s.flags|=2048,Is(9,{destroy:void 0},Eh.bind(null,s,c,a,t),null),qe===null)throw Error(r(349));d||(Ta&127)!==0||_h(s,t,a)}return a}function _h(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=Mr(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Eh(e,t,a,s){t.value=a,t.getSnapshot=s,Mh(t)&&Ch(e)}function Th(e,t,a){return a(function(){Mh(t)&&Ch(e)})}function Mh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Lt(e,a)}catch{return!0}}function Ch(e){var t=kn(e,2);t!==null&&Ct(t,e,2)}function Yu(e){var t=xt();if(typeof e=="function"){var a=e;if(e=a(),In){Fa(!0);try{a()}finally{Fa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function wh(e,t,a,s){return e.baseState=a,Hu(e,Le,typeof s=="function"?s:Ma)}function Qx(e,t,a,s,c){if(zr(e))throw Error(r(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};z.T!==null?a(!0):d.isTransition=!1,s(d),a=t.pending,a===null?(d.next=t.pending=d,Ah(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Ah(e,t){var a=t.action,s=t.payload,c=e.state;if(t.isTransition){var d=z.T,y={};z.T=y;try{var b=a(c,s),_=z.S;_!==null&&_(y,b),Oh(e,t,b)}catch(L){Gu(e,t,L)}finally{d!==null&&y.types!==null&&(d.types=y.types),z.T=d}}else try{d=a(c,s),Oh(e,t,d)}catch(L){Gu(e,t,L)}}function Oh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){zh(e,t,s)},function(s){return Gu(e,t,s)}):zh(e,t,a)}function zh(e,t,a){t.status="fulfilled",t.value=a,Dh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ah(e,a)))}function Gu(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Dh(t),t=t.next;while(t!==s)}e.action=null}function Dh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lh(e,t){return t}function Uh(e,t){if(Te){var a=qe.formState;if(a!==null){e:{var s=ge;if(Te){if(Qe){t:{for(var c=Qe,d=Pt;c.nodeType!==8;){if(!d){c=null;break t}if(c=Jt(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){Qe=Jt(c.nextSibling),s=c.data==="F!";break e}}tn(s)}s=!1}s&&(t=a[0])}}return a=xt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lh,lastRenderedState:t},a.queue=s,a=tm.bind(null,ge,s),s.dispatch=a,s=Yu(!1),d=Zu.bind(null,ge,!1,s.queue),s=xt(),c={state:t,dispatch:null,action:e,pending:null},s.queue=c,a=Qx.bind(null,ge,c,d,a),c.dispatch=a,s.memoizedState=e,[t,a,!1]}function Bh(e){var t=Je();return qh(t,Le,e)}function qh(e,t,a){if(t=Hu(e,t,Lh)[0],e=wr(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ti(t)}catch(y){throw y===$s?br:y}else s=t;t=Je();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,Is(9,{destroy:void 0},Yx.bind(null,c,a),null)),[s,d,e]}function Yx(e,t){e.action=t}function Hh(e){var t=Je(),a=Le;if(a!==null)return qh(t,a,e);Je(),t=t.memoizedState,a=Je();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Is(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=ge.updateQueue,t===null&&(t=Mr(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function Qh(){return Je().memoizedState}function Ar(e,t,a,s){var c=xt();ge.flags|=e,c.memoizedState=Is(1|t,{destroy:void 0},a,s===void 0?null:s)}function Or(e,t,a,s){var c=Je();s=s===void 0?null:s;var d=c.memoizedState.inst;Le!==null&&s!==null&&zu(s,Le.memoizedState.deps)?c.memoizedState=Is(t,d,a,s):(ge.flags|=e,c.memoizedState=Is(1|t,d,a,s))}function Yh(e,t){Ar(8390656,8,e,t)}function ku(e,t){Or(2048,8,e,t)}function Gx(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=Mr(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Gh(e){var t=Je().memoizedState;return Gx({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function kh(e,t){return Or(4,2,e,t)}function Kh(e,t){return Or(4,4,e,t)}function Vh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xh(e,t,a){a=a!=null?a.concat([e]):null,Or(4,4,Vh.bind(null,t,e),a)}function Ku(){}function $h(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&zu(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Zh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&zu(t,s[1]))return s[0];if(s=e(),In){Fa(!0);try{e()}finally{Fa(!1)}}return a.memoizedState=[s,t],s}function Vu(e,t,a){return a===void 0||(Ta&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Pm(),ge.lanes|=e,dn|=e,a)}function Ph(e,t,a,s){return Lt(a,t)?a:Ps.current!==null?(e=Vu(e,a,s),Lt(e,t)||(et=!0),e):(Ta&42)===0||(Ta&1073741824)!==0&&(Re&261930)===0?(et=!0,e.memoizedState=a):(e=Pm(),ge.lanes|=e,dn|=e,t)}function Fh(e,t,a,s,c){var d=V.p;V.p=d!==0&&8>d?d:8;var y=z.T,b={};z.T=b,Zu(e,!1,t,a);try{var _=c(),L=z.S;if(L!==null&&L(b,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var G=Bx(_,s);ai(e,t,G,Yt(e))}else ai(e,t,s,Yt(e))}catch(Z){ai(e,t,{then:function(){},status:"rejected",reason:Z},Yt())}finally{V.p=d,y!==null&&b.types!==null&&(y.types=b.types),z.T=y}}function kx(){}function Xu(e,t,a,s){if(e.tag!==5)throw Error(r(476));var c=Jh(e).queue;Fh(e,c,t,ae,a===null?kx:function(){return Ih(e),a(s)})}function Jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:ae},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ih(e){var t=Jh(e);t.next===null&&(t=e.alternate.memoizedState),ai(e,t.next.queue,{},Yt())}function $u(){return ut(vi)}function Wh(){return Je().memoizedState}function em(){return Je().memoizedState}function Kx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Yt();e=sn(a);var s=ln(t,e,a);s!==null&&(Ct(s,t,a),Jl(s,t,a)),t={cache:ju()},e.payload=t;return}t=t.return}}function Vx(e,t,a){var s=Yt();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zr(e)?am(t,a):(a=du(e,t,a,s),a!==null&&(Ct(a,e,s),nm(a,t,s)))}function tm(e,t,a){var s=Yt();ai(e,t,a,s)}function ai(e,t,a,s){var c={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zr(e))am(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,b=d(y,a);if(c.hasEagerState=!0,c.eagerState=b,Lt(b,y))return hr(e,t,c,0),qe===null&&fr(),!1}catch{}finally{}if(a=du(e,t,c,s),a!==null)return Ct(a,e,s),nm(a,t,s),!0}return!1}function Zu(e,t,a,s){if(s={lane:2,revertLane:To(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},zr(e)){if(t)throw Error(r(479))}else t=du(e,a,s,2),t!==null&&Ct(t,e,2)}function zr(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function am(e,t){Fs=Er=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function nm(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,cf(e,a)}}var ni={readContext:ut,use:Cr,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};ni.useEffectEvent=Xe;var sm={readContext:ut,use:Cr,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Yh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ar(4194308,4,Vh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ar(4194308,4,e,t)},useInsertionEffect:function(e,t){Ar(4,2,e,t)},useMemo:function(e,t){var a=xt();t=t===void 0?null:t;var s=e();if(In){Fa(!0);try{e()}finally{Fa(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=xt();if(a!==void 0){var c=a(t);if(In){Fa(!0);try{a(t)}finally{Fa(!1)}}}else c=t;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=Vx.bind(null,ge,e),[s.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Yu(e);var t=e.queue,a=tm.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ku,useDeferredValue:function(e,t){var a=xt();return Vu(a,e,t)},useTransition:function(){var e=Yu(!1);return e=Fh.bind(null,ge,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=ge,c=xt();if(Te){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),qe===null)throw Error(r(349));(Re&127)!==0||_h(s,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,Yh(Th.bind(null,s,d,e),[e]),s.flags|=2048,Is(9,{destroy:void 0},Eh.bind(null,s,d,a,t),null),a},useId:function(){var e=xt(),t=qe.identifierPrefix;if(Te){var a=da,s=oa;a=(s&~(1<<32-Dt(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Tr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=qx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$u,useFormState:Uh,useActionState:Uh,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Zu.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:qu,useCacheRefresh:function(){return xt().memoizedState=Kx.bind(null,ge)},useEffectEvent:function(e){var t=xt(),a={impl:e};return t.memoizedState=a,function(){if((Ae&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Pu={readContext:ut,use:Cr,useCallback:$h,useContext:ut,useEffect:ku,useImperativeHandle:Xh,useInsertionEffect:kh,useLayoutEffect:Kh,useMemo:Zh,useReducer:wr,useRef:Qh,useState:function(){return wr(Ma)},useDebugValue:Ku,useDeferredValue:function(e,t){var a=Je();return Ph(a,Le.memoizedState,e,t)},useTransition:function(){var e=wr(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ti(e),t]},useSyncExternalStore:Rh,useId:Wh,useHostTransitionStatus:$u,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var a=Je();return wh(a,Le,e,t)},useMemoCache:qu,useCacheRefresh:em};Pu.useEffectEvent=Gh;var lm={readContext:ut,use:Cr,useCallback:$h,useContext:ut,useEffect:ku,useImperativeHandle:Xh,useInsertionEffect:kh,useLayoutEffect:Kh,useMemo:Zh,useReducer:Qu,useRef:Qh,useState:function(){return Qu(Ma)},useDebugValue:Ku,useDeferredValue:function(e,t){var a=Je();return Le===null?Vu(a,e,t):Ph(a,Le.memoizedState,e,t)},useTransition:function(){var e=Qu(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ti(e),t]},useSyncExternalStore:Rh,useId:Wh,useHostTransitionStatus:$u,useFormState:Hh,useActionState:Hh,useOptimistic:function(e,t){var a=Je();return Le!==null?wh(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:qu,useCacheRefresh:em};lm.useEffectEvent=Gh;function Fu(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ju={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=Yt(),c=sn(s);c.payload=t,a!=null&&(c.callback=a),t=ln(e,c,s),t!==null&&(Ct(t,e,s),Jl(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=Yt(),c=sn(s);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=ln(e,c,s),t!==null&&(Ct(t,e,s),Jl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Yt(),s=sn(a);s.tag=2,t!=null&&(s.callback=t),t=ln(e,s,a),t!==null&&(Ct(t,e,a),Jl(t,e,a))}};function im(e,t,a,s,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,y):t.prototype&&t.prototype.isPureReactComponent?!kl(a,s)||!kl(c,d):!0}function rm(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Ju.enqueueReplaceState(t,t.state,null)}function Wn(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function cm(e){dr(e)}function um(e){console.error(e)}function om(e){dr(e)}function Dr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function dm(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Iu(e,t,a){return a=sn(a),a.tag=3,a.payload={element:null},a.callback=function(){Dr(e,t)},a}function fm(e){return e=sn(e),e.tag=3,e}function hm(e,t,a,s){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=s.value;e.payload=function(){return c(d)},e.callback=function(){dm(t,a,s)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){dm(t,a,s),typeof c!="function"&&(fn===null?fn=new Set([this]):fn.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Xx(e,t,a,s,c){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Ks(t,a,c,!0),a=Bt.current,a!==null){switch(a.tag){case 31:case 13:return Ft===null?Xr():a.alternate===null&&$e===0&&($e=3),a.flags&=-257,a.flags|=65536,a.lanes=c,s===Sr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),Ro(e,s,c)),!1;case 22:return a.flags|=65536,s===Sr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),Ro(e,s,c)),!1}throw Error(r(435,a.tag))}return Ro(e,s,c),Xr(),!1}if(Te)return t=Bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,s!==pu&&(e=Error(r(422),{cause:s}),Xl(Xt(e,a)))):(s!==pu&&(t=Error(r(423),{cause:s}),Xl(Xt(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,s=Xt(s,a),c=Iu(e.stateNode,s,c),Mu(e,c),$e!==4&&($e=2)),!1;var d=Error(r(520),{cause:s});if(d=Xt(d,a),di===null?di=[d]:di.push(d),$e!==4&&($e=2),t===null)return!0;s=Xt(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Iu(a.stateNode,s,e),Mu(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(fn===null||!fn.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=fm(c),hm(c,e,a,s),Mu(a,c),!1}a=a.return}while(a!==null);return!1}var Wu=Error(r(461)),et=!1;function ot(e,t,a,s){t.child=e===null?ph(t,null,a,s):Jn(t,e.child,a,s)}function mm(e,t,a,s,c){a=a.render;var d=t.ref;if("ref"in s){var y={};for(var b in s)b!=="ref"&&(y[b]=s[b])}else y=s;return $n(t),s=Du(e,t,a,y,d,c),b=Lu(),e!==null&&!et?(Uu(e,t,c),Ca(e,t,c)):(Te&&b&&yu(t),t.flags|=1,ot(e,t,s,c),t.child)}function ym(e,t,a,s,c){if(e===null){var d=a.type;return typeof d=="function"&&!fu(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,gm(e,t,d,s,c)):(e=yr(a.type,null,s,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!ro(e,c)){var y=d.memoizedProps;if(a=a.compare,a=a!==null?a:kl,a(y,s)&&e.ref===t.ref)return Ca(e,t,c)}return t.flags|=1,e=Na(d,s),e.ref=t.ref,e.return=t,t.child=e}function gm(e,t,a,s,c){if(e!==null){var d=e.memoizedProps;if(kl(d,s)&&e.ref===t.ref)if(et=!1,t.pendingProps=s=d,ro(e,c))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,Ca(e,t,c)}return eo(e,t,a,s,c)}function pm(e,t,a,s){var c=s.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(s=t.child=e.child,c=0;s!==null;)c=c|s.lanes|s.childLanes,s=s.sibling;s=c&~d}else s=0,t.child=null;return xm(e,t,d,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,d!==null?d.cachePool:null),d!==null?bh(t,d):wu(),Sh(t);else return s=t.lanes=536870912,xm(e,t,d!==null?d.baseLanes|a:a,a,s)}else d!==null?(vr(t,d.cachePool),bh(t,d),cn(),t.memoizedState=null):(e!==null&&vr(t,null),wu(),cn());return ot(e,t,c,a),t.child}function si(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function xm(e,t,a,s,c){var d=Ru();return d=d===null?null:{parent:Ie._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&vr(t,null),wu(),Sh(t),e!==null&&Ks(e,t,s,!0),t.childLanes=c,null}function Lr(e,t){return t=Br({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vm(e,t,a){return Jn(t,e.child,null,a),e=Lr(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function $x(e,t,a){var s=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Lr(t,s),t.lanes=536870912,si(null,e);if(Ou(t),(e=Qe)?(e=A0(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wa!==null?{id:oa,overflow:da}:null,retryLane:536870912,hydrationErrors:null},a=ah(e),a.return=t,t.child=a,ct=t,Qe=null)):e=null,e===null)throw tn(t);return t.lanes=536870912,null}return Lr(t,s)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Ou(t),c)if(t.flags&256)t.flags&=-257,t=vm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(et||Ks(e,t,a,!1),c=(a&e.childLanes)!==0,et||c){if(s=qe,s!==null&&(y=uf(s,a),y!==0&&y!==d.retryLane))throw d.retryLane=y,kn(e,y),Ct(s,e,y),Wu;Xr(),t=vm(e,t,a)}else e=d.treeContext,Qe=Jt(y.nextSibling),ct=t,Te=!0,en=null,Pt=!1,e!==null&&lh(t,e),t=Lr(t,s),t.flags|=4096;return t}return e=Na(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ur(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function eo(e,t,a,s,c){return $n(t),a=Du(e,t,a,s,void 0,c),s=Lu(),e!==null&&!et?(Uu(e,t,c),Ca(e,t,c)):(Te&&s&&yu(t),t.flags|=1,ot(e,t,a,c),t.child)}function bm(e,t,a,s,c,d){return $n(t),t.updateQueue=null,a=Nh(t,s,a,c),jh(e),s=Lu(),e!==null&&!et?(Uu(e,t,d),Ca(e,t,d)):(Te&&s&&yu(t),t.flags|=1,ot(e,t,a,d),t.child)}function Sm(e,t,a,s,c){if($n(t),t.stateNode===null){var d=Qs,y=a.contextType;typeof y=="object"&&y!==null&&(d=ut(y)),d=new a(s,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ju,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=s,d.state=t.memoizedState,d.refs={},Eu(t),y=a.contextType,d.context=typeof y=="object"&&y!==null?ut(y):Qs,d.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Fu(t,a,y,s),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&Ju.enqueueReplaceState(d,d.state,null),Wl(t,s,d,c),Il(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){d=t.stateNode;var b=t.memoizedProps,_=Wn(a,b);d.props=_;var L=d.context,G=a.contextType;y=Qs,typeof G=="object"&&G!==null&&(y=ut(G));var Z=a.getDerivedStateFromProps;G=typeof Z=="function"||typeof d.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,G||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b||L!==y)&&rm(t,d,s,y),nn=!1;var U=t.memoizedState;d.state=U,Wl(t,s,d,c),Il(),L=t.memoizedState,b||U!==L||nn?(typeof Z=="function"&&(Fu(t,a,Z,s),L=t.memoizedState),(_=nn||im(t,a,_,s,U,L,y))?(G||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=L),d.props=s,d.state=L,d.context=y,s=_):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{d=t.stateNode,Tu(e,t),y=t.memoizedProps,G=Wn(a,y),d.props=G,Z=t.pendingProps,U=d.context,L=a.contextType,_=Qs,typeof L=="object"&&L!==null&&(_=ut(L)),b=a.getDerivedStateFromProps,(L=typeof b=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==Z||U!==_)&&rm(t,d,s,_),nn=!1,U=t.memoizedState,d.state=U,Wl(t,s,d,c),Il();var H=t.memoizedState;y!==Z||U!==H||nn||e!==null&&e.dependencies!==null&&pr(e.dependencies)?(typeof b=="function"&&(Fu(t,a,b,s),H=t.memoizedState),(G=nn||im(t,a,G,s,U,H,_)||e!==null&&e.dependencies!==null&&pr(e.dependencies))?(L||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,H,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,H,_)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=H),d.props=s,d.state=H,d.context=_,s=G):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),s=!1)}return d=s,Ur(e,t),s=(t.flags&128)!==0,d||s?(d=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&s?(t.child=Jn(t,e.child,null,c),t.child=Jn(t,null,a,c)):ot(e,t,a,c),t.memoizedState=d.state,e=t.child):e=Ca(e,t,c),e}function jm(e,t,a,s){return Vn(),t.flags|=256,ot(e,t,a,s),t.child}var to={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ao(e){return{baseLanes:e,cachePool:dh()}}function no(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Qt),e}function Nm(e,t,a){var s=t.pendingProps,c=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(c?rn(t):cn(),(e=Qe)?(e=A0(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wa!==null?{id:oa,overflow:da}:null,retryLane:536870912,hydrationErrors:null},a=ah(e),a.return=t,t.child=a,ct=t,Qe=null)):e=null,e===null)throw tn(t);return Qo(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,c?(cn(),c=t.mode,b=Br({mode:"hidden",children:b},c),s=Kn(s,c,a,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=ao(a),s.childLanes=no(e,y,a),t.memoizedState=to,si(null,s)):(rn(t),so(t,b))}var _=e.memoizedState;if(_!==null&&(b=_.dehydrated,b!==null)){if(d)t.flags&256?(rn(t),t.flags&=-257,t=lo(e,t,a)):t.memoizedState!==null?(cn(),t.child=e.child,t.flags|=128,t=null):(cn(),b=s.fallback,c=t.mode,s=Br({mode:"visible",children:s.children},c),b=Kn(b,c,a,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Jn(t,e.child,null,a),s=t.child,s.memoizedState=ao(a),s.childLanes=no(e,y,a),t.memoizedState=to,t=si(null,s));else if(rn(t),Qo(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var L=y.dgst;y=L,s=Error(r(419)),s.stack="",s.digest=y,Xl({value:s,source:null,stack:null}),t=lo(e,t,a)}else if(et||Ks(e,t,a,!1),y=(a&e.childLanes)!==0,et||y){if(y=qe,y!==null&&(s=uf(y,a),s!==0&&s!==_.retryLane))throw _.retryLane=s,kn(e,s),Ct(y,e,s),Wu;Ho(b)||Xr(),t=lo(e,t,a)}else Ho(b)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,Qe=Jt(b.nextSibling),ct=t,Te=!0,en=null,Pt=!1,e!==null&&lh(t,e),t=so(t,s.children),t.flags|=4096);return t}return c?(cn(),b=s.fallback,c=t.mode,_=e.child,L=_.sibling,s=Na(_,{mode:"hidden",children:s.children}),s.subtreeFlags=_.subtreeFlags&65011712,L!==null?b=Na(L,b):(b=Kn(b,c,a,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,si(null,s),s=t.child,b=e.child.memoizedState,b===null?b=ao(a):(c=b.cachePool,c!==null?(_=Ie._currentValue,c=c.parent!==_?{parent:_,pool:_}:c):c=dh(),b={baseLanes:b.baseLanes|a,cachePool:c}),s.memoizedState=b,s.childLanes=no(e,y,a),t.memoizedState=to,si(e.child,s)):(rn(t),a=e.child,e=a.sibling,a=Na(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function so(e,t){return t=Br({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Br(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function lo(e,t,a){return Jn(t,e.child,null,a),e=so(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rm(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),bu(e.return,t,a)}function io(e,t,a,s,c,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:c,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=a,y.tailMode=c,y.treeForkCount=d)}function _m(e,t,a){var s=t.pendingProps,c=s.revealOrder,d=s.tail;s=s.children;var y=Fe.current,b=(y&2)!==0;if(b?(y=y&1|2,t.flags|=128):y&=1,ee(Fe,y),ot(e,t,s,a),s=Te?Vl:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rm(e,a,t);else if(e.tag===19)Rm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&_r(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),io(t,!1,c,a,d,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&_r(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}io(t,!0,a,null,d,s);break;case"together":io(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ca(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),dn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ks(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=Na(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Na(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ro(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pr(e)))}function Zx(e,t,a){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),an(t,Ie,e.memoizedState.cache),Vn();break;case 27:case 5:ca(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:an(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ou(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(rn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Nm(e,t,a):(rn(t),e=Ca(e,t,a),e!==null?e.sibling:null);rn(t);break;case 19:var c=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Ks(e,t,a,!1),s=(a&t.childLanes)!==0),c){if(s)return _m(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ee(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,pm(e,t,a,t.pendingProps);case 24:an(t,Ie,e.memoizedState.cache)}return Ca(e,t,a)}function Em(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!ro(e,a)&&(t.flags&128)===0)return et=!1,Zx(e,t,a);et=(e.flags&131072)!==0}else et=!1,Te&&(t.flags&1048576)!==0&&sh(t,Vl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Pn(t.elementType),t.type=e,typeof e=="function")fu(e)?(s=Wn(e,s),t.tag=1,t=Sm(null,t,e,s,a)):(t.tag=0,t=eo(null,t,e,s,a));else{if(e!=null){var c=e.$$typeof;if(c===O){t.tag=11,t=mm(null,t,e,s,a);break e}else if(c===P){t.tag=14,t=ym(null,t,e,s,a);break e}}throw t=ce(e)||e,Error(r(306,t,""))}}return t;case 0:return eo(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,c=Wn(s,t.pendingProps),Sm(e,t,s,c,a);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var d=t.memoizedState;c=d.element,Tu(e,t),Wl(t,s,null,a);var y=t.memoizedState;if(s=y.cache,an(t,Ie,s),s!==d.cache&&Su(t,[Ie],a,!0),Il(),s=y.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=jm(e,t,s,a);break e}else if(s!==c){c=Xt(Error(r(424)),t),Xl(c),t=jm(e,t,s,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=Jt(e.firstChild),ct=t,Te=!0,en=null,Pt=!0,a=ph(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vn(),s===c){t=Ca(e,t,a);break e}ot(e,t,s,a)}t=t.child}return t;case 26:return Ur(e,t),e===null?(a=B0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Te||(a=t.type,e=t.pendingProps,s=Wr(ve.current).createElement(a),s[rt]=t,s[Nt]=e,dt(s,a,e),st(s),t.stateNode=s):t.memoizedState=B0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ca(t),e===null&&Te&&(s=t.stateNode=D0(t.type,t.pendingProps,ve.current),ct=t,Pt=!0,c=Qe,gn(t.type)?(Yo=c,Qe=Jt(s.firstChild)):Qe=c),ot(e,t,t.pendingProps.children,a),Ur(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((c=s=Qe)&&(s=Rv(s,t.type,t.pendingProps,Pt),s!==null?(t.stateNode=s,ct=t,Qe=Jt(s.firstChild),Pt=!1,c=!0):c=!1),c||tn(t)),ca(t),c=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,s=d.children,Uo(c,d)?s=null:y!==null&&Uo(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=Du(e,t,Hx,null,null,a),vi._currentValue=c),Ur(e,t),ot(e,t,s,a),t.child;case 6:return e===null&&Te&&((e=a=Qe)&&(a=_v(a,t.pendingProps,Pt),a!==null?(t.stateNode=a,ct=t,Qe=null,e=!0):e=!1),e||tn(t)),null;case 13:return Nm(e,t,a);case 4:return Pe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Jn(t,null,s,a):ot(e,t,s,a),t.child;case 11:return mm(e,t,t.type,t.pendingProps,a);case 7:return ot(e,t,t.pendingProps,a),t.child;case 8:return ot(e,t,t.pendingProps.children,a),t.child;case 12:return ot(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,an(t,t.type,s.value),ot(e,t,s.children,a),t.child;case 9:return c=t.type._context,s=t.pendingProps.children,$n(t),c=ut(c),s=s(c),t.flags|=1,ot(e,t,s,a),t.child;case 14:return ym(e,t,t.type,t.pendingProps,a);case 15:return gm(e,t,t.type,t.pendingProps,a);case 19:return _m(e,t,a);case 31:return $x(e,t,a);case 22:return pm(e,t,a,t.pendingProps);case 24:return $n(t),s=ut(Ie),e===null?(c=Ru(),c===null&&(c=qe,d=ju(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:s,cache:c},Eu(t),an(t,Ie,c)):((e.lanes&a)!==0&&(Tu(e,t),Wl(t,null,null,a),Il()),c=e.memoizedState,d=t.memoizedState,c.parent!==s?(c={parent:s,cache:s},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),an(t,Ie,s)):(s=d.cache,an(t,Ie,s),s!==c.cache&&Su(t,[Ie],a,!0))),ot(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function wa(e){e.flags|=4}function co(e,t,a,s,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Wm())e.flags|=8192;else throw Fn=Sr,_u}else e.flags&=-16777217}function Tm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!G0(t))if(Wm())e.flags|=8192;else throw Fn=Sr,_u}function qr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?lf():536870912,e.lanes|=t,al|=t)}function li(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags&65011712,s|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function Px(e,t,a){var s=t.pendingProps;switch(gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ea(Ie),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ks(t)?wa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xu())),Ye(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(wa(t),d!==null?(Ye(t),Tm(t,d)):(Ye(t),co(t,c,null,s,a))):d?d!==e.memoizedState?(wa(t),Ye(t),Tm(t,d)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&wa(t),Ye(t),co(t,c,e,s,a)),null;case 27:if(xa(t),a=ve.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=Y.current,ks(t)?ih(t):(e=D0(c,s,a),t.stateNode=e,wa(t))}return Ye(t),null;case 5:if(xa(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(d=Y.current,ks(t))ih(t);else{var y=Wr(ve.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?y.createElement(c,{is:s.is}):y.createElement(c)}}d[rt]=t,d[Nt]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(dt(d,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&wa(t)}}return Ye(t),co(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=ve.current,ks(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,c=ct,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[rt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||N0(e.nodeValue,a)),e||tn(t,!0)}else e=Wr(e).createTextNode(s),e[rt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=ks(t),a!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ye(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ks(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),c=!1}else c=xu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=t.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),qr(t,t.updateQueue),Ye(t),null);case 4:return He(),e===null&&Ao(t.stateNode.containerInfo),Ye(t),null;case 10:return Ea(t.type),Ye(t),null;case 19:if(X(Fe),s=t.memoizedState,s===null)return Ye(t),null;if(c=(t.flags&128)!==0,d=s.rendering,d===null)if(c)li(s,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=_r(e),d!==null){for(t.flags|=128,li(s,!1),e=d.updateQueue,t.updateQueue=e,qr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)th(a,e),a=a.sibling;return ee(Fe,Fe.current&1|2),Te&&Ra(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Se()>kr&&(t.flags|=128,c=!0,li(s,!1),t.lanes=4194304)}else{if(!c)if(e=_r(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,qr(t,e),li(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Te)return Ye(t),null}else 2*Se()-s.renderingStartTime>kr&&a!==536870912&&(t.flags|=128,c=!0,li(s,!1),t.lanes=4194304);s.isBackwards?(d.sibling=t.child,t.child=d):(e=s.last,e!==null?e.sibling=d:t.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Se(),e.sibling=null,a=Fe.current,ee(Fe,c?a&1|2:a&1),Te&&Ra(t,s.treeForkCount),e):(Ye(t),null);case 22:case 23:return qt(t),Au(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&qr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&X(Zn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Ie),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Fx(e,t){switch(gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ea(Ie),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xa(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(Fe),null;case 4:return He(),null;case 10:return Ea(t.type),null;case 22:case 23:return qt(t),Au(),e!==null&&X(Zn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ea(Ie),null;case 25:return null;default:return null}}function Mm(e,t){switch(gu(t),t.tag){case 3:Ea(Ie),He();break;case 26:case 27:case 5:xa(t);break;case 4:He();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:X(Fe);break;case 10:Ea(t.type);break;case 22:case 23:qt(t),Au(),e!==null&&X(Zn);break;case 24:Ea(Ie)}}function ii(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){s=void 0;var d=a.create,y=a.inst;s=d(),y.destroy=s}a=a.next}while(a!==c)}}catch(b){De(t,t.return,b)}}function un(e,t,a){try{var s=t.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var d=c.next;s=d;do{if((s.tag&e)===e){var y=s.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,c=t;var _=a,L=b;try{L()}catch(G){De(c,_,G)}}}s=s.next}while(s!==d)}}catch(G){De(t,t.return,G)}}function Cm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{vh(t,a)}catch(s){De(e,e.return,s)}}}function wm(e,t,a){a.props=Wn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){De(e,t,s)}}function ri(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(c){De(e,t,c)}}function fa(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(c){De(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){De(e,t,c)}else a.current=null}function Am(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(c){De(e,e.return,c)}}function uo(e,t,a){try{var s=e.stateNode;xv(s,e.type,a,t),s[Nt]=t}catch(c){De(e,e.return,c)}}function Om(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&gn(e.type)||e.tag===4}function oo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Om(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&&gn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fo(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Sa));else if(s!==4&&(s===27&&gn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(fo(e,t,a),e=e.sibling;e!==null;)fo(e,t,a),e=e.sibling}function Hr(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&gn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hr(e,t,a),e=e.sibling;e!==null;)Hr(e,t,a),e=e.sibling}function zm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);dt(t,s,a),t[rt]=e,t[Nt]=a}catch(d){De(e,e.return,d)}}var Aa=!1,tt=!1,ho=!1,Dm=typeof WeakSet=="function"?WeakSet:Set,lt=null;function Jx(e,t){if(e=e.containerInfo,Do=ic,e=Xf(e),lu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,b=-1,_=-1,L=0,G=0,Z=e,U=null;t:for(;;){for(var H;Z!==a||c!==0&&Z.nodeType!==3||(b=y+c),Z!==d||s!==0&&Z.nodeType!==3||(_=y+s),Z.nodeType===3&&(y+=Z.nodeValue.length),(H=Z.firstChild)!==null;)U=Z,Z=H;for(;;){if(Z===e)break t;if(U===a&&++L===c&&(b=y),U===d&&++G===s&&(_=y),(H=Z.nextSibling)!==null)break;Z=U,U=Z.parentNode}Z=H}a=b===-1||_===-1?null:{start:b,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lo={focusedElem:e,selectionRange:a},ic=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,s=a.stateNode;try{var ie=Wn(a.type,c);e=s.getSnapshotBeforeUpdate(ie,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(he){De(a,a.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)qo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function Lm(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:za(e,a),s&4&&ii(5,a);break;case 1:if(za(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){De(a,a.return,y)}else{var c=Wn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){De(a,a.return,y)}}s&64&&Cm(a),s&512&&ri(a,a.return);break;case 3:if(za(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{vh(e,t)}catch(y){De(a,a.return,y)}}break;case 27:t===null&&s&4&&zm(a);case 26:case 5:za(e,a),t===null&&s&4&&Am(a),s&512&&ri(a,a.return);break;case 12:za(e,a);break;case 31:za(e,a),s&4&&qm(e,a);break;case 13:za(e,a),s&4&&Hm(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=iv.bind(null,a),Ev(e,a))));break;case 22:if(s=a.memoizedState!==null||Aa,!s){t=t!==null&&t.memoizedState!==null||tt,c=Aa;var d=tt;Aa=s,(tt=t)&&!d?Da(e,a,(a.subtreeFlags&8772)!==0):za(e,a),Aa=c,tt=d}break;case 30:break;default:za(e,a)}}function Um(e){var t=e.alternate;t!==null&&(e.alternate=null,Um(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Gc(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 Ge=null,_t=!1;function Oa(e,t,a){for(a=a.child;a!==null;)Bm(e,t,a),a=a.sibling}function Bm(e,t,a){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Al,a)}catch{}switch(a.tag){case 26:tt||fa(a,t),Oa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||fa(a,t);var s=Ge,c=_t;gn(a.type)&&(Ge=a.stateNode,_t=!1),Oa(e,t,a),gi(a.stateNode),Ge=s,_t=c;break;case 5:tt||fa(a,t);case 6:if(s=Ge,c=_t,Ge=null,Oa(e,t,a),Ge=s,_t=c,Ge!==null)if(_t)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(a.stateNode)}catch(d){De(a,t,d)}else try{Ge.removeChild(a.stateNode)}catch(d){De(a,t,d)}break;case 18:Ge!==null&&(_t?(e=Ge,C0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ol(e)):C0(Ge,a.stateNode));break;case 4:s=Ge,c=_t,Ge=a.stateNode.containerInfo,_t=!0,Oa(e,t,a),Ge=s,_t=c;break;case 0:case 11:case 14:case 15:un(2,a,t),tt||un(4,a,t),Oa(e,t,a);break;case 1:tt||(fa(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&wm(a,t,s)),Oa(e,t,a);break;case 21:Oa(e,t,a);break;case 22:tt=(s=tt)||a.memoizedState!==null,Oa(e,t,a),tt=s;break;default:Oa(e,t,a)}}function qm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ol(e)}catch(a){De(t,t.return,a)}}}function Hm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ol(e)}catch(a){De(t,t.return,a)}}function Ix(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dm),t;default:throw Error(r(435,e.tag))}}function Qr(e,t){var a=Ix(e);t.forEach(function(s){if(!a.has(s)){a.add(s);var c=rv.bind(null,e,s);s.then(c,c)}})}function Et(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var c=a[s],d=e,y=t,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(gn(b.type)){Ge=b.stateNode,_t=!1;break e}break;case 5:Ge=b.stateNode,_t=!1;break e;case 3:case 4:Ge=b.stateNode.containerInfo,_t=!0;break e}b=b.return}if(Ge===null)throw Error(r(160));Bm(d,y,c),Ge=null,_t=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qm(t,e),t=t.sibling}var sa=null;function Qm(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(t,e),Tt(e),s&4&&(un(3,e,e.return),ii(3,e),un(5,e,e.return));break;case 1:Et(t,e),Tt(e),s&512&&(tt||a===null||fa(a,a.return)),s&64&&Aa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var c=sa;if(Et(t,e),Tt(e),s&512&&(tt||a===null||fa(a,a.return)),s&4){var d=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(s){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Dl]||d[rt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(s),c.head.insertBefore(d,c.querySelector("head > title"))),dt(d,s,a),d[rt]=e,st(d),s=d;break e;case"link":var y=Q0("link","href",c).get(s+(a.href||""));if(y){for(var b=0;b<y.length;b++)if(d=y[b],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(b,1);break t}}d=c.createElement(s),dt(d,s,a),c.head.appendChild(d);break;case"meta":if(y=Q0("meta","content",c).get(s+(a.content||""))){for(b=0;b<y.length;b++)if(d=y[b],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(b,1);break t}}d=c.createElement(s),dt(d,s,a),c.head.appendChild(d);break;default:throw Error(r(468,s))}d[rt]=e,st(d),s=d}e.stateNode=s}else Y0(c,e.type,e.stateNode);else e.stateNode=H0(c,s,e.memoizedProps);else d!==s?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,s===null?Y0(c,e.type,e.stateNode):H0(c,s,e.memoizedProps)):s===null&&e.stateNode!==null&&uo(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(t,e),Tt(e),s&512&&(tt||a===null||fa(a,a.return)),a!==null&&s&4&&uo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(t,e),Tt(e),s&512&&(tt||a===null||fa(a,a.return)),e.flags&32){c=e.stateNode;try{zs(c,"")}catch(ie){De(e,e.return,ie)}}s&4&&e.stateNode!=null&&(c=e.memoizedProps,uo(e,c,a!==null?a.memoizedProps:c)),s&1024&&(ho=!0);break;case 6:if(Et(t,e),Tt(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(ie){De(e,e.return,ie)}}break;case 3:if(ac=null,c=sa,sa=ec(t.containerInfo),Et(t,e),sa=c,Tt(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{ol(t.containerInfo)}catch(ie){De(e,e.return,ie)}ho&&(ho=!1,Ym(e));break;case 4:s=sa,sa=ec(e.stateNode.containerInfo),Et(t,e),Tt(e),sa=s;break;case 12:Et(t,e),Tt(e);break;case 31:Et(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 13:Et(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gr=Se()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 22:c=e.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,L=Aa,G=tt;if(Aa=L||c,tt=G||_,Et(t,e),tt=G,Aa=L,Tt(e),s&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||_||Aa||tt||es(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){_=a=t;try{if(d=_.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=_.stateNode;var Z=_.memoizedProps.style,U=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){De(_,_.return,ie)}}}else if(t.tag===6){if(a===null){_=t;try{_.stateNode.nodeValue=c?"":_.memoizedProps}catch(ie){De(_,_.return,ie)}}}else if(t.tag===18){if(a===null){_=t;try{var H=_.stateNode;c?w0(H,!0):w0(_.stateNode,!1)}catch(ie){De(_,_.return,ie)}}}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 e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Qr(e,a))));break;case 19:Et(t,e),Tt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 30:break;case 21:break;default:Et(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Om(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,d=oo(e);Hr(e,d,c);break;case 5:var y=a.stateNode;a.flags&32&&(zs(y,""),a.flags&=-33);var b=oo(e);Hr(e,b,y);break;case 3:case 4:var _=a.stateNode.containerInfo,L=oo(e);fo(e,L,_);break;default:throw Error(r(161))}}catch(G){De(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ym(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ym(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function za(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Lm(e,t.alternate,t),t=t.sibling}function es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:un(4,t,t.return),es(t);break;case 1:fa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&wm(t,t.return,a),es(t);break;case 27:gi(t.stateNode);case 26:case 5:fa(t,t.return),es(t);break;case 22:t.memoizedState===null&&es(t);break;case 30:es(t);break;default:es(t)}e=e.sibling}}function Da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,c=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:Da(c,d,a),ii(4,d);break;case 1:if(Da(c,d,a),s=d,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(L){De(s,s.return,L)}if(s=d,c=s.updateQueue,c!==null){var b=s.stateNode;try{var _=c.shared.hiddenCallbacks;if(_!==null)for(c.shared.hiddenCallbacks=null,c=0;c<_.length;c++)xh(_[c],b)}catch(L){De(s,s.return,L)}}a&&y&64&&Cm(d),ri(d,d.return);break;case 27:zm(d);case 26:case 5:Da(c,d,a),a&&s===null&&y&4&&Am(d),ri(d,d.return);break;case 12:Da(c,d,a);break;case 31:Da(c,d,a),a&&y&4&&qm(c,d);break;case 13:Da(c,d,a),a&&y&4&&Hm(c,d);break;case 22:d.memoizedState===null&&Da(c,d,a),ri(d,d.return);break;case 30:break;default:Da(c,d,a)}t=t.sibling}}function mo(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&$l(a))}function yo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$l(e))}function la(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gm(e,t,a,s),t=t.sibling}function Gm(e,t,a,s){var c=t.flags;switch(t.tag){case 0:case 11:case 15:la(e,t,a,s),c&2048&&ii(9,t);break;case 1:la(e,t,a,s);break;case 3:la(e,t,a,s),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$l(e)));break;case 12:if(c&2048){la(e,t,a,s),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,b=d.onPostCommit;typeof b=="function"&&b(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){De(t,t.return,_)}}else la(e,t,a,s);break;case 31:la(e,t,a,s);break;case 13:la(e,t,a,s);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?la(e,t,a,s):ci(e,t):d._visibility&2?la(e,t,a,s):(d._visibility|=2,Ws(e,t,a,s,(t.subtreeFlags&10256)!==0||!1)),c&2048&&mo(y,t);break;case 24:la(e,t,a,s),c&2048&&yo(t.alternate,t);break;default:la(e,t,a,s)}}function Ws(e,t,a,s,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,b=a,_=s,L=y.flags;switch(y.tag){case 0:case 11:case 15:Ws(d,y,b,_,c),ii(8,y);break;case 23:break;case 22:var G=y.stateNode;y.memoizedState!==null?G._visibility&2?Ws(d,y,b,_,c):ci(d,y):(G._visibility|=2,Ws(d,y,b,_,c)),c&&L&2048&&mo(y.alternate,y);break;case 24:Ws(d,y,b,_,c),c&&L&2048&&yo(y.alternate,y);break;default:Ws(d,y,b,_,c)}t=t.sibling}}function ci(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,c=s.flags;switch(s.tag){case 22:ci(a,s),c&2048&&mo(s.alternate,s);break;case 24:ci(a,s),c&2048&&yo(s.alternate,s);break;default:ci(a,s)}t=t.sibling}}var ui=8192;function el(e,t,a){if(e.subtreeFlags&ui)for(e=e.child;e!==null;)km(e,t,a),e=e.sibling}function km(e,t,a){switch(e.tag){case 26:el(e,t,a),e.flags&ui&&e.memoizedState!==null&&qv(a,sa,e.memoizedState,e.memoizedProps);break;case 5:el(e,t,a);break;case 3:case 4:var s=sa;sa=ec(e.stateNode.containerInfo),el(e,t,a),sa=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ui,ui=16777216,el(e,t,a),ui=s):el(e,t,a));break;default:el(e,t,a)}}function Km(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 oi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Xm(s,e)}Km(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vm(e),e=e.sibling}function Vm(e){switch(e.tag){case 0:case 11:case 15:oi(e),e.flags&2048&&un(9,e,e.return);break;case 3:oi(e);break;case 12:oi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yr(e)):oi(e);break;default:oi(e)}}function Yr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Xm(s,e)}Km(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:un(8,t,t.return),Yr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Yr(t));break;default:Yr(t)}e=e.sibling}}function Xm(e,t){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:un(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:$l(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,lt=s;else e:for(a=e;lt!==null;){s=lt;var c=s.sibling,d=s.return;if(Um(s),s===a){lt=null;break e}if(c!==null){c.return=d,lt=c;break e}lt=d}}}var Wx={getCacheForType:function(e){var t=ut(Ie),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ut(Ie).controller.signal}},ev=typeof WeakMap=="function"?WeakMap:Map,Ae=0,qe=null,je=null,Re=0,ze=0,Ht=null,on=!1,tl=!1,go=!1,La=0,$e=0,dn=0,ts=0,po=0,Qt=0,al=0,di=null,Mt=null,xo=!1,Gr=0,$m=0,kr=1/0,Kr=null,fn=null,at=0,hn=null,nl=null,Ua=0,vo=0,bo=null,Zm=null,fi=0,So=null;function Yt(){return(Ae&2)!==0&&Re!==0?Re&-Re:z.T!==null?To():of()}function Pm(){if(Qt===0)if((Re&536870912)===0||Te){var e=Ii;Ii<<=1,(Ii&3932160)===0&&(Ii=262144),Qt=e}else Qt=536870912;return e=Bt.current,e!==null&&(e.flags|=32),Qt}function Ct(e,t,a){(e===qe&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(sl(e,0),mn(e,Re,Qt,!1)),zl(e,a),((Ae&2)===0||e!==qe)&&(e===qe&&((Ae&2)===0&&(ts|=a),$e===4&&mn(e,Re,Qt,!1)),ha(e))}function Fm(e,t,a){if((Ae&6)!==0)throw Error(r(327));var s=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ol(e,t),c=s?nv(e,t):No(e,t,!0),d=s;do{if(c===0){tl&&!s&&mn(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!tv(a)){c=No(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var b=e;c=di;var _=b.current.memoizedState.isDehydrated;if(_&&(sl(b,y).flags|=256),y=No(b,y,!1),y!==2){if(go&&!_){b.errorRecoveryDisabledLanes|=d,ts|=d,c=4;break e}d=Mt,Mt=c,d!==null&&(Mt===null?Mt=d:Mt.push.apply(Mt,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){sl(e,0),mn(e,t,0,!0);break}e:{switch(s=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:mn(s,t,Qt,!on);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=Gr+300-Se(),10<c)){if(mn(s,t,Qt,!on),er(s,0,!0)!==0)break e;Ua=t,s.timeoutHandle=T0(Jm.bind(null,s,a,Mt,Kr,xo,t,Qt,ts,al,on,d,"Throttled",-0,0),c);break e}Jm(s,a,Mt,Kr,xo,t,Qt,ts,al,on,d,null,-0,0)}}break}while(!0);ha(e)}function Jm(e,t,a,s,c,d,y,b,_,L,G,Z,U,H){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sa},km(t,d,Z);var ie=(d&62914560)===d?Gr-Se():(d&4194048)===d?$m-Se():0;if(ie=Hv(Z,ie),ie!==null){Ua=d,e.cancelPendingCommit=ie(l0.bind(null,e,t,d,a,s,c,y,b,_,G,Z,null,U,H)),mn(e,d,y,!L);return}}l0(e,t,d,a,s,c,y,b,_)}function tv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var c=a[s],d=c.getSnapshot;c=c.value;try{if(!Lt(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 mn(e,t,a,s){t&=~po,t&=~ts,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var c=t;0<c;){var d=31-Dt(c),y=1<<d;s[d]=-1,c&=~y}a!==0&&rf(e,a,t)}function Vr(){return(Ae&6)===0?(hi(0),!1):!0}function jo(){if(je!==null){if(ze===0)var e=je.return;else e=je,_a=Xn=null,Bu(e),Zs=null,Pl=0,e=je;for(;e!==null;)Mm(e.alternate,e),e=e.return;je=null}}function sl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Sv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ua=0,jo(),qe=e,je=a=Na(e.current,null),Re=t,ze=0,Ht=null,on=!1,tl=Ol(e,t),go=!1,al=Qt=po=ts=dn=$e=0,Mt=di=null,xo=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var c=31-Dt(s),d=1<<c;t|=e[c],s&=~d}return La=t,fr(),a}function Im(e,t){ge=null,z.H=ni,t===$s||t===br?(t=mh(),ze=3):t===_u?(t=mh(),ze=4):ze=t===Wu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ht=t,je===null&&($e=1,Dr(e,Xt(t,e.current)))}function Wm(){var e=Bt.current;return e===null?!0:(Re&4194048)===Re?Ft===null:(Re&62914560)===Re||(Re&536870912)!==0?e===Ft:!1}function e0(){var e=z.H;return z.H=ni,e===null?ni:e}function t0(){var e=z.A;return z.A=Wx,e}function Xr(){$e=4,on||(Re&4194048)!==Re&&Bt.current!==null||(tl=!0),(dn&134217727)===0&&(ts&134217727)===0||qe===null||mn(qe,Re,Qt,!1)}function No(e,t,a){var s=Ae;Ae|=2;var c=e0(),d=t0();(qe!==e||Re!==t)&&(Kr=null,sl(e,t)),t=!1;var y=$e;e:do try{if(ze!==0&&je!==null){var b=je,_=Ht;switch(ze){case 8:jo(),y=6;break e;case 3:case 2:case 9:case 6:Bt.current===null&&(t=!0);var L=ze;if(ze=0,Ht=null,ll(e,b,_,L),a&&tl){y=0;break e}break;default:L=ze,ze=0,Ht=null,ll(e,b,_,L)}}av(),y=$e;break}catch(G){Im(e,G)}while(!0);return t&&e.shellSuspendCounter++,_a=Xn=null,Ae=s,z.H=c,z.A=d,je===null&&(qe=null,Re=0,fr()),y}function av(){for(;je!==null;)a0(je)}function nv(e,t){var a=Ae;Ae|=2;var s=e0(),c=t0();qe!==e||Re!==t?(Kr=null,kr=Se()+500,sl(e,t)):tl=Ol(e,t);e:do try{if(ze!==0&&je!==null){t=je;var d=Ht;t:switch(ze){case 1:ze=0,Ht=null,ll(e,t,d,1);break;case 2:case 9:if(fh(d)){ze=0,Ht=null,n0(t);break}t=function(){ze!==2&&ze!==9||qe!==e||(ze=7),ha(e)},d.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:fh(d)?(ze=0,Ht=null,n0(t)):(ze=0,Ht=null,ll(e,t,d,7));break;case 5:var y=null;switch(je.tag){case 26:y=je.memoizedState;case 5:case 27:var b=je;if(y?G0(y):b.stateNode.complete){ze=0,Ht=null;var _=b.sibling;if(_!==null)je=_;else{var L=b.return;L!==null?(je=L,$r(L)):je=null}break t}}ze=0,Ht=null,ll(e,t,d,5);break;case 6:ze=0,Ht=null,ll(e,t,d,6);break;case 8:jo(),$e=6;break e;default:throw Error(r(462))}}sv();break}catch(G){Im(e,G)}while(!0);return _a=Xn=null,z.H=s,z.A=c,Ae=a,je!==null?0:(qe=null,Re=0,fr(),$e)}function sv(){for(;je!==null&&!Bc();)a0(je)}function a0(e){var t=Em(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?$r(e):je=t}function n0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=bm(a,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=bm(a,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Bu(t);default:Mm(a,t),t=je=th(t,La),t=Em(a,t,La)}e.memoizedProps=e.pendingProps,t===null?$r(e):je=t}function ll(e,t,a,s){_a=Xn=null,Bu(t),Zs=null,Pl=0;var c=t.return;try{if(Xx(e,c,t,a,Re)){$e=1,Dr(e,Xt(a,e.current)),je=null;return}}catch(d){if(c!==null)throw je=c,d;$e=1,Dr(e,Xt(a,e.current)),je=null;return}t.flags&32768?(Te||s===1?e=!0:tl||(Re&536870912)!==0?e=!1:(on=e=!0,(s===2||s===9||s===3||s===6)&&(s=Bt.current,s!==null&&s.tag===13&&(s.flags|=16384))),s0(t,e)):$r(t)}function $r(e){var t=e;do{if((t.flags&32768)!==0){s0(t,on);return}e=t.return;var a=Px(t.alternate,t,La);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);$e===0&&($e=5)}function s0(e,t){do{var a=Fx(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);$e=6,je=null}function l0(e,t,a,s,c,d,y,b,_){e.cancelPendingCommit=null;do Zr();while(at!==0);if((Ae&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(d=t.lanes|t.childLanes,d|=ou,Bp(e,a,d,y,b,_),e===qe&&(je=qe=null,Re=0),nl=t,hn=e,Ua=a,vo=d,bo=c,Zm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cv(Fi,function(){return o0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null,c=V.p,V.p=2,y=Ae,Ae|=4;try{Jx(e,t,a)}finally{Ae=y,V.p=c,z.T=s}}at=1,i0(),r0(),c0()}}function i0(){if(at===1){at=0;var e=hn,t=nl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var s=V.p;V.p=2;var c=Ae;Ae|=4;try{Qm(t,e);var d=Lo,y=Xf(e.containerInfo),b=d.focusedElem,_=d.selectionRange;if(y!==b&&b&&b.ownerDocument&&Vf(b.ownerDocument.documentElement,b)){if(_!==null&&lu(b)){var L=_.start,G=_.end;if(G===void 0&&(G=L),"selectionStart"in b)b.selectionStart=L,b.selectionEnd=Math.min(G,b.value.length);else{var Z=b.ownerDocument||document,U=Z&&Z.defaultView||window;if(U.getSelection){var H=U.getSelection(),ie=b.textContent.length,he=Math.min(_.start,ie),Be=_.end===void 0?he:Math.min(_.end,ie);!H.extend&&he>Be&&(y=Be,Be=he,he=y);var A=Kf(b,he),C=Kf(b,Be);if(A&&C&&(H.rangeCount!==1||H.anchorNode!==A.node||H.anchorOffset!==A.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var D=Z.createRange();D.setStart(A.node,A.offset),H.removeAllRanges(),he>Be?(H.addRange(D),H.extend(C.node,C.offset)):(D.setEnd(C.node,C.offset),H.addRange(D))}}}}for(Z=[],H=b;H=H.parentNode;)H.nodeType===1&&Z.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var $=Z[b];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}ic=!!Do,Lo=Do=null}finally{Ae=c,V.p=s,z.T=a}}e.current=t,at=2}}function r0(){if(at===2){at=0;var e=hn,t=nl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var s=V.p;V.p=2;var c=Ae;Ae|=4;try{Lm(e,t.alternate,t)}finally{Ae=c,V.p=s,z.T=a}}at=3}}function c0(){if(at===4||at===3){at=0,Zi();var e=hn,t=nl,a=Ua,s=Zm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,nl=hn=null,u0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(fn=null),Qc(a),t=t.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(Al,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=z.T,c=V.p,V.p=2,z.T=null;try{for(var d=e.onRecoverableError,y=0;y<s.length;y++){var b=s[y];d(b.value,{componentStack:b.stack})}}finally{z.T=t,V.p=c}}(Ua&3)!==0&&Zr(),ha(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===So?fi++:(fi=0,So=e):fi=0,hi(0)}}function u0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$l(t)))}function Zr(){return i0(),r0(),c0(),o0()}function o0(){if(at!==5)return!1;var e=hn,t=vo;vo=0;var a=Qc(Ua),s=z.T,c=V.p;try{V.p=32>a?32:a,z.T=null,a=bo,bo=null;var d=hn,y=Ua;if(at=0,nl=hn=null,Ua=0,(Ae&6)!==0)throw Error(r(331));var b=Ae;if(Ae|=4,Vm(d.current),Gm(d,d.current,y,a),Ae=b,hi(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(Al,d)}catch{}return!0}finally{V.p=c,z.T=s,u0(e,t)}}function d0(e,t,a){t=Xt(a,t),t=Iu(e.stateNode,t,2),e=ln(e,t,2),e!==null&&(zl(e,2),ha(e))}function De(e,t,a){if(e.tag===3)d0(e,e,a);else for(;t!==null;){if(t.tag===3){d0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(fn===null||!fn.has(s))){e=Xt(a,e),a=fm(2),s=ln(t,a,2),s!==null&&(hm(a,s,t,e),zl(s,2),ha(s));break}}t=t.return}}function Ro(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new ev;var c=new Set;s.set(t,c)}else c=s.get(t),c===void 0&&(c=new Set,s.set(t,c));c.has(a)||(go=!0,c.add(a),e=lv.bind(null,e,t,a),t.then(e,e))}function lv(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qe===e&&(Re&a)===a&&($e===4||$e===3&&(Re&62914560)===Re&&300>Se()-Gr?(Ae&2)===0&&sl(e,0):po|=a,al===Re&&(al=0)),ha(e)}function f0(e,t){t===0&&(t=lf()),e=kn(e,t),e!==null&&(zl(e,t),ha(e))}function iv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),f0(e,a)}function rv(e,t){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),f0(e,a)}function cv(e,t){return wl(e,t)}var Pr=null,il=null,_o=!1,Fr=!1,Eo=!1,yn=0;function ha(e){e!==il&&e.next===null&&(il===null?Pr=il=e:il=il.next=e),Fr=!0,_o||(_o=!0,ov())}function hi(e,t){if(!Eo&&Fr){Eo=!0;do for(var a=!1,s=Pr;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var d=0;else{var y=s.suspendedLanes,b=s.pingedLanes;d=(1<<31-Dt(42|e)+1)-1,d&=c&~(y&~b),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,g0(s,d))}else d=Re,d=er(s,s===qe?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Ol(s,d)||(a=!0,g0(s,d));s=s.next}while(a);Eo=!1}}function uv(){h0()}function h0(){Fr=_o=!1;var e=0;yn!==0&&bv()&&(e=yn);for(var t=Se(),a=null,s=Pr;s!==null;){var c=s.next,d=m0(s,t);d===0?(s.next=null,a===null?Pr=c:a.next=c,c===null&&(il=a)):(a=s,(e!==0||(d&3)!==0)&&(Fr=!0)),s=c}at!==0&&at!==5||hi(e),yn!==0&&(yn=0)}function m0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Dt(d),b=1<<y,_=c[y];_===-1?((b&a)===0||(b&s)!==0)&&(c[y]=Up(b,t)):_<=t&&(e.expiredLanes|=b),d&=~b}if(t=qe,a=Re,a=er(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Es(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ol(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&Es(s),Qc(a)){case 2:case 8:a=Pi;break;case 32:a=Fi;break;case 268435456:a=sf;break;default:a=Fi}return s=y0.bind(null,e),a=wl(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&Es(s),e.callbackPriority=2,e.callbackNode=null,2}function y0(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Zr()&&e.callbackNode!==a)return null;var s=Re;return s=er(e,e===qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Fm(e,s,t),m0(e,Se()),e.callbackNode!=null&&e.callbackNode===a?y0.bind(null,e):null)}function g0(e,t){if(Zr())return null;Fm(e,t,!0)}function ov(){jv(function(){(Ae&6)!==0?wl(ua,uv):h0()})}function To(){if(yn===0){var e=Vs;e===0&&(e=Ji,Ji<<=1,(Ji&261888)===0&&(Ji=256)),yn=e}return yn}function p0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sr(""+e)}function x0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function dv(e,t,a,s,c){if(t==="submit"&&a&&a.stateNode===c){var d=p0((c[Nt]||null).action),y=s.submitter;y&&(t=(t=y[Nt]||null)?p0(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var b=new cr("action","action",null,s,c);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(yn!==0){var _=y?x0(c,y):new FormData(c);Xu(a,{pending:!0,data:_,method:c.method,action:d},null,_)}}else typeof d=="function"&&(b.preventDefault(),_=y?x0(c,y):new FormData(c),Xu(a,{pending:!0,data:_,method:c.method,action:d},d,_))},currentTarget:c}]})}}for(var Mo=0;Mo<uu.length;Mo++){var Co=uu[Mo],fv=Co.toLowerCase(),hv=Co[0].toUpperCase()+Co.slice(1);na(fv,"on"+hv)}na(Pf,"onAnimationEnd"),na(Ff,"onAnimationIteration"),na(Jf,"onAnimationStart"),na("dblclick","onDoubleClick"),na("focusin","onFocus"),na("focusout","onBlur"),na(Cx,"onTransitionRun"),na(wx,"onTransitionStart"),na(Ax,"onTransitionCancel"),na(If,"onTransitionEnd"),As("onMouseEnter",["mouseout","mouseover"]),As("onMouseLeave",["mouseout","mouseover"]),As("onPointerEnter",["pointerout","pointerover"]),As("onPointerLeave",["pointerout","pointerover"]),Hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mi="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(" "),mv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mi));function v0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],c=s.event;s=s.listeners;e:{var d=void 0;if(t)for(var y=s.length-1;0<=y;y--){var b=s[y],_=b.instance,L=b.currentTarget;if(b=b.listener,_!==d&&c.isPropagationStopped())break e;d=b,c.currentTarget=L;try{d(c)}catch(G){dr(G)}c.currentTarget=null,d=_}else for(y=0;y<s.length;y++){if(b=s[y],_=b.instance,L=b.currentTarget,b=b.listener,_!==d&&c.isPropagationStopped())break e;d=b,c.currentTarget=L;try{d(c)}catch(G){dr(G)}c.currentTarget=null,d=_}}}}function Ne(e,t){var a=t[Yc];a===void 0&&(a=t[Yc]=new Set);var s=e+"__bubble";a.has(s)||(b0(t,e,2,!1),a.add(s))}function wo(e,t,a){var s=0;t&&(s|=4),b0(a,e,s,t)}var Jr="_reactListening"+Math.random().toString(36).slice(2);function Ao(e){if(!e[Jr]){e[Jr]=!0,hf.forEach(function(a){a!=="selectionchange"&&(mv.has(a)||wo(a,!1,e),wo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jr]||(t[Jr]=!0,wo("selectionchange",!1,t))}}function b0(e,t,a,s){switch(P0(t)){case 2:var c=Gv;break;case 8:c=kv;break;default:c=Xo}a=c.bind(null,t,a,e),c=void 0,!Fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),s?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function Oo(e,t,a,s,c){var d=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var b=s.stateNode.containerInfo;if(b===c)break;if(y===4)for(y=s.return;y!==null;){var _=y.tag;if((_===3||_===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;b!==null;){if(y=Ms(b),y===null)return;if(_=y.tag,_===5||_===6||_===26||_===27){s=d=y;continue e}b=b.parentNode}}s=s.return}_f(function(){var L=d,G=Zc(a),Z=[];e:{var U=Wf.get(e);if(U!==void 0){var H=cr,ie=e;switch(e){case"keypress":if(ir(a)===0)break e;case"keydown":case"keyup":H=rx;break;case"focusin":ie="focus",H=eu;break;case"focusout":ie="blur",H=eu;break;case"beforeblur":case"afterblur":H=eu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=ox;break;case Pf:case Ff:case Jf:H=Ip;break;case If:H=fx;break;case"scroll":case"scrollend":H=$p;break;case"wheel":H=mx;break;case"copy":case"cut":case"paste":H=ex;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=wf;break;case"toggle":case"beforetoggle":H=gx}var he=(t&4)!==0,Be=!he&&(e==="scroll"||e==="scrollend"),A=he?U!==null?U+"Capture":null:U;he=[];for(var C=L,D;C!==null;){var $=C;if(D=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||D===null||A===null||($=Ul(C,A),$!=null&&he.push(yi(C,$,D))),Be)break;C=C.return}0<he.length&&(U=new H(U,ie,null,a,G),Z.push({event:U,listeners:he}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",U&&a!==$c&&(ie=a.relatedTarget||a.fromElement)&&(Ms(ie)||ie[Ts]))break e;if((H||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,H?(ie=a.relatedTarget||a.toElement,H=L,ie=ie?Ms(ie):null,ie!==null&&(Be=f(ie),he=ie.tag,ie!==Be||he!==5&&he!==27&&he!==6)&&(ie=null)):(H=null,ie=L),H!==ie)){if(he=Mf,$="onMouseLeave",A="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(he=wf,$="onPointerLeave",A="onPointerEnter",C="pointer"),Be=H==null?U:Ll(H),D=ie==null?U:Ll(ie),U=new he($,C+"leave",H,a,G),U.target=Be,U.relatedTarget=D,$=null,Ms(G)===L&&(he=new he(A,C+"enter",ie,a,G),he.target=D,he.relatedTarget=Be,$=he),Be=$,H&&ie)t:{for(he=yv,A=H,C=ie,D=0,$=A;$;$=he($))D++;$=0;for(var de=C;de;de=he(de))$++;for(;0<D-$;)A=he(A),D--;for(;0<$-D;)C=he(C),$--;for(;D--;){if(A===C||C!==null&&A===C.alternate){he=A;break t}A=he(A),C=he(C)}he=null}else he=null;H!==null&&S0(Z,U,H,he,!1),ie!==null&&Be!==null&&S0(Z,Be,ie,he,!0)}}e:{if(U=L?Ll(L):window,H=U.nodeName&&U.nodeName.toLowerCase(),H==="select"||H==="input"&&U.type==="file")var Ce=qf;else if(Uf(U))if(Hf)Ce=Ex;else{Ce=Rx;var re=Nx}else H=U.nodeName,!H||H.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&Xc(L.elementType)&&(Ce=qf):Ce=_x;if(Ce&&(Ce=Ce(e,L))){Bf(Z,Ce,a,G);break e}re&&re(e,U,L),e==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&Vc(U,"number",U.value)}switch(re=L?Ll(L):window,e){case"focusin":(Uf(re)||re.contentEditable==="true")&&(Bs=re,iu=L,Kl=null);break;case"focusout":Kl=iu=Bs=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,$f(Z,a,G);break;case"selectionchange":if(Mx)break;case"keydown":case"keyup":$f(Z,a,G)}var pe;if(au)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Us?Df(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&(Af&&a.locale!=="ko"&&(Us||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Us&&(pe=Ef()):(Ia=G,Jc="value"in Ia?Ia.value:Ia.textContent,Us=!0)),re=Ir(L,_e),0<re.length&&(_e=new Cf(_e,e,null,a,G),Z.push({event:_e,listeners:re}),pe?_e.data=pe:(pe=Lf(a),pe!==null&&(_e.data=pe)))),(pe=xx?vx(e,a):bx(e,a))&&(_e=Ir(L,"onBeforeInput"),0<_e.length&&(re=new Cf("onBeforeInput","beforeinput",null,a,G),Z.push({event:re,listeners:_e}),re.data=pe)),dv(Z,e,L,a,G)}v0(Z,t)})}function yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ir(e,t){for(var a=t+"Capture",s=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ul(e,a),c!=null&&s.unshift(yi(e,c,d)),c=Ul(e,t),c!=null&&s.push(yi(e,c,d))),e.tag===3)return s;e=e.return}return[]}function yv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function S0(e,t,a,s,c){for(var d=t._reactName,y=[];a!==null&&a!==s;){var b=a,_=b.alternate,L=b.stateNode;if(b=b.tag,_!==null&&_===s)break;b!==5&&b!==26&&b!==27||L===null||(_=L,c?(L=Ul(a,d),L!=null&&y.unshift(yi(a,L,_))):c||(L=Ul(a,d),L!=null&&y.push(yi(a,L,_)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var gv=/\r\n?/g,pv=/\u0000|\uFFFD/g;function j0(e){return(typeof e=="string"?e:""+e).replace(gv,`
|
|
49
|
-
`).replace(pv,"")}function N0(e,t){return t=j0(t),j0(e)===t}function Ue(e,t,a,s,c,d){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||zs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&zs(e,""+s);break;case"className":ar(e,"class",s);break;case"tabIndex":ar(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ar(e,a,s);break;case"style":Nf(e,s,d);break;case"data":if(t!=="object"){ar(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"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 d=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",c.name,c,null),Ue(e,t,"formEncType",c.formEncType,c,null),Ue(e,t,"formMethod",c.formMethod,c,null),Ue(e,t,"formTarget",c.formTarget,c,null)):(Ue(e,t,"encType",c.encType,c,null),Ue(e,t,"method",c.method,c,null),Ue(e,t,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=sr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),tr(e,"popover",s);break;case"xlinkActuate":ba(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ba(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ba(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ba(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ba(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ba(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ba(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ba(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ba(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":tr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Vp.get(a)||a,tr(e,a,s))}}function zo(e,t,a,s,c,d){switch(a){case"style":Nf(e,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?zs(e,s):(typeof s=="number"||typeof s=="bigint")&&zs(e,""+s);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[Nt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof s=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,c);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):tr(e,a,s)}}}function dt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var s=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var y=a[d];if(y!=null)switch(d){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,d,y,a,null)}}c&&Ue(e,t,"srcSet",a.srcSet,a,null),s&&Ue(e,t,"src",a.src,a,null);return;case"input":Ne("invalid",e);var b=d=y=c=null,_=null,L=null;for(s in a)if(a.hasOwnProperty(s)){var G=a[s];if(G!=null)switch(s){case"name":c=G;break;case"type":y=G;break;case"checked":_=G;break;case"defaultChecked":L=G;break;case"value":d=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Ue(e,t,s,G,a,null)}}vf(e,d,b,_,L,y,c,!1);return;case"select":Ne("invalid",e),s=y=d=null;for(c in a)if(a.hasOwnProperty(c)&&(b=a[c],b!=null))switch(c){case"value":d=b;break;case"defaultValue":y=b;break;case"multiple":s=b;default:Ue(e,t,c,b,a,null)}t=d,a=y,e.multiple=!!s,t!=null?Os(e,!!s,t,!1):a!=null&&Os(e,!!s,a,!0);return;case"textarea":Ne("invalid",e),d=c=s=null;for(y in a)if(a.hasOwnProperty(y)&&(b=a[y],b!=null))switch(y){case"value":s=b;break;case"defaultValue":c=b;break;case"children":d=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Ue(e,t,y,b,a,null)}Sf(e,s,c,d);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(s=a[_],s!=null))switch(_){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ue(e,t,_,s,a,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(s=0;s<mi.length;s++)Ne(mi[s],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(L in a)if(a.hasOwnProperty(L)&&(s=a[L],s!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,L,s,a,null)}return;default:if(Xc(t)){for(G in a)a.hasOwnProperty(G)&&(s=a[G],s!==void 0&&zo(e,t,G,s,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(s=a[b],s!=null&&Ue(e,t,b,s,a,null))}function xv(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,b=null,_=null,L=null,G=null;for(H in a){var Z=a[H];if(a.hasOwnProperty(H)&&Z!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":_=Z;default:s.hasOwnProperty(H)||Ue(e,t,H,null,s,Z)}}for(var U in s){var H=s[U];if(Z=a[U],s.hasOwnProperty(U)&&(H!=null||Z!=null))switch(U){case"type":d=H;break;case"name":c=H;break;case"checked":L=H;break;case"defaultChecked":G=H;break;case"value":y=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:H!==Z&&Ue(e,t,U,H,s,Z)}}Kc(e,y,b,_,L,G,d,c);return;case"select":H=y=b=U=null;for(d in a)if(_=a[d],a.hasOwnProperty(d)&&_!=null)switch(d){case"value":break;case"multiple":H=_;default:s.hasOwnProperty(d)||Ue(e,t,d,null,s,_)}for(c in s)if(d=s[c],_=a[c],s.hasOwnProperty(c)&&(d!=null||_!=null))switch(c){case"value":U=d;break;case"defaultValue":b=d;break;case"multiple":y=d;default:d!==_&&Ue(e,t,c,d,s,_)}t=b,a=y,s=H,U!=null?Os(e,!!a,U,!1):!!s!=!!a&&(t!=null?Os(e,!!a,t,!0):Os(e,!!a,a?[]:"",!1));return;case"textarea":H=U=null;for(b in a)if(c=a[b],a.hasOwnProperty(b)&&c!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ue(e,t,b,null,s,c)}for(y in s)if(c=s[y],d=a[y],s.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":U=c;break;case"defaultValue":H=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&Ue(e,t,y,c,s,d)}bf(e,U,H);return;case"option":for(var ie in a)if(U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Ue(e,t,ie,null,s,U)}for(_ in s)if(U=s[_],H=a[_],s.hasOwnProperty(_)&&U!==H&&(U!=null||H!=null))switch(_){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ue(e,t,_,U,s,H)}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 he in a)U=a[he],a.hasOwnProperty(he)&&U!=null&&!s.hasOwnProperty(he)&&Ue(e,t,he,null,s,U);for(L in s)if(U=s[L],H=a[L],s.hasOwnProperty(L)&&U!==H&&(U!=null||H!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ue(e,t,L,U,s,H)}return;default:if(Xc(t)){for(var Be in a)U=a[Be],a.hasOwnProperty(Be)&&U!==void 0&&!s.hasOwnProperty(Be)&&zo(e,t,Be,void 0,s,U);for(G in s)U=s[G],H=a[G],!s.hasOwnProperty(G)||U===H||U===void 0&&H===void 0||zo(e,t,G,U,s,H);return}}for(var A in a)U=a[A],a.hasOwnProperty(A)&&U!=null&&!s.hasOwnProperty(A)&&Ue(e,t,A,null,s,U);for(Z in s)U=s[Z],H=a[Z],!s.hasOwnProperty(Z)||U===H||U==null&&H==null||Ue(e,t,Z,U,s,H)}function R0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var c=a[s],d=c.transferSize,y=c.initiatorType,b=c.duration;if(d&&b&&R0(y)){for(y=0,b=c.responseEnd,s+=1;s<a.length;s++){var _=a[s],L=_.startTime;if(L>b)break;var G=_.transferSize,Z=_.initiatorType;G&&R0(Z)&&(_=_.responseEnd,y+=G*(_<b?1:(b-L)/(_-L)))}if(--s,t+=8*(d+y)/(c.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 Do=null,Lo=null;function Wr(e){return e.nodeType===9?e:e.ownerDocument}function _0(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 E0(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 Uo(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 Bo=null;function bv(){var e=window.event;return e&&e.type==="popstate"?e===Bo?!1:(Bo=e,!0):(Bo=null,!1)}var T0=typeof setTimeout=="function"?setTimeout:void 0,Sv=typeof clearTimeout=="function"?clearTimeout:void 0,M0=typeof Promise=="function"?Promise:void 0,jv=typeof queueMicrotask=="function"?queueMicrotask:typeof M0<"u"?function(e){return M0.resolve(null).then(e).catch(Nv)}:T0;function Nv(e){setTimeout(function(){throw e})}function gn(e){return e==="head"}function C0(e,t){var a=t,s=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(c),ol(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")gi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,gi(a);for(var d=a.firstChild;d;){var y=d.nextSibling,b=d.nodeName;d[Dl]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=y}}else a==="body"&&gi(e.ownerDocument.body);a=c}while(a);ol(t)}function w0(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function qo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qo(a),Gc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Rv(e,t,a,s){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Dl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function _v(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Jt(e.nextSibling),e===null))return null;return e}function A0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function Ho(e){return e.data==="$?"||e.data==="$~"}function Qo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ev(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Jt(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 Yo=null;function O0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Jt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function z0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function D0(e,t,a){switch(t=Wr(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Gc(e)}var It=new Map,L0=new Set;function ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=V.d;V.d={f:Tv,r:Mv,D:Cv,C:wv,L:Av,m:Ov,X:Dv,S:zv,M:Lv};function Tv(){var e=Ba.f(),t=Vr();return e||t}function Mv(e){var t=Cs(e);t!==null&&t.tag===5&&t.type==="form"?Ih(t):Ba.r(e)}var rl=typeof document>"u"?null:document;function U0(e,t,a){var s=rl;if(s&&typeof t=="string"&&t){var c=Kt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),L0.has(c)||(L0.add(c),e={rel:e,crossOrigin:a,href:t},s.querySelector(c)===null&&(t=s.createElement("link"),dt(t,"link",e),st(t),s.head.appendChild(t)))}}function Cv(e){Ba.D(e),U0("dns-prefetch",e,null)}function wv(e,t){Ba.C(e,t),U0("preconnect",e,t)}function Av(e,t,a){Ba.L(e,t,a);var s=rl;if(s&&e&&t){var c='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Kt(a.imageSizes)+'"]')):c+='[href="'+Kt(e)+'"]';var d=c;switch(t){case"style":d=cl(e);break;case"script":d=ul(e)}It.has(d)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),It.set(d,e),s.querySelector(c)!==null||t==="style"&&s.querySelector(pi(d))||t==="script"&&s.querySelector(xi(d))||(t=s.createElement("link"),dt(t,"link",e),st(t),s.head.appendChild(t)))}}function Ov(e,t){Ba.m(e,t);var a=rl;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Kt(s)+'"][href="'+Kt(e)+'"]',d=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ul(e)}if(!It.has(d)&&(e=x({rel:"modulepreload",href:e},t),It.set(d,e),a.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(xi(d)))return}s=a.createElement("link"),dt(s,"link",e),st(s),a.head.appendChild(s)}}}function zv(e,t,a){Ba.S(e,t,a);var s=rl;if(s&&e){var c=ws(s).hoistableStyles,d=cl(e);t=t||"default";var y=c.get(d);if(!y){var b={loading:0,preload:null};if(y=s.querySelector(pi(d)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=It.get(d))&&Go(e,a);var _=y=s.createElement("link");st(_),dt(_,"link",e),_._p=new Promise(function(L,G){_.onload=L,_.onerror=G}),_.addEventListener("load",function(){b.loading|=1}),_.addEventListener("error",function(){b.loading|=2}),b.loading|=4,tc(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:b},c.set(d,y)}}}function Dv(e,t){Ba.X(e,t);var a=rl;if(a&&e){var s=ws(a).hoistableScripts,c=ul(e),d=s.get(c);d||(d=a.querySelector(xi(c)),d||(e=x({src:e,async:!0},t),(t=It.get(c))&&ko(e,t),d=a.createElement("script"),st(d),dt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function Lv(e,t){Ba.M(e,t);var a=rl;if(a&&e){var s=ws(a).hoistableScripts,c=ul(e),d=s.get(c);d||(d=a.querySelector(xi(c)),d||(e=x({src:e,async:!0,type:"module"},t),(t=It.get(c))&&ko(e,t),d=a.createElement("script"),st(d),dt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function B0(e,t,a,s){var c=(c=ve.current)?ec(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=cl(a.href),a=ws(c).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=cl(a.href);var d=ws(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(pi(e)))&&!d._p&&(y.instance=d,y.state.loading=5),It.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},It.set(e,a),d||Uv(c,e,a,y.state))),t&&s===null)throw Error(r(528,""));return y}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ul(a),a=ws(c).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function cl(e){return'href="'+Kt(e)+'"'}function pi(e){return'link[rel="stylesheet"]['+e+"]"}function q0(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Uv(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),dt(t,"link",a),st(t),e.head.appendChild(t))}function ul(e){return'[src="'+Kt(e)+'"]'}function xi(e){return"script[async]"+e}function H0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(s)return t.instance=s,st(s),s;var c=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),dt(s,"style",c),tc(s,a.precedence,e),t.instance=s;case"stylesheet":c=cl(a.href);var d=e.querySelector(pi(c));if(d)return t.state.loading|=4,t.instance=d,st(d),d;s=q0(a),(c=It.get(c))&&Go(s,c),d=(e.ownerDocument||e).createElement("link"),st(d);var y=d;return y._p=new Promise(function(b,_){y.onload=b,y.onerror=_}),dt(d,"link",s),t.state.loading|=4,tc(d,a.precedence,e),t.instance=d;case"script":return d=ul(a.src),(c=e.querySelector(xi(d)))?(t.instance=c,st(c),c):(s=a,(c=It.get(d))&&(s=x({},a),ko(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),st(c),dt(c,"link",s),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,tc(s,a.precedence,e));return t.instance}function tc(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,d=c,y=0;y<s.length;y++){var b=s[y];if(b.dataset.precedence===t)d=b;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ko(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ac=null;function Q0(e,t,a){if(ac===null){var s=new Map,c=ac=new Map;c.set(a,s)}else c=ac,s=c.get(a),s||(s=new Map,c.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[Dl]||d[rt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var b=s.get(y);b?b.push(d):s.set(y,[d])}}return s}function Y0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Bv(e,t,a){if(a===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 G0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function qv(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=cl(s.href),d=t.querySelector(pi(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,st(d);return}d=t.ownerDocument||t,s=q0(s),(c=It.get(c))&&Go(s,c),d=d.createElement("link"),st(d);var y=d;y._p=new Promise(function(b,_){y.onload=b,y.onerror=_}),dt(d,"link",s),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=nc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ko=0;function Hv(e,t){return e.stylesheets&&e.count===0&&lc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&lc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Ko===0&&(Ko=62500*vv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Ko?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function nc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sc=null;function lc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sc=new Map,t.forEach(Qv,e),sc=null,nc.call(e))}function Qv(e,t){if(!(t.state.loading&4)){var a=sc.get(e);if(a)var s=a.get(null);else{a=new Map,sc.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),s=y)}s&&a.set(null,s)}c=t.instance,y=c.getAttribute("data-precedence"),d=a.get(y)||s,d===s&&a.set(null,c),a.set(y,c),this.count++,s=nc.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var vi={$$typeof:K,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Yv(e,t,a,s,c,d,y,b,_){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=qc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qc(0),this.hiddenUpdates=qc(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function k0(e,t,a,s,c,d,y,b,_,L,G,Z){return e=new Yv(e,t,a,y,_,L,G,Z,b),t=1,d===!0&&(t|=24),d=Ut(3,null,null,t),e.current=d,d.stateNode=e,t=ju(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:s,isDehydrated:a,cache:t},Eu(d),e}function K0(e){return e?(e=Qs,e):Qs}function V0(e,t,a,s,c,d){c=K0(c),s.context===null?s.context=c:s.pendingContext=c,s=sn(t),s.payload={element:a},d=d===void 0?null:d,d!==null&&(s.callback=d),a=ln(e,s,t),a!==null&&(Ct(a,e,t),Jl(a,e,t))}function X0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Vo(e,t){X0(e,t),(e=e.alternate)&&X0(e,t)}function $0(e){if(e.tag===13||e.tag===31){var t=kn(e,67108864);t!==null&&Ct(t,e,67108864),Vo(e,67108864)}}function Z0(e){if(e.tag===13||e.tag===31){var t=Yt();t=Hc(t);var a=kn(e,t);a!==null&&Ct(a,e,t),Vo(e,t)}}var ic=!0;function Gv(e,t,a,s){var c=z.T;z.T=null;var d=V.p;try{V.p=2,Xo(e,t,a,s)}finally{V.p=d,z.T=c}}function kv(e,t,a,s){var c=z.T;z.T=null;var d=V.p;try{V.p=8,Xo(e,t,a,s)}finally{V.p=d,z.T=c}}function Xo(e,t,a,s){if(ic){var c=$o(s);if(c===null)Oo(e,t,s,rc,a),F0(e,s);else if(Vv(c,e,t,a,s))s.stopPropagation();else if(F0(e,s),t&4&&-1<Kv.indexOf(e)){for(;c!==null;){var d=Cs(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=qn(d.pendingLanes);if(y!==0){var b=d;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var _=1<<31-Dt(y);b.entanglements[1]|=_,y&=~_}ha(d),(Ae&6)===0&&(kr=Se()+500,hi(0))}}break;case 31:case 13:b=kn(d,2),b!==null&&Ct(b,d,2),Vr(),Vo(d,2)}if(d=$o(s),d===null&&Oo(e,t,s,rc,a),d===c)break;c=d}c!==null&&s.stopPropagation()}else Oo(e,t,s,null,a)}}function $o(e){return e=Zc(e),Zo(e)}var rc=null;function Zo(e){if(rc=null,e=Ms(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=g(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return rc=e,null}function P0(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(mt()){case ua:return 2;case Pi:return 8;case Fi:case wp:return 32;case sf:return 268435456;default:return 32}default:return 32}}var Po=!1,pn=null,xn=null,vn=null,bi=new Map,Si=new Map,bn=[],Kv="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 F0(e,t){switch(e){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":xn=null;break;case"mouseover":case"mouseout":vn=null;break;case"pointerover":case"pointerout":bi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Si.delete(t.pointerId)}}function ji(e,t,a,s,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:d,targetContainers:[c]},t!==null&&(t=Cs(t),t!==null&&$0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Vv(e,t,a,s,c){switch(t){case"focusin":return pn=ji(pn,e,t,a,s,c),!0;case"dragenter":return xn=ji(xn,e,t,a,s,c),!0;case"mouseover":return vn=ji(vn,e,t,a,s,c),!0;case"pointerover":var d=c.pointerId;return bi.set(d,ji(bi.get(d)||null,e,t,a,s,c)),!0;case"gotpointercapture":return d=c.pointerId,Si.set(d,ji(Si.get(d)||null,e,t,a,s,c)),!0}return!1}function J0(e){var t=Ms(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,df(e.priority,function(){Z0(a)});return}}else if(t===31){if(t=g(a),t!==null){e.blockedOn=t,df(e.priority,function(){Z0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=$o(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);$c=s,a.target.dispatchEvent(s),$c=null}else return t=Cs(a),t!==null&&$0(t),e.blockedOn=a,!1;t.shift()}return!0}function I0(e,t,a){cc(e)&&a.delete(t)}function Xv(){Po=!1,pn!==null&&cc(pn)&&(pn=null),xn!==null&&cc(xn)&&(xn=null),vn!==null&&cc(vn)&&(vn=null),bi.forEach(I0),Si.forEach(I0)}function uc(e,t){e.blockedOn===t&&(e.blockedOn=null,Po||(Po=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Xv)))}var oc=null;function W0(e){oc!==e&&(oc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){oc===e&&(oc=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],c=e[t+2];if(typeof s!="function"){if(Zo(s||a)===null)continue;break}var d=Cs(a);d!==null&&(e.splice(t,3),t-=3,Xu(d,{pending:!0,data:c,method:a.method,action:s},s,c))}}))}function ol(e){function t(_){return uc(_,e)}pn!==null&&uc(pn,e),xn!==null&&uc(xn,e),vn!==null&&uc(vn,e),bi.forEach(t),Si.forEach(t);for(var a=0;a<bn.length;a++){var s=bn[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<bn.length&&(a=bn[0],a.blockedOn===null);)J0(a),a.blockedOn===null&&bn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var c=a[s],d=a[s+1],y=c[Nt]||null;if(typeof d=="function")y||W0(a);else if(y){var b=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[Nt]||null)b=y.formAction;else if(Zo(c)!==null)continue}else b=y.action;typeof b=="function"?a[s+1]=b:(a.splice(s,3),s-=3),W0(a)}}}function ey(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Fo(e){this._internalRoot=e}dc.prototype.render=Fo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,s=Yt();V0(a,s,e,t,null,null)},dc.prototype.unmount=Fo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;V0(e.current,2,null,e,null,null),Vr(),t[Ts]=null}};function dc(e){this._internalRoot=e}dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=of();e={blockedOn:null,target:e,priority:t};for(var a=0;a<bn.length&&t!==0&&t<bn[a].priority;a++);bn.splice(a,0,e),a===0&&J0(e)}};var ty=l.version;if(ty!=="19.2.4")throw Error(r(527,ty,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var $v={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{Al=fc.inject($v),zt=fc}catch{}}return Ri.createRoot=function(e,t){if(!o(e))throw Error(r(299));var a=!1,s="",c=cm,d=um,y=om;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=k0(e,1,!1,null,null,a,s,null,c,d,y,ey),e[Ts]=t.current,Ao(e),new Fo(t)},Ri.hydrateRoot=function(e,t,a){if(!o(e))throw Error(r(299));var s=!1,c="",d=cm,y=um,b=om,_=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),t=k0(e,1,!0,t,a??null,s,c,_,d,y,b,ey),t.context=K0(null),a=t.current,s=Yt(),s=Hc(s),c=sn(s),c.callback=null,ln(a,c,s),a=s,t.current.lanes=a,zl(t,a),ha(t),e[Ts]=t.current,Ao(e),new dc(t)},Ri.version="19.2.4",Ri}var fy;function nb(){if(fy)return ed.exports;fy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),ed.exports=ab(),ed.exports}var sb=nb(),Ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},is,Rn,ml,ig,lb=(ig=class extends Ml{constructor(){super();ue(this,is);ue(this,Rn);ue(this,ml);ne(this,ml,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){E(this,Rn)||this.setEventListener(E(this,ml))}onUnsubscribe(){var l;this.hasListeners()||((l=E(this,Rn))==null||l.call(this),ne(this,Rn,void 0))}setEventListener(l){var i;ne(this,ml,l),(i=E(this,Rn))==null||i.call(this),ne(this,Rn,l(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(l){E(this,is)!==l&&(ne(this,is,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){var l;return typeof E(this,is)=="boolean"?E(this,is):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},is=new WeakMap,Rn=new WeakMap,ml=new WeakMap,ig),Yd=new lb,ib={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},_n,Qd,rg,rb=(rg=class{constructor(){ue(this,_n,ib);ue(this,Qd,!1)}setTimeoutProvider(n){ne(this,_n,n)}setTimeout(n,l){return E(this,_n).setTimeout(n,l)}clearTimeout(n){E(this,_n).clearTimeout(n)}setInterval(n,l){return E(this,_n).setInterval(n,l)}clearInterval(n){E(this,_n).clearInterval(n)}},_n=new WeakMap,Qd=new WeakMap,rg),ns=new rb;function cb(n){setTimeout(n,0)}var ub=typeof window>"u"||"Deno"in globalThis;function bt(){}function ob(n,l){return typeof n=="function"?n(l):n}function vd(n){return typeof n=="number"&&n>=0&&n!==1/0}function xg(n,l){return Math.max(n+(l||0)-Date.now(),0)}function Ln(n,l){return typeof n=="function"?n(l):n}function ea(n,l){return typeof n=="function"?n(l):n}function hy(n,l){const{type:i="all",exact:r,fetchStatus:o,predicate:f,queryKey:h,stale:g}=n;if(h){if(r){if(l.queryHash!==Gd(h,l.options))return!1}else if(!Di(l.queryKey,h))return!1}if(i!=="all"){const p=l.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof g=="boolean"&&l.isStale()!==g||o&&o!==l.state.fetchStatus||f&&!f(l))}function my(n,l){const{exact:i,status:r,predicate:o,mutationKey:f}=n;if(f){if(!l.options.mutationKey)return!1;if(i){if(xs(l.options.mutationKey)!==xs(f))return!1}else if(!Di(l.options.mutationKey,f))return!1}return!(r&&l.state.status!==r||o&&!o(l))}function Gd(n,l){return((l==null?void 0:l.queryKeyHashFn)||xs)(n)}function xs(n){return JSON.stringify(n,(l,i)=>bd(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function Di(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>Di(n[i],l[i])):!1}var db=Object.prototype.hasOwnProperty;function vg(n,l,i=0){if(n===l)return n;if(i>500)return l;const r=yy(n)&&yy(l);if(!r&&!(bd(n)&&bd(l)))return l;const f=(r?n:Object.keys(n)).length,h=r?l:Object.keys(l),g=h.length,p=r?new Array(g):{};let m=0;for(let v=0;v<g;v++){const x=r?v:h[v],S=n[x],j=l[x];if(S===j){p[x]=S,(r?v<f:db.call(n,x))&&m++;continue}if(S===null||j===null||typeof S!="object"||typeof j!="object"){p[x]=j;continue}const N=vg(S,j,i+1);p[x]=N,N===S&&m++}return f===g&&m===f?n:p}function Rc(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function yy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function bd(n){if(!gy(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!gy(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function gy(n){return Object.prototype.toString.call(n)==="[object Object]"}function fb(n){return new Promise(l=>{ns.setTimeout(l,n)})}function Sd(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?vg(n,l):l}function hb(n,l,i=0){const r=[...n,l];return i&&r.length>i?r.slice(1):r}function mb(n,l,i=0){const r=[l,...n];return i&&r.length>i?r.slice(0,-1):r}var kd=Symbol();function bg(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===kd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Kd(n,l){return typeof n=="function"?n(...l):!!n}function yb(n,l,i){let r=!1,o;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(o??(o=l()),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),n}var Li=(()=>{let n=()=>ub;return{isServer(){return n()},setIsServer(l){n=l}}})();function jd(){let n,l;const i=new Promise((o,f)=>{n=o,l=f});i.status="pending",i.catch(()=>{});function r(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{r({status:"fulfilled",value:o}),n(o)},i.reject=o=>{r({status:"rejected",reason:o}),l(o)},i}var gb=cb;function pb(){let n=[],l=0,i=g=>{g()},r=g=>{g()},o=gb;const f=g=>{l?n.push(g):o(()=>{i(g)})},h=()=>{const g=n;n=[],g.length&&o(()=>{r(()=>{g.forEach(p=>{i(p)})})})};return{batch:g=>{let p;l++;try{p=g()}finally{l--,l||h()}return p},batchCalls:g=>(...p)=>{f(()=>{g(...p)})},schedule:f,setNotifyFunction:g=>{i=g},setBatchNotifyFunction:g=>{r=g},setScheduler:g=>{o=g}}}var nt=pb(),yl,En,gl,cg,xb=(cg=class extends Ml{constructor(){super();ue(this,yl,!0);ue(this,En);ue(this,gl);ne(this,gl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),r=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,En)||this.setEventListener(E(this,gl))}onUnsubscribe(){var l;this.hasListeners()||((l=E(this,En))==null||l.call(this),ne(this,En,void 0))}setEventListener(l){var i;ne(this,gl,l),(i=E(this,En))==null||i.call(this),ne(this,En,l(this.setOnline.bind(this)))}setOnline(l){E(this,yl)!==l&&(ne(this,yl,l),this.listeners.forEach(r=>{r(l)}))}isOnline(){return E(this,yl)}},yl=new WeakMap,En=new WeakMap,gl=new WeakMap,cg),_c=new xb;function vb(n){return Math.min(1e3*2**n,3e4)}function Sg(n){return(n??"online")==="online"?_c.isOnline():!0}var Nd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function jg(n){let l=!1,i=0,r;const o=jd(),f=()=>o.status!=="pending",h=R=>{var T;if(!f()){const w=new Nd(R);S(w),(T=n.onCancel)==null||T.call(n,w)}},g=()=>{l=!0},p=()=>{l=!1},m=()=>Yd.isFocused()&&(n.networkMode==="always"||_c.isOnline())&&n.canRun(),v=()=>Sg(n.networkMode)&&n.canRun(),x=R=>{f()||(r==null||r(),o.resolve(R))},S=R=>{f()||(r==null||r(),o.reject(R))},j=()=>new Promise(R=>{var T;r=w=>{(f()||m())&&R(w)},(T=n.onPause)==null||T.call(n)}).then(()=>{var R;r=void 0,f()||(R=n.onContinue)==null||R.call(n)}),N=()=>{if(f())return;let R;const T=i===0?n.initialPromise:void 0;try{R=T??n.fn()}catch(w){R=Promise.reject(w)}Promise.resolve(R).then(x).catch(w=>{var W;if(f())return;const B=n.retry??(Li.isServer()?0:3),K=n.retryDelay??vb,O=typeof K=="function"?K(i,w):K,k=B===!0||typeof B=="number"&&i<B||typeof B=="function"&&B(i,w);if(l||!k){S(w);return}i++,(W=n.onFail)==null||W.call(n,i,w),fb(O).then(()=>m()?void 0:j()).then(()=>{l?S(w):N()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(r==null||r(),o),cancelRetry:g,continueRetry:p,canStart:v,start:()=>(v()?N():j().then(N),o)}}var rs,ug,Ng=(ug=class{constructor(){ue(this,rs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vd(this.gcTime)&&ne(this,rs,ns.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Li.isServer()?1/0:300*1e3))}clearGcTimeout(){E(this,rs)&&(ns.clearTimeout(E(this,rs)),ne(this,rs,void 0))}},rs=new WeakMap,ug),cs,pl,Wt,us,it,Qi,os,Gt,Rg,qa,og,bb=(og=class extends Ng{constructor(l){super();ue(this,Gt);ue(this,cs);ue(this,pl);ue(this,Wt);ue(this,us);ue(this,it);ue(this,Qi);ue(this,os);ne(this,os,!1),ne(this,Qi,l.defaultOptions),this.setOptions(l.options),this.observers=[],ne(this,us,l.client),ne(this,Wt,E(this,us).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,ne(this,cs,xy(this.options)),this.state=l.state??E(this,cs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=E(this,it))==null?void 0:l.promise}setOptions(l){if(this.options={...E(this,Qi),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=xy(this.options);i.data!==void 0&&(this.setState(py(i.data,i.dataUpdatedAt)),ne(this,cs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,Wt).remove(this)}setData(l,i){const r=Sd(this.state.data,l,this.options);return xe(this,Gt,qa).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(l,i){xe(this,Gt,qa).call(this,{type:"setState",state:l,setStateOptions:i})}cancel(l){var r,o;const i=(r=E(this,it))==null?void 0:r.promise;return(o=E(this,it))==null||o.cancel(l),i?i.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return E(this,cs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>ea(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>Ln(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!xg(this.state.dataUpdatedAt,l)}onFocus(){var i;const l=this.observers.find(r=>r.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(i=E(this,it))==null||i.continue()}onOnline(){var i;const l=this.observers.find(r=>r.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(i=E(this,it))==null||i.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),E(this,Wt).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(E(this,it)&&(E(this,os)||xe(this,Gt,Rg).call(this)?E(this,it).cancel({revert:!0}):E(this,it).cancelRetry()),this.scheduleGc()),E(this,Wt).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,Gt,qa).call(this,{type:"invalidate"})}async fetch(l,i){var p,m,v,x,S,j,N,R,T,w,B,K;if(this.state.fetchStatus!=="idle"&&((p=E(this,it))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(E(this,it))return E(this,it).continueRetry(),E(this,it).promise}if(l&&this.setOptions(l),!this.options.queryFn){const O=this.observers.find(k=>k.options.queryFn);O&&this.setOptions(O.options)}const r=new AbortController,o=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(ne(this,os,!0),r.signal)})},f=()=>{const O=bg(this.options,i),W=(()=>{const P={client:E(this,us),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return ne(this,os,!1),this.options.persister?this.options.persister(O,W,this):O(W)},g=(()=>{const O={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:E(this,us),state:this.state,fetchFn:f};return o(O),O})();(m=this.options.behavior)==null||m.onFetch(g,this),ne(this,pl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=g.fetchOptions)==null?void 0:v.meta))&&xe(this,Gt,qa).call(this,{type:"fetch",meta:(x=g.fetchOptions)==null?void 0:x.meta}),ne(this,it,jg({initialPromise:i==null?void 0:i.initialPromise,fn:g.fetchFn,onCancel:O=>{O instanceof Nd&&O.revert&&this.setState({...E(this,pl),fetchStatus:"idle"}),r.abort()},onFail:(O,k)=>{xe(this,Gt,qa).call(this,{type:"failed",failureCount:O,error:k})},onPause:()=>{xe(this,Gt,qa).call(this,{type:"pause"})},onContinue:()=>{xe(this,Gt,qa).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const O=await E(this,it).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(j=(S=E(this,Wt).config).onSuccess)==null||j.call(S,O,this),(R=(N=E(this,Wt).config).onSettled)==null||R.call(N,O,this.state.error,this),O}catch(O){if(O instanceof Nd){if(O.silent)return E(this,it).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw xe(this,Gt,qa).call(this,{type:"error",error:O}),(w=(T=E(this,Wt).config).onError)==null||w.call(T,O,this),(K=(B=E(this,Wt).config).onSettled)==null||K.call(B,this.state.data,O,this),O}finally{this.scheduleGc()}}},cs=new WeakMap,pl=new WeakMap,Wt=new WeakMap,us=new WeakMap,it=new WeakMap,Qi=new WeakMap,os=new WeakMap,Gt=new WeakSet,Rg=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},qa=function(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,..._g(r.data,this.options),fetchMeta:l.meta??null};case"success":const o={...r,...py(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,pl,l.manual?o:void 0),o;case"error":const f=l.error;return{...r,error:f,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,Wt).notify({query:this,type:"updated",action:l})})},og);function _g(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sg(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function py(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xy(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var wt,Me,Yi,vt,ds,xl,Ha,Tn,Gi,vl,bl,fs,hs,Mn,Sl,Oe,Ai,Rd,_d,Ed,Td,Md,Cd,wd,Eg,dg,Sb=(dg=class extends Ml{constructor(l,i){super();ue(this,Oe);ue(this,wt);ue(this,Me);ue(this,Yi);ue(this,vt);ue(this,ds);ue(this,xl);ue(this,Ha);ue(this,Tn);ue(this,Gi);ue(this,vl);ue(this,bl);ue(this,fs);ue(this,hs);ue(this,Mn);ue(this,Sl,new Set);this.options=i,ne(this,wt,l),ne(this,Tn,null),ne(this,Ha,jd()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,Me).addObserver(this),vy(E(this,Me),this.options)?xe(this,Oe,Ai).call(this):this.updateResult(),xe(this,Oe,Td).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ad(E(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ad(E(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Oe,Md).call(this),xe(this,Oe,Cd).call(this),E(this,Me).removeObserver(this)}setOptions(l){const i=this.options,r=E(this,Me);if(this.options=E(this,wt).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ea(this.options.enabled,E(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,Oe,wd).call(this),E(this,Me).setOptions(this.options),i._defaulted&&!Rc(this.options,i)&&E(this,wt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,Me),observer:this});const o=this.hasListeners();o&&by(E(this,Me),r,this.options,i)&&xe(this,Oe,Ai).call(this),this.updateResult(),o&&(E(this,Me)!==r||ea(this.options.enabled,E(this,Me))!==ea(i.enabled,E(this,Me))||Ln(this.options.staleTime,E(this,Me))!==Ln(i.staleTime,E(this,Me)))&&xe(this,Oe,Rd).call(this);const f=xe(this,Oe,_d).call(this);o&&(E(this,Me)!==r||ea(this.options.enabled,E(this,Me))!==ea(i.enabled,E(this,Me))||f!==E(this,Mn))&&xe(this,Oe,Ed).call(this,f)}getOptimisticResult(l){const i=E(this,wt).getQueryCache().build(E(this,wt),l),r=this.createResult(i,l);return Nb(this,r)&&(ne(this,vt,r),ne(this,xl,this.options),ne(this,ds,E(this,Me).state)),r}getCurrentResult(){return E(this,vt)}trackResult(l,i){return new Proxy(l,{get:(r,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,Ha).status==="pending"&&E(this,Ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(l){E(this,Sl).add(l)}getCurrentQuery(){return E(this,Me)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=E(this,wt).defaultQueryOptions(l),r=E(this,wt).getQueryCache().build(E(this,wt),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(l){return xe(this,Oe,Ai).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,vt)))}createResult(l,i){var J;const r=E(this,Me),o=this.options,f=E(this,vt),h=E(this,ds),g=E(this,xl),m=l!==r?l.state:E(this,Yi),{state:v}=l;let x={...v},S=!1,j;if(i._optimisticResults){const q=this.hasListeners(),I=!q&&vy(l,i),te=q&&by(l,r,i,o);(I||te)&&(x={...x,..._g(v.data,l.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:R,status:T}=x;j=x.data;let w=!1;if(i.placeholderData!==void 0&&j===void 0&&T==="pending"){let q;f!=null&&f.isPlaceholderData&&i.placeholderData===(g==null?void 0:g.placeholderData)?(q=f.data,w=!0):q=typeof i.placeholderData=="function"?i.placeholderData((J=E(this,bl))==null?void 0:J.state.data,E(this,bl)):i.placeholderData,q!==void 0&&(T="success",j=Sd(f==null?void 0:f.data,q,i),S=!0)}if(i.select&&j!==void 0&&!w)if(f&&j===(h==null?void 0:h.data)&&i.select===E(this,Gi))j=E(this,vl);else try{ne(this,Gi,i.select),j=i.select(j),j=Sd(f==null?void 0:f.data,j,i),ne(this,vl,j),ne(this,Tn,null)}catch(q){ne(this,Tn,q)}E(this,Tn)&&(N=E(this,Tn),j=E(this,vl),R=Date.now(),T="error");const B=x.fetchStatus==="fetching",K=T==="pending",O=T==="error",k=K&&B,W=j!==void 0,F={status:T,fetchStatus:x.fetchStatus,isPending:K,isSuccess:T==="success",isError:O,isInitialLoading:k,isLoading:k,data:j,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:R,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:x.dataUpdateCount>m.dataUpdateCount||x.errorUpdateCount>m.errorUpdateCount,isFetching:B,isRefetching:B&&!K,isLoadingError:O&&!W,isPaused:x.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:O&&W,isStale:Vd(l,i),refetch:this.refetch,promise:E(this,Ha),isEnabled:ea(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const q=F.data!==void 0,I=F.status==="error"&&!q,te=se=>{I?se.reject(F.error):q&&se.resolve(F.data)},le=()=>{const se=ne(this,Ha,F.promise=jd());te(se)},ce=E(this,Ha);switch(ce.status){case"pending":l.queryHash===r.queryHash&&te(ce);break;case"fulfilled":(I||F.data!==ce.value)&&le();break;case"rejected":(!I||F.error!==ce.reason)&&le();break}}return F}updateResult(){const l=E(this,vt),i=this.createResult(E(this,Me),this.options);if(ne(this,ds,E(this,Me).state),ne(this,xl,this.options),E(this,ds).data!==void 0&&ne(this,bl,E(this,Me)),Rc(i,l))return;ne(this,vt,i);const r=()=>{if(!l)return!0;const{notifyOnChangeProps:o}=this.options,f=typeof o=="function"?o():o;if(f==="all"||!f&&!E(this,Sl).size)return!0;const h=new Set(f??E(this,Sl));return this.options.throwOnError&&h.add("error"),Object.keys(E(this,vt)).some(g=>{const p=g;return E(this,vt)[p]!==l[p]&&h.has(p)})};xe(this,Oe,Eg).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Oe,Td).call(this)}},wt=new WeakMap,Me=new WeakMap,Yi=new WeakMap,vt=new WeakMap,ds=new WeakMap,xl=new WeakMap,Ha=new WeakMap,Tn=new WeakMap,Gi=new WeakMap,vl=new WeakMap,bl=new WeakMap,fs=new WeakMap,hs=new WeakMap,Mn=new WeakMap,Sl=new WeakMap,Oe=new WeakSet,Ai=function(l){xe(this,Oe,wd).call(this);let i=E(this,Me).fetch(this.options,l);return l!=null&&l.throwOnError||(i=i.catch(bt)),i},Rd=function(){xe(this,Oe,Md).call(this);const l=Ln(this.options.staleTime,E(this,Me));if(Li.isServer()||E(this,vt).isStale||!vd(l))return;const r=xg(E(this,vt).dataUpdatedAt,l)+1;ne(this,fs,ns.setTimeout(()=>{E(this,vt).isStale||this.updateResult()},r))},_d=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,Me)):this.options.refetchInterval)??!1},Ed=function(l){xe(this,Oe,Cd).call(this),ne(this,Mn,l),!(Li.isServer()||ea(this.options.enabled,E(this,Me))===!1||!vd(E(this,Mn))||E(this,Mn)===0)&&ne(this,hs,ns.setInterval(()=>{(this.options.refetchIntervalInBackground||Yd.isFocused())&&xe(this,Oe,Ai).call(this)},E(this,Mn)))},Td=function(){xe(this,Oe,Rd).call(this),xe(this,Oe,Ed).call(this,xe(this,Oe,_d).call(this))},Md=function(){E(this,fs)&&(ns.clearTimeout(E(this,fs)),ne(this,fs,void 0))},Cd=function(){E(this,hs)&&(ns.clearInterval(E(this,hs)),ne(this,hs,void 0))},wd=function(){const l=E(this,wt).getQueryCache().build(E(this,wt),this.options);if(l===E(this,Me))return;const i=E(this,Me);ne(this,Me,l),ne(this,Yi,l.state),this.hasListeners()&&(i==null||i.removeObserver(this),l.addObserver(this))},Eg=function(l){nt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(E(this,vt))}),E(this,wt).getQueryCache().notify({query:E(this,Me),type:"observerResultsUpdated"})})},dg);function jb(n,l){return ea(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function vy(n,l){return jb(n,l)||n.state.data!==void 0&&Ad(n,l,l.refetchOnMount)}function Ad(n,l,i){if(ea(l.enabled,n)!==!1&&Ln(l.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&Vd(n,l)}return!1}function by(n,l,i,r){return(n!==l||ea(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Vd(n,i)}function Vd(n,l){return ea(l.enabled,n)!==!1&&n.isStaleByTime(Ln(l.staleTime,n))}function Nb(n,l){return!Rc(n.getCurrentResult(),l)}function Sy(n){return{onFetch:(l,i)=>{var v,x,S,j,N;const r=l.options,o=(S=(x=(v=l.fetchOptions)==null?void 0:v.meta)==null?void 0:x.fetchMore)==null?void 0:S.direction,f=((j=l.state.data)==null?void 0:j.pages)||[],h=((N=l.state.data)==null?void 0:N.pageParams)||[];let g={pages:[],pageParams:[]},p=0;const m=async()=>{let R=!1;const T=K=>{yb(K,()=>l.signal,()=>R=!0)},w=bg(l.options,l.fetchOptions),B=async(K,O,k)=>{if(R)return Promise.reject();if(O==null&&K.pages.length)return Promise.resolve(K);const P=(()=>{const I={client:l.client,queryKey:l.queryKey,pageParam:O,direction:k?"backward":"forward",meta:l.options.meta};return T(I),I})(),F=await w(P),{maxPages:J}=l.options,q=k?mb:hb;return{pages:q(K.pages,F,J),pageParams:q(K.pageParams,O,J)}};if(o&&f.length){const K=o==="backward",O=K?Rb:jy,k={pages:f,pageParams:h},W=O(r,k);g=await B(k,W,K)}else{const K=n??f.length;do{const O=p===0?h[0]??r.initialPageParam:jy(r,g);if(p>0&&O==null)break;g=await B(g,O),p++}while(p<K)}return g};l.options.persister?l.fetchFn=()=>{var R,T;return(T=(R=l.options).persister)==null?void 0:T.call(R,m,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i)}:l.fetchFn=m}}}function jy(n,{pages:l,pageParams:i}){const r=l.length-1;return l.length>0?n.getNextPageParam(l[r],l,i[r],i):void 0}function Rb(n,{pages:l,pageParams:i}){var r;return l.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,l[0],l,i[0],i):void 0}var ki,ya,gt,ms,ga,jn,fg,_b=(fg=class extends Ng{constructor(l){super();ue(this,ga);ue(this,ki);ue(this,ya);ue(this,gt);ue(this,ms);ne(this,ki,l.client),this.mutationId=l.mutationId,ne(this,gt,l.mutationCache),ne(this,ya,[]),this.state=l.state||Tg(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){E(this,ya).includes(l)||(E(this,ya).push(l),this.clearGcTimeout(),E(this,gt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){ne(this,ya,E(this,ya).filter(i=>i!==l)),this.scheduleGc(),E(this,gt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){E(this,ya).length||(this.state.status==="pending"?this.scheduleGc():E(this,gt).remove(this))}continue(){var l;return((l=E(this,ms))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,g,p,m,v,x,S,j,N,R,T,w,B,K,O,k,W,P;const i=()=>{xe(this,ga,jn).call(this,{type:"continue"})},r={client:E(this,ki),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,ms,jg({fn:()=>this.options.mutationFn?this.options.mutationFn(l,r):Promise.reject(new Error("No mutationFn found")),onFail:(F,J)=>{xe(this,ga,jn).call(this,{type:"failed",failureCount:F,error:J})},onPause:()=>{xe(this,ga,jn).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,gt).canRun(this)}));const o=this.state.status==="pending",f=!E(this,ms).canStart();try{if(o)i();else{xe(this,ga,jn).call(this,{type:"pending",variables:l,isPaused:f}),E(this,gt).config.onMutate&&await E(this,gt).config.onMutate(l,this,r);const J=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,l,r));J!==this.state.context&&xe(this,ga,jn).call(this,{type:"pending",context:J,variables:l,isPaused:f})}const F=await E(this,ms).start();return await((m=(p=E(this,gt).config).onSuccess)==null?void 0:m.call(p,F,l,this.state.context,this,r)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,F,l,this.state.context,r)),await((j=(S=E(this,gt).config).onSettled)==null?void 0:j.call(S,F,null,this.state.variables,this.state.context,this,r)),await((R=(N=this.options).onSettled)==null?void 0:R.call(N,F,null,l,this.state.context,r)),xe(this,ga,jn).call(this,{type:"success",data:F}),F}catch(F){try{await((w=(T=E(this,gt).config).onError)==null?void 0:w.call(T,F,l,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((K=(B=this.options).onError)==null?void 0:K.call(B,F,l,this.state.context,r))}catch(J){Promise.reject(J)}try{await((k=(O=E(this,gt).config).onSettled)==null?void 0:k.call(O,void 0,F,this.state.variables,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((P=(W=this.options).onSettled)==null?void 0:P.call(W,void 0,F,l,this.state.context,r))}catch(J){Promise.reject(J)}throw xe(this,ga,jn).call(this,{type:"error",error:F}),F}finally{E(this,gt).runNext(this)}}},ki=new WeakMap,ya=new WeakMap,gt=new WeakMap,ms=new WeakMap,ga=new WeakSet,jn=function(l){const i=r=>{switch(l.type){case"failed":return{...r,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...r,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:l.error,failureCount:r.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),nt.batch(()=>{E(this,ya).forEach(r=>{r.onMutationUpdate(l)}),E(this,gt).notify({mutation:this,type:"updated",action:l})})},fg);function Tg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qa,ia,Ki,hg,Eb=(hg=class extends Ml{constructor(l={}){super();ue(this,Qa);ue(this,ia);ue(this,Ki);this.config=l,ne(this,Qa,new Set),ne(this,ia,new Map),ne(this,Ki,0)}build(l,i,r){const o=new _b({client:l,mutationCache:this,mutationId:++hc(this,Ki)._,options:l.defaultMutationOptions(i),state:r});return this.add(o),o}add(l){E(this,Qa).add(l);const i=mc(l);if(typeof i=="string"){const r=E(this,ia).get(i);r?r.push(l):E(this,ia).set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(E(this,Qa).delete(l)){const i=mc(l);if(typeof i=="string"){const r=E(this,ia).get(i);if(r)if(r.length>1){const o=r.indexOf(l);o!==-1&&r.splice(o,1)}else r[0]===l&&E(this,ia).delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=mc(l);if(typeof i=="string"){const r=E(this,ia).get(i),o=r==null?void 0:r.find(f=>f.state.status==="pending");return!o||o===l}else return!0}runNext(l){var r;const i=mc(l);if(typeof i=="string"){const o=(r=E(this,ia).get(i))==null?void 0:r.find(f=>f!==l&&f.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nt.batch(()=>{E(this,Qa).forEach(l=>{this.notify({type:"removed",mutation:l})}),E(this,Qa).clear(),E(this,ia).clear()})}getAll(){return Array.from(E(this,Qa))}find(l){const i={exact:!0,...l};return this.getAll().find(r=>my(i,r))}findAll(l={}){return this.getAll().filter(i=>my(l,i))}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return nt.batch(()=>Promise.all(l.map(i=>i.continue().catch(bt))))}},Qa=new WeakMap,ia=new WeakMap,Ki=new WeakMap,hg);function mc(n){var l;return(l=n.options.scope)==null?void 0:l.id}var Ya,Cn,At,Ga,Va,vc,Od,mg,Tb=(mg=class extends Ml{constructor(i,r){super();ue(this,Va);ue(this,Ya);ue(this,Cn);ue(this,At);ue(this,Ga);ne(this,Ya,i),this.setOptions(r),this.bindMethods(),xe(this,Va,vc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const r=this.options;this.options=E(this,Ya).defaultMutationOptions(i),Rc(this.options,r)||E(this,Ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,At),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&xs(r.mutationKey)!==xs(this.options.mutationKey)?this.reset():((o=E(this,At))==null?void 0:o.state.status)==="pending"&&E(this,At).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=E(this,At))==null||i.removeObserver(this)}onMutationUpdate(i){xe(this,Va,vc).call(this),xe(this,Va,Od).call(this,i)}getCurrentResult(){return E(this,Cn)}reset(){var i;(i=E(this,At))==null||i.removeObserver(this),ne(this,At,void 0),xe(this,Va,vc).call(this),xe(this,Va,Od).call(this)}mutate(i,r){var o;return ne(this,Ga,r),(o=E(this,At))==null||o.removeObserver(this),ne(this,At,E(this,Ya).getMutationCache().build(E(this,Ya),this.options)),E(this,At).addObserver(this),E(this,At).execute(i)}},Ya=new WeakMap,Cn=new WeakMap,At=new WeakMap,Ga=new WeakMap,Va=new WeakSet,vc=function(){var r;const i=((r=E(this,At))==null?void 0:r.state)??Tg();ne(this,Cn,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Od=function(i){nt.batch(()=>{var r,o,f,h,g,p,m,v;if(E(this,Ga)&&this.hasListeners()){const x=E(this,Cn).variables,S=E(this,Cn).context,j={client:E(this,Ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(o=(r=E(this,Ga)).onSuccess)==null||o.call(r,i.data,x,S,j)}catch(N){Promise.reject(N)}try{(h=(f=E(this,Ga)).onSettled)==null||h.call(f,i.data,null,x,S,j)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(g=E(this,Ga)).onError)==null||p.call(g,i.error,x,S,j)}catch(N){Promise.reject(N)}try{(v=(m=E(this,Ga)).onSettled)==null||v.call(m,void 0,i.error,x,S,j)}catch(N){Promise.reject(N)}}}this.listeners.forEach(x=>{x(E(this,Cn))})})},mg),pa,yg,Mb=(yg=class extends Ml{constructor(l={}){super();ue(this,pa);this.config=l,ne(this,pa,new Map)}build(l,i,r){const o=i.queryKey,f=i.queryHash??Gd(o,i);let h=this.get(f);return h||(h=new bb({client:l,queryKey:o,queryHash:f,options:l.defaultQueryOptions(i),state:r,defaultOptions:l.getQueryDefaults(o)}),this.add(h)),h}add(l){E(this,pa).has(l.queryHash)||(E(this,pa).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=E(this,pa).get(l.queryHash);i&&(l.destroy(),i===l&&E(this,pa).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){nt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return E(this,pa).get(l)}getAll(){return[...E(this,pa).values()]}find(l){const i={exact:!0,...l};return this.getAll().find(r=>hy(i,r))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(r=>hy(l,r)):i}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},pa=new WeakMap,yg),Ze,wn,An,jl,Nl,On,Rl,_l,gg,Cb=(gg=class{constructor(n={}){ue(this,Ze);ue(this,wn);ue(this,An);ue(this,jl);ue(this,Nl);ue(this,On);ue(this,Rl);ue(this,_l);ne(this,Ze,n.queryCache||new Mb),ne(this,wn,n.mutationCache||new Eb),ne(this,An,n.defaultOptions||{}),ne(this,jl,new Map),ne(this,Nl,new Map),ne(this,On,0)}mount(){hc(this,On)._++,E(this,On)===1&&(ne(this,Rl,Yd.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,Ze).onFocus())})),ne(this,_l,_c.subscribe(async n=>{n&&(await this.resumePausedMutations(),E(this,Ze).onOnline())})))}unmount(){var n,l;hc(this,On)._--,E(this,On)===0&&((n=E(this,Rl))==null||n.call(this),ne(this,Rl,void 0),(l=E(this,_l))==null||l.call(this),ne(this,_l,void 0))}isFetching(n){return E(this,Ze).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return E(this,wn).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=E(this,Ze).get(l.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=E(this,Ze).build(this,l),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(Ln(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(n){return E(this,Ze).findAll(n).map(({queryKey:l,state:i})=>{const r=i.data;return[l,r]})}setQueryData(n,l,i){const r=this.defaultQueryOptions({queryKey:n}),o=E(this,Ze).get(r.queryHash),f=o==null?void 0:o.state.data,h=ob(l,f);if(h!==void 0)return E(this,Ze).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,l,i){return nt.batch(()=>E(this,Ze).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,l,i)]))}getQueryState(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=E(this,Ze).get(l.queryHash))==null?void 0:i.state}removeQueries(n){const l=E(this,Ze);nt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=E(this,Ze);return nt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},r=nt.batch(()=>E(this,Ze).findAll(n).map(o=>o.cancel(i)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(n,l={}){return nt.batch(()=>(E(this,Ze).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},r=nt.batch(()=>E(this,Ze).findAll(n).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let f=o.fetch(void 0,i);return i.throwOnError||(f=f.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(r).then(bt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=E(this,Ze).build(this,l);return i.isStaleByTime(Ln(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(bt).catch(bt)}fetchInfiniteQuery(n){return n.behavior=Sy(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(bt).catch(bt)}ensureInfiniteQueryData(n){return n.behavior=Sy(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return _c.isOnline()?E(this,wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ze)}getMutationCache(){return E(this,wn)}getDefaultOptions(){return E(this,An)}setDefaultOptions(n){ne(this,An,n)}setQueryDefaults(n,l){E(this,jl).set(xs(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[...E(this,jl).values()],i={};return l.forEach(r=>{Di(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,l){E(this,Nl).set(xs(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[...E(this,Nl).values()],i={};return l.forEach(r=>{Di(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={...E(this,An).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=Gd(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===kd&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...E(this,An).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){E(this,Ze).clear(),E(this,wn).clear()}},Ze=new WeakMap,wn=new WeakMap,An=new WeakMap,jl=new WeakMap,Nl=new WeakMap,On=new WeakMap,Rl=new WeakMap,_l=new WeakMap,gg),Mg=Q.createContext(void 0),Za=n=>{const l=Q.useContext(Mg);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},wb=({client:n,children:l})=>(Q.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(Mg.Provider,{value:n,children:l})),Cg=Q.createContext(!1),Ab=()=>Q.useContext(Cg);Cg.Provider;function Ob(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var zb=Q.createContext(Ob()),Db=()=>Q.useContext(zb),Lb=(n,l,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?Kd(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(l.isReset()||(n.retryOnMount=!1))},Ub=n=>{Q.useEffect(()=>{n.clearReset()},[n])},Bb=({result:n,errorResetBoundary:l,throwOnError:i,query:r,suspense:o})=>n.isError&&!l.isReset()&&!n.isFetching&&r&&(o&&n.data===void 0||Kd(i,[n.error,r])),qb=n=>{if(n.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Hb=(n,l)=>n.isLoading&&n.isFetching&&!l,Qb=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,Ny=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function Yb(n,l,i){var S,j,N,R;const r=Ab(),o=Db(),f=Za(),h=f.defaultQueryOptions(n);(j=(S=f.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||j.call(S,h);const g=f.getQueryCache().get(h.queryHash);h._optimisticResults=r?"isRestoring":"optimistic",qb(h),Lb(h,o,g),Ub(o);const p=!f.getQueryCache().get(h.queryHash),[m]=Q.useState(()=>new l(f,h)),v=m.getOptimisticResult(h),x=!r&&n.subscribed!==!1;if(Q.useSyncExternalStore(Q.useCallback(T=>{const w=x?m.subscribe(nt.batchCalls(T)):bt;return m.updateResult(),w},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),Q.useEffect(()=>{m.setOptions(h)},[h,m]),Qb(h,v))throw Ny(h,m,o);if(Bb({result:v,errorResetBoundary:o,throwOnError:h.throwOnError,query:g,suspense:h.suspense}))throw v.error;if((R=(N=f.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||R.call(N,h,v),h.experimental_prefetchInRender&&!Li.isServer()&&Hb(v,r)){const T=p?Ny(h,m,o):g==null?void 0:g.promise;T==null||T.catch(bt).finally(()=>{m.updateResult()})}return h.notifyOnChangeProps?v:m.trackResult(v)}function Ke(n,l){return Yb(n,Sb)}function zd(n,l){const i=Za(),[r]=Q.useState(()=>new Tb(i,n));Q.useEffect(()=>{r.setOptions(n)},[r,n]);const o=Q.useSyncExternalStore(Q.useCallback(h=>r.subscribe(nt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=Q.useCallback((h,g)=>{r.mutate(h,g).catch(bt)},[r]);if(o.error&&Kd(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:f,mutateAsync:o.mutate}}var Oi=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function sd(n){const l=Q.useRef({value:n,prev:null}),i=l.current.value;return n!==i&&(l.current={value:n,prev:i}),l.current.prev}function Gb(n,l,i={},r={}){Q.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([f])=>{l(f)},i);return o.observe(n.current),()=>{o.disconnect()}},[l,i,r.disabled,n])}function kb(n){const l=Q.useRef(null);return Q.useImperativeHandle(n,()=>l.current,[]),l}var wg=!1;function Ui(n){return n[n.length-1]}function Kb(n){return typeof n=="function"}function zn(n,l){return Kb(n)?n(l):n}var Vb=Object.prototype.hasOwnProperty,Ry=Object.prototype.propertyIsEnumerable,Xb=()=>Object.create(null),as=(n,l)=>ka(n,l,Xb);function ka(n,l,i=()=>({}),r=0){if(n===l)return n;if(r>500)return l;const o=l,f=Ty(n)&&Ty(o);if(!f&&!(El(n)&&El(o)))return o;const h=f?n:_y(n);if(!h)return o;const g=f?o:_y(o);if(!g)return o;const p=h.length,m=g.length,v=f?new Array(m):i();let x=0;for(let S=0;S<m;S++){const j=f?S:g[S],N=n[j],R=o[j];if(N===R){v[j]=N,(f?S<p:Vb.call(n,j))&&x++;continue}if(N===null||R===null||typeof N!="object"||typeof R!="object"){v[j]=R;continue}const T=ka(N,R,i,r+1);v[j]=T,T===N&&x++}return p===m&&x===p?n:v}function _y(n){const l=Object.getOwnPropertyNames(n);for(const o of l)if(!Ry.call(n,o))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return l;const r=l;for(const o of i){if(!Ry.call(n,o))return!1;r.push(o)}return r}function El(n){if(!Ey(n))return!1;const l=n.constructor;if(typeof l>"u")return!0;const i=l.prototype;return!(!Ey(i)||!i.hasOwnProperty("isPrototypeOf"))}function Ey(n){return Object.prototype.toString.call(n)==="[object Object]"}function Ty(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ys(n,l,i){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(Array.isArray(n)&&Array.isArray(l)){if(n.length!==l.length)return!1;for(let r=0,o=n.length;r<o;r++)if(!ys(n[r],l[r],i))return!1;return!0}if(El(n)&&El(l)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in l)if((!r||l[h]!==void 0)&&!ys(n[h],l[h],i))return!1;return!0}let o=0;if(!r)o=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&o++;let f=0;for(const h in l)if((!r||l[h]!==void 0)&&(f++,f>o||!ys(n[h],l[h],i)))return!1;return o===f}return!1}function Tl(n){let l,i;const r=new Promise((o,f)=>{l=o,i=f});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,l(o),n==null||n(o)},r.reject=o=>{r.status="rejected",i(o)},r}function Bi(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function $b(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function My(n){let l;try{l=decodeURI(n)}catch{l=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return $b(l)}var Zb=["http:","https:","mailto:","tel:"];function Ec(n,l){if(!n)return!1;try{const i=new URL(n);return!l.has(i.protocol)}catch{return!1}}function _i(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const l=/%25|%5C/gi;let i=0,r="",o;for(;(o=l.exec(n))!==null;)r+=My(n.slice(i,o.index))+o[0],i=l.lastIndex;r=r+My(i?n.slice(i):n);let f=!1;return r.startsWith("//")&&(f=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:f}}function Pb(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function Fb(n,l){if(n===l)return!0;if(n.length!==l.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==l[i])return!1;return!0}function Ka(){throw new Error("Invariant failed")}function qi(n){const l=new Map;let i,r;const o=f=>{f.next&&(f.prev?(f.prev.next=f.next,f.next.prev=f.prev,f.next=void 0,r&&(r.next=f,f.prev=r)):(f.next.prev=void 0,i=f.next,f.next=void 0,r&&(f.prev=r,r.next=f)),r=f)};return{get(f){const h=l.get(f);if(h)return o(h),h.value},set(f,h){if(l.size>=n&&i){const p=i;l.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const g=l.get(f);if(g)g.value=h,o(g);else{const p={key:f,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),l.set(f,p)}},clear(){l.clear(),i=void 0,r=void 0}}}var ss=4,Ag=5;function Jb(n){const l=n.indexOf("{");if(l===-1)return null;const i=n.indexOf("}",l);return i===-1||l+1>=n.length?null:[l,i]}function Xd(n,l,i=new Uint16Array(6)){const r=n.indexOf("/",l),o=r===-1?n.length:r,f=n.substring(l,o);if(!f||!f.includes("$"))return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i;if(f==="$"){const g=n.length;return i[0]=2,i[1]=l,i[2]=l,i[3]=g,i[4]=g,i[5]=g,i}if(f.charCodeAt(0)===36)return i[0]=1,i[1]=l,i[2]=l+1,i[3]=o,i[4]=o,i[5]=o,i;const h=Jb(f);if(h){const[g,p]=h,m=f.charCodeAt(g+1);if(m===45){if(g+2<f.length&&f.charCodeAt(g+2)===36){const v=g+3,x=p;if(v<x)return i[0]=3,i[1]=l+g,i[2]=l+v,i[3]=l+x,i[4]=l+p+1,i[5]=o,i}}else if(m===36){const v=g+1,x=g+2;return x===p?(i[0]=2,i[1]=l+g,i[2]=l+v,i[3]=l+x,i[4]=l+p+1,i[5]=n.length,i):(i[0]=1,i[1]=l+g,i[2]=l+x,i[3]=l+p,i[4]=l+p+1,i[5]=o,i)}}return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i}function zc(n,l,i,r,o,f,h){var p,m,v,x,S,j,N,R,T,w,B,K,O;h==null||h(i);let g=r;{const k=i.fullPath??i.from,W=k.length,P=((p=i.options)==null?void 0:p.caseSensitive)??n,F=!!((v=(m=i.options)==null?void 0:m.params)!=null&&v.parse&&((S=(x=i.options)==null?void 0:x.skipRouteOnParseError)!=null&&S.params));for(;g<W;){const q=Xd(k,g,l);let I;const te=g,le=q[5];switch(g=le+1,f++,q[0]){case 0:{const ce=k.substring(q[2],q[3]);if(P){const se=(j=o.static)==null?void 0:j.get(ce);if(se)I=se;else{o.static??(o.static=new Map);const z=ls(i.fullPath??i.from);z.parent=o,z.depth=f,I=z,o.static.set(ce,z)}}else{const se=ce.toLowerCase(),z=(N=o.staticInsensitive)==null?void 0:N.get(se);if(z)I=z;else{o.staticInsensitive??(o.staticInsensitive=new Map);const V=ls(i.fullPath??i.from);V.parent=o,V.depth=f,I=V,o.staticInsensitive.set(se,V)}}break}case 1:{const ce=k.substring(te,q[1]),se=k.substring(q[4],le),z=P&&!!(ce||se),V=ce?z?ce:ce.toLowerCase():void 0,ae=se?z?se:se.toLowerCase():void 0,me=!F&&((R=o.dynamic)==null?void 0:R.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===z&&oe.prefix===V&&oe.suffix===ae));if(me)I=me;else{const oe=id(1,i.fullPath??i.from,z,V,ae);I=oe,oe.depth=f,oe.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(oe)}break}case 3:{const ce=k.substring(te,q[1]),se=k.substring(q[4],le),z=P&&!!(ce||se),V=ce?z?ce:ce.toLowerCase():void 0,ae=se?z?se:se.toLowerCase():void 0,me=!F&&((T=o.optional)==null?void 0:T.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===z&&oe.prefix===V&&oe.suffix===ae));if(me)I=me;else{const oe=id(3,i.fullPath??i.from,z,V,ae);I=oe,oe.parent=o,oe.depth=f,o.optional??(o.optional=[]),o.optional.push(oe)}break}case 2:{const ce=k.substring(te,q[1]),se=k.substring(q[4],le),z=P&&!!(ce||se),V=ce?z?ce:ce.toLowerCase():void 0,ae=se?z?se:se.toLowerCase():void 0,me=id(2,i.fullPath??i.from,z,V,ae);I=me,me.parent=o,me.depth=f,o.wildcard??(o.wildcard=[]),o.wildcard.push(me)}}o=I}if(F&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const q=ls(i.fullPath??i.from);q.kind=Ag,q.parent=o,f++,q.depth=f,o.pathless??(o.pathless=[]),o.pathless.push(q),o=q}const J=(i.path||!i.children)&&!i.isRoot;if(J&&k.endsWith("/")){const q=ls(i.fullPath??i.from);q.kind=ss,q.parent=o,f++,q.depth=f,o.index=q,o=q}o.parse=((B=(w=i.options)==null?void 0:w.params)==null?void 0:B.parse)??null,o.skipOnParamError=F,o.parsingPriority=((O=(K=i.options)==null?void 0:K.skipRouteOnParseError)==null?void 0:O.priority)??0,J&&!o.route&&(o.route=i,o.fullPath=i.fullPath??i.from)}if(i.children)for(const k of i.children)zc(n,l,k,g,o,f,h)}function ld(n,l){if(n.skipOnParamError&&!l.skipOnParamError)return-1;if(!n.skipOnParamError&&l.skipOnParamError)return 1;if(n.skipOnParamError&&l.skipOnParamError&&(n.parsingPriority||l.parsingPriority))return l.parsingPriority-n.parsingPriority;if(n.prefix&&l.prefix&&n.prefix!==l.prefix){if(n.prefix.startsWith(l.prefix))return-1;if(l.prefix.startsWith(n.prefix))return 1}if(n.suffix&&l.suffix&&n.suffix!==l.suffix){if(n.suffix.endsWith(l.suffix))return-1;if(l.suffix.endsWith(n.suffix))return 1}return n.prefix&&!l.prefix?-1:!n.prefix&&l.prefix?1:n.suffix&&!l.suffix?-1:!n.suffix&&l.suffix?1:n.caseSensitive&&!l.caseSensitive?-1:!n.caseSensitive&&l.caseSensitive?1:0}function Nn(n){var l,i,r;if(n.pathless)for(const o of n.pathless)Nn(o);if(n.static)for(const o of n.static.values())Nn(o);if(n.staticInsensitive)for(const o of n.staticInsensitive.values())Nn(o);if((l=n.dynamic)!=null&&l.length){n.dynamic.sort(ld);for(const o of n.dynamic)Nn(o)}if((i=n.optional)!=null&&i.length){n.optional.sort(ld);for(const o of n.optional)Nn(o)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(ld);for(const o of n.wildcard)Nn(o)}}function ls(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function id(n,l,i,r,o){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:r,suffix:o}}function Ib(n,l){const i=ls("/"),r=new Uint16Array(6);for(const o of n)zc(!1,r,o,1,i,0);Nn(i),l.masksTree=i,l.flatCache=qi(1e3)}function Wb(n,l){n||(n="/");const i=l.flatCache.get(n);if(i)return i;const r=$d(n,l.masksTree);return l.flatCache.set(n,r),r}function eS(n,l,i,r,o){n||(n="/"),r||(r="/");const f=l?`case\0${n}`:n;let h=o.singleCache.get(f);return h||(h=ls("/"),zc(l,new Uint16Array(6),{from:n},1,h,0),o.singleCache.set(f,h)),$d(r,h,i)}function tS(n,l,i=!1){const r=i?n:`nofuzz\0${n}`,o=l.matchCache.get(r);if(o!==void 0)return o;n||(n="/");let f;try{f=$d(n,l.segmentTree,i)}catch(h){if(h instanceof URIError)f=null;else throw h}return f&&(f.branch=sS(f.route)),l.matchCache.set(r,f),f}function aS(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function nS(n,l=!1,i){const r=ls(n.fullPath),o=new Uint16Array(6),f={},h={};let g=0;return zc(l,o,n,1,r,0,p=>{if(i==null||i(p,g),p.id in f&&Ka(),f[p.id]=p,g!==0&&p.path){const m=aS(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}g++}),Nn(r),{processedTree:{segmentTree:r,singleCache:qi(1e3),matchCache:qi(1e3),flatCache:null,masksTree:null},routesById:f,routesByPath:h}}function $d(n,l,i=!1){const r=n.split("/"),o=iS(n,r,l,i);if(!o)return null;const[f]=Og(n,r,o);return{route:o.node.route,rawParams:f,parsedParams:o.parsedParams}}function Og(n,l,i){var v,x,S,j,N,R,T,w,B,K;const r=lS(i.node);let o=null;const f=Object.create(null);let h=((v=i.extract)==null?void 0:v.part)??0,g=((x=i.extract)==null?void 0:x.node)??0,p=((S=i.extract)==null?void 0:S.path)??0,m=((j=i.extract)==null?void 0:j.segment)??0;for(;g<r.length;h++,g++,p++,m++){const O=r[g];if(O.kind===ss)break;if(O.kind===Ag){m--,h--,p--;continue}const k=l[h],W=p;if(k&&(p+=k.length),O.kind===1){o??(o=i.node.fullPath.split("/"));const P=o[m],F=((N=O.prefix)==null?void 0:N.length)??0;if(P.charCodeAt(F)===123){const J=((R=O.suffix)==null?void 0:R.length)??0,q=P.substring(F+2,P.length-J-1),I=k.substring(F,k.length-J);f[q]=decodeURIComponent(I)}else{const J=P.substring(1);f[J]=decodeURIComponent(k)}}else if(O.kind===3){if(i.skipped&1<<g){h--,p=W-1;continue}o??(o=i.node.fullPath.split("/"));const P=o[m],F=((T=O.prefix)==null?void 0:T.length)??0,J=((w=O.suffix)==null?void 0:w.length)??0,q=P.substring(F+3,P.length-J-1),I=O.suffix||O.prefix?k.substring(F,k.length-J):k;I&&(f[q]=decodeURIComponent(I))}else if(O.kind===2){const P=O,F=n.substring(W+(((B=P.prefix)==null?void 0:B.length)??0),n.length-(((K=P.suffix)==null?void 0:K.length)??0)),J=decodeURIComponent(F);f["*"]=J,f._splat=J;break}}return i.rawParams&&Object.assign(f,i.rawParams),[f,{part:h,node:g,path:p,segment:m}]}function sS(n){const l=[n];for(;n.parentRoute;)n=n.parentRoute,l.push(n);return l.reverse(),l}function lS(n){const l=Array(n.depth+1);do l[n.depth]=n,n=n.parent;while(n);return l}function iS(n,l,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const o=!Ui(l),f=o&&n!=="/",h=l.length-(o?1:0),g=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,v=null;for(;g.length;){const x=g.pop(),{node:S,index:j,skipped:N,depth:R,statics:T,dynamics:w,optionals:B}=x;let{extract:K,rawParams:O,parsedParams:k}=x;if(S.skipOnParamError){if(!rd(n,l,x))continue;O=x.rawParams,K=x.extract,k=x.parsedParams}r&&S.route&&S.kind!==ss&&Ei(m,x)&&(m=x);const W=j===h;if(W&&(S.route&&!f&&Ei(v,x)&&(v=x),!S.optional&&!S.wildcard&&!S.index&&!S.pathless))continue;const P=W?void 0:l[j];let F;if(W&&S.index){const J={node:S.index,index:j,skipped:N,depth:R+1,statics:T,dynamics:w,optionals:B,extract:K,rawParams:O,parsedParams:k};let q=!0;if(S.index.skipOnParamError&&(rd(n,l,J)||(q=!1)),q){if(T===h&&!w&&!B&&!N)return J;Ei(v,J)&&(v=J)}}if(S.wildcard&&Ei(p,x))for(const J of S.wildcard){const{prefix:q,suffix:I}=J;if(q&&(W||!(J.caseSensitive?P:F??(F=P.toLowerCase())).startsWith(q)))continue;if(I){if(W)continue;const le=l.slice(j).join("/").slice(-I.length);if((J.caseSensitive?le:le.toLowerCase())!==I)continue}const te={node:J,index:h,skipped:N,depth:R,statics:T,dynamics:w,optionals:B,extract:K,rawParams:O,parsedParams:k};if(!(J.skipOnParamError&&!rd(n,l,te))){p=te;break}}if(S.optional){const J=N|1<<R,q=R+1;for(let I=S.optional.length-1;I>=0;I--){const te=S.optional[I];g.push({node:te,index:j,skipped:J,depth:q,statics:T,dynamics:w,optionals:B,extract:K,rawParams:O,parsedParams:k})}if(!W)for(let I=S.optional.length-1;I>=0;I--){const te=S.optional[I],{prefix:le,suffix:ce}=te;if(le||ce){const se=te.caseSensitive?P:F??(F=P.toLowerCase());if(le&&!se.startsWith(le)||ce&&!se.endsWith(ce))continue}g.push({node:te,index:j+1,skipped:N,depth:q,statics:T,dynamics:w,optionals:B+1,extract:K,rawParams:O,parsedParams:k})}}if(!W&&S.dynamic&&P)for(let J=S.dynamic.length-1;J>=0;J--){const q=S.dynamic[J],{prefix:I,suffix:te}=q;if(I||te){const le=q.caseSensitive?P:F??(F=P.toLowerCase());if(I&&!le.startsWith(I)||te&&!le.endsWith(te))continue}g.push({node:q,index:j+1,skipped:N,depth:R+1,statics:T,dynamics:w+1,optionals:B,extract:K,rawParams:O,parsedParams:k})}if(!W&&S.staticInsensitive){const J=S.staticInsensitive.get(F??(F=P.toLowerCase()));J&&g.push({node:J,index:j+1,skipped:N,depth:R+1,statics:T+1,dynamics:w,optionals:B,extract:K,rawParams:O,parsedParams:k})}if(!W&&S.static){const J=S.static.get(P);J&&g.push({node:J,index:j+1,skipped:N,depth:R+1,statics:T+1,dynamics:w,optionals:B,extract:K,rawParams:O,parsedParams:k})}if(S.pathless){const J=R+1;for(let q=S.pathless.length-1;q>=0;q--){const I=S.pathless[q];g.push({node:I,index:j,skipped:N,depth:J,statics:T,dynamics:w,optionals:B,extract:K,rawParams:O,parsedParams:k})}}}if(v&&p)return Ei(p,v)?v:p;if(v)return v;if(p)return p;if(r&&m){let x=m.index;for(let j=0;j<m.index;j++)x+=l[j].length;const S=x===n.length?"/":n.slice(x);return m.rawParams??(m.rawParams=Object.create(null)),m.rawParams["**"]=decodeURIComponent(S),m}return null}function rd(n,l,i){try{const[r,o]=Og(n,l,i);i.rawParams=r,i.extract=o;const f=i.node.parse(r);return i.parsedParams=Object.assign(Object.create(null),i.parsedParams,f),!0}catch{return null}}function Ei(n,l){return n?l.statics>n.statics||l.statics===n.statics&&(l.dynamics>n.dynamics||l.dynamics===n.dynamics&&(l.optionals>n.optionals||l.optionals===n.optionals&&((l.node.kind===ss)>(n.node.kind===ss)||l.node.kind===ss==(n.node.kind===ss)&&l.depth>n.depth))):!0}function bc(n){return Zd(n.filter(l=>l!==void 0).join("/"))}function Zd(n){return n.replace(/\/{2,}/g,"/")}function zg(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Un(n){const l=n.length;return l>1&&n[l-1]==="/"?n.replace(/\/{1,}$/,""):n}function Dg(n){return Un(zg(n))}function Tc(n,l){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${l}/`?n.slice(0,-1):n}function rS(n,l,i){return Tc(n,i)===Tc(l,i)}function cS({base:n,to:l,trailingSlash:i="never",cache:r}){const o=l.startsWith("/"),f=!o&&l===".";let h;if(r){h=o?l:f?n:n+"\0"+l;const x=r.get(h);if(x)return x}let g;if(f)g=n.split("/");else if(o)g=l.split("/");else{for(g=n.split("/");g.length>1&&Ui(g)==="";)g.pop();const x=l.split("/");for(let S=0,j=x.length;S<j;S++){const N=x[S];N===""?S?S===j-1&&g.push(N):g=[N]:N===".."?g.pop():N==="."||g.push(N)}}g.length>1&&(Ui(g)===""?i==="never"&&g.pop():i==="always"&&g.push(""));let p,m="";for(let x=0;x<g.length;x++){x>0&&(m+="/");const S=g[x];if(!S)continue;p=Xd(S,0,p);const j=p[0];if(j===0){m+=S;continue}const N=p[5],R=S.substring(0,p[1]),T=S.substring(p[4],N),w=S.substring(p[2],p[3]);j===1?m+=R||T?`${R}{$${w}}${T}`:`$${w}`:j===2?m+=R||T?`${R}{$}${T}`:"$":m+=`${R}{-$${w}}${T}`}m=Zd(m);const v=m||"/";return h&&r&&r.set(h,v),v}function uS(n){const l=new Map(n.map(o=>[encodeURIComponent(o),o])),i=Array.from(l.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return o=>o.replace(r,f=>l.get(f)??f)}function cd(n,l,i){const r=l[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>wy(o,i)).join("/"):wy(r,i)}function Cy({path:n,params:l,decoder:i,...r}){let o=!1;const f=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:f,isMissingParams:o};if(!n.includes("$"))return{interpolatedPath:n,usedParams:f,isMissingParams:o};const h=n.length;let g=0,p,m="";for(;g<h;){const v=g;p=Xd(n,v,p);const x=p[5];if(g=x+1,v===x)continue;const S=p[0];if(S===0){m+="/"+n.substring(v,x);continue}if(S===2){const j=l._splat;f._splat=j,f["*"]=j;const N=n.substring(v,p[1]),R=n.substring(p[4],x);if(!j){o=!0,(N||R)&&(m+="/"+N+R);continue}const T=cd("_splat",l,i);m+="/"+N+T+R;continue}if(S===1){const j=n.substring(p[2],p[3]);!o&&!(j in l)&&(o=!0),f[j]=l[j];const N=n.substring(v,p[1]),R=n.substring(p[4],x),T=cd(j,l,i)??"undefined";m+="/"+N+T+R;continue}if(S===3){const j=n.substring(p[2],p[3]),N=l[j];if(N==null)continue;f[j]=N;const R=n.substring(v,p[1]),T=n.substring(p[4],x),w=cd(j,l,i)??"";m+="/"+R+w+T;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:f,interpolatedPath:m||"/",isMissingParams:o}}function wy(n,l){const i=encodeURIComponent(n);return(l==null?void 0:l(i))??i}function St(n){return!!(n!=null&&n.isNotFound)}function oS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var dS="tsr-scroll-restoration-v1_3";function fS(){const n=oS();if(!n)return null;let l={};try{const r=JSON.parse(n.getItem("tsr-scroll-restoration-v1_3")||"{}");El(r)&&(l=r)}catch{}return{get state(){return l},set:r=>{l=zn(r,l)||l},persist:()=>{try{n.setItem(dS,JSON.stringify(l))}catch{}}}}var Ay=fS(),hS=n=>n.state.__TSR_key||n.href;function mS(n){const l=[];let i;for(;i=n.parentNode;)l.push(`${n.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,n)+1})`),n=i;return`${l.reverse().join(" > ")}`.toLowerCase()}var yc=!1,Ti="window",Oy="data-scroll-restoration-id";function yS(n,l){if(!Ay)return;const i=Ay;if((n.options.scrollRestoration??!1)&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup||!i)return;n.isScrollRestorationSetup=!0,yc=!1;const r=n.options.getScrollRestorationKey||hS,o=new Map;window.history.scrollRestoration="manual";const f=g=>{if(!(yc||!n.isScrollRestoring))if(g.target===document||g.target===window)o.set(Ti,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=g.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},h=g=>{var m;if(!n.isScrollRestoring||!g||o.size===0||!i)return;const p=(m=i.state)[g]||(m[g]={});for(const[v,x]of o){let S;if(v===Ti)S=Ti;else if(v.isConnected){const j=v.getAttribute(Oy);S=j?`[${Oy}="${j}"]`:mS(v)}S&&(p[S]=x)}};document.addEventListener("scroll",f,!0),n.subscribe("onBeforeLoad",g=>{h(g.fromLocation?r(g.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{h(r(n.stores.resolvedLocation.state??n.stores.location.state)),i.persist()}),n.subscribe("onRendered",g=>{var x;const p=r(g.toLocation),m=n.options.scrollRestorationBehavior,v=n.options.scrollToTopSelectors;if(o.clear(),!n.resetNextScroll){n.resetNextScroll=!0;return}if(!(typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))){yc=!0;try{const S=n.isScrollRestoring?i.state[p]:void 0;let j=!1;if(S)for(const N in S){const R=S[N];if(!El(R))continue;const{scrollX:T,scrollY:w}=R;if(!(!Number.isFinite(T)||!Number.isFinite(w))){if(N===Ti)window.scrollTo({top:w,left:T,behavior:m}),j=!0;else if(N){let B;try{B=document.querySelector(N)}catch{continue}B&&(B.scrollLeft=T,B.scrollTop=w,j=!0)}}}if(!j){const N=n.history.location.hash.slice(1);if(N){const R=((x=window.history.state)==null?void 0:x.__hashScrollIntoViewOptions)??!0;if(R){const T=document.getElementById(N);T&&T.scrollIntoView(R)}}else{const R={top:0,left:0,behavior:m};if(window.scrollTo(R),v)for(const T of v){if(T===Ti)continue;const w=typeof T=="function"?T():document.querySelector(T);w&&w.scrollTo(R)}}}}finally{yc=!1}n.isScrollRestoring&&i.set(S=>(S[p]||(S[p]={}),S))}})}function gS(n,l=String){const i=new URLSearchParams;for(const r in n){const o=n[r];o!==void 0&&i.set(r,l(o))}return i.toString()}function ud(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function pS(n){const l=new URLSearchParams(n),i=Object.create(null);for(const[r,o]of l.entries()){const f=i[r];f==null?i[r]=ud(o):Array.isArray(f)?f.push(ud(o)):i[r]=[f,ud(o)]}return i}var xS=bS(JSON.parse),vS=SS(JSON.stringify,JSON.parse);function bS(n){return l=>{l[0]==="?"&&(l=l.substring(1));const i=pS(l);for(const r in i){const o=i[r];if(typeof o=="string")try{i[r]=n(o)}catch{}}return i}}function SS(n,l){const i=typeof l=="function";function r(o){if(typeof o=="object"&&o!==null)try{return n(o)}catch{}else if(i&&typeof o=="string")try{return l(o),n(o)}catch{}return o}return o=>{const f=gS(o,r);return f?`?${f}`:""}}var gs="__root__";function jS(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const l=new Headers(n.headers);n.href&&l.get("Location")===null&&l.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:l});if(i.options=n,n.throw)throw i;return i}function Ot(n){return n instanceof Response&&!!n.options}function NS(n){return{input:({url:l})=>{for(const i of n)l=Dd(i,l);return l},output:({url:l})=>{for(let i=n.length-1;i>=0;i--)l=Lg(n[i],l);return l}}}function RS(n){const l=Dg(n.basepath),i=`/${l}`,r=`${i}/`,o=n.caseSensitive?i:i.toLowerCase(),f=n.caseSensitive?r:r.toLowerCase();return{input:({url:h})=>{const g=n.caseSensitive?h.pathname:h.pathname.toLowerCase();return g===o?h.pathname="/":g.startsWith(f)&&(h.pathname=h.pathname.slice(i.length)),h},output:({url:h})=>(h.pathname=bc(["/",l,h.pathname]),h)}}function Dd(n,l){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function Lg(n,l){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function _S(n,l){const{createMutableStore:i,createReadonlyStore:r,batch:o,init:f}=l,h=new Map,g=new Map,p=new Map,m=i(n.status),v=i(n.loadedAt),x=i(n.isLoading),S=i(n.isTransitioning),j=i(n.location),N=i(n.resolvedLocation),R=i(n.statusCode),T=i(n.redirect),w=i([]),B=i([]),K=i([]),O=r(()=>od(h,w.state)),k=r(()=>od(g,B.state)),W=r(()=>od(p,K.state)),P=r(()=>w.state[0]),F=r(()=>w.state.some(V=>{var ae;return((ae=h.get(V))==null?void 0:ae.state.status)==="pending"})),J=r(()=>{var V;return{locationHref:j.state.href,resolvedLocationHref:(V=N.state)==null?void 0:V.href,status:m.state}}),q=r(()=>({status:m.state,loadedAt:v.state,isLoading:x.state,isTransitioning:S.state,matches:O.state,location:j.state,resolvedLocation:N.state,statusCode:R.state,redirect:T.state})),I=qi(64);function te(V){let ae=I.get(V);return ae||(ae=r(()=>{const me=w.state;for(const oe of me){const M=h.get(oe);if(M&&M.routeId===V)return M.state}}),I.set(V,ae)),ae}const le={status:m,loadedAt:v,isLoading:x,isTransitioning:S,location:j,resolvedLocation:N,statusCode:R,redirect:T,matchesId:w,pendingMatchesId:B,cachedMatchesId:K,activeMatchesSnapshot:O,pendingMatchesSnapshot:k,cachedMatchesSnapshot:W,firstMatchId:P,hasPendingMatches:F,matchRouteReactivity:J,activeMatchStoresById:h,pendingMatchStoresById:g,cachedMatchStoresById:p,__store:q,getMatchStoreByRouteId:te,setActiveMatches:ce,setPendingMatches:se,setCachedMatches:z};ce(n.matches),f==null||f(le);function ce(V){dd(V,h,w,i,o)}function se(V){dd(V,g,B,i,o)}function z(V){dd(V,p,K,i,o)}return le}function od(n,l){const i=[];for(const r of l){const o=n.get(r);o&&i.push(o.state)}return i}function dd(n,l,i,r,o){const f=n.map(g=>g.id),h=new Set(f);o(()=>{for(const g of l.keys())h.has(g)||l.delete(g);for(const g of n){const p=l.get(g.id);if(!p){const m=r(g);m.routeId=g.routeId,l.set(g.id,m);continue}p.routeId=g.routeId,p.state!==g&&p.setState(()=>g)}Fb(i.state,f)||i.setState(()=>f)})}var Ld=n=>{var l;if(!n.rendered)return n.rendered=!0,(l=n.onReady)==null?void 0:l.call(n)},ES=n=>n.stores.matchesId.state.some(l=>{var i;return(i=n.stores.activeMatchStoresById.get(l))==null?void 0:i.state._forcePending}),Dc=(n,l)=>!!(n.preload&&!n.router.stores.activeMatchStoresById.has(l)),ps=(n,l,i=!0)=>{const r={...n.router.options.context??{}},o=i?l:l-1;for(let f=0;f<=o;f++){const h=n.matches[f];if(!h)continue;const g=n.router.getMatch(h.id);g&&Object.assign(r,g.__routeContext,g.__beforeLoadContext)}return r},zy=(n,l)=>{if(!n.matches.length)return;const i=l.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),o=r>=0?r:0;let f=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;f<0&&(f=o);for(let h=f;h>=0;h--){const g=n.matches[h];if(n.router.looseRoutesById[g.routeId].options.notFoundComponent)return h}return i?f:o},Dn=(n,l,i)=>{var r,o,f;if(!(!Ot(i)&&!St(i)))throw Ot(i)&&i.redirectHandled&&!i.options.reloadDocument||(l&&((r=l._nonReactive.beforeLoadPromise)==null||r.resolve(),(o=l._nonReactive.loaderPromise)==null||o.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loaderPromise=void 0,l._nonReactive.error=i,n.updateMatch(l.id,h=>({...h,status:Ot(i)?"redirected":h.status==="pending"?"success":h.status,context:ps(n,l.index),isFetching:!1,error:i})),St(i)&&!i.routeId&&(i.routeId=l.routeId),(f=l._nonReactive.loadPromise)==null||f.resolve()),Ot(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},Ug=(n,l)=>{const i=n.router.getMatch(l);return!!(!i||i._nonReactive.dehydrated)},Dy=(n,l,i)=>{const r=ps(n,i);n.updateMatch(l,o=>({...o,context:r}))},Mi=(n,l,i,r)=>{var g,p;const{id:o,routeId:f}=n.matches[l],h=n.router.looseRoutesById[f];if(i instanceof Promise)throw i;i.routerCode=r,n.firstBadMatchIndex??(n.firstBadMatchIndex=l),Dn(n,n.router.getMatch(o),i);try{(p=(g=h.options).onError)==null||p.call(g,i)}catch(m){i=m,Dn(n,n.router.getMatch(o),i)}n.updateMatch(o,m=>{var v,x;return(v=m._nonReactive.beforeLoadPromise)==null||v.resolve(),m._nonReactive.beforeLoadPromise=void 0,(x=m._nonReactive.loadPromise)==null||x.resolve(),{...m,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!Ot(i)&&!St(i)&&(n.serialError??(n.serialError=i))},Bg=(n,l,i,r)=>{var f;if(r._nonReactive.pendingTimeout!==void 0)return;const o=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Dc(n,l)&&(i.options.loader||i.options.beforeLoad||Hg(i))&&typeof o=="number"&&o!==1/0&&(i.options.pendingComponent??((f=n.router.options)==null?void 0:f.defaultPendingComponent))){const h=setTimeout(()=>{Ld(n)},o);r._nonReactive.pendingTimeout=h}},TS=(n,l,i)=>{const r=n.router.getMatch(l);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Bg(n,l,i,r);const o=()=>{const f=n.router.getMatch(l);f.preload&&(f.status==="redirected"||f.status==="notFound")&&Dn(n,f,f.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},MS=(n,l,i,r)=>{const o=n.router.getMatch(l);let f=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Tl(()=>{f==null||f.resolve(),f=void 0});const{paramsError:h,searchError:g}=o;h&&Mi(n,i,h,"PARSE_PARAMS"),g&&Mi(n,i,g,"VALIDATE_SEARCH"),Bg(n,l,r,o);const p=new AbortController;let m=!1;const v=()=>{m||(m=!0,n.updateMatch(l,O=>({...O,isFetching:"beforeLoad",fetchCount:O.fetchCount+1,abortController:p})))},x=()=>{var O;(O=o._nonReactive.beforeLoadPromise)==null||O.resolve(),o._nonReactive.beforeLoadPromise=void 0,n.updateMatch(l,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{v(),x()});return}o._nonReactive.beforeLoadPromise=Tl();const S={...ps(n,i,!1),...o.__routeContext},{search:j,params:N,cause:R}=o,T=Dc(n,l),w={search:j,abortController:p,params:N,preload:T,context:S,location:n.location,navigate:O=>n.router.navigate({...O,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:T?"preload":R,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},B=O=>{if(O===void 0){n.router.batch(()=>{v(),x()});return}(Ot(O)||St(O))&&(v(),Mi(n,i,O,"BEFORE_LOAD")),n.router.batch(()=>{v(),n.updateMatch(l,k=>({...k,__beforeLoadContext:O})),x()})};let K;try{if(K=r.options.beforeLoad(w),Bi(K))return v(),K.catch(O=>{Mi(n,i,O,"BEFORE_LOAD")}).then(B)}catch(O){v(),Mi(n,i,O,"BEFORE_LOAD")}B(K)},CS=(n,l)=>{const{id:i,routeId:r}=n.matches[l],o=n.router.looseRoutesById[r],f=()=>g(),h=()=>MS(n,i,l,o),g=()=>{if(Ug(n,i))return;const p=TS(n,i,o);return Bi(p)?p.then(h):h()};return f()},wS=(n,l,i)=>{var f,h,g,p,m,v;const r=n.router.getMatch(l);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const o={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(f=i.options).head)==null?void 0:h.call(f,o),(p=(g=i.options).scripts)==null?void 0:p.call(g,o),(v=(m=i.options).headers)==null?void 0:v.call(m,o)]).then(([x,S,j])=>({meta:x==null?void 0:x.meta,links:x==null?void 0:x.links,headScripts:x==null?void 0:x.scripts,headers:j,scripts:S,styles:x==null?void 0:x.styles}))},qg=(n,l,i,r,o)=>{const f=l[r-1],{params:h,loaderDeps:g,abortController:p,cause:m}=n.router.getMatch(i),v=ps(n,r),x=Dc(n,i);return{params:h,deps:g,preload:!!x,parentMatchPromise:f,abortController:p,context:v,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:x?"preload":m,route:o,...n.router.options.additionalContext}},Ly=async(n,l,i,r,o)=>{var f,h,g,p,m;try{const v=n.router.getMatch(i);try{(!(wg??n.router.isServer)||v.ssr===!0)&&Hi(o);const x=o.options.loader,S=typeof x=="function"?x:x==null?void 0:x.handler,j=S==null?void 0:S(qg(n,l,i,r,o)),N=!!S&&Bi(j);if((N||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||v._nonReactive.minPendingPromise)&&n.updateMatch(i,T=>({...T,isFetching:"loader"})),S){const T=N?await j:j;Dn(n,n.router.getMatch(i),T),T!==void 0&&n.updateMatch(i,w=>({...w,loaderData:T}))}o._lazyPromise&&await o._lazyPromise;const R=v._nonReactive.minPendingPromise;R&&await R,o._componentsPromise&&await o._componentsPromise,n.updateMatch(i,T=>({...T,error:void 0,context:ps(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(x){let S=x;if((S==null?void 0:S.name)==="AbortError"){if(v.abortController.signal.aborted){(f=v._nonReactive.loaderPromise)==null||f.resolve(),v._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:ps(n,r)}));return}const j=v._nonReactive.minPendingPromise;j&&await j,St(x)&&await((g=(h=o.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:g.call(h)),Dn(n,n.router.getMatch(i),x);try{(m=(p=o.options).onError)==null||m.call(p,x)}catch(N){S=N,Dn(n,n.router.getMatch(i),N)}!Ot(S)&&!St(S)&&await Hi(o,["errorComponent"]),n.updateMatch(i,N=>({...N,error:S,context:ps(n,r),status:"error",isFetching:!1}))}}catch(v){const x=n.router.getMatch(i);x&&(x._nonReactive.loaderPromise=void 0),Dn(n,x,v)}},AS=async(n,l,i)=>{var j,N,R,T;async function r(w,B,K,O,k){const W=Date.now()-B.updatedAt,P=w?k.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:k.options.staleTime??n.router.options.defaultStaleTime??0,F=k.options.shouldReload,J=typeof F=="function"?F(qg(n,l,o,i,k)):F,{status:q,invalid:I}=O,te=W>=P&&(!!n.forceStaleReload||O.cause==="enter"||K!==void 0&&K!==O.id);h=q==="success"&&(I||(J??te)),w&&k.options.preload===!1||(h&&!n.sync&&v?(g=!0,(async()=>{var le,ce;try{await Ly(n,l,o,i,k);const se=n.router.getMatch(o);(le=se._nonReactive.loaderPromise)==null||le.resolve(),(ce=se._nonReactive.loadPromise)==null||ce.resolve(),se._nonReactive.loaderPromise=void 0,se._nonReactive.loadPromise=void 0}catch(se){Ot(se)&&await n.router.navigate(se.options)}})()):q!=="success"||h?await Ly(n,l,o,i,k):Dy(n,o,i))}const{id:o,routeId:f}=n.matches[i];let h=!1,g=!1;const p=n.router.looseRoutesById[f],m=p.options.loader,v=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(Ug(n,o)){if(!n.router.getMatch(o))return n.matches[i];Dy(n,o,i)}else{const w=n.router.getMatch(o),B=n.router.stores.matchesId.state[i],K=((j=B&&n.router.stores.activeMatchStoresById.get(B)||null)==null?void 0:j.routeId)===f?B:(N=n.router.stores.activeMatchesSnapshot.state.find(k=>k.routeId===f))==null?void 0:N.id,O=Dc(n,o);if(w._nonReactive.loaderPromise){if(w.status==="success"&&!n.sync&&!w.preload&&v)return w;await w._nonReactive.loaderPromise;const k=n.router.getMatch(o),W=k._nonReactive.error||k.error;W&&Dn(n,k,W),k.status==="pending"&&await r(O,w,K,k,p)}else{const k=O&&!n.router.stores.activeMatchStoresById.has(o),W=n.router.getMatch(o);W._nonReactive.loaderPromise=Tl(),k!==W.preload&&n.updateMatch(o,P=>({...P,preload:k})),await r(O,w,K,W,p)}}const x=n.router.getMatch(o);g||((R=x._nonReactive.loaderPromise)==null||R.resolve(),(T=x._nonReactive.loadPromise)==null||T.resolve(),x._nonReactive.loadPromise=void 0),clearTimeout(x._nonReactive.pendingTimeout),x._nonReactive.pendingTimeout=void 0,g||(x._nonReactive.loaderPromise=void 0),x._nonReactive.dehydrated=void 0;const S=g?x.isFetching:!1;return S!==x.isFetching||x.invalid!==!1?(n.updateMatch(o,w=>({...w,isFetching:S,invalid:!1})),n.router.getMatch(o)):x};async function Uy(n){var S,j;const l=n,i=[];ES(l.router)&&Ld(l);let r;for(let N=0;N<l.matches.length;N++){try{const R=CS(l,N);Bi(R)&&await R}catch(R){if(Ot(R))throw R;if(St(R))r=R;else if(!l.preload)throw R;break}if(l.serialError)break}const o=l.firstBadMatchIndex??l.matches.length,f=r&&!l.preload?zy(l,r):void 0,h=r&&l.preload?0:f!==void 0?Math.min(f+1,o):o;let g,p;for(let N=0;N<h;N++)i.push(AS(l,i,N));try{await Promise.all(i)}catch{const N=await Promise.allSettled(i);for(const R of N){if(R.status!=="rejected")continue;const T=R.reason;if(Ot(T))throw T;St(T)?g??(g=T):p??(p=T)}if(p!==void 0)throw p}const m=g??(r&&!l.preload?r:void 0);let v=l.serialError?l.firstBadMatchIndex??0:l.matches.length-1;if(!m&&r&&l.preload)return l.matches;if(m){const N=zy(l,m);N===void 0&&Ka();const R=l.matches[N],T=l.router.looseRoutesById[R.routeId],w=(S=l.router.options)==null?void 0:S.defaultNotFoundComponent;!T.options.notFoundComponent&&w&&(T.options.notFoundComponent=w),m.routeId=R.routeId;const B=R.routeId===l.router.routeTree.id;l.updateMatch(R.id,K=>({...K,...B?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),v=N,await Hi(T,["notFoundComponent"])}else if(!l.preload){const N=l.matches[0];N.globalNotFound||(j=l.router.getMatch(N.id))!=null&&j.globalNotFound&&l.updateMatch(N.id,R=>({...R,globalNotFound:!1,error:void 0}))}if(l.serialError&&l.firstBadMatchIndex!==void 0){const N=l.router.looseRoutesById[l.matches[l.firstBadMatchIndex].routeId];await Hi(N,["errorComponent"])}for(let N=0;N<=v;N++){const{id:R,routeId:T}=l.matches[N],w=l.router.looseRoutesById[T];try{const B=wS(l,R,w);if(B){const K=await B;l.updateMatch(R,O=>({...O,...K}))}}catch(B){console.error(`Error executing head for route ${T}:`,B)}}const x=Ld(l);if(Bi(x)&&await x,m)throw m;if(l.serialError&&!l.preload&&!l.onReady)throw l.serialError;return l.matches}function By(n,l){const i=l.map(r=>{var o,f;return(f=(o=n.options[r])==null?void 0:o.preload)==null?void 0:f.call(o)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function Hi(n,l=Sc){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:o,...f}=r.options;Object.assign(n.options,f),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:l===Sc?(()=>{if(n._componentsPromise===void 0){const r=By(n,Sc);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():By(n,l);return n._lazyPromise?n._lazyPromise.then(i):i()}function Hg(n){var l;for(const i of Sc)if((l=n.options[i])!=null&&l.preload)return!0;return!1}var Sc=["component","errorComponent","pendingComponent","notFoundComponent"],Bn="__TSR_index",qy="popstate",Hy="beforeunload";function OS(n){let l=n.getLocation();const i=new Set,r=h=>{l=n.getLocation(),i.forEach(g=>g({location:l,action:h}))},o=h=>{n.notifyOnIndexChange??!0?r(h):l=n.getLocation()},f=async({task:h,navigateOpts:g,...p})=>{var x,S;if((g==null?void 0:g.ignoreBlocker)??!1){h();return}const m=((x=n.getBlockers)==null?void 0:x.call(n))??[],v=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&v)for(const j of m){const N=Mc(p.path,p.state);if(await j.blockerFn({currentLocation:l,nextLocation:N,action:p.type})){(S=n.onBlocked)==null||S.call(n);return}}h()};return{get location(){return l},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,g,p)=>{const m=l.state[Bn];g=Qy(m+1,g),f({task:()=>{n.pushState(h,g),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:g})},replace:(h,g,p)=>{const m=l.state[Bn];g=Qy(m,g),f({task:()=>{n.replaceState(h,g),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:g})},go:(h,g)=>{f({task:()=>{n.go(h),o({type:"GO",index:h})},navigateOpts:g,type:"GO"})},back:h=>{f({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{f({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>l.state[Bn]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const g=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...g,h]),()=>{var v,x;const m=((v=n.getBlockers)==null?void 0:v.call(n))??[];(x=n.setBlockers)==null||x.call(n,m.filter(S=>S!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function Qy(n,l){l||(l={});const i=Pd();return{...l,key:i,__TSR_key:i,[Bn]:n}}function zS(n){var F,J;const l=typeof document<"u"?window:void 0,i=l.history.pushState,r=l.history.replaceState;let o=[];const f=()=>o,h=q=>o=q,g=(q=>q),p=(()=>Mc(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state));if(!((F=l.history.state)!=null&&F.__TSR_key)&&!((J=l.history.state)!=null&&J.key)){const q=Pd();l.history.replaceState({[Bn]:0,key:q,__TSR_key:q},"")}let m=p(),v,x=!1,S=!1,j=!1,N=!1;const R=()=>m;let T,w;const B=()=>{T&&(P._ignoreSubscribers=!0,(T.isPush?l.history.pushState:l.history.replaceState)(T.state,"",T.href),P._ignoreSubscribers=!1,T=void 0,w=void 0,v=void 0)},K=(q,I,te)=>{const le=g(I);w||(v=m),m=Mc(I,te),T={href:le,state:te,isPush:(T==null?void 0:T.isPush)||q==="push"},w||(w=Promise.resolve().then(()=>B()))},O=q=>{m=p(),P.notify({type:q})},k=async()=>{if(S){S=!1;return}const q=p(),I=q.state[Bn]-m.state[Bn],te=I===1,le=I===-1,ce=!te&&!le||x;x=!1;const se=ce?"GO":le?"BACK":"FORWARD",z=ce?{type:"GO",index:I}:{type:le?"BACK":"FORWARD"};if(j)j=!1;else{const V=f();if(typeof document<"u"&&V.length){for(const ae of V)if(await ae.blockerFn({currentLocation:m,nextLocation:q,action:se})){S=!0,l.history.go(1),P.notify(z);return}}}m=p(),P.notify(z)},W=q=>{if(N){N=!1;return}let I=!1;const te=f();if(typeof document<"u"&&te.length)for(const le of te){const ce=le.enableBeforeUnload??!0;if(ce===!0){I=!0;break}if(typeof ce=="function"&&ce()===!0){I=!0;break}}if(I)return q.preventDefault(),q.returnValue=""},P=OS({getLocation:R,getLength:()=>l.history.length,pushState:(q,I)=>K("push",q,I),replaceState:(q,I)=>K("replace",q,I),back:q=>(q&&(j=!0),N=!0,l.history.back()),forward:q=>{q&&(j=!0),N=!0,l.history.forward()},go:q=>{x=!0,l.history.go(q)},createHref:q=>g(q),flush:B,destroy:()=>{l.history.pushState=i,l.history.replaceState=r,l.removeEventListener(Hy,W,{capture:!0}),l.removeEventListener(qy,k)},onBlocked:()=>{v&&m!==v&&(m=v)},getBlockers:f,setBlockers:h,notifyOnIndexChange:!1});return l.addEventListener(Hy,W,{capture:!0}),l.addEventListener(qy,k),l.history.pushState=function(...q){const I=i.apply(l.history,q);return P._ignoreSubscribers||O("PUSH"),I},l.history.replaceState=function(...q){const I=r.apply(l.history,q);return P._ignoreSubscribers||O("REPLACE"),I},P}function DS(n){let l=n.replace(/[\x00-\x1f\x7f]/g,"");return l.startsWith("//")&&(l="/"+l.replace(/^\/+/,"")),l}function Mc(n,l){const i=DS(n),r=i.indexOf("#"),o=i.indexOf("?"),f=Pd();return{href:i,pathname:i.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:i.length),hash:r>-1?i.substring(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:l||{[Bn]:0,key:f,__TSR_key:f}}}function Pd(){return(Math.random()+1).toString(36).substring(7)}function hl(n,l){const i=l,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}var LS=class{constructor(n,l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{var v;const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",f=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=uS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=zS()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let x;this.resolvePathCache=qi(1e3),x=this.buildRouteTree(),this.setRoutes(x)}if(!this.stores&&this.latestLocation){const x=this.getStoreConfig(this);this.batch=x.batch,this.stores=_S(BS(this.latestLocation),x),yS(this)}let g=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(f||o!==p||h!==m){this.basepath=p;const x=[],S=Dg(p);S&&S!=="/"&&x.push(RS({basepath:p})),m&&x.push(m),this.rewrite=x.length===0?void 0:x.length===1?x[0]:NS(x),this.history&&this.updateLatestLocation(),g=!0}g&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((v=window.CSS)==null?void 0:v.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=nS(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Ib(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const o=({pathname:p,search:m,hash:v,href:x,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const w=this.options.parseSearch(m),B=this.options.stringifySearch(w);return{href:p+B+v,publicHref:x,pathname:_i(p).path,external:!1,searchStr:B,search:as(r==null?void 0:r.search,w),hash:_i(v.slice(1)).path,state:ka(r==null?void 0:r.state,S)}}const j=new URL(x,this.origin),N=Dd(this.rewrite,j),R=this.options.parseSearch(N.search),T=this.options.stringifySearch(R);return N.search=T,{href:N.href.replace(N.origin,""),publicHref:x,pathname:_i(N.pathname).path,external:!!this.rewrite&&N.origin!==this.origin,searchStr:T,search:as(r==null?void 0:r.search,R),hash:_i(N.hash.slice(1)).path,state:ka(r==null?void 0:r.state,S)}},f=o(i),{__tempLocation:h,__tempKey:g}=f.state;if(h&&(!g||g===this.tempLocationKey)){const p=o(h);return p.state.key=f.state.key,p.state.__TSR_key=f.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:f}}return f},this.resolvePathWithBase=(i,r)=>cS({base:i,to:Zd(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>qS({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.state.forEach(i=>{var o;if(this.stores.pendingMatchStoresById.has(i))return;const r=(o=this.stores.activeMatchStoresById.get(i))==null?void 0:o.state;r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(f={})=>{var q,I;const h=f._fromLocation||this.pendingBuiltLocation||this.latestLocation,g=this.matchRoutesLightweight(h);f.from;const p=f.unsafeRelative==="path"?h.pathname:f.from??g.fullPath,m=this.resolvePathWithBase(p,"."),v=g.search,x=Object.assign(Object.create(null),g.params),S=f.to?this.resolvePathWithBase(m,`${f.to}`):this.resolvePathWithBase(m,"."),j=f.params===!1||f.params===null?Object.create(null):(f.params??!0)===!0?x:Object.assign(x,zn(f.params,x)),N=this.getMatchedRoutes(S);let R=N.matchedRoutes;if((!N.foundRoute||N.foundRoute.path!=="/"&&N.routeParams["**"])&&this.options.notFoundRoute&&(R=[...R,this.options.notFoundRoute]),Object.keys(j).length>0)for(const te of R){const le=((q=te.options.params)==null?void 0:q.stringify)??te.options.stringifyParams;if(le)try{Object.assign(j,le(j))}catch{}}const T=i.leaveParams?S:_i(Cy({path:S,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let w=v;if(i._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const te={};R.forEach(le=>{if(le.options.validateSearch)try{Object.assign(te,jc(le.options.validateSearch,{...te,...w}))}catch{}}),w=te}w=HS({search:w,dest:f,destRoutes:R,_includeValidateSearch:i._includeValidateSearch}),w=as(v,w);const B=this.options.stringifySearch(w),K=f.hash===!0?h.hash:f.hash?zn(f.hash,h.hash):void 0,O=K?`#${K}`:"";let k=f.state===!0?h.state:f.state?zn(f.state,h.state):{};k=ka(h.state,k);const W=`${T}${B}${O}`;let P,F,J=!1;if(this.rewrite){const te=new URL(W,this.origin),le=Lg(this.rewrite,te);P=te.href.replace(te.origin,""),le.origin!==this.origin?(F=le.href,J=!0):F=le.pathname+le.search+le.hash}else P=Pb(W),F=P;return{publicHref:F,href:P,pathname:T,search:w,searchStr:B,state:k,hash:K??"",external:J,unmaskOnReload:f.unmaskOnReload}},o=(f={},h)=>{const g=r(f);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const v=Wb(g.pathname,this.processedTree);if(v){Object.assign(m,v.rawParams);const{from:x,params:S,...j}=v.route,N=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,zn(S,m));h={from:i.from,...j,params:N},p=r(h)}}}return p&&(g.maskedLocation=p),g};return i.mask?o(i,{from:i.from,...i.mask}):o(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const f=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(v=>{o.state[v]=this.latestLocation.state[v]});const m=ys(o.state,this.latestLocation.state);return p.forEach(v=>{delete o.state[v]}),m},h=Un(this.latestLocation.href)===Un(o.href);let g=this.commitLocationPromise;if(this.commitLocationPromise=Tl(()=>{g==null||g.resolve(),g=void 0}),h&&f())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...v}=o;p&&(v={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[o.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:o,viewTransition:f,ignoreBlocker:h,href:g,...p}={})=>{if(g){const x=this.history.location.state.__TSR_index,S=Mc(g,{__TSR_index:i?x:x+1}),j=new URL(S.pathname,this.origin);p.to=Dd(this.rewrite,j).pathname,p.search=this.options.parseSearch(S.search),p.hash=S.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const v=this.commitLocation({...m,viewTransition:f,replace:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:f,...h})=>{var p,m;let g=!1;if(o)try{new URL(`${o}`),g=!0}catch{}if(g&&!r&&(r=!0),r){if(i!==void 0||!o){const x=this.buildLocation({to:i,...h});o=o??x.publicHref,f=f??x.publicHref}const v=!g&&f?f:o;if(Ec(v,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const x=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const S of x)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(v):window.location.href=v,Promise.resolve()}return this.buildAndCommitLocation({...h,href:o,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatchesSnapshot.state.filter(o=>!i.some(f=>f.id===o.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(i),this.stores.setCachedMatches(r)})},this.load=async i=>{let r,o,f;const h=this.stores.resolvedLocation.state??this.stores.location.state;for(f=new Promise(p=>{this.startTransition(async()=>{var m;try{this.beforeLoad();const v=this.latestLocation,x=this.stores.resolvedLocation.state,S=hl(v,x);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...S}),this.emit({type:"onBeforeLoad",...S}),await Uy({router:this,sync:i==null?void 0:i.sync,forceStaleReload:h.href===v.href,matches:this.stores.pendingMatchesSnapshot.state,location:v,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var w,B;let j=null,N=null,R=null,T=null;this.batch(()=>{const K=this.stores.pendingMatchesSnapshot.state,O=K.length,k=this.stores.activeMatchesSnapshot.state;j=O?k.filter(F=>!this.stores.pendingMatchStoresById.has(F.id)):null;const W=new Set;for(const F of this.stores.pendingMatchStoresById.values())F.routeId&&W.add(F.routeId);const P=new Set;for(const F of this.stores.activeMatchStoresById.values())F.routeId&&P.add(F.routeId);N=O?k.filter(F=>!W.has(F.routeId)):null,R=O?K.filter(F=>!P.has(F.routeId)):null,T=O?K.filter(F=>P.has(F.routeId)):k,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),O&&(this.stores.setActiveMatches(K),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...j.filter(F=>F.status!=="error"&&F.status!=="notFound"&&F.status!=="redirected")]),this.clearExpiredCache())});for(const[K,O]of[[N,"onLeave"],[R,"onEnter"],[T,"onStay"]])if(K)for(const k of K)(B=(w=this.looseRoutesById[k.routeId].options)[O])==null||B.call(w,k)})})}})}catch(v){Ot(v)?(r=v,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):St(v)&&(o=v);const x=r?r.status:o?404:this.stores.activeMatchesSnapshot.state.some(S=>S.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>x),this.stores.redirect.setState(()=>r)})}this.latestLoadPromise===f&&((m=this.commitLocationPromise)==null||m.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=f,await f;this.latestLoadPromise&&f!==this.latestLoadPromise;)await this.latestLoadPromise;let g;this.hasNotFoundMatch()?g=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(g=500),g!==void 0&&this.stores.statusCode.setState(()=>g)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const f=this.latestLocation,h=this.stores.resolvedLocation.state,g=typeof r.types=="function"?r.types(hl(f,h)):r.types;if(g===!1){i();return}o={update:i,types:g}}else o=i;document.startViewTransition(o)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStoresById.get(i);if(o){o.setState(r);return}const f=this.stores.activeMatchStoresById.get(i);if(f){f.setState(r);return}const h=this.stores.cachedMatchStoresById.get(i);if(h){const g=r(h.state);g.status==="redirected"?this.stores.cachedMatchStoresById.delete(i)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==i)):h.setState(()=>g)}})},this.getMatch=i=>{var r,o,f;return((r=this.stores.cachedMatchStoresById.get(i))==null?void 0:r.state)??((o=this.stores.pendingMatchStoresById.get(i))==null?void 0:o.state)??((f=this.stores.activeMatchStoresById.get(i))==null?void 0:f.state)},this.invalidate=i=>{const r=o=>{var f;return((f=i==null?void 0:i.filter)==null?void 0:f.call(i,o))??!0?{...o,invalid:!0,...i!=null&&i.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(r)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(r)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const o=i.options._builtLocation??this.buildLocation(i.options),f=this.getParsedLocationHref(o);i.options.href=f,i.headers.set("Location",f)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const f=o.pathname+o.search+o.hash;i.options.href=f,i.headers.set("Location",f)}}catch{}if(i.options.href&&!i.options._builtLocation&&Ec(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(o=>!r(o))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const i=Date.now(),r=o=>{const f=this.looseRoutesById[o.routeId];if(!f.options.loader)return!0;const h=(o.preload?f.options.preloadGcTime??this.options.defaultPreloadGcTime:f.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:i-o.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=Hi,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const f=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),h=new Set([...f,...this.stores.cachedMatchesId.state]),g=o.filter(p=>!h.has(p.id));if(g.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...g])}try{return o=await Uy({router:this,matches:o,location:r,preload:!0,updateMatch:(p,m)=>{f.has(p)?o=o.map(v=>v.id===p?m(v):v):this.updateMatch(p,m)}}),o}catch(p){if(Ot(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});St(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const o={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},f=this.buildLocation(o);if(r!=null&&r.pending&&this.stores.status.state!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.state:r.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,g=eS(f.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!g||i.params&&!ys(g.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ys(h.search,f.search,{partial:!0})?g.rawParams:!1:g.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=l,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??vS,parseSearch:n.parseSearch??xS,protocolAllowlist:n.protocolAllowlist??Zb}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:n,routesByPath:l,processedTree:i}){this.routesById=n,this.routesByPath=l,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,l){var x,S;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:o,parsedParams:f}=i;let{matchedRoutes:h}=i,g=!1;(r?r.path!=="/"&&o["**"]:Un(n.pathname))&&(this.options.notFoundRoute?h=[...h,this.options.notFoundRoute]:g=!0);const p=g?YS(this.options.notFoundMode,h):void 0,m=new Array(h.length),v=new Map;for(const j of this.stores.activeMatchStoresById.values())j.routeId&&v.set(j.routeId,j.state);for(let j=0;j<h.length;j++){const N=h[j],R=m[j-1];let T,w,B;{const se=(R==null?void 0:R.search)??n.search,z=(R==null?void 0:R._strictSearch)??void 0;try{const V=jc(N.options.validateSearch,{...se})??void 0;T={...se,...V},w={...z,...V},B=void 0}catch(V){let ae=V;if(V instanceof Cc||(ae=new Cc(V.message,{cause:V})),l!=null&&l.throwOnError)throw ae;T=se,w={},B=ae}}const K=((S=(x=N.options).loaderDeps)==null?void 0:S.call(x,{search:T}))??"",O=K?JSON.stringify(K):"",{interpolatedPath:k,usedParams:W}=Cy({path:N.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),P=N.id+k+O,F=this.getMatch(P),J=v.get(N.id),q=(F==null?void 0:F._strictParams)??W;let I;if(!F)try{Yy(N,W,f,q)}catch(se){if(St(se)||Ot(se)?I=se:I=new US(se.message,{cause:se}),l!=null&&l.throwOnError)throw I}Object.assign(o,q);const te=J?"stay":"enter";let le;if(F)le={...F,cause:te,params:(J==null?void 0:J.params)??o,_strictParams:q,search:as(J?J.search:F.search,T),_strictSearch:w};else{const se=N.options.loader||N.options.beforeLoad||N.lazyFn||Hg(N)?"pending":"success";le={id:P,ssr:N.options.ssr,index:j,routeId:N.id,params:(J==null?void 0:J.params)??o,_strictParams:q,pathname:k,updatedAt:Date.now(),search:J?as(J.search,T):T,_strictSearch:w,searchError:void 0,status:se,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Tl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:te,loaderDeps:J?ka(J.loaderDeps,K):K,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:N.options.staticData||{},fullPath:N.fullPath}}l!=null&&l.preload||(le.globalNotFound=p===N.id),le.searchError=B;const ce=this.getParentContext(R);le.context={...ce,...le.__routeContext,...le.__beforeLoadContext},m[j]=le}for(let j=0;j<m.length;j++){const N=m[j],R=this.looseRoutesById[N.routeId],T=this.getMatch(N.id),w=v.get(N.routeId);if(N.params=w?as(w.params,o):o,!T){const B=m[j-1],K=this.getParentContext(B);if(R.options.context){const O={deps:N.loaderDeps,params:N.params,context:K??{},location:n,navigate:k=>this.navigate({...k,_fromLocation:n}),buildLocation:this.buildLocation,cause:N.cause,abortController:N.abortController,preload:!!N.preload,matches:m,routeId:R.id};N.__routeContext=R.options.context(O)??void 0}N.context={...K,...N.__routeContext,...N.__beforeLoadContext}}}return m}matchRoutesLightweight(n){var v;const{matchedRoutes:l,routeParams:i,parsedParams:r}=this.getMatchedRoutes(n.pathname),o=Ui(l),f={...n.search};for(const x of l)try{Object.assign(f,jc(x.options.validateSearch,f))}catch{}const h=Ui(this.stores.matchesId.state),g=h&&((v=this.stores.activeMatchStoresById.get(h))==null?void 0:v.state),p=g&&g.routeId===o.id&&g.pathname===n.pathname;let m;if(p)m=g.params;else{const x=Object.assign(Object.create(null),i);for(const S of l)try{Yy(S,i,r??{},x)}catch{}m=x}return{matchedRoutes:l,fullPath:o.fullPath,search:f,params:m}}},Cc=class extends Error{},US=class extends Error{};function BS(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function jc(n,l){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(l);if(i instanceof Promise)throw new Cc("Async validation not supported");if(i.issues)throw new Cc(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(l):typeof n=="function"?n(l):{}}function qS({pathname:n,routesById:l,processedTree:i}){const r=Object.create(null),o=Un(n);let f,h;const g=tS(o,i,!0);return g&&(f=g.route,Object.assign(r,g.rawParams),h=Object.assign(Object.create(null),g.parsedParams)),{matchedRoutes:(g==null?void 0:g.branch)||[l.__root__],routeParams:r,foundRoute:f,parsedParams:h}}function HS({search:n,dest:l,destRoutes:i,_includeValidateSearch:r}){return QS(i)(n,l,r??!1)}function QS(n){var o;const l={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const f of n){if("search"in f.options)(o=f.options.search)!=null&&o.middlewares&&l.middlewares.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const h=({search:g,next:p})=>{let m=g;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(m=f.options.preSearchFilters.reduce((x,S)=>S(x),g));const v=p(m);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((x,S)=>S(x),v):v};l.middlewares.push(h)}if(f.options.validateSearch){const h=({search:g,next:p})=>{const m=p(g);if(!l._includeValidateSearch)return m;try{return{...m,...jc(f.options.validateSearch,m)??void 0}}catch{return m}};l.middlewares.push(h)}}const i=({search:f})=>{const h=l.dest;return h.search?h.search===!0?f:zn(h.search,f):{}};l.middlewares.push(i);const r=(f,h,g)=>{if(f>=g.length)return h;const p=g[f];return p({search:h,next:v=>r(f+1,v,g)})};return function(h,g,p){return l.dest=g,l._includeValidateSearch=p,r(0,h,l.middlewares)}}function YS(n,l){if(n!=="root")for(let i=l.length-1;i>=0;i--){const r=l[i];if(r.children)return r.id}return gs}function Yy(n,l,i,r){var f;const o=((f=n.options.params)==null?void 0:f.parse)??n.options.parseParams;if(o)if(n.options.skipRouteOnParseError)for(const h in l)h in i&&(r[h]=i[h]);else{const h=o(r);Object.assign(r,h)}}var GS="Error preloading route! ☝️",Qg=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=l=>{var p,m;this.originalIndex=l.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=gs:this.parentRoute||Ka();let o=r?gs:i==null?void 0:i.path;o&&o!=="/"&&(o=zg(o));const f=(i==null?void 0:i.id)||o;let h=r?gs:bc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,f]);o==="__root__"&&(o="/"),h!=="__root__"&&(h=bc(["/",h]));const g=h==="__root__"?"/":bc([this.parentRoute.fullPath,o]);this._path=o,this._id=h,this._fullPath=g,this._to=Un(g)},this.addChildren=l=>this._addFileChildren(l),this._addFileChildren=l=>(Array.isArray(l)&&(this.children=l),typeof l=="object"&&l!==null&&(this.children=Object.values(l)),this),this._addFileTypes=()=>this,this.updateLoader=l=>(Object.assign(this.options,l),this),this.update=l=>(Object.assign(this.options,l),this),this.lazy=l=>(this.lazyFn=l,this),this.redirect=l=>jS({from:this.fullPath,...l}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},kS=class extends Qg{constructor(n){super(n)}};function KS(n){if(typeof document<"u"&&document.querySelector){const l=n.stores.location.state,i=l.state.__hashScrollIntoViewOptions??!0;if(i&&l.hash!==""){const r=document.getElementById(l.hash);r&&r.scrollIntoView(i)}}}function Fd(n){const l=n.errorComponent??Jd;return u.jsx(VS,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Q.createElement(l,{error:i,reset:r}):n.children})}var VS=class extends Q.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,l){l.error&&l.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,l){this.props.onCatch&&this.props.onCatch(n,l)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Jd({error:n}){const[l,i]=Q.useState(!1);return u.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[u.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),u.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:l?"Hide Error":"Show Error"})]}),u.jsx("div",{style:{height:".25rem"}}),l?u.jsx("div",{children:u.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?u.jsx("code",{children:n.message}):null})}):null]})}function XS({children:n,fallback:l=null}){return Yg()?u.jsx(zi.Fragment,{children:n}):u.jsx(zi.Fragment,{children:l})}function Yg(){return zi.useSyncExternalStore($S,()=>!0,()=>!1)}function $S(){return()=>{}}var Gg=Q.createContext(null);function pt(n){return Q.useContext(Gg)}var Lc=Q.createContext(void 0),ZS=Q.createContext(void 0),ke=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(ke||{});function PS({update:n,notify:l,unwatched:i}){return{link:r,unlink:o,propagate:f,checkDirty:h,shallowPropagate:g};function r(m,v,x){const S=v.depsTail;if(S!==void 0&&S.dep===m)return;const j=S!==void 0?S.nextDep:v.deps;if(j!==void 0&&j.dep===m){j.version=x,v.depsTail=j;return}const N=m.subsTail;if(N!==void 0&&N.version===x&&N.sub===v)return;const R=v.depsTail=m.subsTail={version:x,dep:m,sub:v,prevDep:S,nextDep:j,prevSub:N,nextSub:void 0};j!==void 0&&(j.prevDep=R),S!==void 0?S.nextDep=R:v.deps=R,N!==void 0?N.nextSub=R:m.subs=R}function o(m,v=m.sub){const x=m.dep,S=m.prevDep,j=m.nextDep,N=m.nextSub,R=m.prevSub;return j!==void 0?j.prevDep=S:v.depsTail=S,S!==void 0?S.nextDep=j:v.deps=j,N!==void 0?N.prevSub=R:x.subsTail=R,R!==void 0?R.nextSub=N:(x.subs=N)===void 0&&i(x),j}function f(m){let v=m.nextSub,x;e:do{const S=m.sub;let j=S.flags;if(j&60?j&12?j&4?!(j&48)&&p(m,S)?(S.flags=j|40,j&=1):j=0:S.flags=j&-9|32:j=0:S.flags=j|32,j&2&&l(S),j&1){const N=S.subs;if(N!==void 0){const R=(m=N).nextSub;R!==void 0&&(x={value:v,prev:x},v=R);continue}}if((m=v)!==void 0){v=m.nextSub;continue}for(;x!==void 0;)if(m=x.value,x=x.prev,m!==void 0){v=m.nextSub;continue e}break}while(!0)}function h(m,v){let x,S=0,j=!1;e:do{const N=m.dep,R=N.flags;if(v.flags&16)j=!0;else if((R&17)===17){if(n(N)){const T=N.subs;T.nextSub!==void 0&&g(T),j=!0}}else if((R&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(x={value:m,prev:x}),m=N.deps,v=N,++S;continue}if(!j){const T=m.nextDep;if(T!==void 0){m=T;continue}}for(;S--;){const T=v.subs,w=T.nextSub!==void 0;if(w?(m=x.value,x=x.prev):m=T,j){if(n(v)){w&&g(T),v=m.sub;continue}j=!1}else v.flags&=-33;v=m.sub;const B=m.nextDep;if(B!==void 0){m=B;continue e}}return j}while(!0)}function g(m){do{const v=m.sub,x=v.flags;(x&48)===32&&(v.flags=x|16,(x&6)===2&&l(v))}while((m=m.nextSub)!==void 0)}function p(m,v){let x=v.depsTail;for(;x!==void 0;){if(x===m)return!0;x=x.prevDep}return!1}}function Id(n,l,i){var f,h,g;const r=typeof n=="object",o=r?n:void 0;return{next:(f=r?n.next:n)==null?void 0:f.bind(o),error:(h=r?n.error:l)==null?void 0:h.bind(o),complete:(g=r?n.complete:i)==null?void 0:g.bind(o)}}const Ud=[];let Nc=0;const{link:Gy,unlink:FS,propagate:JS,checkDirty:kg,shallowPropagate:ky}=PS({update(n){return n._update()},notify(n){Ud[Bd++]=n,n.flags&=~ke.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=ke.Mutable|ke.Dirty,wc(n))}});let gc=0,Bd=0,ma,qd=0;function Kg(n){try{++qd,n()}finally{--qd||Vg()}}function wc(n){const l=n.depsTail;let i=l!==void 0?l.nextDep:n.deps;for(;i!==void 0;)i=FS(i,n)}function Vg(){if(!(qd>0)){for(;gc<Bd;){const n=Ud[gc];Ud[gc++]=void 0,n.notify()}gc=0,Bd=0}}function Xg(n,l){const i=typeof n=="function",r=n,o={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?ke.None:ke.Mutable,get(){return ma!==void 0&&Gy(o,ma,Nc),o._snapshot},subscribe(f){const h=Id(f),g={current:!1},p=IS(()=>{var m;o.get(),g.current?(m=h.next)==null||m.call(h,o._snapshot):g.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(f){const h=ma,g=Object.is;if(i)ma=o,++Nc,o.depsTail=void 0;else if(f===void 0)return!1;i&&(o.flags=ke.Mutable|ke.RecursedCheck);try{const p=o._snapshot,m=typeof f=="function"?f(p):f===void 0&&i?r(p):f;return p===void 0||!g(p,m)?(o._snapshot=m,!0):!1}finally{ma=h,i&&(o.flags&=~ke.RecursedCheck),wc(o)}}};return i?(o.flags=ke.Mutable|ke.Dirty,o.get=function(){const f=o.flags;if(f&ke.Dirty||f&ke.Pending&&kg(o.deps,o)){if(o._update()){const h=o.subs;h!==void 0&&ky(h)}}else f&ke.Pending&&(o.flags=f&~ke.Pending);return ma!==void 0&&Gy(o,ma,Nc),o._snapshot}):o.set=function(f){if(o._update(f)){const h=o.subs;h!==void 0&&(JS(h),ky(h),Vg())}},o}function IS(n){const l=()=>{const r=ma;ma=i,++Nc,i.depsTail=void 0,i.flags=ke.Watching|ke.RecursedCheck;try{return n()}finally{ma=r,i.flags&=~ke.RecursedCheck,wc(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ke.Watching|ke.RecursedCheck,notify(){const r=this.flags;r&ke.Dirty||r&ke.Pending&&kg(this.deps,this)?l():this.flags=ke.Watching},stop(){this.flags=ke.None,this.depsTail=void 0,wc(this)}};return l(),i}class WS{constructor(l){this.atom=Xg(l)}setState(l){this.atom.set(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Id(l))}}class ej{constructor(l){this.atom=Xg(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Id(l))}}function Ky(n){return typeof n=="function"?new ej(n):new WS(n)}var fd={exports:{}},hd={},md={exports:{}},yd={};/**
|
|
50
|
-
* @license React
|
|
51
|
-
* use-sync-external-store-shim.production.js
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var Vy;function tj(){if(Vy)return yd;Vy=1;var n=Vi();function l(x,S){return x===S&&(x!==0||1/x===1/S)||x!==x&&S!==S}var i=typeof Object.is=="function"?Object.is:l,r=n.useState,o=n.useEffect,f=n.useLayoutEffect,h=n.useDebugValue;function g(x,S){var j=S(),N=r({inst:{value:j,getSnapshot:S}}),R=N[0].inst,T=N[1];return f(function(){R.value=j,R.getSnapshot=S,p(R)&&T({inst:R})},[x,j,S]),o(function(){return p(R)&&T({inst:R}),x(function(){p(R)&&T({inst:R})})},[x]),h(j),j}function p(x){var S=x.getSnapshot;x=x.value;try{var j=S();return!i(x,j)}catch{return!0}}function m(x,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:g;return yd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,yd}var Xy;function aj(){return Xy||(Xy=1,md.exports=tj()),md.exports}/**
|
|
58
|
-
* @license React
|
|
59
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
-
*
|
|
61
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the MIT license found in the
|
|
64
|
-
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var $y;function nj(){if($y)return hd;$y=1;var n=Vi(),l=aj();function i(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:i,o=l.useSyncExternalStore,f=n.useRef,h=n.useEffect,g=n.useMemo,p=n.useDebugValue;return hd.useSyncExternalStoreWithSelector=function(m,v,x,S,j){var N=f(null);if(N.current===null){var R={hasValue:!1,value:null};N.current=R}else R=N.current;N=g(function(){function w(W){if(!B){if(B=!0,K=W,W=S(W),j!==void 0&&R.hasValue){var P=R.value;if(j(P,W))return O=P}return O=W}if(P=O,r(K,W))return P;var F=S(W);return j!==void 0&&j(P,F)?(K=W,P):(K=W,O=F)}var B=!1,K,O,k=x===void 0?null:x;return[function(){return w(v())},k===null?void 0:function(){return w(k())}]},[v,x,S,j]);var T=o(m,N[0],N[1]);return h(function(){R.hasValue=!0,R.value=T},[T]),p(T),T},hd}var Zy;function sj(){return Zy||(Zy=1,fd.exports=nj()),fd.exports}var lj=sj();function ij(n,l){return n===l}function ft(n,l,i=ij){const r=Q.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:g}=n.subscribe(h);return g},[n]),o=Q.useCallback(()=>n==null?void 0:n.get(),[n]);return lj.useSyncExternalStoreWithSelector(r,o,o,l,i)}var rj={state:void 0,get:()=>{},subscribe:()=>()=>{}};function vs(n){const l=pt(),i=Q.useContext(n.from?ZS:Lc),r=n.from??i,o=r?n.from?l.stores.getMatchStoreByRouteId(r):l.stores.activeMatchStoresById.get(r):void 0,f=Q.useRef(void 0);return ft(o??rj,h=>{if((n.shouldThrow??!0)&&!h&&Ka(),h===void 0)return;const g=n.select?n.select(h):h;if(n.structuralSharing??l.options.defaultStructuralSharing){const p=ka(f.current,g);return f.current=p,p}return g})}function $g(n){return vs({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.loaderData):l.loaderData})}function Zg(n){const{select:l,...i}=n;return vs({...i,select:r=>l?l(r.loaderDeps):r.loaderDeps})}function Pg(n){return vs({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:l=>{const i=n.strict===!1?l.params:l._strictParams;return n.select?n.select(i):i}})}function Fg(n){return vs({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.search):l.search})}function Xi(n){const l=pt();return Q.useCallback(i=>l.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,l])}function Jg(n){return vs({...n,select:l=>n.select?n.select(l.context):l.context})}var cj=pg();function uj(n,l){const i=pt(),r=kb(l),{activeProps:o,inactiveProps:f,activeOptions:h,to:g,preload:p,preloadDelay:m,hashScrollIntoView:v,replace:x,startTransition:S,resetScroll:j,viewTransition:N,children:R,target:T,disabled:w,style:B,className:K,onClick:O,onBlur:k,onFocus:W,onMouseEnter:P,onMouseLeave:F,onTouchStart:J,ignoreBlocker:q,params:I,search:te,hash:le,state:ce,mask:se,reloadDocument:z,unsafeRelative:V,from:ae,_fromLocation:me,...oe}=n,M=Yg(),X=Q.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),ee=ft(i.stores.location,Se=>Se,(Se,mt)=>Se.href===mt.href),Y=Q.useMemo(()=>{const Se={_fromLocation:ee,...X};return i.buildLocation(Se)},[i,ee,X]),fe=Y.maskedLocation?Y.maskedLocation.publicHref:Y.publicHref,ve=Y.maskedLocation?Y.maskedLocation.external:Y.external,be=Q.useMemo(()=>yj(fe,ve,i.history,w),[w,ve,fe,i.history]),Pe=Q.useMemo(()=>{if(be!=null&&be.external)return Ec(be.href,i.protocolAllowlist)?void 0:be.href;if(!gj(g)&&!(typeof g!="string"||g.indexOf(":")===-1))try{return new URL(g),Ec(g,i.protocolAllowlist)?void 0:g}catch{}},[g,be,i.protocolAllowlist]),He=Q.useMemo(()=>{if(Pe)return!1;if(h!=null&&h.exact){if(!rS(ee.pathname,Y.pathname,i.basepath))return!1}else{const Se=Tc(ee.pathname,i.basepath),mt=Tc(Y.pathname,i.basepath);if(!(Se.startsWith(mt)&&(Se.length===mt.length||Se[mt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!ys(ee.search,Y.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?M&&ee.hash===Y.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,ee,Pe,M,Y.hash,Y.pathname,Y.search,i.basepath]),ca=He?zn(o,{})??oj:gd,xa=He?gd:zn(f,{})??gd,js=[K,ca.className,xa.className].filter(Boolean).join(" "),Cl=(B||ca.style||xa.style)&&{...B,...ca.style,...xa.style},[va,Ns]=Q.useState(!1),Rs=Q.useRef(!1),Pa=n.reloadDocument||Pe?!1:p??i.options.defaultPreload,_s=m??i.options.defaultPreloadDelay??0,aa=Q.useCallback(()=>{i.preloadRoute({...X,_builtLocation:Y}).catch(Se=>{console.warn(Se),console.warn(GS)})},[i,X,Y]);Gb(r,Q.useCallback(Se=>{Se!=null&&Se.isIntersecting&&aa()},[aa]),mj,{disabled:!!w||Pa!=="viewport"}),Q.useEffect(()=>{Rs.current||!w&&Pa==="render"&&(aa(),Rs.current=!0)},[w,aa,Pa]);const wl=Se=>{const mt=Se.currentTarget.getAttribute("target"),ua=T!==void 0?T:mt;if(!w&&!pj(Se)&&!Se.defaultPrevented&&(!ua||ua==="_self")&&Se.button===0){Se.preventDefault(),cj.flushSync(()=>{Ns(!0)});const Pi=i.subscribe("onResolved",()=>{Pi(),Ns(!1)});i.navigate({...X,replace:x,resetScroll:j,hashScrollIntoView:v,startTransition:S,viewTransition:N,ignoreBlocker:q})}};if(Pe)return{...oe,ref:r,href:Pe,...R&&{children:R},...T&&{target:T},...w&&{disabled:w},...B&&{style:B},...K&&{className:K},...O&&{onClick:O},...k&&{onBlur:k},...W&&{onFocus:W},...P&&{onMouseEnter:P},...F&&{onMouseLeave:F},...J&&{onTouchStart:J}};const Es=Se=>{if(w||Pa!=="intent")return;if(!_s){aa();return}const mt=Se.currentTarget;if(Ci.has(mt))return;const ua=setTimeout(()=>{Ci.delete(mt),aa()},_s);Ci.set(mt,ua)},Bc=Se=>{w||Pa!=="intent"||aa()},Zi=Se=>{if(w||!Pa||!_s)return;const mt=Se.currentTarget,ua=Ci.get(mt);ua&&(clearTimeout(ua),Ci.delete(mt))};return{...oe,...ca,...xa,href:be==null?void 0:be.href,ref:r,onClick:dl([O,wl]),onBlur:dl([k,Zi]),onFocus:dl([W,Es]),onMouseEnter:dl([P,Es]),onMouseLeave:dl([F,Zi]),onTouchStart:dl([J,Bc]),disabled:!!w,target:T,...Cl&&{style:Cl},...js&&{className:js},...w&&dj,...He&&fj,...M&&va&&hj}}var gd={},oj={className:"active"},dj={role:"link","aria-disabled":!0},fj={"data-status":"active","aria-current":"page"},hj={"data-transitioning":"transitioning"},Ci=new WeakMap,mj={rootMargin:"100px"},dl=n=>l=>{for(const i of n)if(i){if(l.defaultPrevented)return;i(l)}};function yj(n,l,i,r){if(!r)return l?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function gj(n){if(typeof n!="string")return!1;const l=n.charCodeAt(0);return l===47?n.charCodeAt(1)!==47:l===46}var Ee=Q.forwardRef((n,l)=>{const{_asChild:i,...r}=n,{type:o,...f}=uj(r,l),h=typeof r.children=="function"?r.children({isActive:f["data-status"]==="active"}):r.children;if(!i){const{disabled:g,...p}=f;return Q.createElement("a",p,h)}return Q.createElement(i,f,h)});function pj(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var xj=class extends Qg{constructor(l){super(l),this.useMatch=i=>vs({select:i==null?void 0:i.select,from:this.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>Jg({...i,from:this.id}),this.useSearch=i=>Fg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useParams=i=>Pg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useLoaderDeps=i=>Zg({...i,from:this.id}),this.useLoaderData=i=>$g({...i,from:this.id}),this.useNavigate=()=>Xi({from:this.fullPath}),this.Link=zi.forwardRef((i,r)=>u.jsx(Ee,{ref:r,from:this.fullPath,...i}))}};function vj(n){return new xj(n)}var bj=class extends kS{constructor(n){super(n),this.useMatch=l=>vs({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>Jg({...l,from:this.id}),this.useSearch=l=>Fg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>Pg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>Zg({...l,from:this.id}),this.useLoaderData=l=>$g({...l,from:this.id}),this.useNavigate=()=>Xi({from:this.fullPath}),this.Link=zi.forwardRef((l,i)=>u.jsx(Ee,{ref:i,from:this.fullPath,...l}))}};function Sj(n){return new bj(n)}function ra(n){return typeof n=="object"?new Py(n,{silent:!0}).createRoute(n):new Py(n,{silent:!0}).createRoute}var Py=class{constructor(n,l){this.path=n,this.createRoute=i=>{const r=vj(i);return r.isRoot=!1,r},this.silent=l==null?void 0:l.silent}};function jj(n){const l=pt(),i=`not-found-${ft(l.stores.location,r=>r.pathname)}-${ft(l.stores.status,r=>r)}`;return u.jsx(Fd,{getResetKey:()=>i,onCatch:(r,o)=>{var f;if(St(r))(f=n.onCatch)==null||f.call(n,r,o);else throw r},errorComponent:({error:r})=>{var o;if(St(r))return(o=n.fallback)==null?void 0:o.call(n,r);throw r},children:n.children})}function Nj(){return u.jsx("p",{children:"Not Found"})}function fl(n){return u.jsx(u.Fragment,{children:n.children})}function Ig(n,l,i){return l.options.notFoundComponent?u.jsx(l.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?u.jsx(n.options.defaultNotFoundComponent,{...i}):u.jsx(Nj,{})}function Rj(n){return null}function _j(){return Rj(pt()),null}var Wg=Q.memo(function({matchId:l}){const i=pt(),r=i.stores.activeMatchStoresById.get(l);r||Ka();const o=ft(i.stores.loadedAt,h=>h),f=ft(r,h=>h);return u.jsx(Ej,{router:i,matchId:l,resetKey:o,matchState:Q.useMemo(()=>{var p;const h=f.routeId,g=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:f.ssr,_displayPending:f._displayPending,parentRouteId:g}},[f._displayPending,f.routeId,f.ssr,i.routesById])})});function Ej({router:n,matchId:l,resetKey:i,matchState:r}){var N,R;const o=n.routesById[r.routeId],f=o.options.pendingComponent??n.options.defaultPendingComponent,h=f?u.jsx(f,{}):null,g=o.options.errorComponent??n.options.defaultErrorComponent,p=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??((N=n.options.notFoundRoute)==null?void 0:N.options.component):o.options.notFoundComponent,v=r.ssr===!1||r.ssr==="data-only",x=(!o.isRoot||o.options.wrapInSuspense||v)&&(o.options.wrapInSuspense??f??(((R=o.options.errorComponent)==null?void 0:R.preload)||v))?Q.Suspense:fl,S=g?Fd:fl,j=m?jj:fl;return u.jsxs(o.isRoot?o.options.shellComponent??fl:fl,{children:[u.jsx(Lc.Provider,{value:l,children:u.jsx(x,{fallback:h,children:u.jsx(S,{getResetKey:()=>i,errorComponent:g||Jd,onCatch:(T,w)=>{if(St(T))throw T;p==null||p(T,w)},children:u.jsx(j,{fallback:T=>{if(!m||T.routeId&&T.routeId!==r.routeId||!T.routeId&&!o.isRoot)throw T;return Q.createElement(m,T)},children:v||r._displayPending?u.jsx(XS,{fallback:h,children:u.jsx(Fy,{matchId:l})}):u.jsx(Fy,{matchId:l})})})})}),r.parentRouteId===gs?u.jsxs(u.Fragment,{children:[u.jsx(Tj,{resetKey:i}),n.options.scrollRestoration&&wg?u.jsx(_j,{}):null]}):null]})}function Tj({resetKey:n}){const l=pt(),i=Q.useRef(void 0);return Oi(()=>{const r=l.latestLocation.href;(i.current===void 0||i.current!==r)&&(l.emit({type:"onRendered",...hl(l.stores.location.state,l.stores.resolvedLocation.state)}),i.current=r)},[l.latestLocation.state.__TSR_key,n,l]),null}var Fy=Q.memo(function({matchId:l}){var m,v,x,S;const i=pt(),r=i.stores.activeMatchStoresById.get(l);r||Ka();const o=ft(r,j=>j),f=o.routeId,h=i.routesById[f],g=Q.useMemo(()=>{var N;const j=(N=i.routesById[f].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:N({routeId:f,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return j?JSON.stringify(j):void 0},[f,o.loaderDeps,o._strictParams,o._strictSearch,i.options.defaultRemountDeps,i.routesById]),p=Q.useMemo(()=>{const j=h.options.component??i.options.defaultComponent;return j?u.jsx(j,{},g):u.jsx(ep,{})},[g,h.options.component,i.options.defaultComponent]);if(o._displayPending)throw(m=i.getMatch(o.id))==null?void 0:m._nonReactive.displayPendingPromise;if(o._forcePending)throw(v=i.getMatch(o.id))==null?void 0:v._nonReactive.minPendingPromise;if(o.status==="pending"){const j=h.options.pendingMinMs??i.options.defaultPendingMinMs;if(j){const N=i.getMatch(o.id);if(N&&!N._nonReactive.minPendingPromise){const R=Tl();N._nonReactive.minPendingPromise=R,setTimeout(()=>{R.resolve(),N._nonReactive.minPendingPromise=void 0},j)}}throw(x=i.getMatch(o.id))==null?void 0:x._nonReactive.loadPromise}if(o.status==="notFound")return St(o.error)||Ka(),Ig(i,h,o.error);if(o.status==="redirected")throw Ot(o.error)||Ka(),(S=i.getMatch(o.id))==null?void 0:S._nonReactive.loadPromise;if(o.status==="error")throw o.error;return p}),ep=Q.memo(function(){const l=pt(),i=Q.useContext(Lc);let r,o=!1,f;{const m=i?l.stores.activeMatchStoresById.get(i):void 0;[r,o]=ft(m,v=>[v==null?void 0:v.routeId,(v==null?void 0:v.globalNotFound)??!1]),f=ft(l.stores.matchesId,v=>v[v.findIndex(x=>x===i)+1])}const h=r?l.routesById[r]:void 0,g=l.options.defaultPendingComponent?u.jsx(l.options.defaultPendingComponent,{}):null;if(o)return h||Ka(),Ig(l,h,void 0);if(!f)return null;const p=u.jsx(Wg,{matchId:f});return r===gs?u.jsx(Q.Suspense,{fallback:g,children:p}):p});function Mj(){const n=pt(),l=Q.useRef({router:n,mounted:!1}),[i,r]=Q.useState(!1),o=ft(n.stores.isLoading,x=>x),f=ft(n.stores.hasPendingMatches,x=>x),h=sd(o),g=o||i||f,p=sd(g),m=o||f,v=sd(m);return n.startTransition=x=>{r(!0),Q.startTransition(()=>{x(),r(!1)})},Q.useEffect(()=>{const x=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Un(n.latestLocation.publicHref)!==Un(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{x()}},[n,n.history]),Oi(()=>{if(typeof window<"u"&&n.ssr||l.current.router===n&&l.current.mounted)return;l.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),Oi(()=>{h&&!o&&n.emit({type:"onLoad",...hl(n.stores.location.state,n.stores.resolvedLocation.state)})},[h,n,o]),Oi(()=>{v&&!m&&n.emit({type:"onBeforeRouteMount",...hl(n.stores.location.state,n.stores.resolvedLocation.state)})},[m,v,n]),Oi(()=>{if(p&&!g){const x=hl(n.stores.location.state,n.stores.resolvedLocation.state);n.emit({type:"onResolved",...x}),Kg(()=>{n.stores.status.setState(()=>"idle"),n.stores.resolvedLocation.setState(()=>n.stores.location.state)}),x.hrefChanged&&KS(n)}},[g,p,n]),null}function Cj(){const n=pt(),l=n.routesById[gs].options.pendingComponent??n.options.defaultPendingComponent,i=l?u.jsx(l,{}):null,r=u.jsxs(typeof document<"u"&&n.ssr?fl:Q.Suspense,{fallback:i,children:[u.jsx(Mj,{}),u.jsx(wj,{})]});return n.options.InnerWrap?u.jsx(n.options.InnerWrap,{children:r}):r}function wj(){const n=pt(),l=ft(n.stores.firstMatchId,o=>o),i=ft(n.stores.loadedAt,o=>o),r=l?u.jsx(Wg,{matchId:l}):null;return u.jsx(Lc.Provider,{value:l,children:n.options.disableGlobalCatchBoundary?r:u.jsx(Fd,{getResetKey:()=>i,errorComponent:Jd,onCatch:void 0,children:r})})}function tp(){const n=pt();return ft(n.stores.matchRouteReactivity,l=>l),Q.useCallback(l=>{const{pending:i,caseSensitive:r,fuzzy:o,includeSearch:f,...h}=l;return n.matchRoute(h,{pending:i,caseSensitive:r,fuzzy:o,includeSearch:f})},[n])}function Aj(n){const l=pt(),i=Q.useRef(void 0);return ft(l.stores.activeMatchesSnapshot,r=>{const o=r;if(l.options.defaultStructuralSharing){const f=ka(i.current,o);return i.current=f,f}return o})}var Oj=n=>({createMutableStore:Ky,createReadonlyStore:Ky,batch:Kg}),zj=n=>new Dj(n),Dj=class extends LS{constructor(n){super(n,Oj)}};function Lj({router:n,children:l,...i}){Object.keys(i).length>0&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=u.jsx(Gg.Provider,{value:n,children:l});return n.options.Wrap?u.jsx(n.options.Wrap,{children:r}):r}function Uj({router:n,...l}){return u.jsx(Lj,{router:n,...l,children:u.jsx(Cj,{})})}function ap(n){const i=pt();return Q.useRef(void 0),ft(i.stores.__store,r=>r)}function Bj(n){const l=pt(),i=Q.useRef(void 0);return ft(l.stores.location,r=>{const o=r;if(l.options.defaultStructuralSharing){const f=ka(i.current,o);return i.current=f,f}return o})}const np=Q.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function qj({children:n}){const[l,i]=Q.useState(!1);return u.jsx(np.Provider,{value:{isOpen:l,toggle:()=>i(r=>!r),close:()=>i(!1)},children:n})}function sp(){return Q.useContext(np)}function pd(n){if(!n)return"Run";const[,l]=n.split("::");return l||n}function Hj(n){const l=[];for(let i=1;i<n.length;i++){const r=n[i],o=r.routeId??r.id,f=r.params;o==="/"||o==="/_layout"||(o.includes("/runs/$runId/category/$category")?(l.some(h=>h.label===f.runId)||l.push({label:pd(f.runId),to:`/runs/${encodeURIComponent(f.runId)}`}),l.push({label:f.category??"Category",to:r.pathname})):o.includes("/runs/$runId/suite/$suite")?l.push({label:f.suite??"Suite",to:r.pathname}):o.includes("/runs/$runId")?l.push({label:pd(f.runId),to:r.pathname}):o.includes("/evals/$runId/$evalId")?(l.some(h=>h.label===f.runId)||l.push({label:pd(f.runId),to:`/runs/${encodeURIComponent(f.runId)}`}),l.push({label:f.evalId??"Eval",to:r.pathname})):o.includes("/experiments/$experimentName")?l.push({label:f.experimentName??"Experiment",to:r.pathname}):(o==="/index"||o==="/")&&l.push({label:"Home",to:"/"}))}return l}function Qj(){const n=Aj(),l=Hj(n);return l.length===0?null:u.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 bg-gray-950 px-6 py-2 text-sm",children:[u.jsx(Ee,{to:"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:"Home"}),l.map((i,r)=>{const o=r===l.length-1;return u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-gray-600",children:">"}),o?u.jsx("span",{className:"text-gray-400",children:i.label}):u.jsx(Ee,{to:i.to??"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:i.label})]},`${i.label}-${r}`)})]})}async function Ve(n){const l=await fetch(n);if(!l.ok)throw new Error(`API error: ${l.status} ${l.statusText}`);return l.json()}const Yj={queryKey:["runs"],queryFn:()=>Ve("/api/runs"),refetchInterval:5e3};function Gj(n){return{queryKey:["runs",n],queryFn:()=>Ve(`/api/runs/${encodeURIComponent(n)}`),enabled:!!n}}const kj={queryKey:["feedback"],queryFn:()=>Ve("/api/feedback")},Kj={queryKey:["experiments"],queryFn:()=>Ve("/api/experiments")},Vj={queryKey:["compare"],queryFn:()=>Ve("/api/compare")},Xj={queryKey:["targets"],queryFn:()=>Ve("/api/targets")};function $j(n,l){return{queryKey:["runs",n,"evals",l,"files"],queryFn:()=>Ve(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files`),enabled:!!n&&!!l}}function Zj(n,l,i){return{queryKey:["runs",n,"evals",l,"files",i],queryFn:()=>Ve(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files/${i}`),enabled:!!n&&!!l&&!!i}}function Pj(n,l){return{queryKey:["runs",n,"categories",l,"suites"],queryFn:()=>Ve(`/api/runs/${encodeURIComponent(n)}/categories/${encodeURIComponent(l)}/suites`),enabled:!!n&&!!l}}const Fj={queryKey:["config"],queryFn:()=>Ve("/api/config"),staleTime:5e3};function Jj(n){const l=n?`${jt(n)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",n??""],queryFn:()=>Ve(l),staleTime:5e3}}function Wd(){return Ke(Yj)}function $i(n){return Ke(Gj(n))}function Ij(){return Ke(kj)}function ef(){return Ke(Kj)}function Wj(){return Ke(Vj)}function e1(){return Ke(Xj)}function t1(n,l){return Ke($j(n,l))}function a1(n,l,i){return Ke(Zj(n,l,i))}function lp(n,l){return Ke(Pj(n,l))}function ht(){return Ke(Fj)}function ip(n){return Ke(Jj(n))}const Ac=.8;function Xa(n,l=Ac){return n>=l}const n1={queryKey:["benchmarks"],queryFn:()=>Ve("/api/benchmarks"),refetchInterval:1e4};function tf(){return Ke(n1)}const s1={queryKey:["benchmarks","all-runs"],queryFn:()=>Ve("/api/benchmarks/all-runs"),refetchInterval:5e3};function l1(){return Ke(s1)}async function i1(n){const l=await fetch("/api/benchmarks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const i=await l.json();throw new Error(i.error||`Failed to add project: ${l.status}`)}return l.json()}async function r1(n){const l=await fetch("/api/benchmarks/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const r=await l.json();throw new Error(r.error||`Failed to discover: ${l.status}`)}return(await l.json()).discovered}function jt(n){return`/api/benchmarks/${encodeURIComponent(n)}`}function c1(n){return{queryKey:["benchmarks",n,"runs"],queryFn:()=>Ve(`${jt(n)}/runs`),enabled:!!n,refetchInterval:5e3}}function rp(n){return Ke(c1(n))}function u1(n,l){return{queryKey:["benchmarks",n,"runs",l],queryFn:()=>Ve(`${jt(n)}/runs/${encodeURIComponent(l)}`),enabled:!!n&&!!l}}function af(n,l){return Ke(u1(n,l))}function o1(n,l,i){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files"],queryFn:()=>Ve(`${jt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files`),enabled:!!n&&!!l&&!!i}}function d1(n,l,i,r){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files",r],queryFn:()=>Ve(`${jt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files/${r}`),enabled:!!n&&!!l&&!!i&&!!r}}function f1(n){return{queryKey:["benchmarks",n,"experiments"],queryFn:()=>Ve(`${jt(n)}/experiments`),enabled:!!n}}function h1(n){return{queryKey:["benchmarks",n,"compare"],queryFn:()=>Ve(`${jt(n)}/compare`),enabled:!!n}}function m1(n){return{queryKey:["benchmarks",n,"targets"],queryFn:()=>Ve(`${jt(n)}/targets`),enabled:!!n}}async function cp(n){const l=n?`${jt(n)}/remote/sync`:"/api/remote/sync",i=await fetch(l,{method:"POST"});if(!i.ok)throw new Error(`Failed to sync remote results: ${i.status}`);return i.json()}async function y1(n,l,i){const r=i?`${jt(i)}/runs/${encodeURIComponent(n)}/tags`:`/api/runs/${encodeURIComponent(n)}/tags`,o=await fetch(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:l})});if(!o.ok){const f=await o.json().catch(()=>({error:o.statusText}));throw new Error(f.error??`Failed to save tags: ${o.status}`)}return o.json()}async function g1(n,l){const i=l?`${jt(l)}/runs/${encodeURIComponent(n)}/tags`:`/api/runs/${encodeURIComponent(n)}/tags`,r=await fetch(i,{method:"DELETE"});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error??`Failed to delete tags: ${r.status}`)}}async function p1(n){const l=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(`Failed to save config: ${l.status}`);return l.json()}function x1(n){const l=n?`${jt(n)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",n??""],queryFn:()=>Ve(l),staleTime:3e4}}function v1(n){return Ke(x1(n))}function b1(n){const l=n?`${jt(n)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",n??""],queryFn:()=>Ve(l),staleTime:3e4}}function S1(n){return Ke(b1(n))}async function j1(n,l){const i=l?`${jt(l)}/eval/run`:"/api/eval/run",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error??`Failed: ${r.status}`)}return r.json()}function N1(n){return{queryKey:["eval-status",n],queryFn:()=>Ve(`/api/eval/status/${n}`),enabled:!!n,refetchInterval:l=>{var r;const i=(r=l.state.data)==null?void 0:r.status;return i==="finished"||i==="failed"?!1:2e3}}}function up(n){return Ke(N1(n))}function R1(n){const l="/api/eval/runs";return{queryKey:["eval-runs",""],queryFn:()=>Ve(l),refetchInterval:3e3}}function op(n){return Ke(R1())}async function _1(n,l){const i=l?`${jt(l)}/eval/preview`:"/api/eval/preview",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(`Preview failed: ${r.status}`);return r.json()}function bs({children:n}){const{isOpen:l,close:i}=sp(),r=Bj();return Q.useEffect(()=>{i()},[i,r.pathname]),u.jsxs(u.Fragment,{children:[l&&u.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:i,onKeyDown:o=>o.key==="Escape"&&i(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),u.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-900/50 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 ${l?"translate-x-0":"-translate-x-full"}`,children:n})]})}function E1(){const n=tp(),l=n({to:"/projects/$benchmarkId/evals/$runId/$evalId",fuzzy:!0}),i=n({to:"/projects/$benchmarkId/runs/$runId",fuzzy:!0}),r=n({to:"/projects/$benchmarkId",fuzzy:!0});if(l&&typeof l=="object"&&"benchmarkId"in l){const{benchmarkId:p,runId:m,evalId:v}=l;return u.jsx(A1,{benchmarkId:p,runId:m,currentEvalId:v})}if(i&&typeof i=="object"&&"benchmarkId"in i){const{benchmarkId:p,runId:m}=i;return u.jsx(Jy,{benchmarkId:p,currentRunId:m})}if(r&&typeof r=="object"&&"benchmarkId"in r){const{benchmarkId:p}=r;return u.jsx(Jy,{benchmarkId:p})}const o=n({to:"/evals/$runId/$evalId",fuzzy:!0}),f=n({to:"/runs/$runId/category/$category",fuzzy:!0}),h=n({to:"/runs/$runId/suite/$suite",fuzzy:!0}),g=n({to:"/experiments/$experimentName",fuzzy:!0});if(f&&typeof f=="object"&&"runId"in f){const{runId:p,category:m}=f;return u.jsx(w1,{runId:p,category:m})}if(h&&typeof h=="object"&&"runId"in h){const{runId:p,suite:m}=h;return u.jsx(C1,{runId:p,suite:m})}if(o&&typeof o=="object"&&"runId"in o){const{runId:p,evalId:m}=o;return u.jsx(M1,{runId:p,currentEvalId:m})}if(g&&typeof g=="object"&&"experimentName"in g){const{experimentName:p}=g;return u.jsx(O1,{currentExperiment:p})}return u.jsx(T1,{})}function T1(){const n=tp(),{data:l}=tf(),i=((l==null?void 0:l.projects.length)??0)>0,r=n({to:"/"}),o=n({to:"/runs/$runId",fuzzy:!0}),f=i&&r!==!1,{data:h}=Wd(),{data:g}=l1(),p=f?g:h,{data:m}=op(),v=((m==null?void 0:m.runs)??[]).filter(x=>x.status==="starting"||x.status==="running").length;return u.jsxs(bs,{children:[u.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"}),v>0&&u.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-cyan-900/40 px-2 py-0.5 text-xs text-cyan-400",children:[u.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),v]})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),p==null?void 0:p.runs.map(x=>{const S=r===!1&&o&&typeof o=="object"&&"runId"in o&&o.runId===x.filename;return x.project_id?u.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:x.project_id,runId:x.filename},className:"mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",title:x.project_name,children:x.display_name??x.filename},`${x.project_id}/${x.filename}`):u.jsx(Ee,{to:"/runs/$runId",params:{runId:x.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${S?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:x.display_name??x.filename},x.filename)})]}),u.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:u.jsx(Ee,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function M1({runId:n,currentEvalId:l}){const{data:i}=$i(n),{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8;return u.jsxs(bs,{children:[u.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),u.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[u.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),u.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),i==null?void 0:i.results.map(f=>{const h=f.testId===l,g=Xa(f.score,o);return u.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:f.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[u.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),u.jsx("span",{className:"truncate",children:f.testId})]},f.testId)})]})]})}function C1({runId:n,suite:l}){const{data:i}=$i(n),{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,f=((i==null?void 0:i.results)??[]).filter(h=>(h.suite??"Uncategorized")===l);return u.jsxs(bs,{children:[u.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),u.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[u.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),u.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),u.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),f.map(h=>{const g=Xa(h.score,o);return u.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:h.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[u.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),u.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function w1({runId:n,category:l}){const{data:i}=lp(n,l),r=(i==null?void 0:i.suites)??[];return u.jsxs(bs,{children:[u.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),u.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[u.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),u.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),u.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),r.map(o=>u.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:o.name},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[u.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),u.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function Jy({benchmarkId:n,currentRunId:l}){const{data:i}=rp(n);return u.jsxs(bs,{children:[u.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),u.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[u.jsx(Ee,{to:"/",className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All Benchmarks"}),u.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),i==null?void 0:i.runs.map(r=>{const o=l===r.filename;return u.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:r.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.display_name??r.filename},r.filename)})]})]})}function A1({benchmarkId:n,runId:l,currentEvalId:i}){const{data:r}=af(n,l),{data:o}=ht(),f=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;return u.jsxs(bs,{children:[u.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),u.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[u.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:l},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),u.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:l})]}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),r==null?void 0:r.results.map(h=>{const g=h.testId===i,p=Xa(h.score,f);return u.jsxs(Ee,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:n,runId:l,evalId:h.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${g?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[u.jsx("span",{className:`text-xs ${p?"text-emerald-400":"text-red-400"}`,children:p?"✓":"✗"}),u.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function O1({currentExperiment:n}){const{data:l}=ef(),i=(l==null?void 0:l.experiments)??[];return u.jsxs(bs,{children:[u.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:u.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),u.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:u.jsx(Ee,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),u.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[u.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),i.map(r=>{const o=r.name===n;return u.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.name},r.name)})]})]})}function z1(){return u.jsx(qj,{children:u.jsx(D1,{})})}function D1(){const{toggle:n}=sp();return u.jsxs("div",{className:"flex h-screen overflow-hidden",children:[u.jsx(E1,{}),u.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[u.jsxs("header",{className:"flex items-center gap-3 border-b border-gray-800 bg-gray-900/50 px-4 py-3 md:hidden",children:[u.jsx("button",{type:"button",onClick:n,className:"text-gray-400 hover:text-gray-200","aria-label":"Toggle navigation",children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[u.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),u.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),u.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),u.jsx("span",{className:"text-sm font-semibold text-white",children:"AgentV Studio"})]}),u.jsx(Qj,{}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(ep,{})})]})]})}const ta=Sj({component:z1}),L1=ra("/settings")({component:U1});function U1(){const{data:n,isLoading:l}=ht(),i=Za(),[r,o]=Q.useState(""),[f,h]=Q.useState(!1),[g,p]=Q.useState(null),m=(n==null?void 0:n.threshold)??Ac,v=r||String(m),x=(n==null?void 0:n.read_only)===!0,S=async()=>{const j=Number.parseFloat(r||String(m));if(Number.isNaN(j)||j<0||j>1){p({type:"error",text:"Threshold must be a number between 0 and 1"});return}h(!0),p(null);try{await p1({threshold:j}),await i.invalidateQueries({queryKey:["config"]}),o(""),p({type:"success",text:"Settings saved"}),setTimeout(()=>p(null),3e3)}catch{p({type:"error",text:"Failed to save settings"})}finally{h(!1)}};return l?u.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[u.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):u.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),u.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure your AgentV Studio dashboard"})]}),u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[u.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),u.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),u.jsx("div",{className:"mt-6 space-y-4",children:u.jsxs("div",{children:[u.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),u.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",Ac]}),u.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[u.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:v,onChange:j=>o(j.target.value),disabled:x,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),u.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(v)||0)*100),"%)"]})]})]})}),u.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!x&&u.jsx("button",{type:"button",onClick:S,disabled:f,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:f?"Saving...":"Save Settings"}),x&&u.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),g&&u.jsx("span",{className:`text-sm ${g.type==="success"?"text-emerald-400":"text-red-400"}`,children:g.text})]})]}),u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:u.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",u.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function $a({rate:n}){const l=Math.round(n*100);return u.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[u.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${l}%`}}),u.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[l,"%"]})]})}function dp({data:n,isLoading:l,isError:i,error:r,benchmarkId:o,readOnly:f}){var B,K;const[h,g]=Q.useState("aggregated"),[p,m]=Q.useState([]),{allTags:v,tagCounts:x}=Q.useMemo(()=>{const O=new Map;for(const k of(n==null?void 0:n.runs)??[])for(const W of k.tags??[])O.set(W,(O.get(W)??0)+1);return{allTags:[...O.keys()].sort(),tagCounts:O}},[n==null?void 0:n.runs]),S=Q.useMemo(()=>{if(!n||p.length===0)return n;const O=new Set(p),k=(n.runs??[]).filter(q=>(q.tags??[]).some(I=>O.has(I))),W=new Map,P=new Set,F=new Set;for(const q of k){P.add(q.experiment),F.add(q.target);const I=`${q.experiment}::${q.target}`,te=W.get(I)??{experiment:q.experiment,target:q.target,eval_count:0,passed_count:0,score_sum:0,tests:[]};te.eval_count+=q.eval_count,te.passed_count+=q.passed_count,te.score_sum+=q.avg_score*q.eval_count;for(const le of q.tests)te.tests.push(le);W.set(I,te)}const J=[...W.values()].map(q=>{const I=new Map;for(const te of q.tests)I.set(te.test_id,te);return{experiment:q.experiment,target:q.target,eval_count:q.eval_count,passed_count:q.passed_count,pass_rate:q.eval_count>0?q.passed_count/q.eval_count:0,avg_score:q.eval_count>0?q.score_sum/q.eval_count:0,tests:[...I.values()].slice(-100)}});return{...n,experiments:[...P].sort(),targets:[...F].sort(),cells:J,runs:k}},[n,p]),j=O=>{m(k=>k.includes(O)?k.filter(W=>W!==O):[...k,O])},N=()=>m([]),R=((B=S==null?void 0:S.runs)==null?void 0:B.length)??0,T=n&&n.cells.length>0,w=p.length>0&&S&&(((K=S.runs)==null?void 0:K.length)??0)===0;return u.jsxs("div",{className:"space-y-4",children:[u.jsx(q1,{mode:h,onModeChange:g,runsCount:R}),l&&u.jsx(W1,{}),!l&&i&&r&&u.jsx(J1,{message:`Failed to load comparison data: ${r.message}`}),!l&&!i&&!T&&u.jsx(I1,{}),!l&&!i&&T&&u.jsxs(u.Fragment,{children:[v.length>0&&u.jsx(B1,{allTags:v,tagCounts:x,selected:p,onToggle:j,onClear:N}),w?u.jsx(Uc,{headline:`No runs match ${p.map(O=>`\`${O}\``).join(" + ")}`,body:"Clear the filter or pick a different tag combination.",action:{label:"Clear filter",onClick:N}}):S&&u.jsxs(u.Fragment,{children:[h==="aggregated"&&u.jsx(Q1,{data:S}),h==="per-run"&&u.jsx(V1,{data:S,benchmarkId:o,readOnly:f??!1})]})]})]})}function B1({allTags:n,tagCounts:l,selected:i,onToggle:r,onClear:o}){const f=new Set(i),h=i.length>0;return u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Filter by tag"}),n.map(g=>{const p=f.has(g),m=l.get(g)??0;return u.jsxs("button",{type:"button",onClick:()=>r(g),"aria-pressed":p,className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors ${p?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300 hover:border-cyan-800/80":"border-gray-700 text-gray-400 hover:border-gray-600 hover:text-gray-200"}`,children:[u.jsx("span",{children:g}),u.jsx("span",{className:`rounded px-1 text-[0.65rem] tabular-nums ${p?"bg-cyan-900/50 text-cyan-200":"bg-gray-800 text-gray-500"}`,children:m})]},g)}),h&&u.jsx("button",{type:"button",onClick:o,className:"ml-1 text-xs text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear"})]}),u.jsxs("p",{className:"mt-2 text-xs text-gray-500",children:["Showing runs with ",u.jsx("span",{className:"text-gray-400",children:"any"})," selected tag."]})]})}function q1({mode:n,onModeChange:l,runsCount:i}){return u.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-semibold text-white",children:"Compare runs"}),u.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Study one experiment against another, or pit individual runs head-to-head."})]}),u.jsx(H1,{mode:n,onChange:l,runsCount:i})]})}function H1({mode:n,onChange:l,runsCount:i}){const r=i===0;return u.jsxs("div",{role:"tablist","aria-label":"Comparison view mode",className:"inline-flex items-center rounded-lg border border-gray-800 bg-gray-900/50 p-1",children:[u.jsx(Iy,{active:n==="aggregated",onClick:()=>l("aggregated"),children:"Aggregated"}),u.jsxs(Iy,{active:n==="per-run",onClick:()=>l("per-run"),disabled:r,title:r?"No runs available":void 0,children:["Per run",i>0&&u.jsx("span",{className:"ml-1.5 rounded bg-gray-800 px-1.5 py-0.5 text-xs tabular-nums text-gray-400",children:i})]})]})}function Iy({active:n,onClick:l,disabled:i,title:r,children:o}){return u.jsx("button",{type:"button",role:"tab","aria-selected":n,onClick:l,disabled:i,title:r,className:`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${n?"bg-gray-800 text-cyan-400 shadow-sm":"text-gray-400 hover:text-gray-200 disabled:text-gray-600 disabled:hover:text-gray-600"}`,children:o})}function Q1({data:n}){const{experiments:l,targets:i,cells:r}=n,o=Q.useMemo(()=>{const f=new Map;for(const h of r)f.set(`${h.experiment}::${h.target}`,h);return f},[r]);return l.length<=1&&i.length<=1?u.jsx(Uc,{headline:"Not enough variation to compare",body:`The aggregated matrix requires at least 2 experiments or 2 targets. Currently ${l.length} experiment(s) and ${i.length} target(s).`}):u.jsxs("div",{className:"space-y-3",children:[u.jsx(F1,{}),u.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:u.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Target ↓ / Experiment →"})}),l.map(f=>u.jsx("th",{className:"px-4 py-3 font-medium text-gray-300",children:f},f))]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(f=>u.jsx(Y1,{target:f,experiments:l,cellMap:o},f))})]})})]})}function Y1({target:n,experiments:l,cellMap:i}){return u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n}),l.map(r=>{const o=i.get(`${r}::${n}`);return u.jsx("td",{className:"px-4 py-3",children:o?u.jsx(G1,{cell:o}):u.jsx(k1,{})},r)})]})}function G1({cell:n}){const[l,i]=Q.useState(!1),r=Math.round(n.avg_score*100);return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("button",{type:"button",className:"group flex w-full flex-col gap-1 rounded-md border border-gray-800 bg-gray-900/40 px-3 py-2 text-left transition-colors hover:border-gray-700 hover:bg-gray-900/70",onClick:()=>i(o=>!o),"aria-expanded":l,children:[u.jsx($a,{rate:n.pass_rate}),u.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums text-gray-500",children:[u.jsxs("span",{children:[u.jsx("span",{className:"text-emerald-400",children:n.passed_count}),u.jsx("span",{className:"text-gray-600",children:" / "}),u.jsx("span",{children:n.eval_count})]}),u.jsx("span",{className:"text-gray-700",children:"·"}),u.jsxs("span",{children:["avg ",r,"%"]})]})]}),l&&u.jsx(K1,{tests:n.tests})]})}function k1(){return u.jsx("div",{className:"text-center text-gray-600",children:"—"})}function K1({tests:n}){return u.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[u.jsx("div",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Test cases"}),u.jsx("ul",{className:"space-y-1",children:n.map(l=>u.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[u.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${l.passed?"bg-emerald-400":"bg-red-400"}`}),u.jsx("span",{className:"flex-1 truncate text-gray-300",title:l.test_id,children:l.test_id}),u.jsxs("span",{className:`tabular-nums ${l.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(l.score*100),"%"]})]},l.test_id))})]})}function V1({data:n,benchmarkId:l,readOnly:i}){const r=n.runs??[],[o,f]=Q.useState(new Set),[h,g]=Q.useState(!1),[p,m]=Q.useState(null),v=j=>{f(N=>{const R=new Set(N);return R.has(j)?R.delete(j):R.add(j),R})},x=()=>f(new Set),S=Q.useMemo(()=>r.filter(j=>o.has(j.run_id)),[r,o]);return r.length===0?u.jsx(Uc,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):h&&S.length>=2?u.jsx(Z1,{runs:S,onBack:()=>g(!1)}):u.jsxs("div",{className:"space-y-3",children:[u.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-gray-300",children:r.length})," run",r.length===1?"":"s"," — select two or more to compare side-by-side"]})}),u.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tags"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass rate"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(j=>u.jsx(X1,{run:j,checked:o.has(j.run_id),onToggle:()=>v(j.run_id),editing:p===j.run_id,onStartEdit:()=>m(j.run_id),onEndEdit:()=>m(null),benchmarkId:l,readOnly:i},j.run_id))})]})}),o.size>0&&u.jsxs("div",{role:"toolbar","aria-label":"Selection actions",className:"sticky bottom-4 z-10 flex items-center justify-between gap-3 rounded-lg border border-cyan-900/50 bg-gray-900/95 px-4 py-3 shadow-xl backdrop-blur",children:[u.jsxs("div",{className:"text-sm text-gray-300",children:[u.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:o.size})," ","selected"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{type:"button",onClick:x,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),u.jsxs("button",{type:"button",disabled:o.size<2,onClick:()=>g(!0),className:"inline-flex items-center gap-1.5 rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:["Compare ",o.size,u.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function X1({run:n,checked:l,onToggle:i,editing:r,onStartEdit:o,onEndEdit:f,benchmarkId:h,readOnly:g}){const p=Math.round(n.avg_score*100),m=!g&&n.source!=="remote",v=Q.useRef(null),x=n.tags??[],S=x[0]??n.run_id,j=eN(n.run_id),N=Q.useRef(r);return Q.useEffect(()=>{var R;N.current&&!r&&((R=v.current)==null||R.focus()),N.current=r},[r]),u.jsxs(u.Fragment,{children:[u.jsxs("tr",{className:`transition-colors ${l?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[u.jsx("td",{className:"px-3 py-3 align-middle",children:u.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:l,onChange:i,"aria-label":`Select run ${S}`})}),u.jsxs("td",{className:"px-4 py-3 align-middle",title:n.run_id,children:[u.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:fp(n.started_at)}),j&&u.jsx("div",{className:"text-xs text-gray-500",children:j})]}),u.jsx("td",{className:"px-4 py-3 align-middle",children:m?u.jsx("button",{ref:v,type:"button",onClick:R=>{R.stopPropagation(),o()},className:x.length>0?"inline-flex flex-wrap items-center gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-gray-800/60":"rounded-md border border-dashed border-gray-700 px-2 py-0.5 text-xs text-gray-500 transition-colors hover:border-cyan-800 hover:text-cyan-400","aria-label":x.length>0?"Edit tags":"Add tags",children:x.length>0?x.map(R=>u.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:R},R)):u.jsx(u.Fragment,{children:"+ tags"})}):x.length>0?u.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:x.map(R=>u.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:R},R))}):u.jsx("span",{className:"text-gray-600",children:"—"})}),u.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:n.experiment}),u.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:n.target}),u.jsx("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:n.eval_count}),u.jsx("td",{className:"px-4 py-3 align-middle",children:u.jsx($a,{rate:n.pass_rate})}),u.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[p,"%"]})]}),r&&u.jsx("tr",{className:"bg-gray-950/80",children:u.jsx("td",{colSpan:8,className:"px-4 py-3",children:u.jsx($1,{runId:n.run_id,currentTags:x,benchmarkId:h,onClose:f})})})]})}function $1({runId:n,currentTags:l,benchmarkId:i,onClose:r}){const[o,f]=Q.useState(l),[h,g]=Q.useState(""),[p,m]=Q.useState(null),v=Za(),x=Q.useRef(null);Q.useEffect(()=>{var B;(B=x.current)==null||B.focus()},[]);const S=zd({mutationFn:()=>y1(n,o,i),onSuccess:()=>{v.invalidateQueries({queryKey:["compare"]}),v.invalidateQueries({queryKey:["runs"]}),i&&(v.invalidateQueries({queryKey:["benchmarks",i,"compare"]}),v.invalidateQueries({queryKey:["benchmarks",i,"runs"]})),r()},onError:B=>m(B.message)}),j=zd({mutationFn:()=>g1(n,i),onSuccess:()=>{v.invalidateQueries({queryKey:["compare"]}),v.invalidateQueries({queryKey:["runs"]}),i&&(v.invalidateQueries({queryKey:["benchmarks",i,"compare"]}),v.invalidateQueries({queryKey:["benchmarks",i,"runs"]})),r()},onError:B=>m(B.message)}),N=S.isPending||j.isPending,R=o.length!==l.length||o.some((B,K)=>B!==l[K]),T=()=>{const B=h.trim();if(B!==""){if(o.includes(B)){g("");return}f([...o,B]),g(""),m(null)}},w=B=>{f(o.filter(K=>K!==B))};return u.jsxs("div",{className:"space-y-2 rounded-md border border-gray-800 bg-gray-900/60 p-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Tag run"}),u.jsx("span",{className:"text-xs text-gray-500",children:"Multi-valued. Enter or comma adds; Backspace removes the last chip."})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-gray-700 bg-gray-950 px-2 py-1.5 focus-within:border-cyan-500 focus-within:ring-1 focus-within:ring-cyan-500",children:[o.map(B=>u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[B,u.jsx("button",{type:"button",onClick:()=>w(B),disabled:N,className:"text-cyan-500 transition-colors hover:text-cyan-200 disabled:opacity-50","aria-label":`Remove tag ${B}`,children:"×"})]},B)),u.jsx("input",{ref:x,type:"text",className:"flex-1 min-w-[140px] bg-transparent text-sm text-gray-100 placeholder:text-gray-600 focus:outline-none disabled:opacity-50",placeholder:o.length===0?"e.g. baseline, v2-prompt, slow":"Add tag…",value:h,onChange:B=>{m(null),g(B.target.value)},maxLength:60,disabled:N,onKeyDown:B=>{B.key==="Enter"||B.key===","?(B.preventDefault(),T()):B.key==="Backspace"&&h===""&&o.length>0?(B.preventDefault(),f(o.slice(0,-1))):B.key==="Escape"&&r()},onBlur:T})]}),u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx("button",{type:"button",onClick:r,disabled:N,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:opacity-50",children:"Cancel"}),l.length>0&&u.jsx("button",{type:"button",onClick:()=>{N||j.mutate()},disabled:N,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:opacity-50",children:"Clear all"}),u.jsx("button",{type:"button",disabled:!R||N,onClick:()=>{N||!R||S.mutate()},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:S.isPending?"Saving…":"Save"})]}),p&&u.jsx("div",{className:"rounded-md border border-red-900/60 bg-red-950/30 px-3 py-1.5 text-xs text-red-400",children:p})]})}function Z1({runs:n,onBack:l}){const i=Q.useMemo(()=>{const o=new Set,f=[];for(const h of n)for(const g of h.tests)o.has(g.test_id)||(o.add(g.test_id),f.push(g.test_id));return f},[n]),r=Q.useMemo(()=>n.map(o=>{const f=new Map;for(const h of o.tests)f.set(h.test_id,h);return f}),[n]);return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("button",{type:"button",onClick:l,className:"inline-flex items-center gap-1 text-sm text-cyan-400 transition-colors hover:text-cyan-300",children:[u.jsx("span",{"aria-hidden":!0,children:"←"})," Back to runs"]}),u.jsxs("span",{className:"text-sm text-gray-500",children:[n.length," runs · ",i.length," tests"]})]}),u.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsxs("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:[u.jsxs("tr",{children:[u.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-3 font-medium text-gray-400 backdrop-blur",children:"Test case"}),n.map(o=>u.jsx("th",{className:"px-4 py-3 align-bottom",children:u.jsx(P1,{run:o})},o.run_id))]}),u.jsxs("tr",{className:"border-t border-gray-800/50 bg-gray-900/30",children:[u.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-2 text-xs font-medium uppercase tracking-wider text-gray-500 backdrop-blur",children:"Pass rate"}),n.map(o=>u.jsx("th",{className:"px-4 py-2",children:u.jsx($a,{rate:o.pass_rate})},o.run_id))]})]}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(o=>u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"sticky left-0 z-10 bg-gray-950/70 px-4 py-3 font-medium text-gray-200 backdrop-blur",children:o}),r.map((f,h)=>{const g=f.get(o),p=n[h].run_id;return g?u.jsx("td",{className:"px-4 py-3",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${g.passed?"bg-emerald-400":"bg-red-400"}`}),u.jsxs("span",{className:`tabular-nums ${g.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(g.score*100),"%"]})]})},p):u.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},p)})]},o))})]})})]})}function P1({run:n}){const l=n.tags??[];return u.jsxs("div",{className:"min-w-[140px] space-y-1",children:[u.jsx("div",{className:"text-sm font-medium text-gray-200 tabular-nums",title:n.run_id,children:fp(n.started_at)}),l.length>0&&u.jsx("div",{className:"flex flex-wrap gap-1",children:l.map(i=>u.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-1.5 py-0.5 text-[0.7rem] font-medium text-cyan-300",children:i},i))}),u.jsxs("div",{className:"text-xs text-gray-500",children:[n.experiment," · ",n.target]})]})}function F1(){return u.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[u.jsx(pc,{className:"bg-emerald-400",label:"80%+"}),u.jsx(pc,{className:"bg-yellow-400",label:"50–80%"}),u.jsx(pc,{className:"bg-red-400",label:"< 50%"}),u.jsx(pc,{className:"bg-gray-700",label:"no data"})]})}function pc({className:n,label:l}){return u.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[u.jsx("span",{className:`h-2 w-2 rounded-full ${n}`,"aria-hidden":!0}),u.jsx("span",{children:l})]})}function J1({message:n}){return u.jsx("div",{className:"rounded-lg border border-red-900/60 bg-red-950/30 p-4 text-sm text-red-400",children:n})}function I1(){return u.jsx(Uc,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function Uc({headline:n,body:l,action:i}){return u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[u.jsx("p",{className:"text-lg text-gray-300",children:n}),u.jsx("p",{className:"mt-2 text-sm text-gray-500",children:l}),i&&u.jsx("button",{type:"button",onClick:i.onClick,className:"mt-4 inline-flex items-center rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:i.label})]})}function W1(){return u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:u.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>u.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[u.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},n))]})})}function fp(n){try{const l=new Date(n);if(Number.isNaN(l.getTime()))return n;const i=l.getFullYear(),r=String(l.getMonth()+1).padStart(2,"0"),o=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),h=String(l.getMinutes()).padStart(2,"0");return`${i}-${r}-${o} ${f}:${h}`}catch{return n}}function eN(n){const l=n.split("::");return l.length<2?null:l.slice(0,-1).join(" · ")}function tN(){const{data:n,isLoading:l}=ef();if(l)return u.jsx(aN,{});const i=(n==null?void 0:n.experiments)??[];return i.length===0?u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[u.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),u.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-3",children:u.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:r.name})}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.target_count}),u.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[u.jsx("span",{className:"text-emerald-400",children:r.passed_count}),u.jsx("span",{className:"text-gray-600",children:" / "}),r.eval_count]}),u.jsx("td",{className:"px-4 py-3",children:u.jsx($a,{rate:r.pass_rate})}),u.jsx("td",{className:"px-4 py-3 text-gray-400",title:Wy(r.last_run).full,children:Wy(r.last_run).date})]},r.name))})]})})}function Wy(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),f=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:f<24?h=`${f} hour${f===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function aN(){return u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:u.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>u.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[u.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},n))]})})}function nN(n){if(!n)return"No runs";const l=new Date(n);if(Number.isNaN(l.getTime()))return"N/A";const i=Date.now()-l.getTime(),r=Math.floor(i/6e4);if(r<1)return"Just now";if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function sN({project:n}){const l=Math.round(n.pass_rate*100);return u.jsxs(Ee,{to:"/projects/$benchmarkId",params:{benchmarkId:n.id},className:"group block rounded-lg border border-gray-800 bg-gray-900/50 p-5 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[u.jsx("div",{className:"flex items-start justify-between",children:u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:n.name}),u.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:n.path})]})}),u.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-3",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),u.jsx("p",{className:"text-lg font-semibold text-white",children:n.run_count})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),u.jsx("p",{className:`text-lg font-semibold ${n.run_count===0?"text-gray-500":l>=80?"text-emerald-400":l>=50?"text-yellow-400":"text-red-400"}`,children:n.run_count>0?`${l}%`:"--"})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),u.jsx("p",{className:"text-sm text-gray-300",children:nN(n.last_run)})]})]})]})}function Ss({open:n,onClose:l,benchmarkId:i,prefill:r}){const o=Za(),f=Xi(),[h,g]=Q.useState((r==null?void 0:r.suiteFilter)??""),[p,m]=Q.useState(""),[v,x]=Q.useState((r==null?void 0:r.testIds)??[]),[S,j]=Q.useState((r==null?void 0:r.target)??""),[N,R]=Q.useState(""),[T,w]=Q.useState(""),[B,K]=Q.useState(!1),[O,k]=Q.useState(!1),[W,P]=Q.useState(null),[F,J]=Q.useState(null),[q,I]=Q.useState(!1),[te,le]=Q.useState(null),{data:ce}=v1(i),{data:se}=S1(i),{data:z}=up(W),V=Q.useMemo(()=>(ce==null?void 0:ce.eval_files)??[],[ce]),ae=Q.useMemo(()=>(se==null?void 0:se.targets)??[],[se]);Q.useEffect(()=>{n&&(g((r==null?void 0:r.suiteFilter)??""),x((r==null?void 0:r.testIds)??[]),j((r==null?void 0:r.target)??""),m(""),R(""),w(""),K(!1),k(!1),P(null),J(null),I(!1),le(null))},[n,r]),Q.useEffect(()=>{((z==null?void 0:z.status)==="finished"||(z==null?void 0:z.status)==="failed")&&(o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["projects"]}))},[z==null?void 0:z.status,o]);const me=Q.useCallback(()=>{const Y={};return h.trim()&&(Y.suite_filter=h.trim()),v.length>0&&(Y.test_ids=v),S&&(Y.target=S),N&&(Y.threshold=Number.parseFloat(N)),T&&(Y.workers=Number.parseInt(T,10)),B&&(Y.dry_run=!0),Y},[h,v,S,N,T,B]);Q.useEffect(()=>{const Y=me();if(!Y.suite_filter&&(!Y.test_ids||Y.test_ids.length===0)){le(null);return}_1(Y,i).then(fe=>le(fe.command)).catch(()=>le(null))},[me,i]);function oe(){const Y=p.trim();Y&&!v.includes(Y)&&x([...v,Y]),m("")}function M(Y){x(v.filter(fe=>fe!==Y))}async function X(){J(null),I(!0);try{const Y=me(),fe=await j1(Y,i);P(fe.id)}catch(Y){J(Y.message)}finally{I(!1)}}if(!n)return null;if(W&&z){let Y=function(){l(),f({to:"/",search:{tab:"runs"}})};return u.jsx(eg,{onClose:l,title:"Eval Run",children:u.jsx(lN,{status:z,onClose:l,onRunInBackground:Y,runId:W})})}const ee=!!(h.trim()||v.length>0);return u.jsx(eg,{onClose:l,title:"Run Eval",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),u.jsx("input",{id:"suite-filter",type:"text",value:h,onChange:Y=>g(Y.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),V.length>0&&!h&&u.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-1",children:[V.slice(0,5).map(Y=>u.jsx("button",{type:"button",onClick:()=>g(fe=>fe?`${fe}, ${Y.relative_path}`:Y.relative_path),className:"rounded bg-gray-800 px-2 py-0.5 text-xs text-gray-400 hover:bg-gray-700 hover:text-gray-200",children:Y.relative_path},Y.relative_path)),V.length>5&&u.jsxs("span",{className:"px-1 text-xs text-gray-500",children:["+",V.length-5," more"]})]})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{id:"test-id-input",type:"text",value:p,onChange:Y=>m(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),oe())},placeholder:"auth-*, retrieval-basic",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),u.jsx("button",{type:"button",onClick:oe,disabled:!p.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),v.length>0&&u.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:v.map(Y=>u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[Y,u.jsx("button",{type:"button",onClick:()=>M(Y),className:"text-cyan-400 hover:text-white",children:"×"})]},Y))})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),u.jsxs("select",{id:"target-override",value:S,onChange:Y=>j(Y.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[u.jsx("option",{value:"",children:"Use eval's configured target"}),ae.map(Y=>u.jsx("option",{value:Y,children:Y},Y))]})]}),u.jsxs("div",{children:[u.jsxs("button",{type:"button",onClick:()=>k(!O),className:"text-sm text-gray-400 hover:text-gray-200",children:[O?"▾":"▸"," Advanced Options"]}),O&&u.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),u.jsx("input",{id:"threshold-input",type:"number",value:N,onChange:Y=>R(Y.target.value),min:"0",max:"1",step:"0.1",placeholder:"0.8",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),u.jsx("input",{id:"workers-input",type:"number",value:T,onChange:Y=>w(Y.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),u.jsx("div",{className:"col-span-2",children:u.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[u.jsx("input",{type:"checkbox",checked:B,onChange:Y=>K(Y.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),te&&u.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[u.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),u.jsx("code",{className:"block break-all text-xs text-cyan-300",children:te})]}),F&&u.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:F}),u.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[u.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),u.jsx("button",{type:"button",onClick:X,disabled:!ee||q,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:q?"Launching…":"Run Now"})]})]})})}function eg({children:n,onClose:l,title:i}){return u.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:u.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[u.jsx("h2",{className:"text-lg font-semibold text-white",children:i}),u.jsx("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-white",children:"✕"})]}),u.jsx("div",{className:"px-5 py-4",children:n})]})})}function lN({status:n,onClose:l,onRunInBackground:i,runId:r}){const o=n.status==="finished"||n.status==="failed",f={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:`text-sm font-medium ${f[n.status]??"text-gray-400"}`,children:[n.status==="running"&&"●"," ",n.status.charAt(0).toUpperCase()+n.status.slice(1)]}),!o&&u.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),u.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:u.jsx("code",{className:"block break-all text-xs text-cyan-300",children:n.command})}),n.stdout&&u.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:n.stdout.slice(-3e3)})}),n.stderr&&u.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:n.stderr.slice(-2e3)})}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-xs text-gray-500",children:o?u.jsxs(u.Fragment,{children:["Exit code: ",n.exit_code,n.finished_at&&` · ${new Date(n.finished_at).toLocaleTimeString()}`]}):r&&u.jsx("button",{type:"button",onClick:i,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),o&&u.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function iN(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),f=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:f<24?h=`${f} hour${f===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function rN(n){const l=[n.target,n.experiment].filter(i=>i&&i!=="default"&&i!=="-");return l.length>0?l.join(" · "):n.target?n.target:n.display_name??n.filename}function nf({runs:n,benchmarkId:l,emptyMessage:i}){const{data:r}=ht(),o=(r==null?void 0:r.threshold)??Ac;return n.length===0?u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:i??u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),u.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",u.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"w-8 px-4 py-3"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Run"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failed"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(f=>{const h=iN(f.timestamp),g=f.pass_rate>=o,p=rN(f),m=Math.round(f.pass_rate*f.test_count),v=f.test_count-m;return u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-3 text-center",children:u.jsx("span",{className:`text-base font-bold ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"})}),u.jsx("td",{className:"px-4 py-3",children:l?u.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:l,runId:f.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p}):u.jsx(Ee,{to:"/runs/$runId",params:{runId:f.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p})}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:m}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:v>0?v:u.jsx("span",{className:"text-gray-600",children:"0"})}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:f.test_count}),u.jsx("td",{className:"px-4 py-3",children:u.jsx($a,{rate:f.pass_rate})}),u.jsx("td",{className:"px-4 py-3 text-gray-400",title:h.full,children:h.date})]},f.filename)})})]})})}function cN(n){if(!n)return"Never synced";const l=new Date(n);return Number.isNaN(l.getTime())?"Never synced":`Last synced ${l.toLocaleString()}`}function hp({filter:n,onFilterChange:l,remoteStatus:i,syncInFlight:r,onSync:o}){const f=(i==null?void 0:i.configured)===!0,h=f&&(i==null?void 0:i.available)!==!0;return u.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsx("div",{className:"flex flex-wrap items-center gap-2",children:["all","local","remote"].map(g=>{const p=g==="remote"&&!f;return u.jsx("button",{type:"button",onClick:()=>l(g),title:p?"Remote results are not configured":void 0,className:`rounded-full px-3 py-1 text-sm font-medium transition-colors ${n===g?"bg-cyan-500/20 text-cyan-300":p?"bg-gray-800 text-gray-600":"bg-gray-800 text-gray-400 hover:text-gray-200"}`,children:g==="all"?"All Sources":g==="local"?"Local Only":"Remote Only"},g)})}),f&&o?u.jsx("button",{type:"button",onClick:o,disabled:r,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:r?"Syncing…":"Sync Remote Results"}):null]}),f?u.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-gray-400",children:[u.jsx("span",{children:cN(i==null?void 0:i.last_synced_at)}),i!=null&&i.repo?u.jsxs("span",{children:["Repo: ",i.repo]}):null,h?u.jsx("span",{className:"text-yellow-400",children:"Remote cache unavailable"}):null]}):n==="all"?u.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",u.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results.export"})," to"," ",u.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}):null,i!=null&&i.last_error?u.jsx("div",{className:"rounded-md border border-yellow-900/50 bg-yellow-950/20 px-3 py-2 text-sm text-yellow-300",children:i.last_error}):null]})}function uN(){const{data:n,isLoading:l}=e1();if(l)return u.jsx(oN,{});const i=(n==null?void 0:n.targets)??[];return i.length===0?u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[u.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),u.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:r.name}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.experiment_count}),u.jsx("td",{className:"px-4 py-3",children:u.jsx($a,{rate:r.pass_rate})}),u.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[u.jsx("span",{className:"text-emerald-400",children:r.passed_count}),u.jsx("span",{className:"text-gray-600",children:"/"}),u.jsx("span",{children:r.eval_count})]})]},r.name))})]})})}function oN(){return u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("div",{className:"animate-pulse",children:[u.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:u.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>u.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[u.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),u.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},n))]})})}const tg=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"compare",label:"📊 Compare"},{id:"targets",label:"🤖 Targets"}],dN=ra("/")({component:fN});function fN(){const{data:n,isLoading:l}=tf(),{data:i,isLoading:r}=ht(),o=((n==null?void 0:n.projects.length)??0)>0,f=i==null?void 0:i.multi_project_dashboard;return l||r?u.jsx(mp,{}):f===!0||f===void 0&&o?u.jsx(hN,{}):u.jsx(mN,{})}function hN(){const{data:n}=tf(),{data:l}=ht(),i=Za(),[r,o]=Q.useState(""),[f,h]=Q.useState(""),[g,p]=Q.useState(null),[m,v]=Q.useState(!1),[x,S]=Q.useState(!1),j=(n==null?void 0:n.projects)??[],N=(l==null?void 0:l.read_only)===!0;async function R(w){if(w.preventDefault(),!!r.trim()){p(null);try{await i1(r.trim()),o(""),v(!1),i.invalidateQueries({queryKey:["benchmarks"]})}catch(B){p(B.message)}}}async function T(w){if(w.preventDefault(),!!f.trim()){p(null);try{const B=await r1(f.trim());h(""),B.length===0&&p("No projects with .agentv/ found in that directory."),i.invalidateQueries({queryKey:["benchmarks"]})}catch(B){p(B.message)}}}return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Benchmarks"}),u.jsx("div",{className:"flex gap-2",children:!N&&u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",onClick:()=>S(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),u.jsx("button",{type:"button",onClick:()=>v(!m),className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:m?"Cancel":"Add Benchmark"})]})})]}),g&&u.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-3 text-sm text-red-400",children:g}),!N&&m&&u.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[u.jsxs("form",{onSubmit:R,className:"flex gap-2",children:[u.jsx("input",{type:"text",value:r,onChange:w=>o(w.target.value),placeholder:"Benchmark path (e.g., /home/user/projects/my-evals)",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),u.jsx("button",{type:"submit",className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:"Add"})]}),u.jsxs("form",{onSubmit:T,className:"flex gap-2",children:[u.jsx("input",{type:"text",value:f,onChange:w=>h(w.target.value),placeholder:"Discover benchmarks in directory...",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),u.jsx("button",{type:"submit",className:"rounded-md bg-gray-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-gray-600",children:"Discover"})]})]}),u.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(w=>u.jsx(sN,{project:w},w.id))}),!N&&u.jsx(Ss,{open:x,onClose:()=>S(!1)})]})}function mN(){const i=ap().location.search.tab,r=Xi(),o=Za(),{data:f,isLoading:h,error:g}=Wd(),{data:p}=ip(),{data:m}=ht(),[v,x]=Q.useState(!1),[S,j]=Q.useState("all"),[N,R]=Q.useState(!1),T=(m==null?void 0:m.read_only)===!0,w=tg.some(O=>O.id===i)?i:"experiments",B=S==="all"?(f==null?void 0:f.runs)??[]:((f==null?void 0:f.runs)??[]).filter(O=>O.source===S);async function K(){R(!0);try{await cp(),await Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["experiments"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})])}finally{R(!1)}}return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(m==null?void 0:m.project_name)&&u.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:m.project_name})]}),!T&&u.jsx("button",{type:"button",onClick:()=>x(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),u.jsx("div",{className:"border-b border-gray-800",children:u.jsx("div",{className:"flex gap-1",children:tg.map(O=>u.jsx("button",{type:"button",onClick:()=>r({to:"/",search:{tab:O.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${w===O.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:O.label},O.id))})}),w==="runs"&&u.jsx(gN,{runs:B,isLoading:h,error:g,sourceFilter:S,onSourceFilterChange:j,remoteStatus:p,syncInFlight:N,onSyncRemote:K}),w==="experiments"&&u.jsx(tN,{}),w==="compare"&&u.jsx(yN,{readOnly:T}),w==="targets"&&u.jsx(uN,{}),!T&&u.jsx(Ss,{open:v,onClose:()=>x(!1)})]})}function yN({readOnly:n}){const{data:l,isLoading:i,isError:r,error:o}=Wj();return u.jsx(dp,{data:l,isLoading:i,isError:r,error:o,readOnly:n})}function gN({runs:n,isLoading:l,error:i,sourceFilter:r,onSourceFilterChange:o,remoteStatus:f,syncInFlight:h,onSyncRemote:g}){return l?u.jsx(mp,{}):i?u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",i.message]}):u.jsxs("div",{className:"space-y-4",children:[u.jsx(pN,{}),u.jsx(hp,{filter:r,onFilterChange:o,remoteStatus:f,syncInFlight:h,onSync:g}),u.jsx(nf,{runs:n,emptyMessage:r==="remote"?f!=null&&f.configured?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"text-lg text-gray-400",children:"No remote runs found."}),u.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Sync remote results or run an eval with"," ",u.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"auto_push: true"})," ","in your config."]})]}):u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"text-lg text-gray-400",children:"Remote results are not configured."}),u.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Add"," ",u.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"results.export"})," ","to"," ",u.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:".agentv/config.yaml"})," ","to enable remote result syncing."]})]}):void 0})]})}function pN(){const{data:n}=op(),l=((n==null?void 0:n.runs)??[]).filter(i=>i.status==="starting"||i.status==="running");return l.length===0?null:u.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[u.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:u.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),u.jsx("ul",{className:"divide-y divide-gray-800/50",children:l.map(i=>u.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),u.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:i.id}),u.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(i.started_at).toLocaleTimeString()})]}),u.jsx(Ee,{to:"/jobs/$runId",params:{runId:i.id},className:"ml-4 flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},i.id))})]})}function mp(){return u.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(n=>u.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},n))})}function Oc({total:n,passed:l,failed:i,passRate:r,totalCost:o}){const f=Math.round(r*100),h=f>=80?"text-cyan-400":f>=60?"text-amber-400":"text-red-400";return u.jsxs("div",{className:"flex flex-wrap items-center gap-6 rounded-lg border border-gray-800 bg-gray-900/60 px-5 py-3",children:[u.jsx(wi,{label:"Pass Rate",value:`${f}%`,accent:h,large:!0}),u.jsx("div",{className:"h-6 w-px bg-gray-700"}),u.jsx(wi,{label:"Passed",value:String(l),accent:"text-emerald-400"}),u.jsx(wi,{label:"Failed",value:String(i),accent:"text-red-400"}),u.jsx(wi,{label:"Total",value:String(n)}),o!==void 0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"h-6 w-px bg-gray-700"}),u.jsx(wi,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function wi({label:n,value:l,accent:i,large:r}){return u.jsxs("div",{className:"flex flex-col",children:[u.jsx("span",{className:"text-xs text-gray-500",children:n}),u.jsx("span",{className:`tabular-nums font-semibold ${r?"text-2xl":"text-lg"} ${i??"text-white"}`,children:l})]})}function xN(n,l){const i=new Map;for(const r of n){const o=r.category??"Uncategorized",f=r.suite??"Uncategorized";i.has(o)||i.set(o,new Map);const h=i.get(o),g=h.get(f)??{passed:0,failed:0,total:0,scoreSum:0};g.total+=1,g.scoreSum+=r.score,Xa(r.score,l)?g.passed+=1:g.failed+=1,h.set(f,g)}return Array.from(i.entries()).map(([r,o])=>{const f=Array.from(o.entries()).map(([v,x])=>({name:v,...x,avgScore:x.total>0?x.scoreSum/x.total:0})).sort((v,x)=>v.name.localeCompare(x.name)),h=f.reduce((v,x)=>v+x.total,0),g=f.reduce((v,x)=>v+x.passed,0),p=f.reduce((v,x)=>v+x.failed,0),m=f.reduce((v,x)=>v+x.avgScore*x.total,0);return{name:r,suites:f,total:h,passed:g,failed:p,avgScore:h>0?m/h:0}}).sort((r,o)=>r.name.localeCompare(o.name))}function yp({results:n,runId:l,benchmarkId:i}){const{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,f=n.length,h=n.filter(x=>Xa(x.score,o)).length,g=f-h,p=f>0?h/f:0,m=n.reduce((x,S)=>x+(S.costUsd??0),0),v=xN(n,o);return f===0?u.jsxs("div",{className:"space-y-6",children:[u.jsx(Oc,{total:0,passed:0,failed:0,passRate:0}),u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[u.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),u.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):u.jsxs("div",{className:"space-y-6",children:[u.jsx(Oc,{total:f,passed:h,failed:g,passRate:p,totalCost:m>0?m:void 0}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),u.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),u.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),u.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failed"}),u.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:v.map(x=>u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-2.5 font-medium text-gray-200",children:x.name}),u.jsx("td",{className:"px-4 py-2.5",children:u.jsx($a,{rate:x.total>0?x.passed/x.total:0})}),u.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:x.passed}),u.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:x.failed>0?x.failed:u.jsx("span",{className:"text-gray-600",children:"0"})}),u.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:x.total})]},x.name))})]})})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"All Evals"}),u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"w-8 px-4 py-3"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),u.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map((x,S)=>{const j=x.executionStatus==="execution_error",N=Xa(x.score,o);return u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-3 text-center",children:j?u.jsx("span",{className:"text-base font-bold text-red-400",children:"!"}):u.jsx("span",{className:`text-base font-bold ${N?"text-emerald-400":"text-red-400"}`,children:N?"✓":"✗"})}),u.jsx("td",{className:"px-4 py-3",children:i?u.jsx(Ee,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:i,runId:l,evalId:x.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.testId}):u.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:l,evalId:x.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.testId})}),u.jsx("td",{className:"px-4 py-3 text-gray-400",children:x.target??"-"}),u.jsx("td",{className:"px-4 py-3",children:j?u.jsx("span",{className:"inline-flex rounded-full bg-red-900/50 px-2 py-0.5 text-xs font-medium text-red-400",children:"ERR"}):u.jsx($a,{rate:x.score})}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.durationMs!=null?`${(x.durationMs/1e3).toFixed(1)}s`:"-"}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.costUsd!=null?`$${x.costUsd.toFixed(4)}`:"-"})]},`${x.testId}-${S}`)})})]})})]})]})}const gp=ra("/runs/$runId")({component:vN});function vN(){var R;const{runId:n}=gp.useParams(),{data:l,isLoading:i,error:r}=$i(n),{data:o}=ht(),[f,h]=Q.useState(!1),g=(o==null?void 0:o.read_only)===!0;if(i)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(T=>u.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},T))})]});if(r)return u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",r.message]});const p=(R=l==null?void 0:l.results)==null?void 0:R[0],m=p==null?void 0:p.target,v=p==null?void 0:p.experiment,x=p==null?void 0:p.timestamp,S=m?{target:m}:void 0,j=(()=>{const T=[v,m].filter(w=>w&&w!=="default");return T.length>0?T.join(" · "):n})(),N=[m,v&&v!=="default"?v:null,x?new Date(x).toLocaleString():null,l==null?void 0:l.source].filter(Boolean).join(" · ");return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:j}),u.jsx("p",{className:"mt-1 text-sm text-gray-500",children:N})]}),!g&&u.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),u.jsx(yp,{results:(l==null?void 0:l.results)??[],runId:n}),!g&&u.jsx(Ss,{open:f,onClose:()=>h(!1),prefill:S})]})}const ag=[{id:"runs",label:"Recent Runs"},{id:"experiments",label:"Experiments"},{id:"compare",label:"Compare"},{id:"targets",label:"Targets"}],pp=ra("/projects/$benchmarkId")({component:bN});function bN(){const{benchmarkId:n}=pp.useParams(),r=ap().location.search.tab,o=Xi(),[f,h]=Q.useState(!1),{data:g}=ht(),p=(g==null?void 0:g.read_only)===!0,m=ag.some(v=>v.id===r)?r:"experiments";return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),!p&&u.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),u.jsx("div",{className:"border-b border-gray-800",children:u.jsx("div",{className:"flex gap-1",children:ag.map(v=>u.jsx("button",{type:"button",onClick:()=>o({to:"/projects/$benchmarkId",params:{benchmarkId:n},search:{tab:v.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${m===v.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:v.label},v.id))})}),m==="runs"&&u.jsx(SN,{benchmarkId:n}),m==="experiments"&&u.jsx(jN,{benchmarkId:n}),m==="compare"&&u.jsx(NN,{benchmarkId:n,readOnly:p}),m==="targets"&&u.jsx(RN,{benchmarkId:n}),!p&&u.jsx(Ss,{open:f,onClose:()=>h(!1),benchmarkId:n})]})}function SN({benchmarkId:n}){const l=Za(),{data:i,isLoading:r,error:o}=rp(n),{data:f}=ip(n),[h,g]=Q.useState("all"),[p,m]=Q.useState(!1),v=h==="all"?(i==null?void 0:i.runs)??[]:((i==null?void 0:i.runs)??[]).filter(S=>S.source===h);async function x(){m(!0);try{await cp(n),await Promise.all([l.invalidateQueries({queryKey:["benchmarks",n,"runs"]}),l.invalidateQueries({queryKey:["benchmarks",n,"experiments"]}),l.invalidateQueries({queryKey:["benchmarks",n,"compare"]}),l.invalidateQueries({queryKey:["benchmarks",n,"targets"]}),l.invalidateQueries({queryKey:["remote-status",n]})])}finally{m(!1)}}return r?u.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(S=>u.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},S))}):o?u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",o.message]}):u.jsxs("div",{className:"space-y-4",children:[u.jsx(hp,{filter:h,onFilterChange:g,remoteStatus:f,syncInFlight:p,onSync:x}),u.jsx(nf,{runs:v,benchmarkId:n})]})}function jN({benchmarkId:n}){const{data:l,isLoading:i}=Ke(f1(n)),r=(l==null?void 0:l.experiments)??[];return i?u.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>u.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:u.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"})}):u.jsx("div",{className:"space-y-2",children:r.map(o=>u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"font-medium text-white",children:o.name}),u.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""]})]}),u.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}function NN({benchmarkId:n,readOnly:l}){const{data:i,isLoading:r,isError:o,error:f}=Ke(h1(n));return u.jsx(dp,{data:i,isLoading:r,isError:o,error:f,benchmarkId:n,readOnly:l})}function RN({benchmarkId:n}){const{data:l,isLoading:i}=Ke(m1(n)),r=(l==null?void 0:l.targets)??[];return i?u.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>u.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:u.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"})}):u.jsx("div",{className:"space-y-2",children:r.map(o=>u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"font-medium text-white",children:o.name}),u.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""," · ",o.experiment_count," ","experiment",o.experiment_count!==1?"s":""]})]}),u.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}const xp=ra("/jobs/$runId")({component:_N});function _N(){const{runId:n}=xp.useParams(),{data:l,isLoading:i,error:r}=up(n);if(i)return u.jsxs("div",{className:"space-y-4",children:[u.jsx(xd,{}),u.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(r||!l)return u.jsxs("div",{className:"space-y-4",children:[u.jsx(xd,{}),u.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:r?`Failed to load run: ${r.message}`:"Run not found."})]});const o=l.status==="finished"||l.status==="failed",h={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"}[l.status]??"text-gray-400";return u.jsxs("div",{className:"space-y-4",children:[u.jsx(xd,{}),u.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:n}),u.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(l.started_at).toLocaleString(),l.finished_at&&u.jsxs(u.Fragment,{children:[" · ","Finished ",new Date(l.finished_at).toLocaleString()," · ",Math.round((new Date(l.finished_at).getTime()-new Date(l.started_at).getTime())/1e3),"s"]})]})]}),u.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[u.jsx("span",{className:`text-sm font-medium ${h}`,children:l.status.charAt(0).toUpperCase()+l.status.slice(1)}),!o&&u.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})]}),u.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[u.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),u.jsx("code",{className:"break-all text-xs text-cyan-300",children:l.command})]}),l.stdout?u.jsxs("div",{children:[u.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),u.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:u.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:l.stdout})})]}):!o&&u.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[u.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),l.stderr&&u.jsxs("div",{children:[u.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),u.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:u.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:l.stderr})})]}),o&&u.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",u.jsx("span",{className:l.exit_code===0?"text-emerald-400":"text-red-400",children:l.exit_code})]})]})}function xd(){return u.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const vp=ra("/experiments/$experimentName")({component:EN});function EN(){var x;const{experimentName:n}=vp.useParams(),{data:l,isLoading:i}=ef(),{data:r,isLoading:o}=Wd();if(i||o)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(S=>u.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},S))})]});const h=(x=l==null?void 0:l.experiments)==null?void 0:x.find(S=>S.name===n),g=(r==null?void 0:r.runs)??[],p=(h==null?void 0:h.pass_rate)??0,m=(h==null?void 0:h.run_count)??0,v=(h==null?void 0:h.target_count)??0;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),u.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[m," run",m!==1?"s":""," · ",v," target",v!==1?"s":"",(h==null?void 0:h.last_run)&&u.jsxs("span",{className:"ml-2",children:["· Last run: ",ng(h.last_run)]})]})]}),h&&u.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[u.jsx(xc,{label:"Runs",value:String(m)}),u.jsx(xc,{label:"Targets",value:String(v)}),u.jsx(xc,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),u.jsx(xc,{label:"Last Run",value:ng(h.last_run)})]}),u.jsxs("div",{children:[u.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),u.jsx(nf,{runs:g})]})]})}function xc({label:n,value:l,accent:i}){return u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[u.jsx("p",{className:"text-sm text-gray-400",children:n}),u.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${i??"text-white"}`,children:l})]})}function ng(n){if(!n)return"N/A";try{const l=new Date(n);return Number.isNaN(l.getTime())?"N/A":l.toLocaleString()}catch{return"N/A"}}async function TN(n,l){const i=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:n,comment:l}]})});if(!i.ok)throw new Error(`Failed to save feedback: ${i.status}`);return i.json()}function MN({testId:n}){var v;const{data:l}=Ij(),i=Za(),r=(v=l==null?void 0:l.reviews)==null?void 0:v.find(x=>x.test_id===n),[o,f]=Q.useState((r==null?void 0:r.comment)??""),[h,g]=Q.useState(!1);Q.useEffect(()=>{f((r==null?void 0:r.comment)??""),g(!1)},[r==null?void 0:r.comment]);const p=zd({mutationFn:()=>TN(n,o),onSuccess:()=>{i.invalidateQueries({queryKey:["feedback"]}),g(!0),setTimeout(()=>g(!1),2e3)}}),m=Q.useCallback(()=>{p.mutate()},[p]);return u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[u.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),u.jsx("textarea",{value:o,onChange:x=>{f(x.target.value),g(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),u.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[u.jsx("button",{type:"button",onClick:m,disabled:p.isPending,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:p.isPending?"Saving...":"Save Feedback"}),h&&u.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),p.isError&&u.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function CN(n){var i;switch((i=n.split(".").pop())==null?void 0:i.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function bp(n){const l=[];for(const i of n)i.type==="dir"&&(l.push(i.path),i.children&&l.push(...bp(i.children)));return l}function Sp({node:n,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:f=0}){const h=n.type==="dir",g=r.has(n.path),p=l===n.path;return u.jsxs("div",{children:[u.jsxs("button",{type:"button",onClick:()=>{h?o(n.path):i(n.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${p?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${f*16+8}px`},children:[u.jsx("span",{className:"flex-shrink-0 text-xs",children:h?g?"📂":"📁":CN(n.name)}),u.jsx("span",{className:"truncate",children:n.name})]}),h&&g&&n.children&&u.jsx("div",{children:n.children.map(m=>u.jsx(Sp,{node:m,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:f+1},m.path))})]})}function wN({files:n,selectedPath:l,onSelect:i}){const[r,o]=Q.useState(()=>new Set(bp(n))),f=h=>{o(g=>{const p=new Set(g);return p.has(h)?p.delete(h):p.add(h),p})};return u.jsxs("div",{className:"w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[n.length===0&&u.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),n.map(h=>u.jsx(Sp,{node:h,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:f},h.path))]})}const AN="modulepreload",ON=function(n){return"/"+n},sg={},zN=function(l,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),p=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));o=h(i.map(m=>{if(m=ON(m),m in sg)return;sg[m]=!0;const v=m.endsWith(".css"),x=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const S=document.createElement("link");if(S.rel=v?"stylesheet":AN,v||(S.as="script"),S.crossOrigin="",S.href=m,p&&S.setAttribute("nonce",p),document.head.appendChild(S),v)return new Promise((j,N)=>{S.addEventListener("load",j),S.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function f(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return o.then(h=>{for(const g of h||[])g.status==="rejected"&&f(g.reason);return l().catch(f)})},DN=Q.lazy(()=>zN(()=>import("./index-CEDEXdPp.js"),[]));function LN({value:n,language:l="json",height:i="400px"}){return u.jsx(Q.Suspense,{fallback:u.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:u.jsx(DN,{height:i,language:l,value:n,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function Hd({score:n,className:l=""}){const i=Math.round(Math.max(0,Math.min(1,n))*100);return u.jsxs("div",{className:`flex items-center gap-3 ${l}`,children:[u.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:u.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${i}%`}})}),u.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[i,"%"]})]})}function jp(n){for(const l of n){if(l.type==="file")return l.path;if(l.children){const i=jp(l.children);if(i)return i}}return null}function Np({eval:n,runId:l,benchmarkId:i}){const[r,o]=Q.useState("checks"),{data:f}=ht(),h=(f==null?void 0:f.read_only)===!0,g=[{id:"checks",label:"Checks"},{id:"files",label:"Files"},...h?[]:[{id:"feedback",label:"Feedback"}]];return u.jsxs("div",{className:"flex min-h-full flex-col",children:[u.jsx("div",{className:"flex items-start justify-between border-b border-gray-800 px-4 py-3",children:u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-medium",children:n.testId}),u.jsxs("p",{className:"mt-0.5 text-sm text-gray-400",children:[n.target&&u.jsxs("span",{children:["Target: ",n.target]}),n.durationMs!=null&&u.jsxs("span",{className:"ml-4",children:[(n.durationMs/1e3).toFixed(1),"s"]}),n.costUsd!=null&&u.jsxs("span",{className:"ml-4",children:["$",n.costUsd.toFixed(4)]})]})]})}),u.jsx("div",{className:"border-b border-gray-800",children:u.jsx("div",{className:"flex gap-1 px-4",children:g.map(p=>u.jsx("button",{type:"button",onClick:()=>o(p.id),className:`px-4 py-2 text-sm font-medium transition-colors ${r===p.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:p.label},p.id))})}),u.jsxs("div",{className:"min-h-0 flex-1",children:[r==="checks"&&u.jsx("div",{className:"overflow-auto p-4",children:u.jsx(UN,{result:n})}),r==="files"&&u.jsx("div",{className:"h-full p-4",children:u.jsx(BN,{result:n,runId:l,benchmarkId:i})}),!h&&r==="feedback"&&u.jsx("div",{className:"p-4",children:u.jsx(MN,{testId:n.testId})})]})]})}function lg({assertion:n}){return u.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${n.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[u.jsx("span",{className:`mt-0.5 text-lg ${n.passed?"text-emerald-400":"text-red-400"}`,children:n.passed?"✓":"✗"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("p",{className:"text-sm text-gray-200",children:[n.text,n.durationMs!=null&&u.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(n.durationMs/1e3).toFixed(1),"s)"]})]}),n.evidence&&u.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n.evidence})]})]})}function UN({result:n}){const{data:l}=ht(),i=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,r=!Xa(n.score,i)||n.executionStatus==="error"||n.executionStatus==="failed",o=(n.scores??[]).filter(m=>Array.isArray(m.assertions)&&m.assertions.length>0),f=o.length>0,h=n.assertions??[],g=[];n.error&&g.push(n.error),(n.executionStatus==="error"||n.executionStatus==="failed")&&g.push(`Execution status: ${n.executionStatus}`);const p=f?o.flatMap(m=>m.assertions):h;for(const m of p.filter(v=>!v.passed)){const v=m.evidence?`${m.text}: ${m.evidence}`:m.text;g.push(v)}if(n.scores){for(const m of n.scores)if(!Xa(m.score,i)&&m.details){const v=typeof m.details=="string"?m.details:JSON.stringify(m.details,null,2);g.push(`[${m.name??m.type??"evaluator"}] ${v}`)}}return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),u.jsx("div",{className:"flex-1",children:u.jsx(Hd,{score:n.score})})]})}),n.scores&&n.scores.length>0&&u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[u.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Evaluator Scores"}),u.jsx("div",{className:"space-y-3",children:n.scores.map((m,v)=>u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:m.name??m.type??`Score ${v+1}`}),u.jsx("div",{className:"flex-1",children:u.jsx(Hd,{score:m.score})})]},`${m.name??m.type??v}`))})]}),f?u.jsx("div",{className:"space-y-6",children:o.map((m,v)=>{const x=m.name??m.type??`Evaluator ${v+1}`;return u.jsxs("div",{className:"space-y-2",children:[u.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:x}),m.assertions.map((S,j)=>u.jsx(lg,{assertion:S},`${S.text}-${j}`))]},`${m.name??m.type??v}`)})}):h.length>0?u.jsx("div",{className:"space-y-2",children:h.map((m,v)=>u.jsx(lg,{assertion:m},`${m.text}-${v}`))}):u.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),r&&g.length>0&&u.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[u.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),u.jsx("div",{className:"space-y-2",children:g.map(m=>u.jsx("p",{className:"text-sm text-gray-300",children:m},m))})]})]})}function BN({result:n,runId:l,benchmarkId:i}){const r=n.testId,{data:o}=i?Ke(o1(i,l,r)):t1(l,r),f=(o==null?void 0:o.files)??[],[h,g]=Q.useState(null),p=h??(f.length>0?jp(f):null),{data:m,isLoading:v}=i?Ke(d1(i,l,r,p??"")):a1(l,r,p??"");if(f.length===0)return u.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const x=p?v?"Loading...":(m==null?void 0:m.content)??"":"",S=p?(m==null?void 0:m.language)??"plaintext":"plaintext";return u.jsxs("div",{className:"flex h-full min-h-[400px] gap-4",children:[u.jsx(wN,{files:f,selectedPath:p,onSelect:g}),u.jsx("div",{className:"flex-1",children:u.jsx(LN,{value:x,language:S,height:"100%"})})]})}const Rp=ra("/evals/$runId/$evalId")({component:qN});function qN(){const{runId:n,evalId:l}=Rp.useParams(),{data:i,isLoading:r,error:o}=$i(n),{data:f}=ht(),[h,g]=Q.useState(!1),p=(f==null?void 0:f.read_only)===!0;if(r)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(o)return u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",o.message]});const m=i==null?void 0:i.results.find(v=>v.testId===l);return m?u.jsxs("div",{className:"flex h-full flex-col gap-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",n," / Eval: ",l]}),u.jsx("h1",{className:"text-2xl font-semibold text-white",children:l})]}),!p&&u.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),u.jsx(Np,{eval:m,runId:n}),!p&&u.jsx(Ss,{open:h,onClose:()=>g(!1),prefill:{testIds:[l],target:m.target}})]}):u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:u.jsxs("p",{className:"text-gray-400",children:["Eval ",u.jsx("code",{className:"text-cyan-400",children:l})," not found in run"," ",u.jsx("code",{className:"text-cyan-400",children:n}),"."]})})}const _p=ra("/runs/$runId_/suite/$suite")({component:HN});function HN(){const{runId:n,suite:l}=_p.useParams(),{data:i,isLoading:r,error:o}=$i(n),{data:f}=ht(),h=(f==null?void 0:f.threshold)??(f==null?void 0:f.pass_threshold)??.8;if(r)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(j=>u.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},j))})]});if(o)return u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const g=((i==null?void 0:i.results)??[]).filter(j=>(j.suite??"Uncategorized")===l),p=g.length,m=g.filter(j=>Xa(j.score,h)).length,v=p-m,x=p>0?m/p:0,S=g.reduce((j,N)=>j+(N.costUsd??0),0);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),u.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",n]})]}),u.jsx(Oc,{total:p,passed:m,failed:v,passRate:x,totalCost:S>0?S:void 0}),p===0?u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:u.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):u.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),u.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),u.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),u.jsx("tbody",{className:"divide-y divide-gray-800/50",children:g.map((j,N)=>u.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[u.jsx("td",{className:"px-4 py-3",children:u.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:j.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:j.testId})}),u.jsx("td",{className:"px-4 py-3 text-gray-400",children:j.target??"-"}),u.jsx("td",{className:"px-4 py-3",children:j.executionStatus==="execution_error"?u.jsx("span",{className:"inline-flex rounded-full px-2 py-0.5 text-xs font-medium bg-red-900/50 text-red-400",children:"ERR"}):u.jsx($a,{rate:j.score})}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.durationMs!=null?`${(j.durationMs/1e3).toFixed(1)}s`:"-"}),u.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.costUsd!=null?`$${j.costUsd.toFixed(4)}`:"-"})]},`${j.testId}-${N}`))})]})})]})}const Ep=ra("/runs/$runId_/category/$category")({component:QN});function QN(){const{runId:n,category:l}=Ep.useParams(),{data:i,isLoading:r,error:o}=lp(n,l);if(r)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>u.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(o)return u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",o.message]});const f=(i==null?void 0:i.suites)??[],h=f.reduce((v,x)=>v+x.total,0),g=f.reduce((v,x)=>v+x.passed,0),p=h-g,m=h>0?g/h:0;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),u.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",n]})]}),u.jsx(Oc,{total:h,passed:g,failed:p,passRate:m}),f.length===0?u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:u.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):u.jsxs("div",{className:"space-y-3",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),u.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:f.map(v=>u.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:v.name}),u.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",v.total]})]}),u.jsx("div",{className:"mt-2",children:u.jsx(Hd,{score:v.avg_score})}),u.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[u.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&u.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]})]})]},v.name))})]})]})}const Tp=ra("/projects/$benchmarkId_/runs/$runId")({component:YN});function YN(){var T;const{benchmarkId:n,runId:l}=Tp.useParams(),{data:i,isLoading:r,error:o}=af(n,l),{data:f}=ht(),[h,g]=Q.useState(!1),p=(f==null?void 0:f.read_only)===!0;if(r)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(w=>u.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},w))})]});if(o)return u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const m=(T=i==null?void 0:i.results)==null?void 0:T[0],v=m==null?void 0:m.target,x=m==null?void 0:m.experiment,S=m==null?void 0:m.timestamp,j=v?{target:v}:void 0,N=(()=>{const w=[x,v].filter(B=>B&&B!=="default");return w.length>0?w.join(" · "):l})(),R=[v,x&&x!=="default"?x:null,S?new Date(S).toLocaleString():null,i==null?void 0:i.source].filter(Boolean).join(" · ");return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold text-white",children:N}),u.jsx("p",{className:"mt-1 text-sm text-gray-500",children:R})]}),!p&&u.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),u.jsx(yp,{results:(i==null?void 0:i.results)??[],runId:l,benchmarkId:n}),!p&&u.jsx(Ss,{open:h,onClose:()=>g(!1),benchmarkId:n,prefill:j})]})}const Mp=ra("/projects/$benchmarkId_/evals/$runId/$evalId")({component:GN});function GN(){const{benchmarkId:n,runId:l,evalId:i}=Mp.useParams(),{data:r,isLoading:o,error:f}=af(n,l),{data:h}=ht(),[g,p]=Q.useState(!1),m=(h==null?void 0:h.read_only)===!0;if(o)return u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),u.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(f)return u.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",f.message]});const v=r==null?void 0:r.results.find(x=>x.testId===i);return v?u.jsxs("div",{className:"flex h-full flex-col gap-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",l," / Eval: ",i]}),u.jsx("h1",{className:"text-2xl font-semibold text-white",children:i})]}),!m&&u.jsx("button",{type:"button",onClick:()=>p(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),u.jsx(Np,{eval:v,runId:l,benchmarkId:n}),!m&&u.jsx(Ss,{open:g,onClose:()=>p(!1),benchmarkId:n,prefill:{testIds:[i],target:v.target}})]}):u.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:u.jsxs("p",{className:"text-gray-400",children:["Eval ",u.jsx("code",{className:"text-cyan-400",children:i})," not found in run"," ",u.jsx("code",{className:"text-cyan-400",children:l}),"."]})})}const kN=L1.update({id:"/settings",path:"/settings",getParentRoute:()=>ta}),KN=dN.update({id:"/",path:"/",getParentRoute:()=>ta}),VN=gp.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>ta}),XN=pp.update({id:"/projects/$benchmarkId",path:"/projects/$benchmarkId",getParentRoute:()=>ta}),$N=xp.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>ta}),ZN=vp.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>ta}),PN=Rp.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>ta}),FN=_p.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>ta}),JN=Ep.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>ta}),IN=Tp.update({id:"/projects/$benchmarkId_/runs/$runId",path:"/projects/$benchmarkId/runs/$runId",getParentRoute:()=>ta}),WN=Mp.update({id:"/projects/$benchmarkId_/evals/$runId/$evalId",path:"/projects/$benchmarkId/evals/$runId/$evalId",getParentRoute:()=>ta}),e4={IndexRoute:KN,SettingsRoute:kN,ExperimentsExperimentNameRoute:ZN,JobsRunIdRoute:$N,ProjectsBenchmarkIdRoute:XN,RunsRunIdRoute:VN,EvalsRunIdEvalIdRoute:PN,ProjectsBenchmarkIdRunsRunIdRoute:IN,RunsRunIdCategoryCategoryRoute:JN,RunsRunIdSuiteSuiteRoute:FN,ProjectsBenchmarkIdEvalsRunIdEvalIdRoute:WN},t4=ta._addFileChildren(e4)._addFileTypes(),a4=new Cb({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),n4=zj({routeTree:t4}),Cp=document.getElementById("root");if(!Cp)throw new Error("Root element not found");sb.createRoot(Cp).render(u.jsx(Q.StrictMode,{children:u.jsx(wb,{client:a4,children:u.jsx(Uj,{router:n4})})}));export{zi as W,Q as r};
|