@kuralle-syrinx/studio 4.4.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.
@@ -0,0 +1,171 @@
1
+ function QS(n,o){for(var r=0;r<o.length;r++){const i=o[r];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in n)){const u=Object.getOwnPropertyDescriptor(i,l);u&&Object.defineProperty(n,l,u.get?u:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(l){if(l.ep)return;l.ep=!0;const u=r(l);fetch(l.href,u)}})();function fv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function n2(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var o=n.default;if(typeof o=="function"){var r=function i(){return this instanceof i?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};r.prototype=o.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var l=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(r,i,l.get?l:{enumerable:!0,get:function(){return n[i]}})}),r}var ff={exports:{}},ws={};/**
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 zg;function FS(){if(zg)return ws;zg=1;var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function r(i,l,u){var d=null;if(u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),"key"in l){u={};for(var h in l)h!=="key"&&(u[h]=l[h])}else u=l;return l=u.ref,{$$typeof:n,type:i,key:d,ref:l!==void 0?l:null,props:u}}return ws.Fragment=o,ws.jsx=r,ws.jsxs=r,ws}var Lg;function KS(){return Lg||(Lg=1,ff.exports=FS()),ff.exports}var b=KS(),df={exports:{}},xe={};/**
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 kg;function ZS(){if(kg)return xe;kg=1;var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),S=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function M(N,G,W){this.props=N,this.context=G,this.refs=C,this.updater=W||T}M.prototype.isReactComponent={},M.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,G,"setState")},M.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function _(){}_.prototype=M.prototype;function j(N,G,W){this.props=N,this.context=G,this.refs=C,this.updater=W||T}var k=j.prototype=new _;k.constructor=j,E(k,M.prototype),k.isPureReactComponent=!0;var z=Array.isArray;function q(){}var L={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function Q(N,G,W){var ee=W.ref;return{$$typeof:n,type:N,key:G,ref:ee!==void 0?ee:null,props:W}}function oe(N,G){return Q(N.type,G,N.props)}function ne(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function $(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return G[W]})}var pe=/\/+/g;function fe(N,G){return typeof N=="object"&&N!==null&&N.key!=null?$(""+N.key):G.toString(36)}function me(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(q,q):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function U(N,G,W,ee,ae){var se=typeof N;(se==="undefined"||se==="boolean")&&(N=null);var te=!1;if(N===null)te=!0;else switch(se){case"bigint":case"string":case"number":te=!0;break;case"object":switch(N.$$typeof){case n:case o:te=!0;break;case y:return te=N._init,U(te(N._payload),G,W,ee,ae)}}if(te)return ae=ae(N),te=ee===""?"."+fe(N,0):ee,z(ae)?(W="",te!=null&&(W=te.replace(pe,"$&/")+"/"),U(ae,G,W,"",function(ve){return ve})):ae!=null&&(ne(ae)&&(ae=oe(ae,W+(ae.key==null||N&&N.key===ae.key?"":(""+ae.key).replace(pe,"$&/")+"/")+te)),G.push(ae)),1;te=0;var ge=ee===""?".":ee+":";if(z(N))for(var re=0;re<N.length;re++)ee=N[re],se=ge+fe(ee,re),te+=U(ee,G,W,se,ae);else if(re=x(N),typeof re=="function")for(N=re.call(N),re=0;!(ee=N.next()).done;)ee=ee.value,se=ge+fe(ee,re++),te+=U(ee,G,W,se,ae);else if(se==="object"){if(typeof N.then=="function")return U(me(N),G,W,ee,ae);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return te}function Y(N,G,W){if(N==null)return N;var ee=[],ae=0;return U(N,ee,"","",function(se){return G.call(W,se,ae++)}),ee}function Z(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var ue=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},J={map:Y,forEach:function(N,G,W){Y(N,function(){G.apply(this,arguments)},W)},count:function(N){var G=0;return Y(N,function(){G++}),G},toArray:function(N){return Y(N,function(G){return G})||[]},only:function(N){if(!ne(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return xe.Activity=g,xe.Children=J,xe.Component=M,xe.Fragment=r,xe.Profiler=l,xe.PureComponent=j,xe.StrictMode=i,xe.Suspense=p,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,xe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return L.H.useMemoCache(N)}},xe.cache=function(N){return function(){return N.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(N,G,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ee=E({},N.props),ae=N.key;if(G!=null)for(se in G.key!==void 0&&(ae=""+G.key),G)!D.call(G,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&G.ref===void 0||(ee[se]=G[se]);var se=arguments.length-2;if(se===1)ee.children=W;else if(1<se){for(var te=Array(se),ge=0;ge<se;ge++)te[ge]=arguments[ge+2];ee.children=te}return Q(N.type,ae,ee)},xe.createContext=function(N){return N={$$typeof:d,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:u,_context:N},N},xe.createElement=function(N,G,W){var ee,ae={},se=null;if(G!=null)for(ee in G.key!==void 0&&(se=""+G.key),G)D.call(G,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ae[ee]=G[ee]);var te=arguments.length-2;if(te===1)ae.children=W;else if(1<te){for(var ge=Array(te),re=0;re<te;re++)ge[re]=arguments[re+2];ae.children=ge}if(N&&N.defaultProps)for(ee in te=N.defaultProps,te)ae[ee]===void 0&&(ae[ee]=te[ee]);return Q(N,se,ae)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(N){return{$$typeof:h,render:N}},xe.isValidElement=ne,xe.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:Z}},xe.memo=function(N,G){return{$$typeof:m,type:N,compare:G===void 0?null:G}},xe.startTransition=function(N){var G=L.T,W={};L.T=W;try{var ee=N(),ae=L.S;ae!==null&&ae(W,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(q,ue)}catch(se){ue(se)}finally{G!==null&&W.types!==null&&(G.types=W.types),L.T=G}},xe.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},xe.use=function(N){return L.H.use(N)},xe.useActionState=function(N,G,W){return L.H.useActionState(N,G,W)},xe.useCallback=function(N,G){return L.H.useCallback(N,G)},xe.useContext=function(N){return L.H.useContext(N)},xe.useDebugValue=function(){},xe.useDeferredValue=function(N,G){return L.H.useDeferredValue(N,G)},xe.useEffect=function(N,G){return L.H.useEffect(N,G)},xe.useEffectEvent=function(N){return L.H.useEffectEvent(N)},xe.useId=function(){return L.H.useId()},xe.useImperativeHandle=function(N,G,W){return L.H.useImperativeHandle(N,G,W)},xe.useInsertionEffect=function(N,G){return L.H.useInsertionEffect(N,G)},xe.useLayoutEffect=function(N,G){return L.H.useLayoutEffect(N,G)},xe.useMemo=function(N,G){return L.H.useMemo(N,G)},xe.useOptimistic=function(N,G){return L.H.useOptimistic(N,G)},xe.useReducer=function(N,G,W){return L.H.useReducer(N,G,W)},xe.useRef=function(N){return L.H.useRef(N)},xe.useState=function(N){return L.H.useState(N)},xe.useSyncExternalStore=function(N,G,W){return L.H.useSyncExternalStore(N,G,W)},xe.useTransition=function(){return L.H.useTransition()},xe.version="19.2.7",xe}var Dg;function Hs(){return Dg||(Dg=1,df.exports=ZS()),df.exports}var w=Hs();const Qt=fv(w),hd=QS({__proto__:null,default:Qt},[w]);var hf={exports:{}},Rs={},mf={exports:{}},pf={};/**
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 Bg;function JS(){return Bg||(Bg=1,(function(n){function o(U,Y){var Z=U.length;U.push(Y);e:for(;0<Z;){var ue=Z-1>>>1,J=U[ue];if(0<l(J,Y))U[ue]=Y,U[Z]=J,Z=ue;else break e}}function r(U){return U.length===0?null:U[0]}function i(U){if(U.length===0)return null;var Y=U[0],Z=U.pop();if(Z!==Y){U[0]=Z;e:for(var ue=0,J=U.length,N=J>>>1;ue<N;){var G=2*(ue+1)-1,W=U[G],ee=G+1,ae=U[ee];if(0>l(W,Z))ee<J&&0>l(ae,W)?(U[ue]=ae,U[ee]=Z,ue=ee):(U[ue]=W,U[G]=Z,ue=G);else if(ee<J&&0>l(ae,Z))U[ue]=ae,U[ee]=Z,ue=ee;else break e}}return Y}function l(U,Y){var Z=U.sortIndex-Y.sortIndex;return Z!==0?Z:U.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],m=[],y=1,g=null,S=3,x=!1,T=!1,E=!1,C=!1,M=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function k(U){for(var Y=r(m);Y!==null;){if(Y.callback===null)i(m);else if(Y.startTime<=U)i(m),Y.sortIndex=Y.expirationTime,o(p,Y);else break;Y=r(m)}}function z(U){if(E=!1,k(U),!T)if(r(p)!==null)T=!0,q||(q=!0,$());else{var Y=r(m);Y!==null&&me(z,Y.startTime-U)}}var q=!1,L=-1,D=5,Q=-1;function oe(){return C?!0:!(n.unstable_now()-Q<D)}function ne(){if(C=!1,q){var U=n.unstable_now();Q=U;var Y=!0;try{e:{T=!1,E&&(E=!1,_(L),L=-1),x=!0;var Z=S;try{t:{for(k(U),g=r(p);g!==null&&!(g.expirationTime>U&&oe());){var ue=g.callback;if(typeof ue=="function"){g.callback=null,S=g.priorityLevel;var J=ue(g.expirationTime<=U);if(U=n.unstable_now(),typeof J=="function"){g.callback=J,k(U),Y=!0;break t}g===r(p)&&i(p),k(U)}else i(p);g=r(p)}if(g!==null)Y=!0;else{var N=r(m);N!==null&&me(z,N.startTime-U),Y=!1}}break e}finally{g=null,S=Z,x=!1}Y=void 0}}finally{Y?$():q=!1}}}var $;if(typeof j=="function")$=function(){j(ne)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,fe=pe.port2;pe.port1.onmessage=ne,$=function(){fe.postMessage(null)}}else $=function(){M(ne,0)};function me(U,Y){L=M(function(){U(n.unstable_now())},Y)}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(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(U){switch(S){case 1:case 2:case 3:var Y=3;break;default:Y=S}var Z=S;S=Y;try{return U()}finally{S=Z}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function(U,Y){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var Z=S;S=U;try{return Y()}finally{S=Z}},n.unstable_scheduleCallback=function(U,Y,Z){var ue=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ue+Z:ue):Z=ue,U){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=Z+J,U={id:y++,callback:Y,priorityLevel:U,startTime:Z,expirationTime:J,sortIndex:-1},Z>ue?(U.sortIndex=Z,o(m,U),r(p)===null&&U===r(m)&&(E?(_(L),L=-1):E=!0,me(z,Z-ue))):(U.sortIndex=J,o(p,U),T||x||(T=!0,q||(q=!0,$()))),U},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(U){var Y=S;return function(){var Z=S;S=Y;try{return U.apply(this,arguments)}finally{S=Z}}}})(pf)),pf}var Ug;function WS(){return Ug||(Ug=1,mf.exports=JS()),mf.exports}var gf={exports:{}},Rt={};/**
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 Hg;function $S(){if(Hg)return Rt;Hg=1;var n=Hs();function o(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}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 r(){}var i={d:{f:r,r:function(){throw Error(o(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Rt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(o(299));return u(p,m,null,y)},Rt.flushSync=function(p){var m=d.T,y=i.p;try{if(d.T=null,i.p=2,p)return p()}finally{d.T=m,i.p=y,i.d.f()}},Rt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},Rt.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},Rt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:S,fetchPriority:x}):y==="script"&&i.d.X(p,{crossOrigin:g,integrity:S,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Rt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=h(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},Rt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=h(y,m.crossOrigin);i.d.L(p,y,{crossOrigin:g,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})}},Rt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=h(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},Rt.requestFormReset=function(p){i.d.r(p)},Rt.unstable_batchedUpdates=function(p,m){return p(m)},Rt.useFormState=function(p,m,y){return d.H.useFormState(p,m,y)},Rt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Rt.version="19.2.7",Rt}var Ig;function dv(){if(Ig)return gf.exports;Ig=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(o){console.error(o)}}return n(),gf.exports=$S(),gf.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 Pg;function ew(){if(Pg)return Rs;Pg=1;var n=WS(),o=Hs(),r=dv();function i(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 l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(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 d(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 h(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(u(e)!==e)throw Error(i(188))}function m(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,s=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(s=c.return,s!==null){a=s;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return p(c),e;if(f===s)return p(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==s.return)a=c,s=f;else{for(var v=!1,R=c.child;R;){if(R===a){v=!0,a=c,s=f;break}if(R===s){v=!0,s=c,a=f;break}R=R.sibling}if(!v){for(R=f.child;R;){if(R===a){v=!0,a=f,s=c;break}if(R===s){v=!0,s=f,a=c;break}R=R.sibling}if(!v)throw Error(i(189))}}if(a.alternate!==s)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,S=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function fe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case M:return"Profiler";case C:return"StrictMode";case z:return"Suspense";case q:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case j:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var me=Array.isArray,U=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ue=[],J=-1;function N(e){return{current:e}}function G(e){0>J||(e.current=ue[J],ue[J]=null,J--)}function W(e,t){J++,ue[J]=e.current,e.current=t}var ee=N(null),ae=N(null),se=N(null),te=N(null);function ge(e,t){switch(W(se,t),W(ae,e),W(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ng(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ng(t),e=ag(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ee),W(ee,e)}function re(){G(ee),G(ae),G(se)}function ve(e){e.memoizedState!==null&&W(te,e);var t=ee.current,a=ag(t,e.type);t!==a&&(W(ae,e),W(ee,a))}function be(e){ae.current===e&&(G(ee),G(ae)),te.current===e&&(G(te),vs._currentValue=Z)}var Ce,Ge;function Ve(e){if(Ce===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||"",Ge=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ce+e+Ge}var Ht=!1;function _t(e,t){if(!e||Ht)return"";Ht=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(V){var P=V}Reflect.construct(e,[],K)}else{try{K.call()}catch(V){P=V}e.call(K.prototype)}}else{try{throw Error()}catch(V){P=V}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(V){if(V&&P&&typeof V.stack=="string")return[V.stack,P.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 f=s.DetermineComponentFrameRoot(),v=f[0],R=f[1];if(v&&R){var A=v.split(`
44
+ `),I=R.split(`
45
+ `);for(c=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;c<I.length&&!I[c].includes("DetermineComponentFrameRoot");)c++;if(s===A.length||c===I.length)for(s=A.length-1,c=I.length-1;1<=s&&0<=c&&A[s]!==I[c];)c--;for(;1<=s&&0<=c;s--,c--)if(A[s]!==I[c]){if(s!==1||c!==1)do if(s--,c--,0>c||A[s]!==I[c]){var X=`
46
+ `+A[s].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=s&&0<=c);break}}}finally{Ht=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ve(a):""}function Tt(e,t){switch(e.tag){case 26:case 27:case 5:return Ve(e.type);case 16:return Ve("Lazy");case 13:return e.child!==t&&t!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return _t(e.type,!1);case 11:return _t(e.type.render,!1);case 1:return _t(e.type,!0);case 31:return Ve("Activity");default:return""}}function Jt(e){try{var t="",a=null;do t+=Tt(e,a),a=e,e=e.return;while(e);return t}catch(s){return`
47
+ Error generating stack: `+s.message+`
48
+ `+s.stack}}var Cn=Object.prototype.hasOwnProperty,Ct=n.unstable_scheduleCallback,Un=n.unstable_cancelCallback,fa=n.unstable_shouldYield,Nr=n.unstable_requestPaint,ht=n.unstable_now,He=n.unstable_getCurrentPriorityLevel,We=n.unstable_ImmediatePriority,At=n.unstable_UserBlockingPriority,da=n.unstable_NormalPriority,Jl=n.unstable_LowPriority,Ps=n.unstable_IdlePriority,Se=n.log,$e=n.unstable_setDisableYieldValue,Xe=null,je=null;function we(e){if(typeof Se=="function"&&$e(e),je&&typeof je.setStrictMode=="function")try{je.setStrictMode(Xe,e)}catch{}}var ze=Math.clz32?Math.clz32:vn,mt=Math.log,Wt=Math.LN2;function vn(e){return e>>>=0,e===0?32:31-(mt(e)/Wt|0)|0}var _o=256,qs=262144,Vs=4194304;function Fa(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 Ys(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var R=s&134217727;return R!==0?(s=R&~f,s!==0?c=Fa(s):(v&=R,v!==0?c=Fa(v):a||(a=R&~e,a!==0&&(c=Fa(a))))):(R=s&~f,R!==0?c=Fa(R):v!==0?c=Fa(v):a||(a=s&~e,a!==0&&(c=Fa(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function Or(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lb(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 Bd(){var e=Vs;return Vs<<=1,(Vs&62914560)===0&&(Vs=4194304),e}function Wl(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function jr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function kb(e,t,a,s,c,f){var v=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 R=e.entanglements,A=e.expirationTimes,I=e.hiddenUpdates;for(a=v&~a;0<a;){var X=31-ze(a),K=1<<X;R[X]=0,A[X]=-1;var P=I[X];if(P!==null)for(I[X]=null,X=0;X<P.length;X++){var V=P[X];V!==null&&(V.lane&=-536870913)}a&=~K}s!==0&&Ud(e,s,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function Ud(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ze(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function Hd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-ze(a),c=1<<s;c&t|e[s]&t&&(e[s]|=t),a&=~c}}function Id(e,t){var a=t&-t;return a=(a&42)!==0?1:$l(a),(a&(e.suspendedLanes|t))!==0?0:a}function $l(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 ec(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pd(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Cg(e.type))}function qd(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var ha=Math.random().toString(36).slice(2),yt="__reactFiber$"+ha,Nt="__reactProps$"+ha,Ao="__reactContainer$"+ha,tc="__reactEvents$"+ha,Db="__reactListeners$"+ha,Bb="__reactHandles$"+ha,Vd="__reactResources$"+ha,zr="__reactMarker$"+ha;function nc(e){delete e[yt],delete e[Nt],delete e[tc],delete e[Db],delete e[Bb]}function No(e){var t=e[yt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ao]||a[yt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ug(e);e!==null;){if(a=e[yt])return a;e=ug(e)}return t}e=a,a=e.parentNode}return null}function Oo(e){if(e=e[yt]||e[Ao]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Lr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jo(e){var t=e[Vd];return t||(t=e[Vd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[zr]=!0}var Yd=new Set,Gd={};function Ka(e,t){zo(e,t),zo(e+"Capture",t)}function zo(e,t){for(Gd[e]=t,e=0;e<t.length;e++)Yd.add(t[e])}var Ub=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]*$"),Xd={},Qd={};function Hb(e){return Cn.call(Qd,e)?!0:Cn.call(Xd,e)?!1:Ub.test(e)?Qd[e]=!0:(Xd[e]=!0,!1)}function Gs(e,t,a){if(Hb(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 Xs(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 Hn(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 $t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ib(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,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){a=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ac(e){if(!e._valueTracker){var t=Fd(e)?"checked":"value";e._valueTracker=Ib(e,t,""+e[t])}}function Kd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=Fd(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function Qs(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 Pb=/[\n"\\]/g;function en(e){return e.replace(Pb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function oc(e,t,a,s,c,f,v,R){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+$t(t)):e.value!==""+$t(t)&&(e.value=""+$t(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?rc(e,v,$t(t)):a!=null?rc(e,v,$t(a)):s!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+$t(R):e.removeAttribute("name")}function Zd(e,t,a,s,c,f,v,R){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){ac(e);return}a=a!=null?""+$t(a):"",t=t!=null?""+$t(t):a,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),ac(e)}function rc(e,t,a){t==="number"&&Qs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Lo(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=""+$t(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 Jd(e,t,a){if(t!=null&&(t=""+$t(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+$t(a):""}function Wd(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(i(92));if(me(s)){if(1<s.length)throw Error(i(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=$t(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),ac(e)}function ko(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var qb=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 $d(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||qb.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function eh(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(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&&$d(e,c,s)}else for(var f in t)t.hasOwnProperty(f)&&$d(e,f,t[f])}function sc(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 Vb=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"]]),Yb=/^[\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 Fs(e){return Yb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var ic=null;function lc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Do=null,Bo=null;function th(e){var t=Oo(e);if(t&&(e=t.stateNode)){var a=e[Nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(oc(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="'+en(""+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(i(90));oc(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&&Kd(s)}break e;case"textarea":Jd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Lo(e,!!a.multiple,t,!1)}}}var cc=!1;function nh(e,t,a){if(cc)return e(t,a);cc=!0;try{var s=e(t);return s}finally{if(cc=!1,(Do!==null||Bo!==null)&&(ki(),Do&&(t=Do,e=Bo,Bo=Do=null,th(t),e)))for(t=0;t<e.length;t++)th(e[t])}}function kr(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(i(231,t,typeof a));return a}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uc=!1;if(Pn)try{var Dr={};Object.defineProperty(Dr,"passive",{get:function(){uc=!0}}),window.addEventListener("test",Dr,Dr),window.removeEventListener("test",Dr,Dr)}catch{uc=!1}var ma=null,fc=null,Ks=null;function ah(){if(Ks)return Ks;var e,t=fc,a=t.length,s,c="value"in ma?ma.value:ma.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var v=a-e;for(s=1;s<=v&&t[a-s]===c[f-s];s++);return Ks=c.slice(e,1<s?1-s:void 0)}function Zs(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 Js(){return!0}function oh(){return!1}function Ot(e){function t(a,s,c,f,v){this._reactName=a,this._targetInst=c,this.type=s,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(a=e[R],this[R]=a?a(f):f[R]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Js:oh,this.isPropagationStopped=oh,this}return g(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=Js)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Js)},persist:function(){},isPersistent:Js}),t}var Za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ws=Ot(Za),Br=g({},Za,{view:0,detail:0}),Gb=Ot(Br),dc,hc,Ur,$s=g({},Br,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==Ur&&(Ur&&e.type==="mousemove"?(dc=e.screenX-Ur.screenX,hc=e.screenY-Ur.screenY):hc=dc=0,Ur=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:hc}}),rh=Ot($s),Xb=g({},$s,{dataTransfer:0}),Qb=Ot(Xb),Fb=g({},Br,{relatedTarget:0}),mc=Ot(Fb),Kb=g({},Za,{animationName:0,elapsedTime:0,pseudoElement:0}),Zb=Ot(Kb),Jb=g({},Za,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wb=Ot(Jb),$b=g({},Za,{data:0}),sh=Ot($b),ex={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tx={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"},nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ax(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nx[e])?!!t[e]:!1}function pc(){return ax}var ox=g({},Br,{key:function(e){if(e.key){var t=ex[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?Zs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rx=Ot(ox),sx=g({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ih=Ot(sx),ix=g({},Br,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),lx=Ot(ix),cx=g({},Za,{propertyName:0,elapsedTime:0,pseudoElement:0}),ux=Ot(cx),fx=g({},$s,{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}),dx=Ot(fx),hx=g({},Za,{newState:0,oldState:0}),mx=Ot(hx),px=[9,13,27,32],gc=Pn&&"CompositionEvent"in window,Hr=null;Pn&&"documentMode"in document&&(Hr=document.documentMode);var gx=Pn&&"TextEvent"in window&&!Hr,lh=Pn&&(!gc||Hr&&8<Hr&&11>=Hr),ch=" ",uh=!1;function fh(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 dh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Uo=!1;function yx(e,t){switch(e){case"compositionend":return dh(t);case"keypress":return t.which!==32?null:(uh=!0,ch);case"textInput":return e=t.data,e===ch&&uh?null:e;default:return null}}function vx(e,t){if(Uo)return e==="compositionend"||!gc&&fh(e,t)?(e=ah(),Ks=fc=ma=null,Uo=!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 lh&&t.locale!=="ko"?null:t.data;default:return null}}var bx={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 hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bx[e.type]:t==="textarea"}function mh(e,t,a,s){Do?Bo?Bo.push(s):Bo=[s]:Do=s,t=qi(t,"onChange"),0<t.length&&(a=new Ws("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Ir=null,Pr=null;function xx(e){Zp(e,0)}function ei(e){var t=Lr(e);if(Kd(t))return e}function ph(e,t){if(e==="change")return t}var gh=!1;if(Pn){var yc;if(Pn){var vc="oninput"in document;if(!vc){var yh=document.createElement("div");yh.setAttribute("oninput","return;"),vc=typeof yh.oninput=="function"}yc=vc}else yc=!1;gh=yc&&(!document.documentMode||9<document.documentMode)}function vh(){Ir&&(Ir.detachEvent("onpropertychange",bh),Pr=Ir=null)}function bh(e){if(e.propertyName==="value"&&ei(Pr)){var t=[];mh(t,Pr,e,lc(e)),nh(xx,t)}}function Sx(e,t,a){e==="focusin"?(vh(),Ir=t,Pr=a,Ir.attachEvent("onpropertychange",bh)):e==="focusout"&&vh()}function wx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ei(Pr)}function Rx(e,t){if(e==="click")return ei(t)}function Ex(e,t){if(e==="input"||e==="change")return ei(t)}function Tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:Tx;function qr(e,t){if(It(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(!Cn.call(t,c)||!It(e[c],t[c]))return!1}return!0}function xh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sh(e,t){var a=xh(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=xh(a)}}function wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qs(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=Qs(e.document)}return t}function bc(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 Cx=Pn&&"documentMode"in document&&11>=document.documentMode,Ho=null,xc=null,Vr=null,Sc=!1;function Eh(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Sc||Ho==null||Ho!==Qs(s)||(s=Ho,"selectionStart"in s&&bc(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}),Vr&&qr(Vr,s)||(Vr=s,s=qi(xc,"onSelect"),0<s.length&&(t=new Ws("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=Ho)))}function Ja(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Io={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},wc={},Th={};Pn&&(Th=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Wa(e){if(wc[e])return wc[e];if(!Io[e])return e;var t=Io[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Th)return wc[e]=t[a];return e}var Ch=Wa("animationend"),Mh=Wa("animationiteration"),_h=Wa("animationstart"),Mx=Wa("transitionrun"),_x=Wa("transitionstart"),Ax=Wa("transitioncancel"),Ah=Wa("transitionend"),Nh=new Map,Rc="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(" ");Rc.push("scrollEnd");function bn(e,t){Nh.set(e,t),Ka(t,[e])}var ti=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)},tn=[],Po=0,Ec=0;function ni(){for(var e=Po,t=Ec=Po=0;t<e;){var a=tn[t];tn[t++]=null;var s=tn[t];tn[t++]=null;var c=tn[t];tn[t++]=null;var f=tn[t];if(tn[t++]=null,s!==null&&c!==null){var v=s.pending;v===null?c.next=c:(c.next=v.next,v.next=c),s.pending=c}f!==0&&Oh(a,c,f)}}function ai(e,t,a,s){tn[Po++]=e,tn[Po++]=t,tn[Po++]=a,tn[Po++]=s,Ec|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Tc(e,t,a,s){return ai(e,t,a,s),oi(e)}function $a(e,t){return ai(e,null,null,t),oi(e)}function Oh(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,s=f.alternate,s!==null&&(s.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-ze(a),e=f.hiddenUpdates,s=e[c],s===null?e[c]=[t]:s.push(t),t.lane=a|536870912),f):null}function oi(e){if(50<fs)throw fs=0,Lu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qo={};function Nx(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 Pt(e,t,a,s){return new Nx(e,t,a,s)}function Cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qn(e,t){var a=e.alternate;return a===null?(a=Pt(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 jh(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 ri(e,t,a,s,c,f){var v=0;if(s=e,typeof e=="function")Cc(e)&&(v=1);else if(typeof e=="string")v=kS(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=Pt(31,a,t,c),e.elementType=Q,e.lanes=f,e;case E:return eo(a.children,c,f,t);case C:v=8,c|=24;break;case M:return e=Pt(12,a,t,c|2),e.elementType=M,e.lanes=f,e;case z:return e=Pt(13,a,t,c),e.elementType=z,e.lanes=f,e;case q:return e=Pt(19,a,t,c),e.elementType=q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:v=10;break e;case _:v=9;break e;case k:v=11;break e;case L:v=14;break e;case D:v=16,s=null;break e}v=29,a=Error(i(130,e===null?"null":typeof e,"")),s=null}return t=Pt(v,a,t,c),t.elementType=e,t.type=s,t.lanes=f,t}function eo(e,t,a,s){return e=Pt(7,e,s,t),e.lanes=a,e}function Mc(e,t,a){return e=Pt(6,e,null,t),e.lanes=a,e}function zh(e){var t=Pt(18,null,null,0);return t.stateNode=e,t}function _c(e,t,a){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Lh=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var a=Lh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Jt(t)},Lh.set(e,t),t)}return{value:e,source:t,stack:Jt(t)}}var Vo=[],Yo=0,si=null,Yr=0,an=[],on=0,pa=null,Mn=1,_n="";function Vn(e,t){Vo[Yo++]=Yr,Vo[Yo++]=si,si=e,Yr=t}function kh(e,t,a){an[on++]=Mn,an[on++]=_n,an[on++]=pa,pa=e;var s=Mn;e=_n;var c=32-ze(s)-1;s&=~(1<<c),a+=1;var f=32-ze(t)+c;if(30<f){var v=c-c%5;f=(s&(1<<v)-1).toString(32),s>>=v,c-=v,Mn=1<<32-ze(t)+c|a<<c|s,_n=f+e}else Mn=1<<f|a<<c|s,_n=e}function Ac(e){e.return!==null&&(Vn(e,1),kh(e,1,0))}function Nc(e){for(;e===si;)si=Vo[--Yo],Vo[Yo]=null,Yr=Vo[--Yo],Vo[Yo]=null;for(;e===pa;)pa=an[--on],an[on]=null,_n=an[--on],an[on]=null,Mn=an[--on],an[on]=null}function Dh(e,t){an[on++]=Mn,an[on++]=_n,an[on++]=pa,Mn=t.id,_n=t.overflow,pa=e}var vt=null,Qe=null,Oe=!1,ga=null,rn=!1,Oc=Error(i(519));function ya(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gr(nn(t,e)),Oc}function Bh(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[yt]=e,t[Nt]=s,a){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(a=0;a<hs.length;a++)_e(hs[a],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),Zd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),Wd(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||eg(t.textContent,a)?(s.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),s.onScroll!=null&&_e("scroll",t),s.onScrollEnd!=null&&_e("scrollend",t),s.onClick!=null&&(t.onclick=In),t=!0):t=!1,t||ya(e,!0)}function Uh(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 31:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:vt=vt.return}}function Go(e){if(e!==vt)return!1;if(!Oe)return Uh(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Ku(e.type,e.memoizedProps)),a=!a),a&&Qe&&ya(e),Uh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Qe=cg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Qe=cg(e)}else t===27?(t=Qe,Oa(e.type)?(e=ef,ef=null,Qe=e):Qe=t):Qe=vt?ln(e.stateNode.nextSibling):null;return!0}function to(){Qe=vt=null,Oe=!1}function jc(){var e=ga;return e!==null&&(kt===null?kt=e:kt.push.apply(kt,e),ga=null),e}function Gr(e){ga===null?ga=[e]:ga.push(e)}var zc=N(null),no=null,Yn=null;function va(e,t,a){W(zc,t._currentValue),t._currentValue=a}function Gn(e){e._currentValue=zc.current,G(zc)}function Lc(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 kc(e,t,a,s){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var v=c.child;f=f.firstContext;e:for(;f!==null;){var R=f;f=c;for(var A=0;A<t.length;A++)if(R.context===t[A]){f.lanes|=a,R=f.alternate,R!==null&&(R.lanes|=a),Lc(f.return,a,e),s||(v=null);break e}f=R.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(i(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),Lc(v,a,e),v=null}else v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function Xo(e,t,a,s){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var R=c.type;It(c.pendingProps.value,v.value)||(e!==null?e.push(R):e=[R])}}else if(c===te.current){if(v=c.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(vs):e=[vs])}c=c.return}e!==null&&kc(t,e,a,s),t.flags|=262144}function ii(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ao(e){no=e,Yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function bt(e){return Hh(no,e)}function li(e,t){return no===null&&ao(e),Hh(e,t)}function Hh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Yn===null){if(e===null)throw Error(i(308));Yn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yn=Yn.next=t;return a}var Ox=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()})}},jx=n.unstable_scheduleCallback,zx=n.unstable_NormalPriority,rt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dc(){return{controller:new Ox,data:new Map,refCount:0}}function Xr(e){e.refCount--,e.refCount===0&&jx(zx,function(){e.controller.abort()})}var Qr=null,Bc=0,Qo=0,Fo=null;function Lx(e,t){if(Qr===null){var a=Qr=[];Bc=0,Qo=Iu(),Fo={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Bc++,t.then(Ih,Ih),t}function Ih(){if(--Bc===0&&Qr!==null){Fo!==null&&(Fo.status="fulfilled");var e=Qr;Qr=null,Qo=0,Fo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function kx(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 Ph=U.S;U.S=function(e,t){Ep=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Lx(e,t),Ph!==null&&Ph(e,t)};var oo=N(null);function Uc(){var e=oo.current;return e!==null?e:Ye.pooledCache}function ci(e,t){t===null?W(oo,oo.current):W(oo,t.pool)}function qh(){var e=Uc();return e===null?null:{parent:rt._currentValue,pool:e}}var Ko=Error(i(460)),Hc=Error(i(474)),ui=Error(i(542)),fi={then:function(){}};function Vh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(In,In),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xh(e),e;default:if(typeof t.status=="string")t.then(In,In);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(i(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,Xh(e),e}throw so=t,Ko}}function ro(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(so=a,Ko):a}}var so=null;function Gh(){if(so===null)throw Error(i(459));var e=so;return so=null,e}function Xh(e){if(e===Ko||e===ui)throw Error(i(483))}var Zo=null,Fr=0;function di(e){var t=Fr;return Fr+=1,Zo===null&&(Zo=[]),Yh(Zo,e,t)}function Kr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function hi(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qh(e){function t(B,O){if(e){var H=B.deletions;H===null?(B.deletions=[O],B.flags|=16):H.push(O)}}function a(B,O){if(!e)return null;for(;O!==null;)t(B,O),O=O.sibling;return null}function s(B){for(var O=new Map;B!==null;)B.key!==null?O.set(B.key,B):O.set(B.index,B),B=B.sibling;return O}function c(B,O){return B=qn(B,O),B.index=0,B.sibling=null,B}function f(B,O,H){return B.index=H,e?(H=B.alternate,H!==null?(H=H.index,H<O?(B.flags|=67108866,O):H):(B.flags|=67108866,O)):(B.flags|=1048576,O)}function v(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function R(B,O,H,F){return O===null||O.tag!==6?(O=Mc(H,B.mode,F),O.return=B,O):(O=c(O,H),O.return=B,O)}function A(B,O,H,F){var he=H.type;return he===E?X(B,O,H.props.children,F,H.key):O!==null&&(O.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===D&&ro(he)===O.type)?(O=c(O,H.props),Kr(O,H),O.return=B,O):(O=ri(H.type,H.key,H.props,null,B.mode,F),Kr(O,H),O.return=B,O)}function I(B,O,H,F){return O===null||O.tag!==4||O.stateNode.containerInfo!==H.containerInfo||O.stateNode.implementation!==H.implementation?(O=_c(H,B.mode,F),O.return=B,O):(O=c(O,H.children||[]),O.return=B,O)}function X(B,O,H,F,he){return O===null||O.tag!==7?(O=eo(H,B.mode,F,he),O.return=B,O):(O=c(O,H),O.return=B,O)}function K(B,O,H){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Mc(""+O,B.mode,H),O.return=B,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case x:return H=ri(O.type,O.key,O.props,null,B.mode,H),Kr(H,O),H.return=B,H;case T:return O=_c(O,B.mode,H),O.return=B,O;case D:return O=ro(O),K(B,O,H)}if(me(O)||$(O))return O=eo(O,B.mode,H,null),O.return=B,O;if(typeof O.then=="function")return K(B,di(O),H);if(O.$$typeof===j)return K(B,li(B,O),H);hi(B,O)}return null}function P(B,O,H,F){var he=O!==null?O.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return he!==null?null:R(B,O,""+H,F);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return H.key===he?A(B,O,H,F):null;case T:return H.key===he?I(B,O,H,F):null;case D:return H=ro(H),P(B,O,H,F)}if(me(H)||$(H))return he!==null?null:X(B,O,H,F,null);if(typeof H.then=="function")return P(B,O,di(H),F);if(H.$$typeof===j)return P(B,O,li(B,H),F);hi(B,H)}return null}function V(B,O,H,F,he){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return B=B.get(H)||null,R(O,B,""+F,he);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case x:return B=B.get(F.key===null?H:F.key)||null,A(O,B,F,he);case T:return B=B.get(F.key===null?H:F.key)||null,I(O,B,F,he);case D:return F=ro(F),V(B,O,H,F,he)}if(me(F)||$(F))return B=B.get(H)||null,X(O,B,F,he,null);if(typeof F.then=="function")return V(B,O,H,di(F),he);if(F.$$typeof===j)return V(B,O,H,li(O,F),he);hi(O,F)}return null}function ce(B,O,H,F){for(var he=null,Le=null,de=O,Ee=O=0,Ne=null;de!==null&&Ee<H.length;Ee++){de.index>Ee?(Ne=de,de=null):Ne=de.sibling;var ke=P(B,de,H[Ee],F);if(ke===null){de===null&&(de=Ne);break}e&&de&&ke.alternate===null&&t(B,de),O=f(ke,O,Ee),Le===null?he=ke:Le.sibling=ke,Le=ke,de=Ne}if(Ee===H.length)return a(B,de),Oe&&Vn(B,Ee),he;if(de===null){for(;Ee<H.length;Ee++)de=K(B,H[Ee],F),de!==null&&(O=f(de,O,Ee),Le===null?he=de:Le.sibling=de,Le=de);return Oe&&Vn(B,Ee),he}for(de=s(de);Ee<H.length;Ee++)Ne=V(de,B,Ee,H[Ee],F),Ne!==null&&(e&&Ne.alternate!==null&&de.delete(Ne.key===null?Ee:Ne.key),O=f(Ne,O,Ee),Le===null?he=Ne:Le.sibling=Ne,Le=Ne);return e&&de.forEach(function(Da){return t(B,Da)}),Oe&&Vn(B,Ee),he}function ye(B,O,H,F){if(H==null)throw Error(i(151));for(var he=null,Le=null,de=O,Ee=O=0,Ne=null,ke=H.next();de!==null&&!ke.done;Ee++,ke=H.next()){de.index>Ee?(Ne=de,de=null):Ne=de.sibling;var Da=P(B,de,ke.value,F);if(Da===null){de===null&&(de=Ne);break}e&&de&&Da.alternate===null&&t(B,de),O=f(Da,O,Ee),Le===null?he=Da:Le.sibling=Da,Le=Da,de=Ne}if(ke.done)return a(B,de),Oe&&Vn(B,Ee),he;if(de===null){for(;!ke.done;Ee++,ke=H.next())ke=K(B,ke.value,F),ke!==null&&(O=f(ke,O,Ee),Le===null?he=ke:Le.sibling=ke,Le=ke);return Oe&&Vn(B,Ee),he}for(de=s(de);!ke.done;Ee++,ke=H.next())ke=V(de,B,Ee,ke.value,F),ke!==null&&(e&&ke.alternate!==null&&de.delete(ke.key===null?Ee:ke.key),O=f(ke,O,Ee),Le===null?he=ke:Le.sibling=ke,Le=ke);return e&&de.forEach(function(XS){return t(B,XS)}),Oe&&Vn(B,Ee),he}function qe(B,O,H,F){if(typeof H=="object"&&H!==null&&H.type===E&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case x:e:{for(var he=H.key;O!==null;){if(O.key===he){if(he=H.type,he===E){if(O.tag===7){a(B,O.sibling),F=c(O,H.props.children),F.return=B,B=F;break e}}else if(O.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===D&&ro(he)===O.type){a(B,O.sibling),F=c(O,H.props),Kr(F,H),F.return=B,B=F;break e}a(B,O);break}else t(B,O);O=O.sibling}H.type===E?(F=eo(H.props.children,B.mode,F,H.key),F.return=B,B=F):(F=ri(H.type,H.key,H.props,null,B.mode,F),Kr(F,H),F.return=B,B=F)}return v(B);case T:e:{for(he=H.key;O!==null;){if(O.key===he)if(O.tag===4&&O.stateNode.containerInfo===H.containerInfo&&O.stateNode.implementation===H.implementation){a(B,O.sibling),F=c(O,H.children||[]),F.return=B,B=F;break e}else{a(B,O);break}else t(B,O);O=O.sibling}F=_c(H,B.mode,F),F.return=B,B=F}return v(B);case D:return H=ro(H),qe(B,O,H,F)}if(me(H))return ce(B,O,H,F);if($(H)){if(he=$(H),typeof he!="function")throw Error(i(150));return H=he.call(H),ye(B,O,H,F)}if(typeof H.then=="function")return qe(B,O,di(H),F);if(H.$$typeof===j)return qe(B,O,li(B,H),F);hi(B,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,O!==null&&O.tag===6?(a(B,O.sibling),F=c(O,H),F.return=B,B=F):(a(B,O),F=Mc(H,B.mode,F),F.return=B,B=F),v(B)):a(B,O)}return function(B,O,H,F){try{Fr=0;var he=qe(B,O,H,F);return Zo=null,he}catch(de){if(de===Ko||de===ui)throw de;var Le=Pt(29,de,null,B.mode);return Le.lanes=F,Le.return=B,Le}}}var io=Qh(!0),Fh=Qh(!1),ba=!1;function Ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sa(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(De&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,t=oi(e),Oh(e,null,a),t}return ai(e,s,t,a),oi(e)}function Zr(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,Hd(e,a)}}function qc(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=v:f=f.next=v,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:f,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 Vc=!1;function Jr(){if(Vc){var e=Fo;if(e!==null)throw e}}function Wr(e,t,a,s){Vc=!1;var c=e.updateQueue;ba=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,R=c.shared.pending;if(R!==null){c.shared.pending=null;var A=R,I=A.next;A.next=null,v===null?f=I:v.next=I,v=A;var X=e.alternate;X!==null&&(X=X.updateQueue,R=X.lastBaseUpdate,R!==v&&(R===null?X.firstBaseUpdate=I:R.next=I,X.lastBaseUpdate=A))}if(f!==null){var K=c.baseState;v=0,X=I=A=null,R=f;do{var P=R.lane&-536870913,V=P!==R.lane;if(V?(Ae&P)===P:(s&P)===P){P!==0&&P===Qo&&(Vc=!0),X!==null&&(X=X.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ce=e,ye=R;P=t;var qe=a;switch(ye.tag){case 1:if(ce=ye.payload,typeof ce=="function"){K=ce.call(qe,K,P);break e}K=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ye.payload,P=typeof ce=="function"?ce.call(qe,K,P):ce,P==null)break e;K=g({},K,P);break e;case 2:ba=!0}}P=R.callback,P!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[P]:V.push(P))}else V={lane:P,tag:R.tag,payload:R.payload,callback:R.callback,next:null},X===null?(I=X=V,A=K):X=X.next=V,v|=P;if(R=R.next,R===null){if(R=c.shared.pending,R===null)break;V=R,R=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);X===null&&(A=K),c.baseState=A,c.firstBaseUpdate=I,c.lastBaseUpdate=X,f===null&&(c.shared.lanes=0),Ca|=v,e.lanes=v,e.memoizedState=K}}function Kh(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Zh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Kh(a[e],t)}var Jo=N(null),mi=N(0);function Jh(e,t){e=ea,W(mi,e),W(Jo,t),ea=e|t.baseLanes}function Yc(){W(mi,ea),W(Jo,Jo.current)}function Gc(){ea=mi.current,G(Jo),G(mi)}var qt=N(null),sn=null;function wa(e){var t=e.alternate;W(nt,nt.current&1),W(qt,e),sn===null&&(t===null||Jo.current!==null||t.memoizedState!==null)&&(sn=e)}function Xc(e){W(nt,nt.current),W(qt,e),sn===null&&(sn=e)}function Wh(e){e.tag===22?(W(nt,nt.current),W(qt,e),sn===null&&(sn=e)):Ra()}function Ra(){W(nt,nt.current),W(qt,qt.current)}function Vt(e){G(qt),sn===e&&(sn=null),G(nt)}var nt=N(0);function pi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Wu(a)||$u(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 Xn=0,Re=null,Ie=null,st=null,gi=!1,Wo=!1,lo=!1,yi=0,$r=0,$o=null,Dx=0;function et(){throw Error(i(321))}function Qc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!It(e[a],t[a]))return!1;return!0}function Fc(e,t,a,s,c,f){return Xn=f,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?km:cu,lo=!1,f=a(s,c),lo=!1,Wo&&(f=em(t,a,s,c)),$h(e),f}function $h(e){U.H=ns;var t=Ie!==null&&Ie.next!==null;if(Xn=0,st=Ie=Re=null,gi=!1,$r=0,$o=null,t)throw Error(i(300));e===null||it||(e=e.dependencies,e!==null&&ii(e)&&(it=!0))}function em(e,t,a,s){Re=e;var c=0;do{if(Wo&&($o=null),$r=0,Wo=!1,25<=c)throw Error(i(301));if(c+=1,st=Ie=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=Dm,f=t(a,s)}while(Wo);return f}function Bx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?es(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Re.flags|=1024),t}function Kc(){var e=yi!==0;return yi=0,e}function Zc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Jc(e){if(gi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}gi=!1}Xn=0,st=Ie=Re=null,Wo=!1,$r=yi=0,$o=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Re.memoizedState=st=e:st=st.next=e,st}function at(){if(Ie===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=st===null?Re.memoizedState:st.next;if(t!==null)st=t,Ie=e;else{if(e===null)throw Re.alternate===null?Error(i(467)):Error(i(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},st===null?Re.memoizedState=st=e:st=st.next=e}return st}function vi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function es(e){var t=$r;return $r+=1,$o===null&&($o=[]),e=Yh($o,e,t),t=Re,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?km:cu),e}function bi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return es(e);if(e.$$typeof===j)return bt(e)}throw Error(i(438,String(e)))}function Wc(e){var t=null,a=Re.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=Re.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=vi(),Re.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]=oe;return t.index++,a}function Qn(e,t){return typeof t=="function"?t(e):t}function xi(e){var t=at();return $c(t,Ie,e)}function $c(e,t,a){var s=e.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=a;var c=e.baseQueue,f=s.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,s.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var R=v=null,A=null,I=t,X=!1;do{var K=I.lane&-536870913;if(K!==I.lane?(Ae&K)===K:(Xn&K)===K){var P=I.revertLane;if(P===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),K===Qo&&(X=!0);else if((Xn&P)===P){I=I.next,P===Qo&&(X=!0);continue}else K={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},A===null?(R=A=K,v=f):A=A.next=K,Re.lanes|=P,Ca|=P;K=I.action,lo&&a(f,K),f=I.hasEagerState?I.eagerState:a(f,K)}else P={lane:K,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},A===null?(R=A=P,v=f):A=A.next=P,Re.lanes|=K,Ca|=K;I=I.next}while(I!==null&&I!==t);if(A===null?v=f:A.next=R,!It(f,e.memoizedState)&&(it=!0,X&&(a=Fo,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=A,s.lastRenderedState=f}return c===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function eu(e){var t=at(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var s=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==c);It(f,t.memoizedState)||(it=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,s]}function tm(e,t,a){var s=Re,c=at(),f=Oe;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var v=!It((Ie||c).memoizedState,a);if(v&&(c.memoizedState=a,it=!0),c=c.queue,au(om.bind(null,s,c,e),[e]),c.getSnapshot!==t||v||st!==null&&st.memoizedState.tag&1){if(s.flags|=2048,er(9,{destroy:void 0},am.bind(null,s,c,a,t),null),Ye===null)throw Error(i(349));f||(Xn&127)!==0||nm(s,t,a)}return a}function nm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Re.updateQueue,t===null?(t=vi(),Re.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function am(e,t,a,s){t.value=a,t.getSnapshot=s,rm(t)&&sm(e)}function om(e,t,a){return a(function(){rm(t)&&sm(e)})}function rm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!It(e,a)}catch{return!0}}function sm(e){var t=$a(e,2);t!==null&&Dt(t,e,2)}function tu(e){var t=Mt();if(typeof e=="function"){var a=e;if(e=a(),lo){we(!0);try{a()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:e},t}function im(e,t,a,s){return e.baseState=a,$c(e,Ie,typeof s=="function"?s:Qn)}function Ux(e,t,a,s,c){if(Ri(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};U.T!==null?a(!0):f.isTransition=!1,s(f),a=t.pending,a===null?(f.next=t.pending=f,lm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function lm(e,t){var a=t.action,s=t.payload,c=e.state;if(t.isTransition){var f=U.T,v={};U.T=v;try{var R=a(c,s),A=U.S;A!==null&&A(v,R),cm(e,t,R)}catch(I){nu(e,t,I)}finally{f!==null&&v.types!==null&&(f.types=v.types),U.T=f}}else try{f=a(c,s),cm(e,t,f)}catch(I){nu(e,t,I)}}function cm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){um(e,t,s)},function(s){return nu(e,t,s)}):um(e,t,a)}function um(e,t,a){t.status="fulfilled",t.value=a,fm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,lm(e,a)))}function nu(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,fm(t),t=t.next;while(t!==s)}e.action=null}function fm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function dm(e,t){return t}function hm(e,t){if(Oe){var a=Ye.formState;if(a!==null){e:{var s=Re;if(Oe){if(Qe){t:{for(var c=Qe,f=rn;c.nodeType!==8;){if(!f){c=null;break t}if(c=ln(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){Qe=ln(c.nextSibling),s=c.data==="F!";break e}}ya(s)}s=!1}s&&(t=a[0])}}return a=Mt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dm,lastRenderedState:t},a.queue=s,a=jm.bind(null,Re,s),s.dispatch=a,s=tu(!1),f=lu.bind(null,Re,!1,s.queue),s=Mt(),c={state:t,dispatch:null,action:e,pending:null},s.queue=c,a=Ux.bind(null,Re,c,f,a),c.dispatch=a,s.memoizedState=e,[t,a,!1]}function mm(e){var t=at();return pm(t,Ie,e)}function pm(e,t,a){if(t=$c(e,t,dm)[0],e=xi(Qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=es(t)}catch(v){throw v===Ko?ui:v}else s=t;t=at();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(Re.flags|=2048,er(9,{destroy:void 0},Hx.bind(null,c,a),null)),[s,f,e]}function Hx(e,t){e.action=t}function gm(e){var t=at(),a=Ie;if(a!==null)return pm(t,a,e);at(),t=t.memoizedState,a=at();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function er(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=Re.updateQueue,t===null&&(t=vi(),Re.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 ym(){return at().memoizedState}function Si(e,t,a,s){var c=Mt();Re.flags|=e,c.memoizedState=er(1|t,{destroy:void 0},a,s===void 0?null:s)}function wi(e,t,a,s){var c=at();s=s===void 0?null:s;var f=c.memoizedState.inst;Ie!==null&&s!==null&&Qc(s,Ie.memoizedState.deps)?c.memoizedState=er(t,f,a,s):(Re.flags|=e,c.memoizedState=er(1|t,f,a,s))}function vm(e,t){Si(8390656,8,e,t)}function au(e,t){wi(2048,8,e,t)}function Ix(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=vi(),Re.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function bm(e){var t=at().memoizedState;return Ix({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function xm(e,t){return wi(4,2,e,t)}function Sm(e,t){return wi(4,4,e,t)}function wm(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 Rm(e,t,a){a=a!=null?a.concat([e]):null,wi(4,4,wm.bind(null,t,e),a)}function ou(){}function Em(e,t){var a=at();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Qc(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Tm(e,t){var a=at();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Qc(t,s[1]))return s[0];if(s=e(),lo){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[s,t],s}function ru(e,t,a){return a===void 0||(Xn&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Cp(),Re.lanes|=e,Ca|=e,a)}function Cm(e,t,a,s){return It(a,t)?a:Jo.current!==null?(e=ru(e,a,s),It(e,t)||(it=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Ae&261930)===0?(it=!0,e.memoizedState=a):(e=Cp(),Re.lanes|=e,Ca|=e,t)}function Mm(e,t,a,s,c){var f=Y.p;Y.p=f!==0&&8>f?f:8;var v=U.T,R={};U.T=R,lu(e,!1,t,a);try{var A=c(),I=U.S;if(I!==null&&I(R,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var X=kx(A,s);ts(e,t,X,Xt(e))}else ts(e,t,s,Xt(e))}catch(K){ts(e,t,{then:function(){},status:"rejected",reason:K},Xt())}finally{Y.p=f,v!==null&&R.types!==null&&(v.types=R.types),U.T=v}}function Px(){}function su(e,t,a,s){if(e.tag!==5)throw Error(i(476));var c=_m(e).queue;Mm(e,c,t,Z,a===null?Px:function(){return Am(e),a(s)})}function _m(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:Z},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Am(e){var t=_m(e);t.next===null&&(t=e.alternate.memoizedState),ts(e,t.next.queue,{},Xt())}function iu(){return bt(vs)}function Nm(){return at().memoizedState}function Om(){return at().memoizedState}function qx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Xt();e=xa(a);var s=Sa(t,e,a);s!==null&&(Dt(s,t,a),Zr(s,t,a)),t={cache:Dc()},e.payload=t;return}t=t.return}}function Vx(e,t,a){var s=Xt();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ri(e)?zm(t,a):(a=Tc(e,t,a,s),a!==null&&(Dt(a,e,s),Lm(a,t,s)))}function jm(e,t,a){var s=Xt();ts(e,t,a,s)}function ts(e,t,a,s){var c={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ri(e))zm(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,R=f(v,a);if(c.hasEagerState=!0,c.eagerState=R,It(R,v))return ai(e,t,c,0),Ye===null&&ni(),!1}catch{}if(a=Tc(e,t,c,s),a!==null)return Dt(a,e,s),Lm(a,t,s),!0}return!1}function lu(e,t,a,s){if(s={lane:2,revertLane:Iu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ri(e)){if(t)throw Error(i(479))}else t=Tc(e,a,s,2),t!==null&&Dt(t,e,2)}function Ri(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function zm(e,t){Wo=gi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Lm(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,Hd(e,a)}}var ns={readContext:bt,use:bi,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};ns.useEffectEvent=et;var km={readContext:bt,use:bi,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:vm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Si(4194308,4,wm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Si(4194308,4,e,t)},useInsertionEffect:function(e,t){Si(4,2,e,t)},useMemo:function(e,t){var a=Mt();t=t===void 0?null:t;var s=e();if(lo){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=Mt();if(a!==void 0){var c=a(t);if(lo){we(!0);try{a(t)}finally{we(!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,Re,e),[s.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=tu(e);var t=e.queue,a=jm.bind(null,Re,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ou,useDeferredValue:function(e,t){var a=Mt();return ru(a,e,t)},useTransition:function(){var e=tu(!1);return e=Mm.bind(null,Re,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=Re,c=Mt();if(Oe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Ye===null)throw Error(i(349));(Ae&127)!==0||nm(s,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,vm(om.bind(null,s,f,e),[e]),s.flags|=2048,er(9,{destroy:void 0},am.bind(null,s,f,a,t),null),a},useId:function(){var e=Mt(),t=Ye.identifierPrefix;if(Oe){var a=_n,s=Mn;a=(s&~(1<<32-ze(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=yi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Dx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:iu,useFormState:hm,useActionState:hm,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=lu.bind(null,Re,!0,a),a.dispatch=t,[e,t]},useMemoCache:Wc,useCacheRefresh:function(){return Mt().memoizedState=qx.bind(null,Re)},useEffectEvent:function(e){var t=Mt(),a={impl:e};return t.memoizedState=a,function(){if((De&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},cu={readContext:bt,use:bi,useCallback:Em,useContext:bt,useEffect:au,useImperativeHandle:Rm,useInsertionEffect:xm,useLayoutEffect:Sm,useMemo:Tm,useReducer:xi,useRef:ym,useState:function(){return xi(Qn)},useDebugValue:ou,useDeferredValue:function(e,t){var a=at();return Cm(a,Ie.memoizedState,e,t)},useTransition:function(){var e=xi(Qn)[0],t=at().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:tm,useId:Nm,useHostTransitionStatus:iu,useFormState:mm,useActionState:mm,useOptimistic:function(e,t){var a=at();return im(a,Ie,e,t)},useMemoCache:Wc,useCacheRefresh:Om};cu.useEffectEvent=bm;var Dm={readContext:bt,use:bi,useCallback:Em,useContext:bt,useEffect:au,useImperativeHandle:Rm,useInsertionEffect:xm,useLayoutEffect:Sm,useMemo:Tm,useReducer:eu,useRef:ym,useState:function(){return eu(Qn)},useDebugValue:ou,useDeferredValue:function(e,t){var a=at();return Ie===null?ru(a,e,t):Cm(a,Ie.memoizedState,e,t)},useTransition:function(){var e=eu(Qn)[0],t=at().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:tm,useId:Nm,useHostTransitionStatus:iu,useFormState:gm,useActionState:gm,useOptimistic:function(e,t){var a=at();return Ie!==null?im(a,Ie,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:Om};Dm.useEffectEvent=bm;function uu(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:g({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var fu={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=Xt(),c=xa(s);c.payload=t,a!=null&&(c.callback=a),t=Sa(e,c,s),t!==null&&(Dt(t,e,s),Zr(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=Xt(),c=xa(s);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Sa(e,c,s),t!==null&&(Dt(t,e,s),Zr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Xt(),s=xa(a);s.tag=2,t!=null&&(s.callback=t),t=Sa(e,s,a),t!==null&&(Dt(t,e,a),Zr(t,e,a))}};function Bm(e,t,a,s,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,v):t.prototype&&t.prototype.isPureReactComponent?!qr(a,s)||!qr(c,f):!0}function Um(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&&fu.enqueueReplaceState(t,t.state,null)}function co(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=g({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Hm(e){ti(e)}function Im(e){console.error(e)}function Pm(e){ti(e)}function Ei(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qm(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 du(e,t,a){return a=xa(a),a.tag=3,a.payload={element:null},a.callback=function(){Ei(e,t)},a}function Vm(e){return e=xa(e),e.tag=3,e}function Ym(e,t,a,s){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=s.value;e.payload=function(){return c(f)},e.callback=function(){qm(t,a,s)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){qm(t,a,s),typeof c!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function Yx(e,t,a,s,c){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Xo(t,a,c,!0),a=qt.current,a!==null){switch(a.tag){case 31:case 13:return sn===null?Di():a.alternate===null&&tt===0&&(tt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,s===fi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),Bu(e,s,c)),!1;case 22:return a.flags|=65536,s===fi?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)),Bu(e,s,c)),!1}throw Error(i(435,a.tag))}return Bu(e,s,c),Di(),!1}if(Oe)return t=qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,s!==Oc&&(e=Error(i(422),{cause:s}),Gr(nn(e,a)))):(s!==Oc&&(t=Error(i(423),{cause:s}),Gr(nn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,s=nn(s,a),c=du(e.stateNode,s,c),qc(e,c),tt!==4&&(tt=2)),!1;var f=Error(i(520),{cause:s});if(f=nn(f,a),us===null?us=[f]:us.push(f),tt!==4&&(tt=2),t===null)return!0;s=nn(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=du(a.stateNode,s,e),qc(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ma===null||!Ma.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Vm(c),Ym(c,e,a,s),qc(a,c),!1}a=a.return}while(a!==null);return!1}var hu=Error(i(461)),it=!1;function xt(e,t,a,s){t.child=e===null?Fh(t,null,a,s):io(t,e.child,a,s)}function Gm(e,t,a,s,c){a=a.render;var f=t.ref;if("ref"in s){var v={};for(var R in s)R!=="ref"&&(v[R]=s[R])}else v=s;return ao(t),s=Fc(e,t,a,v,f,c),R=Kc(),e!==null&&!it?(Zc(e,t,c),Fn(e,t,c)):(Oe&&R&&Ac(t),t.flags|=1,xt(e,t,s,c),t.child)}function Xm(e,t,a,s,c){if(e===null){var f=a.type;return typeof f=="function"&&!Cc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Qm(e,t,f,s,c)):(e=ri(a.type,null,s,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Su(e,c)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:qr,a(v,s)&&e.ref===t.ref)return Fn(e,t,c)}return t.flags|=1,e=qn(f,s),e.ref=t.ref,e.return=t,t.child=e}function Qm(e,t,a,s,c){if(e!==null){var f=e.memoizedProps;if(qr(f,s)&&e.ref===t.ref)if(it=!1,t.pendingProps=s=f,Su(e,c))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,Fn(e,t,c)}return mu(e,t,a,s,c)}function Fm(e,t,a,s){var c=s.children,f=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(f=f!==null?f.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&~f}else s=0,t.child=null;return Km(e,t,f,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ci(t,f!==null?f.cachePool:null),f!==null?Jh(t,f):Yc(),Wh(t);else return s=t.lanes=536870912,Km(e,t,f!==null?f.baseLanes|a:a,a,s)}else f!==null?(ci(t,f.cachePool),Jh(t,f),Ra(),t.memoizedState=null):(e!==null&&ci(t,null),Yc(),Ra());return xt(e,t,c,a),t.child}function as(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Km(e,t,a,s,c){var f=Uc();return f=f===null?null:{parent:rt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&ci(t,null),Yc(),Wh(t),e!==null&&Xo(e,t,s,!0),t.childLanes=c,null}function Ti(e,t){return t=Mi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zm(e,t,a){return io(t,e.child,null,a),e=Ti(t,t.pendingProps),e.flags|=2,Vt(t),t.memoizedState=null,e}function Gx(e,t,a){var s=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(s.mode==="hidden")return e=Ti(t,s),t.lanes=536870912,as(null,e);if(Xc(t),(e=Qe)?(e=lg(e,rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Mn,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},a=zh(e),a.return=t,t.child=a,vt=t,Qe=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return Ti(t,s)}var f=e.memoizedState;if(f!==null){var v=f.dehydrated;if(Xc(t),c)if(t.flags&256)t.flags&=-257,t=Zm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(it||Xo(e,t,a,!1),c=(a&e.childLanes)!==0,it||c){if(s=Ye,s!==null&&(v=Id(s,a),v!==0&&v!==f.retryLane))throw f.retryLane=v,$a(e,v),Dt(s,e,v),hu;Di(),t=Zm(e,t,a)}else e=f.treeContext,Qe=ln(v.nextSibling),vt=t,Oe=!0,ga=null,rn=!1,e!==null&&Dh(t,e),t=Ti(t,s),t.flags|=4096;return t}return e=qn(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ci(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(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mu(e,t,a,s,c){return ao(t),a=Fc(e,t,a,s,void 0,c),s=Kc(),e!==null&&!it?(Zc(e,t,c),Fn(e,t,c)):(Oe&&s&&Ac(t),t.flags|=1,xt(e,t,a,c),t.child)}function Jm(e,t,a,s,c,f){return ao(t),t.updateQueue=null,a=em(t,s,a,c),$h(e),s=Kc(),e!==null&&!it?(Zc(e,t,f),Fn(e,t,f)):(Oe&&s&&Ac(t),t.flags|=1,xt(e,t,a,f),t.child)}function Wm(e,t,a,s,c){if(ao(t),t.stateNode===null){var f=qo,v=a.contextType;typeof v=="object"&&v!==null&&(f=bt(v)),f=new a(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=fu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},Ic(t),v=a.contextType,f.context=typeof v=="object"&&v!==null?bt(v):qo,f.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(uu(t,a,v,s),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&fu.enqueueReplaceState(f,f.state,null),Wr(t,s,f,c),Jr(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var R=t.memoizedProps,A=co(a,R);f.props=A;var I=f.context,X=a.contextType;v=qo,typeof X=="object"&&X!==null&&(v=bt(X));var K=a.getDerivedStateFromProps;X=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,X||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(R||I!==v)&&Um(t,f,s,v),ba=!1;var P=t.memoizedState;f.state=P,Wr(t,s,f,c),Jr(),I=t.memoizedState,R||P!==I||ba?(typeof K=="function"&&(uu(t,a,K,s),I=t.memoizedState),(A=ba||Bm(t,a,A,s,P,I,v))?(X||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=I),f.props=s,f.state=I,f.context=v,s=A):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,Pc(e,t),v=t.memoizedProps,X=co(a,v),f.props=X,K=t.pendingProps,P=f.context,I=a.contextType,A=qo,typeof I=="object"&&I!==null&&(A=bt(I)),R=a.getDerivedStateFromProps,(I=typeof R=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==K||P!==A)&&Um(t,f,s,A),ba=!1,P=t.memoizedState,f.state=P,Wr(t,s,f,c),Jr();var V=t.memoizedState;v!==K||P!==V||ba||e!==null&&e.dependencies!==null&&ii(e.dependencies)?(typeof R=="function"&&(uu(t,a,R,s),V=t.memoizedState),(X=ba||Bm(t,a,X,s,P,V,A)||e!==null&&e.dependencies!==null&&ii(e.dependencies))?(I||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,V,A),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,V,A)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=V),f.props=s,f.state=V,f.context=A,s=X):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,Ci(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=io(t,e.child,null,c),t.child=io(t,null,a,c)):xt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=Fn(e,t,c),e}function $m(e,t,a,s){return to(),t.flags|=256,xt(e,t,a,s),t.child}var pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gu(e){return{baseLanes:e,cachePool:qh()}}function yu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Gt),e}function ep(e,t,a){var s=t.pendingProps,c=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(c?wa(t):Ra(),(e=Qe)?(e=lg(e,rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Mn,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},a=zh(e),a.return=t,t.child=a,vt=t,Qe=null)):e=null,e===null)throw ya(t);return $u(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,c?(Ra(),c=t.mode,R=Mi({mode:"hidden",children:R},c),s=eo(s,c,a,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=gu(a),s.childLanes=yu(e,v,a),t.memoizedState=pu,as(null,s)):(wa(t),vu(t,R))}var A=e.memoizedState;if(A!==null&&(R=A.dehydrated,R!==null)){if(f)t.flags&256?(wa(t),t.flags&=-257,t=bu(e,t,a)):t.memoizedState!==null?(Ra(),t.child=e.child,t.flags|=128,t=null):(Ra(),R=s.fallback,c=t.mode,s=Mi({mode:"visible",children:s.children},c),R=eo(R,c,a,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,io(t,e.child,null,a),s=t.child,s.memoizedState=gu(a),s.childLanes=yu(e,v,a),t.memoizedState=pu,t=as(null,s));else if(wa(t),$u(R)){if(v=R.nextSibling&&R.nextSibling.dataset,v)var I=v.dgst;v=I,s=Error(i(419)),s.stack="",s.digest=v,Gr({value:s,source:null,stack:null}),t=bu(e,t,a)}else if(it||Xo(e,t,a,!1),v=(a&e.childLanes)!==0,it||v){if(v=Ye,v!==null&&(s=Id(v,a),s!==0&&s!==A.retryLane))throw A.retryLane=s,$a(e,s),Dt(v,e,s),hu;Wu(R)||Di(),t=bu(e,t,a)}else Wu(R)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,Qe=ln(R.nextSibling),vt=t,Oe=!0,ga=null,rn=!1,e!==null&&Dh(t,e),t=vu(t,s.children),t.flags|=4096);return t}return c?(Ra(),R=s.fallback,c=t.mode,A=e.child,I=A.sibling,s=qn(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,I!==null?R=qn(I,R):(R=eo(R,c,a,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,as(null,s),s=t.child,R=e.child.memoizedState,R===null?R=gu(a):(c=R.cachePool,c!==null?(A=rt._currentValue,c=c.parent!==A?{parent:A,pool:A}:c):c=qh(),R={baseLanes:R.baseLanes|a,cachePool:c}),s.memoizedState=R,s.childLanes=yu(e,v,a),t.memoizedState=pu,as(e.child,s)):(wa(t),a=e.child,e=a.sibling,a=qn(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=a,t.memoizedState=null,a)}function vu(e,t){return t=Mi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mi(e,t){return e=Pt(22,e,null,t),e.lanes=0,e}function bu(e,t,a){return io(t,e.child,null,a),e=vu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tp(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Lc(e.return,t,a)}function xu(e,t,a,s,c,f){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:c,treeForkCount:f}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=a,v.tailMode=c,v.treeForkCount=f)}function np(e,t,a){var s=t.pendingProps,c=s.revealOrder,f=s.tail;s=s.children;var v=nt.current,R=(v&2)!==0;if(R?(v=v&1|2,t.flags|=128):v&=1,W(nt,v),xt(e,t,s,a),s=Oe?Yr:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tp(e,a,t);else if(e.tag===19)tp(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&&pi(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),xu(t,!1,c,a,f,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&&pi(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}xu(t,!0,a,null,f,s);break;case"together":xu(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Fn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ca|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Xo(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=qn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=qn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Su(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ii(e)))}function Xx(e,t,a){switch(t.tag){case 3:ge(t,t.stateNode.containerInfo),va(t,rt,e.memoizedState.cache),to();break;case 27:case 5:ve(t);break;case 4:ge(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xc(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(wa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ep(e,t,a):(wa(t),e=Fn(e,t,a),e!==null?e.sibling:null);wa(t);break;case 19:var c=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Xo(e,t,a,!1),s=(a&t.childLanes)!==0),c){if(s)return np(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),W(nt,nt.current),s)break;return null;case 22:return t.lanes=0,Fm(e,t,a,t.pendingProps);case 24:va(t,rt,e.memoizedState.cache)}return Fn(e,t,a)}function ap(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!Su(e,a)&&(t.flags&128)===0)return it=!1,Xx(e,t,a);it=(e.flags&131072)!==0}else it=!1,Oe&&(t.flags&1048576)!==0&&kh(t,Yr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ro(t.elementType),t.type=e,typeof e=="function")Cc(e)?(s=co(e,s),t.tag=1,t=Wm(null,t,e,s,a)):(t.tag=0,t=mu(null,t,e,s,a));else{if(e!=null){var c=e.$$typeof;if(c===k){t.tag=11,t=Gm(null,t,e,s,a);break e}else if(c===L){t.tag=14,t=Xm(null,t,e,s,a);break e}}throw t=fe(e)||e,Error(i(306,t,""))}}return t;case 0:return mu(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,c=co(s,t.pendingProps),Wm(e,t,s,c,a);case 3:e:{if(ge(t,t.stateNode.containerInfo),e===null)throw Error(i(387));s=t.pendingProps;var f=t.memoizedState;c=f.element,Pc(e,t),Wr(t,s,null,a);var v=t.memoizedState;if(s=v.cache,va(t,rt,s),s!==f.cache&&kc(t,[rt],a,!0),Jr(),s=v.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=$m(e,t,s,a);break e}else if(s!==c){c=nn(Error(i(424)),t),Gr(c),t=$m(e,t,s,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Qe=ln(e.firstChild),vt=t,Oe=!0,ga=null,rn=!0,a=Fh(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(to(),s===c){t=Fn(e,t,a);break e}xt(e,t,s,a)}t=t.child}return t;case 26:return Ci(e,t),e===null?(a=mg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,s=Vi(se.current).createElement(a),s[yt]=t,s[Nt]=e,St(s,a,e),pt(s),t.stateNode=s):t.memoizedState=mg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ve(t),e===null&&Oe&&(s=t.stateNode=fg(t.type,t.pendingProps,se.current),vt=t,rn=!0,c=Qe,Oa(t.type)?(ef=c,Qe=ln(s.firstChild)):Qe=c),xt(e,t,t.pendingProps.children,a),Ci(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((c=s=Qe)&&(s=wS(s,t.type,t.pendingProps,rn),s!==null?(t.stateNode=s,vt=t,Qe=ln(s.firstChild),rn=!1,c=!0):c=!1),c||ya(t)),ve(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,s=f.children,Ku(c,f)?s=null:v!==null&&Ku(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=Fc(e,t,Bx,null,null,a),vs._currentValue=c),Ci(e,t),xt(e,t,s,a),t.child;case 6:return e===null&&Oe&&((e=a=Qe)&&(a=RS(a,t.pendingProps,rn),a!==null?(t.stateNode=a,vt=t,Qe=null,e=!0):e=!1),e||ya(t)),null;case 13:return ep(e,t,a);case 4:return ge(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=io(t,null,s,a):xt(e,t,s,a),t.child;case 11:return Gm(e,t,t.type,t.pendingProps,a);case 7:return xt(e,t,t.pendingProps,a),t.child;case 8:return xt(e,t,t.pendingProps.children,a),t.child;case 12:return xt(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,va(t,t.type,s.value),xt(e,t,s.children,a),t.child;case 9:return c=t.type._context,s=t.pendingProps.children,ao(t),c=bt(c),s=s(c),t.flags|=1,xt(e,t,s,a),t.child;case 14:return Xm(e,t,t.type,t.pendingProps,a);case 15:return Qm(e,t,t.type,t.pendingProps,a);case 19:return np(e,t,a);case 31:return Gx(e,t,a);case 22:return Fm(e,t,a,t.pendingProps);case 24:return ao(t),s=bt(rt),e===null?(c=Uc(),c===null&&(c=Ye,f=Dc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:s,cache:c},Ic(t),va(t,rt,c)):((e.lanes&a)!==0&&(Pc(e,t),Wr(t,null,null,a),Jr()),c=e.memoizedState,f=t.memoizedState,c.parent!==s?(c={parent:s,cache:s},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),va(t,rt,s)):(s=f.cache,va(t,rt,s),s!==c.cache&&kc(t,[rt],a,!0))),xt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Kn(e){e.flags|=4}function wu(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(Np())e.flags|=8192;else throw so=fi,Hc}else e.flags&=-16777217}function op(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bg(t))if(Np())e.flags|=8192;else throw so=fi,Hc}function _i(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bd():536870912,e.lanes|=t,or|=t)}function os(e,t){if(!Oe)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 Fe(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 Qx(e,t,a){var s=t.pendingProps;switch(Nc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Gn(rt),re(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Go(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jc())),Fe(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Kn(t),f!==null?(Fe(t),op(t,f)):(Fe(t),wu(t,c,null,s,a))):f?f!==e.memoizedState?(Kn(t),Fe(t),op(t,f)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Kn(t),Fe(t),wu(t,c,e,s,a)),null;case 27:if(be(t),a=se.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Kn(t);else{if(!s){if(t.stateNode===null)throw Error(i(166));return Fe(t),null}e=ee.current,Go(t)?Bh(t):(e=fg(c,s,a),t.stateNode=e,Kn(t))}return Fe(t),null;case 5:if(be(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Kn(t);else{if(!s){if(t.stateNode===null)throw Error(i(166));return Fe(t),null}if(f=ee.current,Go(t))Bh(t);else{var v=Vi(se.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?v.createElement(c,{is:s.is}):v.createElement(c)}}f[yt]=t,f[Nt]=s;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=f;e:switch(St(f,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&&Kn(t)}}return Fe(t),wu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Kn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(i(166));if(e=se.current,Go(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,c=vt,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[yt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||eg(e.nodeValue,a)),e||ya(t,!0)}else e=Vi(e).createTextNode(s),e[yt]=t,t.stateNode=e}return Fe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=Go(t),a!==null){if(e===null){if(!s)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[yt]=t}else to(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else a=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Vt(t),t):(Vt(t),null);if((t.flags&128)!==0)throw Error(i(558))}return Fe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Go(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[yt]=t}else to(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),c=!1}else c=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Vt(t),t):(Vt(t),null)}return Vt(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),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==c&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),_i(t,t.updateQueue),Fe(t),null);case 4:return re(),e===null&&Yu(t.stateNode.containerInfo),Fe(t),null;case 10:return Gn(t.type),Fe(t),null;case 19:if(G(nt),s=t.memoizedState,s===null)return Fe(t),null;if(c=(t.flags&128)!==0,f=s.rendering,f===null)if(c)os(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=pi(e),f!==null){for(t.flags|=128,os(s,!1),e=f.updateQueue,t.updateQueue=e,_i(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)jh(a,e),a=a.sibling;return W(nt,nt.current&1|2),Oe&&Vn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ht()>zi&&(t.flags|=128,c=!0,os(s,!1),t.lanes=4194304)}else{if(!c)if(e=pi(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,_i(t,e),os(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!Oe)return Fe(t),null}else 2*ht()-s.renderingStartTime>zi&&a!==536870912&&(t.flags|=128,c=!0,os(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ht(),e.sibling=null,a=nt.current,W(nt,c?a&1|2:a&1),Oe&&Vn(t,s.treeForkCount),e):(Fe(t),null);case 22:case 23:return Vt(t),Gc(),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&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),a=t.updateQueue,a!==null&&_i(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&&G(oo),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Gn(rt),Fe(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fx(e,t){switch(Nc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gn(rt),re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(Vt(t),t.alternate===null)throw Error(i(340));to()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));to()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(nt),null;case 4:return re(),null;case 10:return Gn(t.type),null;case 22:case 23:return Vt(t),Gc(),e!==null&&G(oo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gn(rt),null;case 25:return null;default:return null}}function rp(e,t){switch(Nc(t),t.tag){case 3:Gn(rt),re();break;case 26:case 27:case 5:be(t);break;case 4:re();break;case 31:t.memoizedState!==null&&Vt(t);break;case 13:Vt(t);break;case 19:G(nt);break;case 10:Gn(t.type);break;case 22:case 23:Vt(t),Gc(),e!==null&&G(oo);break;case 24:Gn(rt)}}function rs(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 f=a.create,v=a.inst;s=f(),v.destroy=s}a=a.next}while(a!==c)}}catch(R){Ue(t,t.return,R)}}function Ea(e,t,a){try{var s=t.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var f=c.next;s=f;do{if((s.tag&e)===e){var v=s.inst,R=v.destroy;if(R!==void 0){v.destroy=void 0,c=t;var A=a,I=R;try{I()}catch(X){Ue(c,A,X)}}}s=s.next}while(s!==f)}}catch(X){Ue(t,t.return,X)}}function sp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Zh(t,a)}catch(s){Ue(e,e.return,s)}}}function ip(e,t,a){a.props=co(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Ue(e,t,s)}}function ss(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){Ue(e,t,c)}}function An(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(c){Ue(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){Ue(e,t,c)}else a.current=null}function lp(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){Ue(e,e.return,c)}}function Ru(e,t,a){try{var s=e.stateNode;gS(s,e.type,a,t),s[Nt]=t}catch(c){Ue(e,e.return,c)}}function cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oa(e.type)||e.tag===4}function Eu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cp(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&&Oa(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 Tu(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=In));else if(s!==4&&(s===27&&Oa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Tu(e,t,a),e=e.sibling;e!==null;)Tu(e,t,a),e=e.sibling}function Ai(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&&Oa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ai(e,t,a),e=e.sibling;e!==null;)Ai(e,t,a),e=e.sibling}function up(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);St(t,s,a),t[yt]=e,t[Nt]=a}catch(f){Ue(e,e.return,f)}}var Zn=!1,lt=!1,Cu=!1,fp=typeof WeakSet=="function"?WeakSet:Set,gt=null;function Kx(e,t){if(e=e.containerInfo,Qu=Zi,e=Rh(e),bc(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,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,R=-1,A=-1,I=0,X=0,K=e,P=null;t:for(;;){for(var V;K!==a||c!==0&&K.nodeType!==3||(R=v+c),K!==f||s!==0&&K.nodeType!==3||(A=v+s),K.nodeType===3&&(v+=K.nodeValue.length),(V=K.firstChild)!==null;)P=K,K=V;for(;;){if(K===e)break t;if(P===a&&++I===c&&(R=v),P===f&&++X===s&&(A=v),(V=K.nextSibling)!==null)break;K=P,P=K.parentNode}K=V}a=R===-1||A===-1?null:{start:R,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Fu={focusedElem:e,selectionRange:a},Zi=!1,gt=t;gt!==null;)if(t=gt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,gt=e;else for(;gt!==null;){switch(t=gt,f=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&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,s=a.stateNode;try{var ce=co(a.type,c);e=s.getSnapshotBeforeUpdate(ce,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Ue(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Ju(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ju(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,gt=e;break}gt=t.return}}function dp(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(e,a),s&4&&rs(5,a);break;case 1:if(Wn(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){Ue(a,a.return,v)}else{var c=co(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ue(a,a.return,v)}}s&64&&sp(a),s&512&&ss(a,a.return);break;case 3:if(Wn(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{Zh(e,t)}catch(v){Ue(a,a.return,v)}}break;case 27:t===null&&s&4&&up(a);case 26:case 5:Wn(e,a),t===null&&s&4&&lp(a),s&512&&ss(a,a.return);break;case 12:Wn(e,a);break;case 31:Wn(e,a),s&4&&pp(e,a);break;case 13:Wn(e,a),s&4&&gp(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=oS.bind(null,a),ES(e,a))));break;case 22:if(s=a.memoizedState!==null||Zn,!s){t=t!==null&&t.memoizedState!==null||lt,c=Zn;var f=lt;Zn=s,(lt=t)&&!f?$n(e,a,(a.subtreeFlags&8772)!==0):Wn(e,a),Zn=c,lt=f}break;case 30:break;default:Wn(e,a)}}function hp(e){var t=e.alternate;t!==null&&(e.alternate=null,hp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&nc(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 Ke=null,jt=!1;function Jn(e,t,a){for(a=a.child;a!==null;)mp(e,t,a),a=a.sibling}function mp(e,t,a){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount(Xe,a)}catch{}switch(a.tag){case 26:lt||An(a,t),Jn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:lt||An(a,t);var s=Ke,c=jt;Oa(a.type)&&(Ke=a.stateNode,jt=!1),Jn(e,t,a),ps(a.stateNode),Ke=s,jt=c;break;case 5:lt||An(a,t);case 6:if(s=Ke,c=jt,Ke=null,Jn(e,t,a),Ke=s,jt=c,Ke!==null)if(jt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(a.stateNode)}catch(f){Ue(a,t,f)}else try{Ke.removeChild(a.stateNode)}catch(f){Ue(a,t,f)}break;case 18:Ke!==null&&(jt?(e=Ke,sg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),dr(e)):sg(Ke,a.stateNode));break;case 4:s=Ke,c=jt,Ke=a.stateNode.containerInfo,jt=!0,Jn(e,t,a),Ke=s,jt=c;break;case 0:case 11:case 14:case 15:Ea(2,a,t),lt||Ea(4,a,t),Jn(e,t,a);break;case 1:lt||(An(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&ip(a,t,s)),Jn(e,t,a);break;case 21:Jn(e,t,a);break;case 22:lt=(s=lt)||a.memoizedState!==null,Jn(e,t,a),lt=s;break;default:Jn(e,t,a)}}function pp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{dr(e)}catch(a){Ue(t,t.return,a)}}}function gp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{dr(e)}catch(a){Ue(t,t.return,a)}}function Zx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new fp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new fp),t;default:throw Error(i(435,e.tag))}}function Ni(e,t){var a=Zx(e);t.forEach(function(s){if(!a.has(s)){a.add(s);var c=rS.bind(null,e,s);s.then(c,c)}})}function zt(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var c=a[s],f=e,v=t,R=v;e:for(;R!==null;){switch(R.tag){case 27:if(Oa(R.type)){Ke=R.stateNode,jt=!1;break e}break;case 5:Ke=R.stateNode,jt=!1;break e;case 3:case 4:Ke=R.stateNode.containerInfo,jt=!0;break e}R=R.return}if(Ke===null)throw Error(i(160));mp(f,v,c),Ke=null,jt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yp(t,e),t=t.sibling}var xn=null;function yp(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zt(t,e),Lt(e),s&4&&(Ea(3,e,e.return),rs(3,e),Ea(5,e,e.return));break;case 1:zt(t,e),Lt(e),s&512&&(lt||a===null||An(a,a.return)),s&64&&Zn&&(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=xn;if(zt(t,e),Lt(e),s&512&&(lt||a===null||An(a,a.return)),s&4){var f=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":f=c.getElementsByTagName("title")[0],(!f||f[zr]||f[yt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(s),c.head.insertBefore(f,c.querySelector("head > title"))),St(f,s,a),f[yt]=e,pt(f),s=f;break e;case"link":var v=yg("link","href",c).get(s+(a.href||""));if(v){for(var R=0;R<v.length;R++)if(f=v[R],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(R,1);break t}}f=c.createElement(s),St(f,s,a),c.head.appendChild(f);break;case"meta":if(v=yg("meta","content",c).get(s+(a.content||""))){for(R=0;R<v.length;R++)if(f=v[R],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(R,1);break t}}f=c.createElement(s),St(f,s,a),c.head.appendChild(f);break;default:throw Error(i(468,s))}f[yt]=e,pt(f),s=f}e.stateNode=s}else vg(c,e.type,e.stateNode);else e.stateNode=gg(c,s,e.memoizedProps);else f!==s?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,s===null?vg(c,e.type,e.stateNode):gg(c,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ru(e,e.memoizedProps,a.memoizedProps)}break;case 27:zt(t,e),Lt(e),s&512&&(lt||a===null||An(a,a.return)),a!==null&&s&4&&Ru(e,e.memoizedProps,a.memoizedProps);break;case 5:if(zt(t,e),Lt(e),s&512&&(lt||a===null||An(a,a.return)),e.flags&32){c=e.stateNode;try{ko(c,"")}catch(ce){Ue(e,e.return,ce)}}s&4&&e.stateNode!=null&&(c=e.memoizedProps,Ru(e,c,a!==null?a.memoizedProps:c)),s&1024&&(Cu=!0);break;case 6:if(zt(t,e),Lt(e),s&4){if(e.stateNode===null)throw Error(i(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(ce){Ue(e,e.return,ce)}}break;case 3:if(Xi=null,c=xn,xn=Yi(t.containerInfo),zt(t,e),xn=c,Lt(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{dr(t.containerInfo)}catch(ce){Ue(e,e.return,ce)}Cu&&(Cu=!1,vp(e));break;case 4:s=xn,xn=Yi(e.stateNode.containerInfo),zt(t,e),Lt(e),xn=s;break;case 12:zt(t,e),Lt(e);break;case 31:zt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ni(e,s)));break;case 13:zt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ji=ht()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ni(e,s)));break;case 22:c=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,I=Zn,X=lt;if(Zn=I||c,lt=X||A,zt(t,e),lt=X,Zn=I,Lt(e),s&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||A||Zn||lt||uo(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(f=A.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{R=A.stateNode;var K=A.memoizedProps.style,P=K!=null&&K.hasOwnProperty("display")?K.display:null;R.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(ce){Ue(A,A.return,ce)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=c?"":A.memoizedProps}catch(ce){Ue(A,A.return,ce)}}}else if(t.tag===18){if(a===null){A=t;try{var V=A.stateNode;c?ig(V,!0):ig(A.stateNode,!1)}catch(ce){Ue(A,A.return,ce)}}}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,Ni(e,a))));break;case 19:zt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ni(e,s)));break;case 30:break;case 21:break;default:zt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(cp(s)){a=s;break}s=s.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=Eu(e);Ai(e,f,c);break;case 5:var v=a.stateNode;a.flags&32&&(ko(v,""),a.flags&=-33);var R=Eu(e);Ai(e,R,v);break;case 3:case 4:var A=a.stateNode.containerInfo,I=Eu(e);Tu(e,I,A);break;default:throw Error(i(161))}}catch(X){Ue(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dp(e,t.alternate,t),t=t.sibling}function uo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ea(4,t,t.return),uo(t);break;case 1:An(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&ip(t,t.return,a),uo(t);break;case 27:ps(t.stateNode);case 26:case 5:An(t,t.return),uo(t);break;case 22:t.memoizedState===null&&uo(t);break;case 30:uo(t);break;default:uo(t)}e=e.sibling}}function $n(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:$n(c,f,a),rs(4,f);break;case 1:if($n(c,f,a),s=f,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(I){Ue(s,s.return,I)}if(s=f,c=s.updateQueue,c!==null){var R=s.stateNode;try{var A=c.shared.hiddenCallbacks;if(A!==null)for(c.shared.hiddenCallbacks=null,c=0;c<A.length;c++)Kh(A[c],R)}catch(I){Ue(s,s.return,I)}}a&&v&64&&sp(f),ss(f,f.return);break;case 27:up(f);case 26:case 5:$n(c,f,a),a&&s===null&&v&4&&lp(f),ss(f,f.return);break;case 12:$n(c,f,a);break;case 31:$n(c,f,a),a&&v&4&&pp(c,f);break;case 13:$n(c,f,a),a&&v&4&&gp(c,f);break;case 22:f.memoizedState===null&&$n(c,f,a),ss(f,f.return);break;case 30:break;default:$n(c,f,a)}t=t.sibling}}function Mu(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&&Xr(a))}function _u(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xr(e))}function Sn(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bp(e,t,a,s),t=t.sibling}function bp(e,t,a,s){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Sn(e,t,a,s),c&2048&&rs(9,t);break;case 1:Sn(e,t,a,s);break;case 3:Sn(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&&Xr(e)));break;case 12:if(c&2048){Sn(e,t,a,s),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,R=f.onPostCommit;typeof R=="function"&&R(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Ue(t,t.return,A)}}else Sn(e,t,a,s);break;case 31:Sn(e,t,a,s);break;case 13:Sn(e,t,a,s);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Sn(e,t,a,s):is(e,t):f._visibility&2?Sn(e,t,a,s):(f._visibility|=2,tr(e,t,a,s,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Mu(v,t);break;case 24:Sn(e,t,a,s),c&2048&&_u(t.alternate,t);break;default:Sn(e,t,a,s)}}function tr(e,t,a,s,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,v=t,R=a,A=s,I=v.flags;switch(v.tag){case 0:case 11:case 15:tr(f,v,R,A,c),rs(8,v);break;case 23:break;case 22:var X=v.stateNode;v.memoizedState!==null?X._visibility&2?tr(f,v,R,A,c):is(f,v):(X._visibility|=2,tr(f,v,R,A,c)),c&&I&2048&&Mu(v.alternate,v);break;case 24:tr(f,v,R,A,c),c&&I&2048&&_u(v.alternate,v);break;default:tr(f,v,R,A,c)}t=t.sibling}}function is(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:is(a,s),c&2048&&Mu(s.alternate,s);break;case 24:is(a,s),c&2048&&_u(s.alternate,s);break;default:is(a,s)}t=t.sibling}}var ls=8192;function nr(e,t,a){if(e.subtreeFlags&ls)for(e=e.child;e!==null;)xp(e,t,a),e=e.sibling}function xp(e,t,a){switch(e.tag){case 26:nr(e,t,a),e.flags&ls&&e.memoizedState!==null&&DS(a,xn,e.memoizedState,e.memoizedProps);break;case 5:nr(e,t,a);break;case 3:case 4:var s=xn;xn=Yi(e.stateNode.containerInfo),nr(e,t,a),xn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ls,ls=16777216,nr(e,t,a),ls=s):nr(e,t,a));break;default:nr(e,t,a)}}function Sp(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 cs(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];gt=s,Rp(s,e)}Sp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wp(e),e=e.sibling}function wp(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&Ea(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Oi(e)):cs(e);break;default:cs(e)}}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];gt=s,Rp(s,e)}Sp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ea(8,t,t.return),Oi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Oi(t));break;default:Oi(t)}e=e.sibling}}function Rp(e,t){for(;gt!==null;){var a=gt;switch(a.tag){case 0:case 11:case 15:Ea(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:Xr(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,gt=s;else e:for(a=e;gt!==null;){s=gt;var c=s.sibling,f=s.return;if(hp(s),s===a){gt=null;break e}if(c!==null){c.return=f,gt=c;break e}gt=f}}}var Jx={getCacheForType:function(e){var t=bt(rt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return bt(rt).controller.signal}},Wx=typeof WeakMap=="function"?WeakMap:Map,De=0,Ye=null,Me=null,Ae=0,Be=0,Yt=null,Ta=!1,ar=!1,Au=!1,ea=0,tt=0,Ca=0,fo=0,Nu=0,Gt=0,or=0,us=null,kt=null,Ou=!1,ji=0,Ep=0,zi=1/0,Li=null,Ma=null,ut=0,_a=null,rr=null,ta=0,ju=0,zu=null,Tp=null,fs=0,Lu=null;function Xt(){return(De&2)!==0&&Ae!==0?Ae&-Ae:U.T!==null?Iu():Pd()}function Cp(){if(Gt===0)if((Ae&536870912)===0||Oe){var e=qs;qs<<=1,(qs&3932160)===0&&(qs=262144),Gt=e}else Gt=536870912;return e=qt.current,e!==null&&(e.flags|=32),Gt}function Dt(e,t,a){(e===Ye&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(sr(e,0),Aa(e,Ae,Gt,!1)),jr(e,a),((De&2)===0||e!==Ye)&&(e===Ye&&((De&2)===0&&(fo|=a),tt===4&&Aa(e,Ae,Gt,!1)),Nn(e))}function Mp(e,t,a){if((De&6)!==0)throw Error(i(327));var s=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Or(e,t),c=s?tS(e,t):Du(e,t,!0),f=s;do{if(c===0){ar&&!s&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!$x(a)){c=Du(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var R=e;c=us;var A=R.current.memoizedState.isDehydrated;if(A&&(sr(R,v).flags|=256),v=Du(R,v,!1),v!==2){if(Au&&!A){R.errorRecoveryDisabledLanes|=f,fo|=f,c=4;break e}f=kt,kt=c,f!==null&&(kt===null?kt=f:kt.push.apply(kt,f))}c=v}if(f=!1,c!==2)continue}}if(c===1){sr(e,0),Aa(e,t,0,!0);break}e:{switch(s=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Aa(s,t,Gt,!Ta);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=ji+300-ht(),10<c)){if(Aa(s,t,Gt,!Ta),Ys(s,0,!0)!==0)break e;ta=t,s.timeoutHandle=og(_p.bind(null,s,a,kt,Li,Ou,t,Gt,fo,or,Ta,f,"Throttled",-0,0),c);break e}_p(s,a,kt,Li,Ou,t,Gt,fo,or,Ta,f,null,-0,0)}}break}while(!0);Nn(e)}function _p(e,t,a,s,c,f,v,R,A,I,X,K,P,V){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},xp(t,f,K);var ce=(f&62914560)===f?ji-ht():(f&4194048)===f?Ep-ht():0;if(ce=BS(K,ce),ce!==null){ta=f,e.cancelPendingCommit=ce(Dp.bind(null,e,t,f,a,s,c,v,R,A,X,K,null,P,V)),Aa(e,f,v,!I);return}}Dp(e,t,f,a,s,c,v,R,A)}function $x(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],f=c.getSnapshot;c=c.value;try{if(!It(f(),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 Aa(e,t,a,s){t&=~Nu,t&=~fo,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var c=t;0<c;){var f=31-ze(c),v=1<<f;s[f]=-1,c&=~v}a!==0&&Ud(e,a,t)}function ki(){return(De&6)===0?(ds(0),!1):!0}function ku(){if(Me!==null){if(Be===0)var e=Me.return;else e=Me,Yn=no=null,Jc(e),Zo=null,Fr=0,e=Me;for(;e!==null;)rp(e.alternate,e),e=e.return;Me=null}}function sr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,bS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ta=0,ku(),Ye=e,Me=a=qn(e.current,null),Ae=t,Be=0,Yt=null,Ta=!1,ar=Or(e,t),Au=!1,or=Gt=Nu=fo=Ca=tt=0,kt=us=null,Ou=!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-ze(s),f=1<<c;t|=e[c],s&=~f}return ea=t,ni(),a}function Ap(e,t){Re=null,U.H=ns,t===Ko||t===ui?(t=Gh(),Be=3):t===Hc?(t=Gh(),Be=4):Be=t===hu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,Me===null&&(tt=1,Ei(e,nn(t,e.current)))}function Np(){var e=qt.current;return e===null?!0:(Ae&4194048)===Ae?sn===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===sn:!1}function Op(){var e=U.H;return U.H=ns,e===null?ns:e}function jp(){var e=U.A;return U.A=Jx,e}function Di(){tt=4,Ta||(Ae&4194048)!==Ae&&qt.current!==null||(ar=!0),(Ca&134217727)===0&&(fo&134217727)===0||Ye===null||Aa(Ye,Ae,Gt,!1)}function Du(e,t,a){var s=De;De|=2;var c=Op(),f=jp();(Ye!==e||Ae!==t)&&(Li=null,sr(e,t)),t=!1;var v=tt;e:do try{if(Be!==0&&Me!==null){var R=Me,A=Yt;switch(Be){case 8:ku(),v=6;break e;case 3:case 2:case 9:case 6:qt.current===null&&(t=!0);var I=Be;if(Be=0,Yt=null,ir(e,R,A,I),a&&ar){v=0;break e}break;default:I=Be,Be=0,Yt=null,ir(e,R,A,I)}}eS(),v=tt;break}catch(X){Ap(e,X)}while(!0);return t&&e.shellSuspendCounter++,Yn=no=null,De=s,U.H=c,U.A=f,Me===null&&(Ye=null,Ae=0,ni()),v}function eS(){for(;Me!==null;)zp(Me)}function tS(e,t){var a=De;De|=2;var s=Op(),c=jp();Ye!==e||Ae!==t?(Li=null,zi=ht()+500,sr(e,t)):ar=Or(e,t);e:do try{if(Be!==0&&Me!==null){t=Me;var f=Yt;t:switch(Be){case 1:Be=0,Yt=null,ir(e,t,f,1);break;case 2:case 9:if(Vh(f)){Be=0,Yt=null,Lp(t);break}t=function(){Be!==2&&Be!==9||Ye!==e||(Be=7),Nn(e)},f.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Vh(f)?(Be=0,Yt=null,Lp(t)):(Be=0,Yt=null,ir(e,t,f,7));break;case 5:var v=null;switch(Me.tag){case 26:v=Me.memoizedState;case 5:case 27:var R=Me;if(v?bg(v):R.stateNode.complete){Be=0,Yt=null;var A=R.sibling;if(A!==null)Me=A;else{var I=R.return;I!==null?(Me=I,Bi(I)):Me=null}break t}}Be=0,Yt=null,ir(e,t,f,5);break;case 6:Be=0,Yt=null,ir(e,t,f,6);break;case 8:ku(),tt=6;break e;default:throw Error(i(462))}}nS();break}catch(X){Ap(e,X)}while(!0);return Yn=no=null,U.H=s,U.A=c,De=a,Me!==null?0:(Ye=null,Ae=0,ni(),tt)}function nS(){for(;Me!==null&&!fa();)zp(Me)}function zp(e){var t=ap(e.alternate,e,ea);e.memoizedProps=e.pendingProps,t===null?Bi(e):Me=t}function Lp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Jm(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=Jm(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Jc(t);default:rp(a,t),t=Me=jh(t,ea),t=ap(a,t,ea)}e.memoizedProps=e.pendingProps,t===null?Bi(e):Me=t}function ir(e,t,a,s){Yn=no=null,Jc(t),Zo=null,Fr=0;var c=t.return;try{if(Yx(e,c,t,a,Ae)){tt=1,Ei(e,nn(a,e.current)),Me=null;return}}catch(f){if(c!==null)throw Me=c,f;tt=1,Ei(e,nn(a,e.current)),Me=null;return}t.flags&32768?(Oe||s===1?e=!0:ar||(Ae&536870912)!==0?e=!1:(Ta=e=!0,(s===2||s===9||s===3||s===6)&&(s=qt.current,s!==null&&s.tag===13&&(s.flags|=16384))),kp(t,e)):Bi(t)}function Bi(e){var t=e;do{if((t.flags&32768)!==0){kp(t,Ta);return}e=t.return;var a=Qx(t.alternate,t,ea);if(a!==null){Me=a;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);tt===0&&(tt=5)}function kp(e,t){do{var a=Fx(e.alternate,e);if(a!==null){a.flags&=32767,Me=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=a}while(e!==null);tt=6,Me=null}function Dp(e,t,a,s,c,f,v,R,A){e.cancelPendingCommit=null;do Ui();while(ut!==0);if((De&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=Ec,kb(e,a,f,v,R,A),e===Ye&&(Me=Ye=null,Ae=0),rr=t,_a=e,ta=a,ju=f,zu=c,Tp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sS(da,function(){return Pp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,c=Y.p,Y.p=2,v=De,De|=4;try{Kx(e,t,a)}finally{De=v,Y.p=c,U.T=s}}ut=1,Bp(),Up(),Hp()}}function Bp(){if(ut===1){ut=0;var e=_a,t=rr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var s=Y.p;Y.p=2;var c=De;De|=4;try{yp(t,e);var f=Fu,v=Rh(e.containerInfo),R=f.focusedElem,A=f.selectionRange;if(v!==R&&R&&R.ownerDocument&&wh(R.ownerDocument.documentElement,R)){if(A!==null&&bc(R)){var I=A.start,X=A.end;if(X===void 0&&(X=I),"selectionStart"in R)R.selectionStart=I,R.selectionEnd=Math.min(X,R.value.length);else{var K=R.ownerDocument||document,P=K&&K.defaultView||window;if(P.getSelection){var V=P.getSelection(),ce=R.textContent.length,ye=Math.min(A.start,ce),qe=A.end===void 0?ye:Math.min(A.end,ce);!V.extend&&ye>qe&&(v=qe,qe=ye,ye=v);var B=Sh(R,ye),O=Sh(R,qe);if(B&&O&&(V.rangeCount!==1||V.anchorNode!==B.node||V.anchorOffset!==B.offset||V.focusNode!==O.node||V.focusOffset!==O.offset)){var H=K.createRange();H.setStart(B.node,B.offset),V.removeAllRanges(),ye>qe?(V.addRange(H),V.extend(O.node,O.offset)):(H.setEnd(O.node,O.offset),V.addRange(H))}}}}for(K=[],V=R;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<K.length;R++){var F=K[R];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Zi=!!Qu,Fu=Qu=null}finally{De=c,Y.p=s,U.T=a}}e.current=t,ut=2}}function Up(){if(ut===2){ut=0;var e=_a,t=rr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var s=Y.p;Y.p=2;var c=De;De|=4;try{dp(e,t.alternate,t)}finally{De=c,Y.p=s,U.T=a}}ut=3}}function Hp(){if(ut===4||ut===3){ut=0,Nr();var e=_a,t=rr,a=ta,s=Tp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,rr=_a=null,Ip(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ma=null),ec(a),t=t.stateNode,je&&typeof je.onCommitFiberRoot=="function")try{je.onCommitFiberRoot(Xe,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=U.T,c=Y.p,Y.p=2,U.T=null;try{for(var f=e.onRecoverableError,v=0;v<s.length;v++){var R=s[v];f(R.value,{componentStack:R.stack})}}finally{U.T=t,Y.p=c}}(ta&3)!==0&&Ui(),Nn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Lu?fs++:(fs=0,Lu=e):fs=0,ds(0)}}function Ip(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xr(t)))}function Ui(){return Bp(),Up(),Hp(),Pp()}function Pp(){if(ut!==5)return!1;var e=_a,t=ju;ju=0;var a=ec(ta),s=U.T,c=Y.p;try{Y.p=32>a?32:a,U.T=null,a=zu,zu=null;var f=_a,v=ta;if(ut=0,rr=_a=null,ta=0,(De&6)!==0)throw Error(i(331));var R=De;if(De|=4,wp(f.current),bp(f,f.current,v,a),De=R,ds(0,!1),je&&typeof je.onPostCommitFiberRoot=="function")try{je.onPostCommitFiberRoot(Xe,f)}catch{}return!0}finally{Y.p=c,U.T=s,Ip(e,t)}}function qp(e,t,a){t=nn(a,t),t=du(e.stateNode,t,2),e=Sa(e,t,2),e!==null&&(jr(e,2),Nn(e))}function Ue(e,t,a){if(e.tag===3)qp(e,e,a);else for(;t!==null;){if(t.tag===3){qp(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ma===null||!Ma.has(s))){e=nn(a,e),a=Vm(2),s=Sa(t,a,2),s!==null&&(Ym(a,s,t,e),jr(s,2),Nn(s));break}}t=t.return}}function Bu(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new Wx;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)||(Au=!0,c.add(a),e=aS.bind(null,e,t,a),t.then(e,e))}function aS(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ye===e&&(Ae&a)===a&&(tt===4||tt===3&&(Ae&62914560)===Ae&&300>ht()-ji?(De&2)===0&&sr(e,0):Nu|=a,or===Ae&&(or=0)),Nn(e)}function Vp(e,t){t===0&&(t=Bd()),e=$a(e,t),e!==null&&(jr(e,t),Nn(e))}function oS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Vp(e,a)}function rS(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(i(314))}s!==null&&s.delete(t),Vp(e,a)}function sS(e,t){return Ct(e,t)}var Hi=null,lr=null,Uu=!1,Ii=!1,Hu=!1,Na=0;function Nn(e){e!==lr&&e.next===null&&(lr===null?Hi=lr=e:lr=lr.next=e),Ii=!0,Uu||(Uu=!0,lS())}function ds(e,t){if(!Hu&&Ii){Hu=!0;do for(var a=!1,s=Hi;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var f=0;else{var v=s.suspendedLanes,R=s.pingedLanes;f=(1<<31-ze(42|e)+1)-1,f&=c&~(v&~R),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Qp(s,f))}else f=Ae,f=Ys(s,s===Ye?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||Or(s,f)||(a=!0,Qp(s,f));s=s.next}while(a);Hu=!1}}function iS(){Yp()}function Yp(){Ii=Uu=!1;var e=0;Na!==0&&vS()&&(e=Na);for(var t=ht(),a=null,s=Hi;s!==null;){var c=s.next,f=Gp(s,t);f===0?(s.next=null,a===null?Hi=c:a.next=c,c===null&&(lr=a)):(a=s,(e!==0||(f&3)!==0)&&(Ii=!0)),s=c}ut!==0&&ut!==5||ds(e),Na!==0&&(Na=0)}function Gp(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-ze(f),R=1<<v,A=c[v];A===-1?((R&a)===0||(R&s)!==0)&&(c[v]=Lb(R,t)):A<=t&&(e.expiredLanes|=R),f&=~R}if(t=Ye,a=Ae,a=Ys(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Un(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Or(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&Un(s),ec(a)){case 2:case 8:a=At;break;case 32:a=da;break;case 268435456:a=Ps;break;default:a=da}return s=Xp.bind(null,e),a=Ct(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&Un(s),e.callbackPriority=2,e.callbackNode=null,2}function Xp(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ui()&&e.callbackNode!==a)return null;var s=Ae;return s=Ys(e,e===Ye?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Mp(e,s,t),Gp(e,ht()),e.callbackNode!=null&&e.callbackNode===a?Xp.bind(null,e):null)}function Qp(e,t){if(Ui())return null;Mp(e,t,!0)}function lS(){xS(function(){(De&6)!==0?Ct(We,iS):Yp()})}function Iu(){if(Na===0){var e=Qo;e===0&&(e=_o,_o<<=1,(_o&261888)===0&&(_o=256)),Na=e}return Na}function Fp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fs(""+e)}function Kp(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 cS(e,t,a,s,c){if(t==="submit"&&a&&a.stateNode===c){var f=Fp((c[Nt]||null).action),v=s.submitter;v&&(t=(t=v[Nt]||null)?Fp(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var R=new Ws("action","action",null,s,c);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Na!==0){var A=v?Kp(c,v):new FormData(c);su(a,{pending:!0,data:A,method:c.method,action:f},null,A)}}else typeof f=="function"&&(R.preventDefault(),A=v?Kp(c,v):new FormData(c),su(a,{pending:!0,data:A,method:c.method,action:f},f,A))},currentTarget:c}]})}}for(var Pu=0;Pu<Rc.length;Pu++){var qu=Rc[Pu],uS=qu.toLowerCase(),fS=qu[0].toUpperCase()+qu.slice(1);bn(uS,"on"+fS)}bn(Ch,"onAnimationEnd"),bn(Mh,"onAnimationIteration"),bn(_h,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(Mx,"onTransitionRun"),bn(_x,"onTransitionStart"),bn(Ax,"onTransitionCancel"),bn(Ah,"onTransitionEnd"),zo("onMouseEnter",["mouseout","mouseover"]),zo("onMouseLeave",["mouseout","mouseover"]),zo("onPointerEnter",["pointerout","pointerover"]),zo("onPointerLeave",["pointerout","pointerover"]),Ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ka("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hs="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(" "),dS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hs));function Zp(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 f=void 0;if(t)for(var v=s.length-1;0<=v;v--){var R=s[v],A=R.instance,I=R.currentTarget;if(R=R.listener,A!==f&&c.isPropagationStopped())break e;f=R,c.currentTarget=I;try{f(c)}catch(X){ti(X)}c.currentTarget=null,f=A}else for(v=0;v<s.length;v++){if(R=s[v],A=R.instance,I=R.currentTarget,R=R.listener,A!==f&&c.isPropagationStopped())break e;f=R,c.currentTarget=I;try{f(c)}catch(X){ti(X)}c.currentTarget=null,f=A}}}}function _e(e,t){var a=t[tc];a===void 0&&(a=t[tc]=new Set);var s=e+"__bubble";a.has(s)||(Jp(t,e,2,!1),a.add(s))}function Vu(e,t,a){var s=0;t&&(s|=4),Jp(a,e,s,t)}var Pi="_reactListening"+Math.random().toString(36).slice(2);function Yu(e){if(!e[Pi]){e[Pi]=!0,Yd.forEach(function(a){a!=="selectionchange"&&(dS.has(a)||Vu(a,!1,e),Vu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pi]||(t[Pi]=!0,Vu("selectionchange",!1,t))}}function Jp(e,t,a,s){switch(Cg(t)){case 2:var c=IS;break;case 8:c=PS;break;default:c=rf}a=c.bind(null,t,a,e),c=void 0,!uc||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 Gu(e,t,a,s,c){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var R=s.stateNode.containerInfo;if(R===c)break;if(v===4)for(v=s.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;R!==null;){if(v=No(R),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){s=f=v;continue e}R=R.parentNode}}s=s.return}nh(function(){var I=f,X=lc(a),K=[];e:{var P=Nh.get(e);if(P!==void 0){var V=Ws,ce=e;switch(e){case"keypress":if(Zs(a)===0)break e;case"keydown":case"keyup":V=rx;break;case"focusin":ce="focus",V=mc;break;case"focusout":ce="blur",V=mc;break;case"beforeblur":case"afterblur":V=mc;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":V=rh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Qb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=lx;break;case Ch:case Mh:case _h:V=Zb;break;case Ah:V=ux;break;case"scroll":case"scrollend":V=Gb;break;case"wheel":V=dx;break;case"copy":case"cut":case"paste":V=Wb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=ih;break;case"toggle":case"beforetoggle":V=mx}var ye=(t&4)!==0,qe=!ye&&(e==="scroll"||e==="scrollend"),B=ye?P!==null?P+"Capture":null:P;ye=[];for(var O=I,H;O!==null;){var F=O;if(H=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||H===null||B===null||(F=kr(O,B),F!=null&&ye.push(ms(O,F,H))),qe)break;O=O.return}0<ye.length&&(P=new V(P,ce,null,a,X),K.push({event:P,listeners:ye}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",P&&a!==ic&&(ce=a.relatedTarget||a.fromElement)&&(No(ce)||ce[Ao]))break e;if((V||P)&&(P=X.window===X?X:(P=X.ownerDocument)?P.defaultView||P.parentWindow:window,V?(ce=a.relatedTarget||a.toElement,V=I,ce=ce?No(ce):null,ce!==null&&(qe=u(ce),ye=ce.tag,ce!==qe||ye!==5&&ye!==27&&ye!==6)&&(ce=null)):(V=null,ce=I),V!==ce)){if(ye=rh,F="onMouseLeave",B="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ye=ih,F="onPointerLeave",B="onPointerEnter",O="pointer"),qe=V==null?P:Lr(V),H=ce==null?P:Lr(ce),P=new ye(F,O+"leave",V,a,X),P.target=qe,P.relatedTarget=H,F=null,No(X)===I&&(ye=new ye(B,O+"enter",ce,a,X),ye.target=H,ye.relatedTarget=qe,F=ye),qe=F,V&&ce)t:{for(ye=hS,B=V,O=ce,H=0,F=B;F;F=ye(F))H++;F=0;for(var he=O;he;he=ye(he))F++;for(;0<H-F;)B=ye(B),H--;for(;0<F-H;)O=ye(O),F--;for(;H--;){if(B===O||O!==null&&B===O.alternate){ye=B;break t}B=ye(B),O=ye(O)}ye=null}else ye=null;V!==null&&Wp(K,P,V,ye,!1),ce!==null&&qe!==null&&Wp(K,qe,ce,ye,!0)}}e:{if(P=I?Lr(I):window,V=P.nodeName&&P.nodeName.toLowerCase(),V==="select"||V==="input"&&P.type==="file")var Le=ph;else if(hh(P))if(gh)Le=Ex;else{Le=wx;var de=Sx}else V=P.nodeName,!V||V.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?I&&sc(I.elementType)&&(Le=ph):Le=Rx;if(Le&&(Le=Le(e,I))){mh(K,Le,a,X);break e}de&&de(e,P,I),e==="focusout"&&I&&P.type==="number"&&I.memoizedProps.value!=null&&rc(P,"number",P.value)}switch(de=I?Lr(I):window,e){case"focusin":(hh(de)||de.contentEditable==="true")&&(Ho=de,xc=I,Vr=null);break;case"focusout":Vr=xc=Ho=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,Eh(K,a,X);break;case"selectionchange":if(Cx)break;case"keydown":case"keyup":Eh(K,a,X)}var Ee;if(gc)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Uo?fh(e,a)&&(Ne="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ne="onCompositionStart");Ne&&(lh&&a.locale!=="ko"&&(Uo||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Uo&&(Ee=ah()):(ma=X,fc="value"in ma?ma.value:ma.textContent,Uo=!0)),de=qi(I,Ne),0<de.length&&(Ne=new sh(Ne,e,null,a,X),K.push({event:Ne,listeners:de}),Ee?Ne.data=Ee:(Ee=dh(a),Ee!==null&&(Ne.data=Ee)))),(Ee=gx?yx(e,a):vx(e,a))&&(Ne=qi(I,"onBeforeInput"),0<Ne.length&&(de=new sh("onBeforeInput","beforeinput",null,a,X),K.push({event:de,listeners:Ne}),de.data=Ee)),cS(K,e,I,a,X)}Zp(K,t)})}function ms(e,t,a){return{instance:e,listener:t,currentTarget:a}}function qi(e,t){for(var a=t+"Capture",s=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=kr(e,a),c!=null&&s.unshift(ms(e,c,f)),c=kr(e,t),c!=null&&s.push(ms(e,c,f))),e.tag===3)return s;e=e.return}return[]}function hS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wp(e,t,a,s,c){for(var f=t._reactName,v=[];a!==null&&a!==s;){var R=a,A=R.alternate,I=R.stateNode;if(R=R.tag,A!==null&&A===s)break;R!==5&&R!==26&&R!==27||I===null||(A=I,c?(I=kr(a,f),I!=null&&v.unshift(ms(a,I,A))):c||(I=kr(a,f),I!=null&&v.push(ms(a,I,A)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var mS=/\r\n?/g,pS=/\u0000|\uFFFD/g;function $p(e){return(typeof e=="string"?e:""+e).replace(mS,`
49
+ `).replace(pS,"")}function eg(e,t){return t=$p(t),$p(e)===t}function Pe(e,t,a,s,c,f){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ko(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ko(e,""+s);break;case"className":Xs(e,"class",s);break;case"tabIndex":Xs(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Xs(e,a,s);break;case"style":eh(e,s,f);break;case"data":if(t!=="object"){Xs(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=Fs(""+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 f=="function"&&(a==="formAction"?(t!=="input"&&Pe(e,t,"name",c.name,c,null),Pe(e,t,"formEncType",c.formEncType,c,null),Pe(e,t,"formMethod",c.formMethod,c,null),Pe(e,t,"formTarget",c.formTarget,c,null)):(Pe(e,t,"encType",c.encType,c,null),Pe(e,t,"method",c.method,c,null),Pe(e,t,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=Fs(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=In);break;case"onScroll":s!=null&&_e("scroll",e);break;case"onScrollEnd":s!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(i(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=Fs(""+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":_e("beforetoggle",e),_e("toggle",e),Gs(e,"popover",s);break;case"xlinkActuate":Hn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Hn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Hn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Hn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Hn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Hn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Gs(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=Vb.get(a)||a,Gs(e,a,s))}}function Xu(e,t,a,s,c,f){switch(a){case"style":eh(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof s=="string"?ko(e,s):(typeof s=="number"||typeof s=="bigint")&&ko(e,""+s);break;case"onScroll":s!=null&&_e("scroll",e);break;case"onScrollEnd":s!=null&&_e("scrollend",e);break;case"onClick":s!=null&&(e.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[Nt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof s=="function")){typeof f!="function"&&f!==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,""):Gs(e,a,s)}}}function St(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var s=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Pe(e,t,f,v,a,null)}}c&&Pe(e,t,"srcSet",a.srcSet,a,null),s&&Pe(e,t,"src",a.src,a,null);return;case"input":_e("invalid",e);var R=f=v=c=null,A=null,I=null;for(s in a)if(a.hasOwnProperty(s)){var X=a[s];if(X!=null)switch(s){case"name":c=X;break;case"type":v=X;break;case"checked":A=X;break;case"defaultChecked":I=X;break;case"value":f=X;break;case"defaultValue":R=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,t));break;default:Pe(e,t,s,X,a,null)}}Zd(e,f,R,A,I,v,c,!1);return;case"select":_e("invalid",e),s=v=f=null;for(c in a)if(a.hasOwnProperty(c)&&(R=a[c],R!=null))switch(c){case"value":f=R;break;case"defaultValue":v=R;break;case"multiple":s=R;default:Pe(e,t,c,R,a,null)}t=f,a=v,e.multiple=!!s,t!=null?Lo(e,!!s,t,!1):a!=null&&Lo(e,!!s,a,!0);return;case"textarea":_e("invalid",e),f=c=s=null;for(v in a)if(a.hasOwnProperty(v)&&(R=a[v],R!=null))switch(v){case"value":s=R;break;case"defaultValue":c=R;break;case"children":f=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(i(91));break;default:Pe(e,t,v,R,a,null)}Wd(e,s,c,f);return;case"option":for(A in a)a.hasOwnProperty(A)&&(s=a[A],s!=null)&&(A==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Pe(e,t,A,s,a,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(s=0;s<hs.length;s++)_e(hs[s],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("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(I in a)if(a.hasOwnProperty(I)&&(s=a[I],s!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Pe(e,t,I,s,a,null)}return;default:if(sc(t)){for(X in a)a.hasOwnProperty(X)&&(s=a[X],s!==void 0&&Xu(e,t,X,s,a,void 0));return}}for(R in a)a.hasOwnProperty(R)&&(s=a[R],s!=null&&Pe(e,t,R,s,a,null))}function gS(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,f=null,v=null,R=null,A=null,I=null,X=null;for(V in a){var K=a[V];if(a.hasOwnProperty(V)&&K!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":A=K;default:s.hasOwnProperty(V)||Pe(e,t,V,null,s,K)}}for(var P in s){var V=s[P];if(K=a[P],s.hasOwnProperty(P)&&(V!=null||K!=null))switch(P){case"type":f=V;break;case"name":c=V;break;case"checked":I=V;break;case"defaultChecked":X=V;break;case"value":v=V;break;case"defaultValue":R=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(i(137,t));break;default:V!==K&&Pe(e,t,P,V,s,K)}}oc(e,v,R,A,I,X,f,c);return;case"select":V=v=R=P=null;for(f in a)if(A=a[f],a.hasOwnProperty(f)&&A!=null)switch(f){case"value":break;case"multiple":V=A;default:s.hasOwnProperty(f)||Pe(e,t,f,null,s,A)}for(c in s)if(f=s[c],A=a[c],s.hasOwnProperty(c)&&(f!=null||A!=null))switch(c){case"value":P=f;break;case"defaultValue":R=f;break;case"multiple":v=f;default:f!==A&&Pe(e,t,c,f,s,A)}t=R,a=v,s=V,P!=null?Lo(e,!!a,P,!1):!!s!=!!a&&(t!=null?Lo(e,!!a,t,!0):Lo(e,!!a,a?[]:"",!1));return;case"textarea":V=P=null;for(R in a)if(c=a[R],a.hasOwnProperty(R)&&c!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Pe(e,t,R,null,s,c)}for(v in s)if(c=s[v],f=a[v],s.hasOwnProperty(v)&&(c!=null||f!=null))switch(v){case"value":P=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&Pe(e,t,v,c,s,f)}Jd(e,P,V);return;case"option":for(var ce in a)P=a[ce],a.hasOwnProperty(ce)&&P!=null&&!s.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:Pe(e,t,ce,null,s,P));for(A in s)P=s[A],V=a[A],s.hasOwnProperty(A)&&P!==V&&(P!=null||V!=null)&&(A==="selected"?e.selected=P&&typeof P!="function"&&typeof P!="symbol":Pe(e,t,A,P,s,V));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 ye in a)P=a[ye],a.hasOwnProperty(ye)&&P!=null&&!s.hasOwnProperty(ye)&&Pe(e,t,ye,null,s,P);for(I in s)if(P=s[I],V=a[I],s.hasOwnProperty(I)&&P!==V&&(P!=null||V!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,t));break;default:Pe(e,t,I,P,s,V)}return;default:if(sc(t)){for(var qe in a)P=a[qe],a.hasOwnProperty(qe)&&P!==void 0&&!s.hasOwnProperty(qe)&&Xu(e,t,qe,void 0,s,P);for(X in s)P=s[X],V=a[X],!s.hasOwnProperty(X)||P===V||P===void 0&&V===void 0||Xu(e,t,X,P,s,V);return}}for(var B in a)P=a[B],a.hasOwnProperty(B)&&P!=null&&!s.hasOwnProperty(B)&&Pe(e,t,B,null,s,P);for(K in s)P=s[K],V=a[K],!s.hasOwnProperty(K)||P===V||P==null&&V==null||Pe(e,t,K,P,s,V)}function tg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yS(){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],f=c.transferSize,v=c.initiatorType,R=c.duration;if(f&&R&&tg(v)){for(v=0,R=c.responseEnd,s+=1;s<a.length;s++){var A=a[s],I=A.startTime;if(I>R)break;var X=A.transferSize,K=A.initiatorType;X&&tg(K)&&(A=A.responseEnd,v+=X*(A<R?1:(R-I)/(A-I)))}if(--s,t+=8*(f+v)/(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 Qu=null,Fu=null;function Vi(e){return e.nodeType===9?e:e.ownerDocument}function ng(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 ag(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 Ku(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 Zu=null;function vS(){var e=window.event;return e&&e.type==="popstate"?e===Zu?!1:(Zu=e,!0):(Zu=null,!1)}var og=typeof setTimeout=="function"?setTimeout:void 0,bS=typeof clearTimeout=="function"?clearTimeout:void 0,rg=typeof Promise=="function"?Promise:void 0,xS=typeof queueMicrotask=="function"?queueMicrotask:typeof rg<"u"?function(e){return rg.resolve(null).then(e).catch(SS)}:og;function SS(e){setTimeout(function(){throw e})}function Oa(e){return e==="head"}function sg(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),dr(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")ps(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ps(a);for(var f=a.firstChild;f;){var v=f.nextSibling,R=f.nodeName;f[zr]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=v}}else a==="body"&&ps(e.ownerDocument.body);a=c}while(a);dr(t)}function ig(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 Ju(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":Ju(a),nc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function wS(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[zr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==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(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=ln(e.nextSibling),e===null)break}return null}function RS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ln(e.nextSibling),e===null))return null;return e}function lg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ln(e.nextSibling),e===null))return null;return e}function Wu(e){return e.data==="$?"||e.data==="$~"}function $u(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ES(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 ln(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 ef=null;function cg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ln(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function ug(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 fg(e,t,a){switch(t=Vi(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ps(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);nc(e)}var cn=new Map,dg=new Set;function Yi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var na=Y.d;Y.d={f:TS,r:CS,D:MS,C:_S,L:AS,m:NS,X:jS,S:OS,M:zS};function TS(){var e=na.f(),t=ki();return e||t}function CS(e){var t=Oo(e);t!==null&&t.tag===5&&t.type==="form"?Am(t):na.r(e)}var cr=typeof document>"u"?null:document;function hg(e,t,a){var s=cr;if(s&&typeof t=="string"&&t){var c=en(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),dg.has(c)||(dg.add(c),e={rel:e,crossOrigin:a,href:t},s.querySelector(c)===null&&(t=s.createElement("link"),St(t,"link",e),pt(t),s.head.appendChild(t)))}}function MS(e){na.D(e),hg("dns-prefetch",e,null)}function _S(e,t){na.C(e,t),hg("preconnect",e,t)}function AS(e,t,a){na.L(e,t,a);var s=cr;if(s&&e&&t){var c='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+en(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+en(a.imageSizes)+'"]')):c+='[href="'+en(e)+'"]';var f=c;switch(t){case"style":f=ur(e);break;case"script":f=fr(e)}cn.has(f)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),cn.set(f,e),s.querySelector(c)!==null||t==="style"&&s.querySelector(gs(f))||t==="script"&&s.querySelector(ys(f))||(t=s.createElement("link"),St(t,"link",e),pt(t),s.head.appendChild(t)))}}function NS(e,t){na.m(e,t);var a=cr;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+en(s)+'"][href="'+en(e)+'"]',f=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=fr(e)}if(!cn.has(f)&&(e=g({rel:"modulepreload",href:e},t),cn.set(f,e),a.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ys(f)))return}s=a.createElement("link"),St(s,"link",e),pt(s),a.head.appendChild(s)}}}function OS(e,t,a){na.S(e,t,a);var s=cr;if(s&&e){var c=jo(s).hoistableStyles,f=ur(e);t=t||"default";var v=c.get(f);if(!v){var R={loading:0,preload:null};if(v=s.querySelector(gs(f)))R.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=cn.get(f))&&tf(e,a);var A=v=s.createElement("link");pt(A),St(A,"link",e),A._p=new Promise(function(I,X){A.onload=I,A.onerror=X}),A.addEventListener("load",function(){R.loading|=1}),A.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Gi(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:R},c.set(f,v)}}}function jS(e,t){na.X(e,t);var a=cr;if(a&&e){var s=jo(a).hoistableScripts,c=fr(e),f=s.get(c);f||(f=a.querySelector(ys(c)),f||(e=g({src:e,async:!0},t),(t=cn.get(c))&&nf(e,t),f=a.createElement("script"),pt(f),St(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(c,f))}}function zS(e,t){na.M(e,t);var a=cr;if(a&&e){var s=jo(a).hoistableScripts,c=fr(e),f=s.get(c);f||(f=a.querySelector(ys(c)),f||(e=g({src:e,async:!0,type:"module"},t),(t=cn.get(c))&&nf(e,t),f=a.createElement("script"),pt(f),St(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(c,f))}}function mg(e,t,a,s){var c=(c=se.current)?Yi(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ur(a.href),a=jo(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=ur(a.href);var f=jo(c).hoistableStyles,v=f.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=c.querySelector(gs(e)))&&!f._p&&(v.instance=f,v.state.loading=5),cn.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},cn.set(e,a),f||LS(c,e,a,v.state))),t&&s===null)throw Error(i(528,""));return v}if(t&&s!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=fr(a),a=jo(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(i(444,e))}}function ur(e){return'href="'+en(e)+'"'}function gs(e){return'link[rel="stylesheet"]['+e+"]"}function pg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function LS(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}),St(t,"link",a),pt(t),e.head.appendChild(t))}function fr(e){return'[src="'+en(e)+'"]'}function ys(e){return"script[async]"+e}function gg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+en(a.href)+'"]');if(s)return t.instance=s,pt(s),s;var c=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),pt(s),St(s,"style",c),Gi(s,a.precedence,e),t.instance=s;case"stylesheet":c=ur(a.href);var f=e.querySelector(gs(c));if(f)return t.state.loading|=4,t.instance=f,pt(f),f;s=pg(a),(c=cn.get(c))&&tf(s,c),f=(e.ownerDocument||e).createElement("link"),pt(f);var v=f;return v._p=new Promise(function(R,A){v.onload=R,v.onerror=A}),St(f,"link",s),t.state.loading|=4,Gi(f,a.precedence,e),t.instance=f;case"script":return f=fr(a.src),(c=e.querySelector(ys(f)))?(t.instance=c,pt(c),c):(s=a,(c=cn.get(f))&&(s=g({},a),nf(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),pt(c),St(c,"link",s),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Gi(s,a.precedence,e));return t.instance}function Gi(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,f=c,v=0;v<s.length;v++){var R=s[v];if(R.dataset.precedence===t)f=R;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function tf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xi=null;function yg(e,t,a){if(Xi===null){var s=new Map,c=Xi=new Map;c.set(a,s)}else c=Xi,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 f=a[c];if(!(f[zr]||f[yt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var R=s.get(v);R?R.push(f):s.set(v,[f])}}return s}function vg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function kS(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function DS(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=ur(s.href),f=t.querySelector(gs(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qi.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,pt(f);return}f=t.ownerDocument||t,s=pg(s),(c=cn.get(c))&&tf(s,c),f=f.createElement("link"),pt(f);var v=f;v._p=new Promise(function(R,A){v.onload=R,v.onerror=A}),St(f,"link",s),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Qi.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var af=0;function BS(e,t){return e.stylesheets&&e.count===0&&Ki(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&Ki(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&af===0&&(af=62500*yS());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ki(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function Qi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ki(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fi=null;function Ki(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fi=new Map,t.forEach(US,e),Fi=null,Qi.call(e))}function US(e,t){if(!(t.state.loading&4)){var a=Fi.get(e);if(a)var s=a.get(null);else{a=new Map,Fi.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var v=c[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),s=v)}s&&a.set(null,s)}c=t.instance,v=c.getAttribute("data-precedence"),f=a.get(v)||s,f===s&&a.set(null,c),a.set(v,c),this.count++,s=Qi.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var vs={$$typeof:j,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function HS(e,t,a,s,c,f,v,R,A){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=Wl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wl(0),this.hiddenUpdates=Wl(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function xg(e,t,a,s,c,f,v,R,A,I,X,K){return e=new HS(e,t,a,v,A,I,X,K,R),t=1,f===!0&&(t|=24),f=Pt(3,null,null,t),e.current=f,f.stateNode=e,t=Dc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:a,cache:t},Ic(f),e}function Sg(e){return e?(e=qo,e):qo}function wg(e,t,a,s,c,f){c=Sg(c),s.context===null?s.context=c:s.pendingContext=c,s=xa(t),s.payload={element:a},f=f===void 0?null:f,f!==null&&(s.callback=f),a=Sa(e,s,t),a!==null&&(Dt(a,e,t),Zr(a,e,t))}function Rg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function of(e,t){Rg(e,t),(e=e.alternate)&&Rg(e,t)}function Eg(e){if(e.tag===13||e.tag===31){var t=$a(e,67108864);t!==null&&Dt(t,e,67108864),of(e,67108864)}}function Tg(e){if(e.tag===13||e.tag===31){var t=Xt();t=$l(t);var a=$a(e,t);a!==null&&Dt(a,e,t),of(e,t)}}var Zi=!0;function IS(e,t,a,s){var c=U.T;U.T=null;var f=Y.p;try{Y.p=2,rf(e,t,a,s)}finally{Y.p=f,U.T=c}}function PS(e,t,a,s){var c=U.T;U.T=null;var f=Y.p;try{Y.p=8,rf(e,t,a,s)}finally{Y.p=f,U.T=c}}function rf(e,t,a,s){if(Zi){var c=sf(s);if(c===null)Gu(e,t,s,Ji,a),Mg(e,s);else if(VS(c,e,t,a,s))s.stopPropagation();else if(Mg(e,s),t&4&&-1<qS.indexOf(e)){for(;c!==null;){var f=Oo(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Fa(f.pendingLanes);if(v!==0){var R=f;for(R.pendingLanes|=2,R.entangledLanes|=2;v;){var A=1<<31-ze(v);R.entanglements[1]|=A,v&=~A}Nn(f),(De&6)===0&&(zi=ht()+500,ds(0))}}break;case 31:case 13:R=$a(f,2),R!==null&&Dt(R,f,2),ki(),of(f,2)}if(f=sf(s),f===null&&Gu(e,t,s,Ji,a),f===c)break;c=f}c!==null&&s.stopPropagation()}else Gu(e,t,s,null,a)}}function sf(e){return e=lc(e),lf(e)}var Ji=null;function lf(e){if(Ji=null,e=No(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=h(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 Ji=e,null}function Cg(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(He()){case We:return 2;case At:return 8;case da:case Jl:return 32;case Ps:return 268435456;default:return 32}default:return 32}}var cf=!1,ja=null,za=null,La=null,bs=new Map,xs=new Map,ka=[],qS="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 Mg(e,t){switch(e){case"focusin":case"focusout":ja=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":La=null;break;case"pointerover":case"pointerout":bs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xs.delete(t.pointerId)}}function Ss(e,t,a,s,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Oo(t),t!==null&&Eg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function VS(e,t,a,s,c){switch(t){case"focusin":return ja=Ss(ja,e,t,a,s,c),!0;case"dragenter":return za=Ss(za,e,t,a,s,c),!0;case"mouseover":return La=Ss(La,e,t,a,s,c),!0;case"pointerover":var f=c.pointerId;return bs.set(f,Ss(bs.get(f)||null,e,t,a,s,c)),!0;case"gotpointercapture":return f=c.pointerId,xs.set(f,Ss(xs.get(f)||null,e,t,a,s,c)),!0}return!1}function _g(e){var t=No(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,qd(e.priority,function(){Tg(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,qd(e.priority,function(){Tg(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 Wi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);ic=s,a.target.dispatchEvent(s),ic=null}else return t=Oo(a),t!==null&&Eg(t),e.blockedOn=a,!1;t.shift()}return!0}function Ag(e,t,a){Wi(e)&&a.delete(t)}function YS(){cf=!1,ja!==null&&Wi(ja)&&(ja=null),za!==null&&Wi(za)&&(za=null),La!==null&&Wi(La)&&(La=null),bs.forEach(Ag),xs.forEach(Ag)}function $i(e,t){e.blockedOn===t&&(e.blockedOn=null,cf||(cf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,YS)))}var el=null;function Ng(e){el!==e&&(el=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){el===e&&(el=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(lf(s||a)===null)continue;break}var f=Oo(a);f!==null&&(e.splice(t,3),t-=3,su(f,{pending:!0,data:c,method:a.method,action:s},s,c))}}))}function dr(e){function t(A){return $i(A,e)}ja!==null&&$i(ja,e),za!==null&&$i(za,e),La!==null&&$i(La,e),bs.forEach(t),xs.forEach(t);for(var a=0;a<ka.length;a++){var s=ka[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ka.length&&(a=ka[0],a.blockedOn===null);)_g(a),a.blockedOn===null&&ka.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var c=a[s],f=a[s+1],v=c[Nt]||null;if(typeof f=="function")v||Ng(a);else if(v){var R=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[Nt]||null)R=v.formAction;else if(lf(c)!==null)continue}else R=v.action;typeof R=="function"?a[s+1]=R:(a.splice(s,3),s-=3),Ng(a)}}}function Og(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return c=v})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.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 uf(e){this._internalRoot=e}tl.prototype.render=uf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,s=Xt();wg(a,s,e,t,null,null)},tl.prototype.unmount=uf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wg(e.current,2,null,e,null,null),ki(),t[Ao]=null}};function tl(e){this._internalRoot=e}tl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ka.length&&t!==0&&t<ka[a].priority;a++);ka.splice(a,0,e),a===0&&_g(e)}};var jg=o.version;if(jg!=="19.2.7")throw Error(i(527,jg,"19.2.7"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=m(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var GS={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nl.isDisabled&&nl.supportsFiber)try{Xe=nl.inject(GS),je=nl}catch{}}return Rs.createRoot=function(e,t){if(!l(e))throw Error(i(299));var a=!1,s="",c=Hm,f=Im,v=Pm;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&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=xg(e,1,!1,null,null,a,s,null,c,f,v,Og),e[Ao]=t.current,Yu(e),new uf(t)},Rs.hydrateRoot=function(e,t,a){if(!l(e))throw Error(i(299));var s=!1,c="",f=Hm,v=Im,R=Pm,A=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(R=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),t=xg(e,1,!0,t,a??null,s,c,A,f,v,R,Og),t.context=Sg(null),a=t.current,s=Xt(),s=$l(s),c=xa(s),c.callback=null,Sa(a,c,s),a=s,t.current.lanes=a,jr(t,a),Nn(t),e[Ao]=t.current,Yu(e),new tl(t)},Rs.version="19.2.7",Rs}var qg;function tw(){if(qg)return hf.exports;qg=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(o){console.error(o)}}return n(),hf.exports=ew(),hf.exports}var nw=tw(),As=typeof window<"u"?w.useLayoutEffect:w.useEffect;function yf(n){const o=w.useRef({value:n,prev:null}),r=o.current.value;return n!==r&&(o.current={value:n,prev:r}),o.current.prev}function aw(n,o,r={},i={}){w.useEffect(()=>{if(!n.current||i.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([u])=>{o(u)},r);return l.observe(n.current),()=>{l.disconnect()}},[o,r,i.disabled,n])}function ow(n){const o=w.useRef(null);return w.useImperativeHandle(n,()=>o.current,[]),o}const hv=!1;function zs(n){return n[n.length-1]}function rw(n){return typeof n=="function"}function go(n,o){return rw(n)?n(o):n}const mv=Object.prototype.hasOwnProperty,Vg=Object.prototype.propertyIsEnumerable;function pv(n){for(const o in n)if(mv.call(n,o))return!0;return!1}const sw=()=>Object.create(null),ho=(n,o)=>yo(n,o,sw);function yo(n,o,r=()=>({}),i=0){if(n===o)return n;if(i>500)return o;const l=o,u=Xg(n)&&Xg(l);if(!u&&!(El(n)&&El(l)))return l;const d=u?n:Yg(n);if(!d)return l;const h=u?l:Yg(l);if(!h)return l;const p=d.length,m=h.length,y=u?new Array(m):r();let g=0;for(let S=0;S<m;S++){const x=u?S:h[S],T=n[x],E=l[x];if(T===E){y[x]=T,(u?S<p:mv.call(n,x))&&g++;continue}if(T===null||E===null||typeof T!="object"||typeof E!="object"){y[x]=E;continue}const C=yo(T,E,r,i+1);y[x]=C,C===T&&g++}return p===m&&g===p?n:y}function Yg(n){const o=Object.getOwnPropertyNames(n);for(const l of o)if(!Vg.call(n,l))return!1;const r=Object.getOwnPropertySymbols(n);if(r.length===0)return o;const i=o;for(const l of r){if(!Vg.call(n,l))return!1;i.push(l)}return i}function El(n){if(!Gg(n))return!1;const o=n.constructor;if(typeof o>"u")return!0;const r=o.prototype;return!(!Gg(r)||!r.hasOwnProperty("isPrototypeOf"))}function Gg(n){return Object.prototype.toString.call(n)==="[object Object]"}function Xg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function bo(n,o,r){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(let i=0,l=n.length;i<l;i++)if(!bo(n[i],o[i],r))return!1;return!0}if(El(n)&&El(o)){const i=r?.ignoreUndefined??!0;if(r?.partial){for(const d in o)if((!i||o[d]!==void 0)&&!bo(n[d],o[d],r))return!1;return!0}let l=0;if(!i)l=Object.keys(n).length;else for(const d in n)n[d]!==void 0&&l++;let u=0;for(const d in o)if((!i||o[d]!==void 0)&&(u++,u>l||!bo(n[d],o[d],r)))return!1;return l===u}return!1}function Er(n){let o,r;const i=new Promise((l,u)=>{o=l,r=u});return i.status="pending",i.resolve=l=>{i.status="resolved",i.value=l,o(l),n?.(l)},i.reject=l=>{i.status="rejected",r(l)},i}function Ls(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function iw(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Qg(n){let o;try{o=decodeURI(n)}catch{o=n.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return iw(o)}const lw=["http:","https:","mailto:","tel:"];function Tl(n,o){if(!n)return!1;try{const r=new URL(n);return!o.has(r.protocol)}catch{return!1}}function Es(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const o=/%25|%5C/gi;let r=0,i="",l;for(;(l=o.exec(n))!==null;)i+=Qg(n.slice(r,l.index))+l[0],r=o.lastIndex;i=i+Qg(r?n.slice(r):n);let u=!1;return i.startsWith("//")&&(u=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:u}}function cw(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function uw(n,o){if(n===o)return!0;if(n.length!==o.length)return!1;for(let r=0;r<n.length;r++)if(n[r]!==o[r])return!1;return!0}function sa(){throw new Error("Invariant failed")}function ks(n){const o=new Map;let r,i;const l=u=>{u.next&&(u.prev?(u.prev.next=u.next,u.next.prev=u.prev,u.next=void 0,i&&(i.next=u,u.prev=i)):(u.next.prev=void 0,r=u.next,u.next=void 0,i&&(u.prev=i,i.next=u)),i=u)};return{get(u){const d=o.get(u);if(d)return l(d),d.value},set(u,d){if(o.size>=n&&r){const p=r;o.delete(p.key),p.next&&(r=p.next,p.next.prev=void 0),p===i&&(i=void 0)}const h=o.get(u);if(h)h.value=d,l(h);else{const p={key:u,value:d,prev:i};i&&(i.next=p),i=p,r||(r=p),o.set(u,p)}},clear(){o.clear(),r=void 0,i=void 0}}}const Ia=4,gv=5;function fw(n){const o=n.indexOf("{");if(o===-1)return null;const r=n.indexOf("}",o);return r===-1||o+1>=n.length?null:[o,r]}function yv(n,o,r=new Uint16Array(6)){const i=n.indexOf("/",o),l=i===-1?n.length:i,u=n.substring(o,l);if(!u||!u.includes("$"))return r[0]=0,r[1]=o,r[2]=o,r[3]=l,r[4]=l,r[5]=l,r;if(u==="$"){const h=n.length;return r[0]=2,r[1]=o,r[2]=o,r[3]=h,r[4]=h,r[5]=h,r}if(u.charCodeAt(0)===36)return r[0]=1,r[1]=o,r[2]=o+1,r[3]=l,r[4]=l,r[5]=l,r;const d=fw(u);if(d){const[h,p]=d,m=u.charCodeAt(h+1);if(m===45){if(h+2<u.length&&u.charCodeAt(h+2)===36){const y=h+3,g=p;if(y<g)return r[0]=3,r[1]=o+h,r[2]=o+y,r[3]=o+g,r[4]=o+p+1,r[5]=l,r}}else if(m===36){const y=h+1,g=h+2;return g===p?(r[0]=2,r[1]=o+h,r[2]=o+y,r[3]=o+g,r[4]=o+p+1,r[5]=n.length,r):(r[0]=1,r[1]=o+h,r[2]=o+g,r[3]=o+p,r[4]=o+p+1,r[5]=l,r)}}return r[0]=0,r[1]=o,r[2]=o,r[3]=l,r[4]=l,r[5]=l,r}function Il(n,o,r,i,l,u,d){d?.(r);let h=i;{const p=r.fullPath??r.from,m=p.length,y=r.options?.caseSensitive??n,g=r.options?.params?.parse??r.options?.parseParams;for(;h<m;){const x=yv(p,h,o);let T;const E=h,C=x[5];switch(h=C+1,u++,x[0]){case 0:{const M=p.substring(x[2],x[3]);if(y){const _=l.static?.get(M);if(_)T=_;else{l.static??=new Map;const j=vo(r.fullPath??r.from);j.parent=l,j.depth=u,T=j,l.static.set(M,j)}}else{const _=M.toLowerCase(),j=l.staticInsensitive?.get(_);if(j)T=j;else{l.staticInsensitive??=new Map;const k=vo(r.fullPath??r.from);k.parent=l,k.depth=u,T=k,l.staticInsensitive.set(_,k)}}break}case 1:{const M=p.substring(E,x[1]),_=p.substring(x[4],C),j=y&&!!(M||_),k=M?j?M:M.toLowerCase():void 0,z=_?j?_:_.toLowerCase():void 0,q=!g&&l.dynamic?.find(L=>!L.parse&&L.caseSensitive===j&&L.prefix===k&&L.suffix===z);if(q)T=q;else{const L=bf(1,r.fullPath??r.from,j,k,z);T=L,L.depth=u,L.parent=l,l.dynamic??=[],l.dynamic.push(L)}break}case 3:{const M=p.substring(E,x[1]),_=p.substring(x[4],C),j=y&&!!(M||_),k=M?j?M:M.toLowerCase():void 0,z=_?j?_:_.toLowerCase():void 0,q=!g&&l.optional?.find(L=>!L.parse&&L.caseSensitive===j&&L.prefix===k&&L.suffix===z);if(q)T=q;else{const L=bf(3,r.fullPath??r.from,j,k,z);T=L,L.parent=l,L.depth=u,l.optional??=[],l.optional.push(L)}break}case 2:{const M=p.substring(E,x[1]),_=p.substring(x[4],C),j=y&&!!(M||_),k=M?j?M:M.toLowerCase():void 0,z=_?j?_:_.toLowerCase():void 0,q=bf(2,r.fullPath??r.from,j,k,z);T=q,q.parent=l,q.depth=u,l.wildcard??=[],l.wildcard.push(q)}}l=T}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const x=vo(r.fullPath??r.from);x.kind=gv,x.parent=l,u++,x.depth=u,l.pathless??=[],l.pathless.push(x),l=x}const S=(r.path||!r.children)&&!r.isRoot;if(S&&p.endsWith("/")){const x=vo(r.fullPath??r.from);x.kind=Ia,x.parent=l,u++,x.depth=u,l.index=x,l=x}l.parse=g??null,l.priority=r.options?.params?.priority??0,S&&!l.route&&(l.route=r,l.fullPath=r.fullPath??r.from)}if(r.children)for(const p of r.children)Il(n,o,p,h,l,u,d)}function vf(n,o){if(n.parse&&!o.parse)return-1;if(!n.parse&&o.parse)return 1;if(n.parse&&o.parse&&(n.priority||o.priority))return o.priority-n.priority;if(n.prefix&&o.prefix&&n.prefix!==o.prefix){if(n.prefix.startsWith(o.prefix))return-1;if(o.prefix.startsWith(n.prefix))return 1}if(n.suffix&&o.suffix&&n.suffix!==o.suffix){if(n.suffix.endsWith(o.suffix))return-1;if(o.suffix.endsWith(n.suffix))return 1}return n.prefix&&!o.prefix?-1:!n.prefix&&o.prefix?1:n.suffix&&!o.suffix?-1:!n.suffix&&o.suffix?1:n.caseSensitive&&!o.caseSensitive?-1:!n.caseSensitive&&o.caseSensitive?1:0}function Ha(n){if(n.pathless)for(const o of n.pathless)Ha(o);if(n.static)for(const o of n.static.values())Ha(o);if(n.staticInsensitive)for(const o of n.staticInsensitive.values())Ha(o);if(n.dynamic?.length){n.dynamic.sort(vf);for(const o of n.dynamic)Ha(o)}if(n.optional?.length){n.optional.sort(vf);for(const o of n.optional)Ha(o)}if(n.wildcard?.length){n.wildcard.sort(vf);for(const o of n.wildcard)Ha(o)}}function vo(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,priority:0}}function bf(n,o,r,i,l){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:o,parent:null,parse:null,priority:0,caseSensitive:r,prefix:i,suffix:l}}function dw(n,o){const r=vo("/"),i=new Uint16Array(6);for(const l of n)Il(!1,i,l,1,r,0);Ha(r),o.masksTree=r,o.flatCache=ks(1e3)}function hw(n,o){n||="/";const r=o.flatCache.get(n);if(r)return r;const i=md(n,o.masksTree);return o.flatCache.set(n,i),i}function mw(n,o,r,i,l){n||="/",i||="/";const u=o?`case\0${n}`:n;let d=l.singleCache.get(u);return d||(d=vo("/"),Il(o,new Uint16Array(6),{from:n},1,d,0),l.singleCache.set(u,d)),md(i,d,r)}function pw(n,o,r=!1){const i=r?n:`nofuzz\0${n}`,l=o.matchCache.get(i);if(l!==void 0)return l;n||="/";let u;try{u=md(n,o.segmentTree,r)}catch(d){if(d instanceof URIError)u=null;else throw d}return u&&(u.branch=bv(u.route)),o.matchCache.set(i,u),u}function gw(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function yw(n,o=!1,r){const i=vo(n.fullPath),l=new Uint16Array(6),u={},d={};let h=0;return Il(o,l,n,1,i,0,p=>{if(r?.(p,h),p.id in u&&sa(),u[p.id]=p,h!==0&&p.path){const m=gw(p.fullPath);(!d[m]||p.fullPath.endsWith("/"))&&(d[m]=p)}h++}),Ha(i),{processedTree:{segmentTree:i,singleCache:ks(1e3),matchCache:ks(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:d}}function md(n,o,r=!1){const i=n.split("/"),l=bw(n,i,o,r);if(!l)return null;const[u]=vv(n,i,l);return{route:l.node.route,rawParams:u}}function vv(n,o,r){const i=vw(r.node);let l=null;const u=Object.create(null);let d=r.extract?.part??0,h=r.extract?.node??0,p=r.extract?.path??0,m=r.extract?.segment??0;for(;h<i.length;d++,h++,p++,m++){const y=i[h];if(y.kind===Ia)break;if(y.kind===gv){m--,d--,p--;continue}const g=o[d],S=p;if(g&&(p+=g.length),y.kind===1){l??=r.node.fullPath.split("/");const x=l[m],T=y.prefix?.length??0;if(x.charCodeAt(T)===123){const E=y.suffix?.length??0,C=x.substring(T+2,x.length-E-1),M=g.substring(T,g.length-E);u[C]=decodeURIComponent(M)}else{const E=x.substring(1);u[E]=decodeURIComponent(g)}}else if(y.kind===3){if(r.skipped&1<<h){d--,p=S-1;continue}l??=r.node.fullPath.split("/");const x=l[m],T=y.prefix?.length??0,E=y.suffix?.length??0,C=x.substring(T+3,x.length-E-1),M=y.suffix||y.prefix?g.substring(T,g.length-E):g;M&&(u[C]=decodeURIComponent(M))}else if(y.kind===2){const x=y,T=n.substring(S+(x.prefix?.length??0),n.length-(x.suffix?.length??0)),E=decodeURIComponent(T);u["*"]=E,u._splat=E;break}}return r.rawParams&&Object.assign(u,r.rawParams),[u,{part:d,node:h,path:p,segment:m}]}function bv(n){const o=[n];for(;n.parentRoute;)n=n.parentRoute,o.push(n);return o.reverse(),o}function vw(n){const o=Array(n.depth+1);do o[n.depth]=n,n=n.parent;while(n);return o}function bw(n,o,r,i){if(n==="/"&&r.index)return{node:r.index,skipped:0};const l=!zs(o),u=l&&n!=="/",d=o.length-(l?1:0),h=[{node:r,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const y=h.pop(),{node:g,index:S,skipped:x,depth:T,statics:E,dynamics:C,optionals:M}=y;let{extract:_,rawParams:j}=y;if(g.kind===2&&g.route&&!ol(m,y))continue;if(g.parse){if(!Fg(n,o,y))continue;j=y.rawParams,_=y.extract}i&&g.route&&g.kind!==Ia&&ol(p,y)&&(p=y);const k=S===d;if(k&&(g.route&&(!u||g.kind===Ia||g.kind===2)&&ol(m,y)&&(m=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const z=k?void 0:o[S];let q;if(k&&g.index){const L={node:g.index,index:S,skipped:x,depth:T+1,statics:E,dynamics:C,optionals:M,extract:_,rawParams:j};let D=!0;if(g.index.parse&&(Fg(n,o,L)||(D=!1)),D){if(!C&&!M&&!x&&xw(E,d))return L;ol(m,L)&&(m=L)}}if(g.wildcard)for(let L=g.wildcard.length-1;L>=0;L--){const D=g.wildcard[L],{prefix:Q,suffix:oe}=D;if(!(Q&&(k||!(D.caseSensitive?z:q??=z.toLowerCase()).startsWith(Q)))){if(oe){if(k)continue;const ne=o.slice(S).join("/").slice(-oe.length);if((D.caseSensitive?ne:ne.toLowerCase())!==oe)continue}h.push({node:D,index:d,skipped:x,depth:T+1,statics:E,dynamics:C,optionals:M,extract:_,rawParams:j})}}if(g.optional){const L=x|1<<T,D=T+1;for(let Q=g.optional.length-1;Q>=0;Q--){const oe=g.optional[Q];h.push({node:oe,index:S,skipped:L,depth:D,statics:E,dynamics:C,optionals:M,extract:_,rawParams:j})}if(!k)for(let Q=g.optional.length-1;Q>=0;Q--){const oe=g.optional[Q],{prefix:ne,suffix:$}=oe;if(ne||$){const pe=oe.caseSensitive?z:q??=z.toLowerCase();if(ne&&!pe.startsWith(ne)||$&&!pe.endsWith($))continue}h.push({node:oe,index:S+1,skipped:x,depth:D,statics:E,dynamics:C,optionals:M+al(d,S),extract:_,rawParams:j})}}if(!k&&g.dynamic&&z)for(let L=g.dynamic.length-1;L>=0;L--){const D=g.dynamic[L],{prefix:Q,suffix:oe}=D;if(Q||oe){const ne=D.caseSensitive?z:q??=z.toLowerCase();if(Q&&!ne.startsWith(Q)||oe&&!ne.endsWith(oe))continue}h.push({node:D,index:S+1,skipped:x,depth:T+1,statics:E,dynamics:C+al(d,S),optionals:M,extract:_,rawParams:j})}if(!k&&g.staticInsensitive){const L=g.staticInsensitive.get(q??=z.toLowerCase());L&&h.push({node:L,index:S+1,skipped:x,depth:T+1,statics:E+al(d,S),dynamics:C,optionals:M,extract:_,rawParams:j})}if(!k&&g.static){const L=g.static.get(z);L&&h.push({node:L,index:S+1,skipped:x,depth:T+1,statics:E+al(d,S),dynamics:C,optionals:M,extract:_,rawParams:j})}if(g.pathless){const L=T+1;for(let D=g.pathless.length-1;D>=0;D--){const Q=g.pathless[D];h.push({node:Q,index:S,skipped:x,depth:L,statics:E,dynamics:C,optionals:M,extract:_,rawParams:j})}}}if(m)return m;if(i&&p){let y=p.index;for(let S=0;S<p.index;S++)y+=o[S].length;const g=y===n.length?"/":n.slice(y);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(g),p}return null}function al(n,o){return 2**(n-o-1)}function xw(n,o){return n===2**(o-1)-1}function Fg(n,o,r){let i,l;try{[i,l]=vv(n,o,r)}catch{return null}if(r.rawParams=i,r.extract=l,!r.node.parse)return!0;try{if(r.node.parse(i)===!1)return null}catch{}return!0}function ol(n,o){return n?o.statics>n.statics||o.statics===n.statics&&(o.dynamics>n.dynamics||o.dynamics===n.dynamics&&(o.optionals>n.optionals||o.optionals===n.optionals&&((o.node.kind===Ia)>(n.node.kind===Ia)||o.node.kind===Ia==(n.node.kind===Ia)&&o.depth>n.depth))):!0}function pl(n){return pd(n.filter(o=>o!==void 0).join("/"))}function pd(n){return n.replace(/\/{2,}/g,"/")}function xv(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function ra(n){const o=n.length;return o>1&&n[o-1]==="/"?n.replace(/\/{1,}$/,""):n}function Sv(n){return ra(xv(n))}function Cl(n,o){return n?.endsWith("/")&&n!=="/"&&n!==`${o}/`?n.slice(0,-1):n}function Sw(n,o,r){return Cl(n,r)===Cl(o,r)}function ww({base:n,to:o,trailingSlash:r="never",cache:i}){const l=o.startsWith("/"),u=!l&&o===".";let d;if(i){d=l?o:u?n:n+"\0"+o;const m=i.get(d);if(m)return m}let h;if(u)h=n.split("/");else if(l)h=o.split("/");else{for(h=n.split("/");h.length>1&&zs(h)==="";)h.pop();const m=o.split("/");for(let y=0,g=m.length;y<g;y++){const S=m[y];S===""?y?y===g-1&&h.push(S):h=[S]:S===".."?h.pop():S==="."||h.push(S)}}h.length>1&&(zs(h)===""?r==="never"&&h.pop():r==="always"&&h.push(""));const p=pd(h.join("/"))||"/";return d&&i&&i.set(d,p),p}function Rw(n){const o=new Map(n.map(l=>[encodeURIComponent(l),l])),r=Array.from(o.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(r,"g");return l=>l.replace(i,u=>o.get(u)??u)}function xf(n,o,r){const i=o[n];return typeof i!="string"?i:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(l=>Zg(l,r)).join("/"):Zg(i,r)}function Kg({path:n,params:o,decoder:r,...i}){let l=!1;const u=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:u,isMissingParams:l};if(!n.includes("$"))return{interpolatedPath:n,usedParams:u,isMissingParams:l};const d=n.length;let h=0,p,m="";for(;h<d;){const y=h;p=yv(n,y,p);const g=p[5];if(h=g+1,y===g)continue;const S=p[0];if(S===0){m+="/"+n.substring(y,g);continue}if(S===2){const x=o._splat;u._splat=x,u["*"]=x;const T=n.substring(y,p[1]),E=n.substring(p[4],g);if(!x){l=!0,(T||E)&&(m+="/"+T+E);continue}const C=xf("_splat",o,r);m+="/"+T+C+E;continue}if(S===1){const x=n.substring(p[2],p[3]);!l&&!(x in o)&&(l=!0),u[x]=o[x];const T=n.substring(y,p[1]),E=n.substring(p[4],g),C=xf(x,o,r)??"undefined";m+="/"+T+C+E;continue}if(S===3){const x=n.substring(p[2],p[3]),T=o[x];if(T==null)continue;u[x]=T;const E=n.substring(y,p[1]),C=n.substring(p[4],g),M=xf(x,o,r)??"";m+="/"+E+M+C;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:u,interpolatedPath:m||"/",isMissingParams:l}}function Zg(n,o){const r=encodeURIComponent(n);return o?.(r)??r}function Et(n){return n?.isNotFound===!0}function Ew(n,o=String){const r=new URLSearchParams;for(const i in n){const l=n[i];l!==void 0&&r.set(i,o(l))}return r.toString()}function Sf(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function Tw(n){const o=new URLSearchParams(n),r=Object.create(null);for(const[i,l]of o.entries()){const u=r[i];u==null?r[i]=Sf(l):Array.isArray(u)?u.push(Sf(l)):r[i]=[u,Sf(l)]}return r}const Cw=_w(JSON.parse),Mw=Aw(JSON.stringify,JSON.parse);function _w(n){return o=>{o[0]==="?"&&(o=o.substring(1));const r=Tw(o);for(const i in r){const l=r[i];if(typeof l=="string")try{r[i]=n(l)}catch{}}return r}}function Aw(n,o){const r=typeof o=="function";function i(l){if(typeof l=="object"&&l!==null)try{return n(l)}catch{}else if(r&&typeof l=="string")try{return o(l),n(l)}catch{}return l}return l=>{const u=Ew(l,i);return u?`?${u}`:""}}const xo="__root__";function Nw(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 o=new Headers(n.headers);n.href&&o.get("Location")===null&&o.set("Location",n.href);const r=new Response(null,{status:n.statusCode,headers:o});if(r.options=n,n.throw)throw r;return r}function Bt(n){return n instanceof Response&&!!n.options}const Yf=n=>{if(!n.rendered)return n.rendered=!0,n.onReady?.()},Ow=n=>n.stores.matchesId.get().some(o=>n.stores.matchStores.get(o)?.get()._forcePending),Pl=(n,o)=>!!(n.preload&&!n.router.stores.matchStores.has(o)),So=(n,o,r=!0)=>{const i={...n.router.options.context??{}},l=r?o:o-1;for(let u=0;u<=l;u++){const d=n.matches[u];if(!d)continue;const h=n.router.getMatch(d.id);h&&Object.assign(i,h.__routeContext,h.__beforeLoadContext)}return i},Jg=(n,o)=>{if(!n.matches.length)return;const r=o.routeId,i=n.matches.findIndex(d=>d.routeId===n.router.routeTree.id),l=i>=0?i:0;let u=r?n.matches.findIndex(d=>d.routeId===r):n.firstBadMatchIndex??n.matches.length-1;u<0&&(u=l);for(let d=u;d>=0;d--){const h=n.matches[d];if(n.router.looseRoutesById[h.routeId].options.notFoundComponent)return d}return r?u:l},Pa=(n,o,r)=>{if(!(!Bt(r)&&!Et(r)))throw Bt(r)&&r.redirectHandled&&!r.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=r,n.updateMatch(o.id,i=>({...i,status:Bt(r)?"redirected":Et(r)?"notFound":i.status==="pending"?"success":i.status,context:So(n,o.index),isFetching:!1,error:r})),Et(r)&&!r.routeId&&(r.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),Bt(r)&&(n.rendered=!0,r.options._fromLocation=n.location,r.redirectHandled=!0,r=n.router.resolveRedirect(r))),r},wv=(n,o)=>{const r=n.router.getMatch(o);return!!(!r||r._nonReactive.dehydrated)},Wg=(n,o,r)=>{const i=So(n,r);n.updateMatch(o,l=>({...l,context:i}))},Ts=(n,o,r)=>{const{id:i,routeId:l}=n.matches[o],u=n.router.looseRoutesById[l];if(r instanceof Promise)throw r;n.firstBadMatchIndex??=o,Pa(n,n.router.getMatch(i),r);try{u.options.onError?.(r)}catch(d){r=d,Pa(n,n.router.getMatch(i),r)}n.updateMatch(i,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!n.preload&&!Bt(r)&&!Et(r)&&(n.serialError??=r)},Rv=(n,o,r,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const l=r.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Pl(n,o)&&(r.options.loader||r.options.beforeLoad||Tv(r))&&typeof l=="number"&&l!==1/0&&(r.options.pendingComponent??n.router.options?.defaultPendingComponent)){const u=setTimeout(()=>{Yf(n)},l);i._nonReactive.pendingTimeout=u}},jw=(n,o,r)=>{const i=n.router.getMatch(o);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;Rv(n,o,r,i);const l=()=>{const u=n.router.getMatch(o);u.preload&&(u.status==="redirected"||u.status==="notFound")&&Pa(n,u,u.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(l):l()},zw=(n,o,r,i)=>{const l=n.router.getMatch(o);let u=l._nonReactive.loadPromise;l._nonReactive.loadPromise=Er(()=>{u?.resolve(),u=void 0});const{paramsError:d,searchError:h}=l;d&&Ts(n,r,d),h&&Ts(n,r,h),Rv(n,o,i,l);const p=new AbortController;let m=!1;const y=()=>{m||(m=!0,n.updateMatch(o,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:p})))},g=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,n.updateMatch(o,k=>({...k,isFetching:!1}))};if(!i.options.beforeLoad){n.router.batch(()=>{y(),g()});return}l._nonReactive.beforeLoadPromise=Er();const S={...So(n,r,!1),...l.__routeContext},{search:x,params:T,cause:E}=l,C=Pl(n,o),M={search:x,abortController:p,params:T,preload:C,context:S,location:n.location,navigate:k=>n.router.navigate({...k,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:C?"preload":E,matches:n.matches,routeId:i.id,...n.router.options.additionalContext},_=k=>{if(k===void 0){n.router.batch(()=>{y(),g()});return}(Bt(k)||Et(k))&&(y(),Ts(n,r,k)),n.router.batch(()=>{y(),n.updateMatch(o,z=>({...z,__beforeLoadContext:k})),g()})};let j;try{if(j=i.options.beforeLoad(M),Ls(j))return y(),j.catch(k=>{Ts(n,r,k)}).then(_)}catch(k){y(),Ts(n,r,k)}_(j)},Lw=(n,o)=>{const{id:r,routeId:i}=n.matches[o],l=n.router.looseRoutesById[i],u=()=>h(),d=()=>zw(n,r,o,l),h=()=>{if(wv(n,r))return;const p=jw(n,r,l);return Ls(p)?p.then(d):d()};return u()},kw=(n,o,r)=>{const i=n.router.getMatch(o);if(!i||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const l={ssr:n.router.options.ssr,matches:n.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([r.options.head?.(l),r.options.scripts?.(l),r.options.headers?.(l)]).then(([u,d,h])=>({meta:u?.meta,links:u?.links,headScripts:u?.scripts,headers:h,scripts:d,styles:u?.styles}))},Ev=(n,o,r,i,l)=>{const u=o[i-1],{params:d,loaderDeps:h,abortController:p,cause:m}=n.router.getMatch(r),y=So(n,i),g=Pl(n,r);return{params:d,deps:h,preload:!!g,parentMatchPromise:u,abortController:p,context:y,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:g?"preload":m,route:l,...n.router.options.additionalContext}},$g=async(n,o,r,i,l)=>{try{const u=n.router.getMatch(r);try{(!(hv??n.router.isServer)||u.ssr===!0)&&Ds(l);const d=l.options.loader,h=typeof d=="function"?d:d?.handler,p=h?.(Ev(n,o,r,i,l)),m=!!h&&Ls(p);if((m||l._lazyPromise||l._componentsPromise||l.options.head||l.options.scripts||l.options.headers||u._nonReactive.minPendingPromise)&&n.updateMatch(r,g=>({...g,isFetching:"loader"})),h){const g=m?await p:p;Pa(n,n.router.getMatch(r),g),g!==void 0&&n.updateMatch(r,S=>({...S,loaderData:g}))}l._lazyPromise&&await l._lazyPromise;const y=u._nonReactive.minPendingPromise;y&&await y,l._componentsPromise&&await l._componentsPromise,n.updateMatch(r,g=>({...g,error:void 0,context:So(n,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let h=d;if(h?.name==="AbortError"){if(u.abortController.signal.aborted){u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loaderPromise=void 0;return}n.updateMatch(r,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:So(n,i)}));return}const p=u._nonReactive.minPendingPromise;p&&await p,Et(d)&&await l.options.notFoundComponent?.preload?.(),Pa(n,n.router.getMatch(r),d);try{l.options.onError?.(d)}catch(m){h=m,Pa(n,n.router.getMatch(r),m)}!Bt(h)&&!Et(h)&&await Ds(l,["errorComponent"]),n.updateMatch(r,m=>({...m,error:h,context:So(n,i),status:"error",isFetching:!1}))}}catch(u){const d=n.router.getMatch(r);d&&(d._nonReactive.loaderPromise=void 0),Pa(n,d,u)}},Dw=async(n,o,r)=>{async function i(x,T,E,C,M){const _=Date.now()-T.updatedAt,j=x?M.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:M.options.staleTime??n.router.options.defaultStaleTime??0,k=M.options.shouldReload,z=typeof k=="function"?k(Ev(n,o,l,r,M)):k,{status:q,invalid:L}=C,D=_>=j&&(!!n.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);d=q==="success"&&(L||(z??D)),x&&M.options.preload===!1||(d&&!n.sync&&y?(h=!0,(async()=>{try{await $g(n,o,l,r,M);const Q=n.router.getMatch(l);Q._nonReactive.loaderPromise?.resolve(),Q._nonReactive.loadPromise?.resolve(),Q._nonReactive.loaderPromise=void 0,Q._nonReactive.loadPromise=void 0}catch(Q){Bt(Q)&&await n.router.navigate(Q.options)}})()):q!=="success"||d?await $g(n,o,l,r,M):Wg(n,l,r))}const{id:l,routeId:u}=n.matches[r];let d=!1,h=!1;const p=n.router.looseRoutesById[u],m=p.options.loader,y=((typeof m=="function"?void 0:m?.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(wv(n,l)){if(!n.router.getMatch(l))return n.matches[r];Wg(n,l,r)}else{const x=n.router.getMatch(l),T=n.router.stores.matchesId.get()[r],E=(T&&n.router.stores.matchStores.get(T)||null)?.routeId===u?T:n.router.stores.matches.get().find(M=>M.routeId===u)?.id,C=Pl(n,l);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!n.sync&&!x.preload&&y)return x;await x._nonReactive.loaderPromise;const M=n.router.getMatch(l),_=M._nonReactive.error||M.error;_&&Pa(n,M,_),M.status==="pending"&&await i(C,x,E,M,p)}else{const M=C&&!n.router.stores.matchStores.has(l),_=n.router.getMatch(l);_._nonReactive.loaderPromise=Er(),M!==_.preload&&n.updateMatch(l,j=>({...j,preload:M})),await i(C,x,E,_,p)}}const g=n.router.getMatch(l);h||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,h||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const S=h?g.isFetching:!1;return S!==g.isFetching||g.invalid!==!1?(n.updateMatch(l,x=>({...x,isFetching:S,invalid:!1})),n.router.getMatch(l)):g};async function ey(n){const o=n,r=[];Ow(o.router)&&Yf(o);let i;for(let S=0;S<o.matches.length;S++){try{const x=Lw(o,S);Ls(x)&&await x}catch(x){if(Bt(x))throw x;if(Et(x))i=x;else if(!o.preload)throw x;break}if(o.serialError||o.firstBadMatchIndex!=null)break}const l=o.firstBadMatchIndex??o.matches.length,u=i&&!o.preload?Jg(o,i):void 0,d=i&&o.preload?0:u!==void 0?Math.min(u+1,l):l;let h,p;for(let S=0;S<d;S++)r.push(Dw(o,r,S));try{await Promise.all(r)}catch{const S=await Promise.allSettled(r);for(const x of S){if(x.status!=="rejected")continue;const T=x.reason;if(Bt(T))throw T;Et(T)?h??=T:p??=T}if(p!==void 0)throw p}const m=h??(i&&!o.preload?i:void 0);let y=o.firstBadMatchIndex!==void 0?o.firstBadMatchIndex:o.matches.length-1;if(!m&&i&&o.preload)return o.matches;if(m){const S=Jg(o,m);S===void 0&&sa();const x=o.matches[S],T=o.router.looseRoutesById[x.routeId],E=o.router.options?.defaultNotFoundComponent;!T.options.notFoundComponent&&E&&(T.options.notFoundComponent=E),m.routeId=x.routeId;const C=x.routeId===o.router.routeTree.id;o.updateMatch(x.id,M=>({...M,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),y=S,await Ds(T,["notFoundComponent"])}else if(!o.preload){const S=o.matches[0];S.globalNotFound||o.router.getMatch(S.id)?.globalNotFound&&o.updateMatch(S.id,x=>({...x,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){const S=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ds(S,["errorComponent"])}for(let S=0;S<=y;S++){const{id:x,routeId:T}=o.matches[S],E=o.router.looseRoutesById[T];try{const C=kw(o,x,E);if(C){const M=await C;o.updateMatch(x,_=>({..._,...M}))}}catch(C){console.error(`Error executing head for route ${T}:`,C)}}const g=Yf(o);if(Ls(g)&&await g,m)throw m;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}function ty(n,o){const r=o.map(i=>n.options[i]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Ds(n,o=gl){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(i=>{const{id:l,...u}=i.options;Object.assign(n.options,u),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const r=()=>n._componentsLoaded?void 0:o===gl?(()=>{if(n._componentsPromise===void 0){const i=ty(n,gl);i?n._componentsPromise=i.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():ty(n,o);return n._lazyPromise?n._lazyPromise.then(r):r()}function Tv(n){for(const o of gl)if(n.options[o]?.preload)return!0;return!1}const gl=["component","errorComponent","pendingComponent","notFoundComponent"];function Bw(n){return{input:({url:o})=>{for(const r of n)o=Gf(r,o);return o},output:({url:o})=>{for(let r=n.length-1;r>=0;r--)o=Cv(n[r],o);return o}}}function Uw(n){const o=Sv(n.basepath),r=`/${o}`,i=n.caseSensitive?r:r.toLowerCase(),l=`${i}/`;return{input:({url:u})=>{const d=n.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===i?u.pathname="/":d.startsWith(l)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=pl(["/",o,u.pathname]),u)}}function Gf(n,o){const r=n?.input?.({url:o});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return o}function Cv(n,o){const r=n?.output?.({url:o});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return o}function Hw(n,o){const{createMutableStore:r,createReadonlyStore:i,batch:l,init:u}=o,d=new Map,h=new Map,p=new Map,m=r(n.status),y=r(n.loadedAt),g=r(n.isLoading),S=r(n.isTransitioning),x=r(n.location),T=r(n.resolvedLocation),E=r(n.statusCode),C=r(n.redirect),M=r([]),_=r([]),j=r([]),k=i(()=>wf(d,M.get())),z=i(()=>wf(h,_.get())),q=i(()=>wf(p,j.get())),L=i(()=>M.get()[0]),D=i(()=>M.get().some(Y=>d.get(Y)?.get().status==="pending")),Q=i(()=>({locationHref:x.get().href,resolvedLocationHref:T.get()?.href,status:m.get()})),oe=i(()=>({status:m.get(),loadedAt:y.get(),isLoading:g.get(),isTransitioning:S.get(),matches:k.get(),location:x.get(),resolvedLocation:T.get(),statusCode:E.get(),redirect:C.get()})),ne=ks(64);function $(Y){let Z=ne.get(Y);return Z||(Z=i(()=>{const ue=M.get();for(const J of ue){const N=d.get(J);if(N&&N.routeId===Y)return N.get()}}),ne.set(Y,Z)),Z}const pe={status:m,loadedAt:y,isLoading:g,isTransitioning:S,location:x,resolvedLocation:T,statusCode:E,redirect:C,matchesId:M,pendingIds:_,cachedIds:j,matches:k,pendingMatches:z,cachedMatches:q,firstId:L,hasPending:D,matchRouteDeps:Q,matchStores:d,pendingMatchStores:h,cachedMatchStores:p,__store:oe,getRouteMatchStore:$,setMatches:fe,setPending:me,setCached:U};fe(n.matches),u?.(pe);function fe(Y){Rf(Y,d,M,r,l)}function me(Y){Rf(Y,h,_,r,l)}function U(Y){Rf(Y,p,j,r,l)}return pe}function wf(n,o){const r=[];for(const i of o){const l=n.get(i);l&&r.push(l.get())}return r}function Rf(n,o,r,i,l){const u=n.map(h=>h.id),d=new Set(u);l(()=>{for(const h of o.keys())d.has(h)||o.delete(h);for(const h of n){const p=o.get(h.id);if(!p){const m=i(h);m.routeId=h.routeId,o.set(h.id,m);continue}p.routeId=h.routeId,p.get()!==h&&p.set(h)}uw(r.get(),u)||r.set(u)})}var qa="__TSR_index",ny="popstate",ay="beforeunload";function Iw(n){let o=n.getLocation();const r=new Set,i=d=>{o=n.getLocation(),r.forEach(h=>h({location:o,action:d}))},l=d=>{n.notifyOnIndexChange??!0?i(d):o=n.getLocation()},u=async({task:d,navigateOpts:h,...p})=>{if(h?.ignoreBlocker??!1){d();return}const m=n.getBlockers?.()??[],y=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const g of m){const S=Ml(p.path,p.state);if(await g.blockerFn({currentLocation:o,nextLocation:S,action:p.type})){n.onBlocked?.();return}}d()};return{get location(){return o},get length(){return n.getLength()},subscribers:r,subscribe:d=>(r.add(d),()=>{r.delete(d)}),push:(d,h,p)=>{const m=o.state[qa];h=oy(m+1,h),u({task:()=>{n.pushState(d,h),i({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:d,state:h})},replace:(d,h,p)=>{const m=o.state[qa];h=oy(m,h),u({task:()=>{n.replaceState(d,h),i({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:d,state:h})},go:(d,h)=>{u({task:()=>{n.go(d),l({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{u({task:()=>{n.back(d?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{u({task:()=>{n.forward(d?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>o.state[qa]!==0,createHref:d=>n.createHref(d),block:d=>{if(!n.setBlockers)return()=>{};const h=n.getBlockers?.()??[];return n.setBlockers([...h,d]),()=>{const p=n.getBlockers?.()??[];n.setBlockers?.(p.filter(m=>m!==d))}},flush:()=>n.flush?.(),destroy:()=>n.destroy?.(),notify:i}}function oy(n,o){o||(o={});const r=gd();return{...o,key:r,__TSR_key:r,[qa]:n}}function Pw(n){const o=typeof document<"u"?window:void 0,r=o.history.pushState,i=o.history.replaceState;let l=[];const u=()=>l,d=D=>l=D,h=(D=>D),p=(()=>Ml(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){const D=gd();o.history.replaceState({[qa]:0,key:D,__TSR_key:D},"")}let m=p(),y,g=!1,S=!1,x=!1,T=!1;const E=()=>m;let C,M;const _=()=>{C&&(L._ignoreSubscribers=!0,(C.isPush?o.history.pushState:o.history.replaceState)(C.state,"",C.href),L._ignoreSubscribers=!1,C=void 0,M=void 0,y=void 0)},j=(D,Q,oe)=>{const ne=h(Q);M||(y=m),m=Ml(Q,oe),C={href:ne,state:oe,isPush:C?.isPush||D==="push"},M||(M=Promise.resolve().then(()=>_()))},k=D=>{m=p(),L.notify({type:D})},z=async()=>{if(S){S=!1;return}const D=p(),Q=D.state[qa]-m.state[qa],oe=Q===1,ne=Q===-1,$=!oe&&!ne||g;g=!1;const pe=$?"GO":ne?"BACK":"FORWARD",fe=$?{type:"GO",index:Q}:{type:ne?"BACK":"FORWARD"};if(x)x=!1;else{const me=u();if(typeof document<"u"&&me.length){for(const U of me)if(await U.blockerFn({currentLocation:m,nextLocation:D,action:pe})){S=!0,o.history.go(1),L.notify(fe);return}}}m=p(),L.notify(fe)},q=D=>{if(T){T=!1;return}let Q=!1;const oe=u();if(typeof document<"u"&&oe.length)for(const ne of oe){const $=ne.enableBeforeUnload??!0;if($===!0){Q=!0;break}if(typeof $=="function"&&$()===!0){Q=!0;break}}if(Q)return D.preventDefault(),D.returnValue=""},L=Iw({getLocation:E,getLength:()=>o.history.length,pushState:(D,Q)=>j("push",D,Q),replaceState:(D,Q)=>j("replace",D,Q),back:D=>(D&&(x=!0),T=!0,o.history.back()),forward:D=>{D&&(x=!0),T=!0,o.history.forward()},go:D=>{g=!0,o.history.go(D)},createHref:D=>h(D),flush:_,destroy:()=>{o.history.pushState=r,o.history.replaceState=i,o.removeEventListener(ay,q,{capture:!0}),o.removeEventListener(ny,z)},onBlocked:()=>{y&&m!==y&&(m=y)},getBlockers:u,setBlockers:d,notifyOnIndexChange:!1});return o.addEventListener(ay,q,{capture:!0}),o.addEventListener(ny,z),o.history.pushState=function(...D){const Q=r.apply(o.history,D);return L._ignoreSubscribers||k("PUSH"),Q},o.history.replaceState=function(...D){const Q=i.apply(o.history,D);return L._ignoreSubscribers||k("REPLACE"),Q},L}function qw(n){let o=n.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}function Ml(n,o){const r=qw(n),i=r.indexOf("#"),l=r.indexOf("?"),u=gd();return{href:r,pathname:r.substring(0,i>0?l>0?Math.min(i,l):i:l>0?l:r.length),hash:i>-1?r.substring(i):"",search:l>-1?r.slice(l,i===-1?void 0:i):"",state:o||{[qa]:0,key:u,__TSR_key:u}}}function gd(){return(Math.random()+1).toString(36).substring(7)}function Sr(n,o){const r=o,i=n;return{fromLocation:r,toLocation:i,pathChanged:r?.pathname!==i.pathname,hrefChanged:r?.href!==i.href,hashChanged:r?.hash!==i.hash}}const Xf=new WeakMap;var Vw=class{constructor(n,o){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.routeBranchCache=new WeakMap,this.startTransition=r=>r(),this.update=r=>{const i=this.options,l=this.basepath??i?.basepath??"/",u=this.basepath===void 0,d=i?.rewrite;if(this.options={...i,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Rw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pw()),this.origin=this.options.origin,this.origin||(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 y;this.resolvePathCache=ks(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=Hw(Gw(this.latestLocation),y),n1(this)}let h=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(u||l!==p||d!==m){this.basepath=p;const y=[],g=Sv(p);g&&g!=="/"&&y.push(Uw({basepath:p})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:Bw(y),this.history&&this.updateLatestLocation(),h=!0}h&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=yw(this.routeTree,this.options.caseSensitive,(i,l)=>{i.init({originalIndex:l})});return this.options.routeMasks&&dw(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,i)=>{const l={eventType:r,fn:i};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>{this.subscribers.forEach(i=>{i.eventType===r.type&&i.fn(r)})},this.parseLocation=(r,i)=>{const l=({pathname:p,search:m,hash:y,href:g,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const M=this.options.parseSearch(m),_=this.options.stringifySearch(M);return{href:p+_+y,publicHref:p+_+y,pathname:Es(p).path,external:!1,searchStr:_,search:ho(i?.search,M),hash:Es(y.slice(1)).path,state:yo(i?.state,S)}}const x=new URL(g,this.origin),T=Gf(this.rewrite,x),E=this.options.parseSearch(T.search),C=this.options.stringifySearch(E);return T.search=C,{href:T.href.replace(T.origin,""),publicHref:g,pathname:Es(T.pathname).path,external:!!this.rewrite&&T.origin!==this.origin,searchStr:C,search:ho(i?.search,E),hash:Es(T.hash.slice(1)).path,state:yo(i?.state,S)}},u=l(r),{__tempLocation:d,__tempKey:h}=u.state;if(d&&(!h||h===this.tempLocationKey)){const p=l(d);return p.state.key=u.state.key,p.state.__TSR_key=u.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:u}}return u},this.resolvePathWithBase=(r,i)=>ww({base:r,to:i.includes("//")?pd(i):i,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,i,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:i},l):this.matchRoutesInternal(r,i),this.getMatchedRoutes=r=>Xw({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const i=this.getMatch(r);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const i=this.stores.matchStores.get(r)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const i=(u={})=>{const d=u._fromLocation||this.pendingBuiltLocation||this.latestLocation,h=this.matchRoutesLightweight(d);u.from;const p=u.unsafeRelative==="path"?d.pathname:u.from??h.fullPath,m=u.to?`${u.to}`:void 0,y=h.search,g=Object.assign(Object.create(null),h.params),S=m?.charCodeAt(0)===47?"/":this.resolvePathWithBase(p,"."),x=m?this.resolvePathWithBase(S,m):S,T=u.params===!1||u.params===null?Object.create(null):(u.params??!0)===!0?g:Object.assign(g,go(u.params,g)),E=this.routesByPath[ra(x)];let C;if(E)C=this.getRouteBranch(E);else if(x.includes("$"))C=[];else{const ne=this.getMatchedRoutes(x);C=ne.matchedRoutes,this.options.notFoundRoute&&(!ne.foundRoute||ne.foundRoute.path!=="/"&&ne.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&pv(T))for(const ne of C){const $=ne.options.params?.stringify??ne.options.stringifyParams;if($)try{Object.assign(T,$(T))}catch{}}const M=r.leaveParams?x:Es(Kg({path:x,params:T,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=y;if(r._includeValidateSearch&&this.options.search?.strict){const ne={};C.forEach($=>{if($.options.validateSearch)try{Object.assign(ne,yl($.options.validateSearch,{...ne,..._}))}catch{}}),_=ne}_=Qw({search:_,dest:u,destRoutes:C,_includeValidateSearch:r._includeValidateSearch}),_=ho(y,_);const j=this.options.stringifySearch(_),k=u.hash===!0?d.hash:u.hash?go(u.hash,d.hash):void 0,z=k?`#${k}`:"";let q=u.state===!0?d.state:u.state?go(u.state,d.state):{};q=yo(d.state,q);const L=`${M}${j}${z}`;let D,Q,oe=!1;if(this.rewrite){const ne=new URL(L,this.origin),$=Cv(this.rewrite,ne);D=ne.href.replace(ne.origin,""),$.origin!==this.origin?(Q=$.href,oe=!0):Q=$.pathname+$.search+$.hash}else D=cw(L),Q=D;return{publicHref:Q,href:D,pathname:M,search:_,searchStr:j,state:q,hash:k??"",external:oe,unmaskOnReload:u.unmaskOnReload}},l=(u={},d)=>{const h=i(u);let p=d?i(d):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const y=hw(h.pathname,this.processedTree);if(y){Object.assign(m,y.rawParams);const{from:g,params:S,...x}=y.route,T=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,go(S,m));d={from:r.from,...x,params:T},p=i(d)}}}return p&&(h.maskedLocation=p),h};return r.mask?l(r,{from:r.from,...r.mask}):l(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:i,...l})=>{let u;const d=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(g=>{l.state[g]=this.latestLocation.state[g]});const y=bo(l.state,this.latestLocation.state);return m.forEach(g=>{delete l.state[g]}),y},h=ra(this.latestLocation.href)===ra(l.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=Er(()=>{p?.resolve(),p=void 0}),h&&d())this.load();else{let{maskedLocation:m,hashScrollIntoView:y,...g}=l;m&&(g={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,u=l.replace?"REPLACE":"PUSH",this.history[u==="REPLACE"?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:i})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(u?{action:{type:u}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:i,hashScrollIntoView:l,viewTransition:u,ignoreBlocker:d,href:h,...p}={})=>{if(h){const g=this.history.location.state.__TSR_index,S=Ml(h,{__TSR_index:r?g:g+1}),x=new URL(S.pathname,this.origin);p.to=Gf(this.rewrite,x).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 y=this.commitLocation({...m,viewTransition:u,replace:r,resetScroll:i,hashScrollIntoView:l,ignoreBlocker:d});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:i,href:l,publicHref:u,...d})=>{let h=!1;if(l)try{new URL(`${l}`),h=!0}catch{}if(h&&!i&&(i=!0),i){if(r!==void 0||!l){const m=this.buildLocation({to:r,...d});l=l??m.publicHref,u=u??m.publicHref}const p=!h&&u?u:l;if(Tl(p,this.protocolAllowlist))return Promise.resolve();if(!d.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const y of m)if(y?.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return d.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...d,href:l,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(l=>!r.some(u=>u.id===l.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(i)})},this.load=async r=>{const i=r?.action?.type;let l,u,d;const h=this.stores.resolvedLocation.get()??this.stores.location.get();for(d=new Promise(m=>{this.startTransition(async()=>{try{this.beforeLoad(),i?Xf.set(this.latestLocation,i):Xf.delete(this.latestLocation);const y=this.latestLocation,g=Sr(y,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await ey({router:this,sync:r?.sync,forceStaleReload:h.href===y.href,matches:this.stores.pendingMatches.get(),location:y,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let S=null,x=null,T=null,E=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),M=C.length,_=this.stores.matches.get();S=M?_.filter(z=>!this.stores.pendingMatchStores.has(z.id)):null;const j=new Set;for(const z of this.stores.pendingMatchStores.values())z.routeId&&j.add(z.routeId);const k=new Set;for(const z of this.stores.matchStores.values())z.routeId&&k.add(z.routeId);x=M?_.filter(z=>!j.has(z.routeId)):null,T=M?C.filter(z=>!k.has(z.routeId)):null,E=M?C.filter(z=>k.has(z.routeId)):_,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),M&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...S.filter(z=>z.status!=="error"&&z.status!=="notFound"&&z.status!=="redirected")]),this.clearExpiredCache())});for(const[C,M]of[[x,"onLeave"],[T,"onEnter"],[E,"onStay"]])if(C)for(const _ of C)this.looseRoutesById[_.routeId].options[M]?.(_)})})}})}catch(y){Bt(y)?(l=y,this.navigate({...l.options,replace:!0,ignoreBlocker:!0})):Et(y)&&(u=y);const g=l?l.status:u?404:this.stores.matches.get().some(S=>S.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(l)})}this.latestLoadPromise===d&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),m()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise;let p;this.hasNotFoundMatch()?p=404:this.stores.matches.get().some(m=>m.status==="error")&&(p=500),p!==void 0&&this.stores.statusCode.set(p)},this.startViewTransition=r=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const u=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof i.types=="function"?i.types(Sr(u,d)):i.types;if(h===!1){r();return}l={update:r,types:h}}else l=r;document.startViewTransition(l)}else r()},this.updateMatch=(r,i)=>{this.startTransition(()=>{const l=this.stores.pendingMatchStores.get(r);if(l){l.set(i);return}const u=this.stores.matchStores.get(r);if(u){u.set(i);return}const d=this.stores.cachedMatchStores.get(r);if(d){const h=i(d.get());h.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==r)):d.set(h)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const i=l=>r?.filter?.(l)??!0?{...l,invalid:!0,...r?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const i=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const l=r.options._builtLocation??this.buildLocation(r.options),u=this.getParsedLocationHref(l);r.options.href=u,r.headers.set("Location",u)}else if(i)try{const l=new URL(i);if(this.origin&&l.origin===this.origin){const u=l.pathname+l.search+l.hash;r.options.href=u,r.headers.set("Location",u)}}catch{}if(r.options.href&&!r.options._builtLocation&&Tl(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const i=r?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(l=>!i(l))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),i=l=>{const u=this.looseRoutesById[l.routeId];if(!u.options.loader)return!0;const d=(l.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??300*1e3;return l.status==="error"?!0:r-l.updatedAt>=d};this.clearCache({filter:i})},this.loadRouteChunk=Ds,this.preloadRoute=async r=>{const i=r._builtLocation??this.buildLocation(r);let l=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:r});const u=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),d=new Set([...u,...this.stores.cachedIds.get()]),h=l.filter(p=>!d.has(p.id));if(h.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...h])}try{return l=await ey({router:this,matches:l,location:i,preload:!0,updateMatch:(p,m)=>{u.has(p)?l=l.map(y=>y.id===p?m(y):y):this.updateMatch(p,m)}}),l}catch(p){if(Bt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:i});Et(p)||console.error(p);return}},this.matchRoute=(r,i)=>{const l={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},u=this.buildLocation(l);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const d=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),h=mw(u.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,d.pathname,this.processedTree);return!h||r.params&&!bo(h.rawParams,r.params,{partial:!0})?!1:i?.includeSearch??!0?bo(d.search,u.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=o,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??Mw,parseSearch:n.parseSearch??Cw,protocolAllowlist:n.protocolAllowlist??lw}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:o,processedTree:r}){this.routesById=n,this.routesByPath=o,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}getRouteBranch(n){let o=this.routeBranchCache.get(n);return o||(o=bv(n),this.routeBranchCache.set(n,o)),o}get looseRoutesById(){return this.routesById}getParentContext(n){return n?.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,o){const r=this.getMatchedRoutes(n.pathname),{foundRoute:i,routeParams:l}=r;let{matchedRoutes:u}=r,d=!1;(i?i.path!=="/"&&l["**"]:ra(n.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:d=!0);const h=d?Kw(this.options.notFoundMode,u):void 0,p=new Array(u.length),m=new Map;for(const y of this.stores.matchStores.values())y.routeId&&m.set(y.routeId,y.get());for(let y=0;y<u.length;y++){const g=u[y],S=p[y-1];let x,T,E;{const $=S?.search??n.search,pe=S?._strictSearch??void 0;try{const fe=yl(g.options.validateSearch,{...$})??void 0;x={...$,...fe},T={...pe,...fe},E=void 0}catch(fe){let me=fe;if(fe instanceof _l||(me=new _l(fe.message,{cause:fe})),o?.throwOnError)throw me;x=$,T={},E=me}}const C=g.options.loaderDeps?.({search:x})??"",M=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:j}=Kg({path:g.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),k=g.id+_+M,z=this.getMatch(k),q=m.get(g.id),L=z?._strictParams??j;let D;if(!z)try{ry(g,L)}catch($){if(Et($)||Bt($)?D=$:D=new Yw($.message,{cause:$}),o?.throwOnError)throw D}Object.assign(l,L);const Q=q?"stay":"enter";let oe;if(z)oe={...z,cause:Q,params:q?.params??l,_strictParams:L,search:ho(q?q.search:z.search,x),_strictSearch:T};else{const $=g.options.loader||g.options.beforeLoad||g.lazyFn||Tv(g)?"pending":"success";oe={id:k,ssr:g.options.ssr,index:y,routeId:g.id,params:q?.params??l,_strictParams:L,pathname:_,updatedAt:Date.now(),search:q?ho(q.search,x):x,_strictSearch:T,searchError:void 0,status:$,isFetching:!1,error:void 0,paramsError:D,__routeContext:void 0,_nonReactive:{loadPromise:Er()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Q,loaderDeps:q?yo(q.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}o?.preload||(oe.globalNotFound=h===g.id),oe.searchError=E;const ne=this.getParentContext(S);oe.context={...ne,...oe.__routeContext,...oe.__beforeLoadContext},p[y]=oe}for(let y=0;y<p.length;y++){const g=p[y],S=this.looseRoutesById[g.routeId],x=this.getMatch(g.id),T=m.get(g.routeId);if(g.params=T?ho(T.params,l):l,!x){const E=p[y-1],C=this.getParentContext(E);if(S.options.context){const M={deps:g.loaderDeps,params:g.params,context:C??{},location:n,navigate:_=>this.navigate({..._,_fromLocation:n}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:p,routeId:S.id};g.__routeContext=S.options.context(M)??void 0}g.context={...C,...g.__routeContext,...g.__beforeLoadContext}}}return p}matchRoutesLightweight(n){const{matchedRoutes:o,routeParams:r}=this.getMatchedRoutes(n.pathname),i=zs(o),l={...n.search};for(const m of o)try{Object.assign(l,yl(m.options.validateSearch,l))}catch{}const u=zs(this.stores.matchesId.get()),d=u&&this.stores.matchStores.get(u)?.get(),h=d&&d.routeId===i.id&&d.pathname===n.pathname;let p;if(h)p=d.params;else{const m=Object.assign(Object.create(null),r);for(const y of o)try{ry(y,m)}catch{}p=m}return{matchedRoutes:o,fullPath:i.fullPath,search:l,params:p}}},_l=class extends Error{},Yw=class extends Error{};function Gw(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function yl(n,o){if(n==null)return{};if("~standard"in n){const r=n["~standard"].validate(o);if(r instanceof Promise)throw new _l("Async validation not supported");if(r.issues)throw new _l(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in n?n.parse(o):typeof n=="function"?n(o):{}}function Xw({pathname:n,routesById:o,processedTree:r}){const i=Object.create(null),l=ra(n);let u;const d=pw(l,r,!0);return d&&(u=d.route,Object.assign(i,d.rawParams)),{matchedRoutes:d?.branch||[o.__root__],routeParams:i,foundRoute:u}}function Qw({search:n,dest:o,destRoutes:r,_includeValidateSearch:i}){return Fw(r)(n,o,i??!1)}function Fw(n){const o={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of n){if("search"in l.options)l.options.search?.middlewares&&o.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:d,next:h})=>{let p=d;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((y,g)=>g(y),d));const m=h(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,g)=>g(y),m):m};o.middlewares.push(u)}if(l.options.validateSearch){const u=({search:d,next:h})=>{const p=h(d);if(!o._includeValidateSearch)return p;try{return{...p,...yl(l.options.validateSearch,p)??void 0}}catch{return p}};o.middlewares.push(u)}}const r=({search:l})=>{const u=o.dest;return u.search?u.search===!0?l:go(u.search,l):{}};o.middlewares.push(r);const i=(l,u,d)=>{if(l>=d.length)return u;const h=d[l];return h({search:u,next:m=>i(l+1,m,d)})};return function(u,d,h){return o.dest=d,o._includeValidateSearch=h,i(0,u,o.middlewares)}}function Kw(n,o){if(n!=="root")for(let r=o.length-1;r>=0;r--){const i=o[r];if(i.children)return i.id}return xo}function ry(n,o){const r=n.options.params?.parse??n.options.parseParams;if(r){const i=r(o);if(i===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(o,i)}}function Zw(){try{return sessionStorage}catch{return}}const Jw="tsr-scroll-restoration-v1_3",Mv=Zw();function Ww(){try{return JSON.parse(Mv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function $w(){try{Mv?.setItem(Jw,JSON.stringify(yr))}catch{}}const yr=Ww(),sy="data-scroll-restoration-id",e1=n=>n.state.__TSR_key||n.href;function t1(n){const o=n.getAttribute(sy);if(o)return`[${sy}="${o}"]`;let r="",i=n,l;for(;l=i.parentNode;){let u=1,d=i;for(;d=d.previousElementSibling;)u++;const h=`${i.localName}:nth-child(${u})`;r=r?`${h} > ${r}`:h,i=l}return r}let rl=!1;const vr="window";function Qf(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function iy(n){const o=[];for(const r of n){if(r===vr)continue;const i=Qf(r);i&&o.push(i)}return o}function n1(n,o){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,rl=!1;const r=n.options.getScrollRestorationKey||e1,i=new Map,l=(h,p,m)=>{const y=i.get(h)||{};y.scrollX=p,y.scrollY=m,i.set(h,y)};history.scrollRestoration="manual";const u=h=>{if(!(rl||!n.isScrollRestoring))if(h.target===document)l(vr,scrollX,scrollY);else{const p=h.target;l(p,p.scrollLeft,p.scrollTop)}},d=h=>{if(!n.isScrollRestoring)return;const p=yr[h]||={};for(const[m,y]of i)m===vr?p[vr]=y:m.isConnected&&(p[t1(m)]=y)};document.addEventListener("scroll",u,!0),n.subscribe("onBeforeLoad",h=>{h.fromLocation&&d(r(h.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{d(r(n.stores.resolvedLocation.get()??n.stores.location.get())),$w()}),n.subscribe("onRendered",h=>{const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,y=n.resetNextScroll;let g;if(i.clear(),y||(n.resetNextScroll=!0),typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const S=r(h.toLocation),x=h.fromLocation&&r(h.fromLocation);if(n.isScrollRestoring&&x&&x!==S){const T=yr[x];if(T){let E=yr[S];for(const C in T){if(C===vr){if(y)continue}else{const M=Qf(C);if(!M||y&&m&&(g??=iy(m),g.includes(M)))continue}E||(E=yr[S]={}),E[C]??=T[C]}}}rl=!0;try{const T=h.toLocation.hash,E=h.toLocation.state.__hashScrollIntoViewOptions??!0;let C=!1;if(y){const M=Xf.get(h.toLocation),_=T&&E&&(M==="PUSH"||M==="REPLACE"),j=n.isScrollRestoring?yr[S]:void 0;if(j)for(const k in j){const{scrollX:z,scrollY:q}=j[k];if(k===vr){if(_)continue;scrollTo({top:q,left:z,behavior:p}),C=!0}else{const L=Qf(k);L&&(L.scrollLeft=z,L.scrollTop=q)}}if(!C&&!T){const k={top:0,left:0,behavior:p};if(scrollTo(k),m){g??=iy(m);for(const z of g)z.scrollTo(k)}}}!C&&T&&E&&document.getElementById(T)?.scrollIntoView(E)}finally{rl=!1}})}const a1="Error preloading route! ☝️";var _v=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=o=>{this.originalIndex=o.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=xo:this.parentRoute||sa();let l=i?xo:r?.path;l&&l!=="/"&&(l=xv(l));const u=r?.id||l;let d=i?xo:pl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,u]);l==="__root__"&&(l="/"),d!=="__root__"&&(d=pl(["/",d]));const h=d==="__root__"?"/":pl([this.parentRoute.fullPath,l]);this._path=l,this._id=d,this._fullPath=h,this._to=ra(h)},this.addChildren=o=>this._addFileChildren(o),this._addFileChildren=o=>(Array.isArray(o)&&(this.children=o),typeof o=="object"&&o!==null&&(this.children=Object.values(o)),this),this._addFileTypes=()=>this,this.updateLoader=o=>(Object.assign(this.options,o),this),this.update=o=>(Object.assign(this.options,o),this),this.lazy=o=>(this.lazyFn=o,this),this.redirect=o=>Nw({from:this.fullPath,...o}),this.options=n||{},this.isRoot=!n?.getParentRoute,n?.id&&n?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},o1=class extends _v{constructor(n){super(n)}};function yd(n){const o=n.errorComponent??vd;return b.jsx(r1,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:r,reset:i})=>r?w.createElement(o,{error:r,reset:i}):n.children})}var r1=class extends w.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,o){const r=n.getResetKey();return o.error&&o.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidCatch(n,o){this.props.onCatch&&this.props.onCatch(n,o)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function vd({error:n}){const[o,r]=w.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(i=>!i),children:o?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),o?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?b.jsx("code",{children:n.message}):null})}):null]})}function s1({children:n,fallback:o=null}){return Av()?b.jsx(Qt.Fragment,{children:n}):b.jsx(Qt.Fragment,{children:o})}function Av(){return Qt.useSyncExternalStore(i1,()=>!0,()=>!1)}function i1(){return()=>{}}var Nv=w.createContext(null);function dn(n){return w.useContext(Nv)}var ql=w.createContext(void 0),l1=w.createContext(void 0),Ze=(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))(Ze||{});function c1({update:n,notify:o,unwatched:r}){return{link:i,unlink:l,propagate:u,checkDirty:d,shallowPropagate:h};function i(m,y,g){const S=y.depsTail;if(S!==void 0&&S.dep===m)return;const x=S!==void 0?S.nextDep:y.deps;if(x!==void 0&&x.dep===m){x.version=g,y.depsTail=x;return}const T=m.subsTail;if(T!==void 0&&T.version===g&&T.sub===y)return;const E=y.depsTail=m.subsTail={version:g,dep:m,sub:y,prevDep:S,nextDep:x,prevSub:T,nextSub:void 0};x!==void 0&&(x.prevDep=E),S!==void 0?S.nextDep=E:y.deps=E,T!==void 0?T.nextSub=E:m.subs=E}function l(m,y=m.sub){const g=m.dep,S=m.prevDep,x=m.nextDep,T=m.nextSub,E=m.prevSub;return x!==void 0?x.prevDep=S:y.depsTail=S,S!==void 0?S.nextDep=x:y.deps=x,T!==void 0?T.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=T:(g.subs=T)===void 0&&r(g),x}function u(m){let y=m.nextSub,g;e:do{const S=m.sub;let x=S.flags;if(x&60?x&12?x&4?!(x&48)&&p(m,S)?(S.flags=x|40,x&=1):x=0:S.flags=x&-9|32:x=0:S.flags=x|32,x&2&&o(S),x&1){const T=S.subs;if(T!==void 0){const E=(m=T).nextSub;E!==void 0&&(g={value:y,prev:g},y=E);continue}}if((m=y)!==void 0){y=m.nextSub;continue}for(;g!==void 0;)if(m=g.value,g=g.prev,m!==void 0){y=m.nextSub;continue e}break}while(!0)}function d(m,y){let g,S=0,x=!1;e:do{const T=m.dep,E=T.flags;if(y.flags&16)x=!0;else if((E&17)===17){if(n(T)){const C=T.subs;C.nextSub!==void 0&&h(C),x=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(g={value:m,prev:g}),m=T.deps,y=T,++S;continue}if(!x){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;S--;){const C=y.subs,M=C.nextSub!==void 0;if(M?(m=g.value,g=g.prev):m=C,x){if(n(y)){M&&h(C),y=m.sub;continue}x=!1}else y.flags&=-33;y=m.sub;const _=m.nextDep;if(_!==void 0){m=_;continue e}}return x}while(!0)}function h(m){do{const y=m.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&o(y))}while((m=m.nextSub)!==void 0)}function p(m,y){let g=y.depsTail;for(;g!==void 0;){if(g===m)return!0;g=g.prevDep}return!1}}function u1(n,o,r){const i=typeof n=="object",l=i?n:void 0;return{next:(i?n.next:n)?.bind(l),error:(i?n.error:o)?.bind(l),complete:(i?n.complete:r)?.bind(l)}}const Ff=[];let vl=0;const{link:ly,unlink:f1,propagate:d1,checkDirty:Ov,shallowPropagate:cy}=c1({update(n){return n._update()},notify(n){Ff[Kf++]=n,n.flags&=~Ze.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ze.Mutable|Ze.Dirty,Al(n))}});let sl=0,Kf=0,jn,Zf=0;function jv(n){try{++Zf,n()}finally{--Zf||zv()}}function Al(n){const o=n.depsTail;let r=o!==void 0?o.nextDep:n.deps;for(;r!==void 0;)r=f1(r,n)}function zv(){if(!(Zf>0)){for(;sl<Kf;){const n=Ff[sl];Ff[sl++]=void 0,n.notify()}sl=0,Kf=0}}function uy(n,o){const r=typeof n=="function",i=n,l={_snapshot:r?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?Ze.None:Ze.Mutable,get(){return jn!==void 0&&ly(l,jn,vl),l._snapshot},subscribe(u){const d=u1(u),h={current:!1},p=h1(()=>{l.get(),h.current?d.next?.(l._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(u){const d=jn,h=o?.compare??Object.is;if(r)jn=l,++vl,l.depsTail=void 0;else if(u===void 0)return!1;r&&(l.flags=Ze.Mutable|Ze.RecursedCheck);try{const p=l._snapshot,m=typeof u=="function"?u(p):u===void 0&&r?i(p):u;return p===void 0||!h(p,m)?(l._snapshot=m,!0):!1}finally{jn=d,r&&(l.flags&=~Ze.RecursedCheck),Al(l)}}};return r?(l.flags=Ze.Mutable|Ze.Dirty,l.get=function(){const u=l.flags;if(u&Ze.Dirty||u&Ze.Pending&&Ov(l.deps,l)){if(l._update()){const d=l.subs;d!==void 0&&cy(d)}}else u&Ze.Pending&&(l.flags=u&~Ze.Pending);return jn!==void 0&&ly(l,jn,vl),l._snapshot}):l.set=function(u){if(l._update(u)){const d=l.subs;d!==void 0&&(d1(d),cy(d),zv())}},l}function h1(n){const o=()=>{const i=jn;jn=r,++vl,r.depsTail=void 0,r.flags=Ze.Watching|Ze.RecursedCheck;try{return n()}finally{jn=i,r.flags&=~Ze.RecursedCheck,Al(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ze.Watching|Ze.RecursedCheck,notify(){const i=this.flags;i&Ze.Dirty||i&Ze.Pending&&Ov(this.deps,this)?o():this.flags=Ze.Watching},stop(){this.flags=Ze.None,this.depsTail=void 0,Al(this)}};return o(),r}var Ef={exports:{}},Tf={},Cf={exports:{}},Mf={};/**
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 fy;function m1(){if(fy)return Mf;fy=1;var n=Hs();function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var r=typeof Object.is=="function"?Object.is:o,i=n.useState,l=n.useEffect,u=n.useLayoutEffect,d=n.useDebugValue;function h(g,S){var x=S(),T=i({inst:{value:x,getSnapshot:S}}),E=T[0].inst,C=T[1];return u(function(){E.value=x,E.getSnapshot=S,p(E)&&C({inst:E})},[g,x,S]),l(function(){return p(E)&&C({inst:E}),g(function(){p(E)&&C({inst:E})})},[g]),d(x),x}function p(g){var S=g.getSnapshot;g=g.value;try{var x=S();return!r(g,x)}catch{return!0}}function m(g,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Mf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,Mf}var dy;function p1(){return dy||(dy=1,Cf.exports=m1()),Cf.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 hy;function g1(){if(hy)return Tf;hy=1;var n=Hs(),o=p1();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var i=typeof Object.is=="function"?Object.is:r,l=o.useSyncExternalStore,u=n.useRef,d=n.useEffect,h=n.useMemo,p=n.useDebugValue;return Tf.useSyncExternalStoreWithSelector=function(m,y,g,S,x){var T=u(null);if(T.current===null){var E={hasValue:!1,value:null};T.current=E}else E=T.current;T=h(function(){function M(q){if(!_){if(_=!0,j=q,q=S(q),x!==void 0&&E.hasValue){var L=E.value;if(x(L,q))return k=L}return k=q}if(L=k,i(j,q))return L;var D=S(q);return x!==void 0&&x(L,D)?(j=q,L):(j=q,k=D)}var _=!1,j,k,z=g===void 0?null:g;return[function(){return M(y())},z===null?void 0:function(){return M(z())}]},[y,g,S,x]);var C=l(m,T[0],T[1]);return d(function(){E.hasValue=!0,E.value=C},[C]),p(C),C},Tf}var my;function y1(){return my||(my=1,Ef.exports=g1()),Ef.exports}var v1=y1();function b1(n,o){return n===o}function Zt(n,o,r=b1){const i=w.useCallback(d=>{if(!n)return()=>{};const{unsubscribe:h}=n.subscribe(d);return h},[n]),l=w.useCallback(()=>n?.get(),[n]);return v1.useSyncExternalStoreWithSelector(i,l,l,o,r)}var x1={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Co(n){const o=dn(),r=w.useContext(n.from?l1:ql),i=n.from??r,l=i?n.from?o.stores.getRouteMatchStore(i):o.stores.matchStores.get(i):void 0,u=w.useRef(void 0);return Zt(l??x1,d=>{if((n.shouldThrow??!0)&&!d&&sa(),d===void 0)return;const h=n.select?n.select(d):d;if(n.structuralSharing??o.options.defaultStructuralSharing){const p=yo(u.current,h);return u.current=p,p}return h})}function Lv(n){return Co({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:o=>n.select?n.select(o.loaderData):o.loaderData})}function kv(n){const{select:o,...r}=n;return Co({...r,select:i=>o?o(i.loaderDeps):i.loaderDeps})}function Dv(n){return Co({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:o=>{const r=n.strict===!1?o.params:o._strictParams;return n.select?n.select(r):r}})}function Bv(n){return Co({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:o=>n.select?n.select(o.search):o.search})}function Uv(n){const o=dn();return w.useCallback(r=>o.navigate({...r,from:r.from??n?.from}),[n?.from,o])}function Hv(n){return Co({...n,select:o=>n.select?n.select(o.context):o.context})}var Cr=dv();const S1=fv(Cr);function w1(n,o){const r=dn(),i=ow(o),{activeProps:l,inactiveProps:u,activeOptions:d,to:h,preload:p,preloadDelay:m,preloadIntentProximity:y,hashScrollIntoView:g,replace:S,startTransition:x,resetScroll:T,viewTransition:E,children:C,target:M,disabled:_,style:j,className:k,onClick:z,onBlur:q,onFocus:L,onMouseEnter:D,onMouseLeave:Q,onTouchStart:oe,ignoreBlocker:ne,params:$,search:pe,hash:fe,state:me,mask:U,reloadDocument:Y,unsafeRelative:Z,from:ue,_fromLocation:J,...N}=n,G=Av(),W=w.useMemo(()=>n,[r,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),ee=Zt(r.stores.location,He=>He,(He,We)=>He.href===We.href),ae=w.useMemo(()=>{const He={_fromLocation:ee,...W};return r.buildLocation(He)},[r,ee,W]),se=ae.maskedLocation?ae.maskedLocation.publicHref:ae.publicHref,te=ae.maskedLocation?ae.maskedLocation.external:ae.external,ge=w.useMemo(()=>_1(se,te,r.history,_),[_,te,se,r.history]),re=w.useMemo(()=>{if(ge?.external)return Tl(ge.href,r.protocolAllowlist)?void 0:ge.href;if(!A1(h)&&!(typeof h!="string"||h.indexOf(":")===-1))try{return new URL(h),Tl(h,r.protocolAllowlist)?void 0:h}catch{}},[h,ge,r.protocolAllowlist]),ve=w.useMemo(()=>{if(re)return!1;if(d?.exact){if(!Sw(ee.pathname,ae.pathname,r.basepath))return!1}else{const He=Cl(ee.pathname,r.basepath),We=Cl(ae.pathname,r.basepath);if(!(He.startsWith(We)&&(He.length===We.length||He[We.length]==="/")))return!1}return(d?.includeSearch??!0)&&!bo(ee.search,ae.search,{partial:!d?.exact,ignoreUndefined:!d?.explicitUndefined})?!1:d?.includeHash?G&&ee.hash===ae.hash:!0},[d?.exact,d?.explicitUndefined,d?.includeHash,d?.includeSearch,ee,re,G,ae.hash,ae.pathname,ae.search,r.basepath]),be=ve?go(l,{})??R1:_f,Ce=ve?_f:go(u,{})??_f,Ge=[k,be.className,Ce.className].filter(Boolean).join(" "),Ve=(j||be.style||Ce.style)&&{...j,...be.style,...Ce.style},[Ht,_t]=w.useState(!1),Tt=w.useRef(!1),Jt=n.reloadDocument||re?!1:p??r.options.defaultPreload,Cn=m??r.options.defaultPreloadDelay??0,Ct=w.useCallback(()=>{r.preloadRoute({...W,_builtLocation:ae}).catch(He=>{console.warn(He),console.warn(a1)})},[r,W,ae]);aw(i,w.useCallback(He=>{He?.isIntersecting&&Ct()},[Ct]),M1,{disabled:!!_||Jt!=="viewport"}),w.useEffect(()=>{Tt.current||!_&&Jt==="render"&&(Ct(),Tt.current=!0)},[_,Ct,Jt]);const Un=He=>{const We=He.currentTarget.getAttribute("target"),At=M!==void 0?M:We;if(!_&&!N1(He)&&!He.defaultPrevented&&(!At||At==="_self")&&He.button===0){He.preventDefault(),Cr.flushSync(()=>{_t(!0)});const da=r.subscribe("onResolved",()=>{da(),_t(!1)});r.navigate({...W,replace:S,resetScroll:T,hashScrollIntoView:g,startTransition:x,viewTransition:E,ignoreBlocker:ne})}};if(re)return{...N,ref:i,href:re,...C&&{children:C},...M&&{target:M},..._&&{disabled:_},...j&&{style:j},...k&&{className:k},...z&&{onClick:z},...q&&{onBlur:q},...L&&{onFocus:L},...D&&{onMouseEnter:D},...Q&&{onMouseLeave:Q},...oe&&{onTouchStart:oe}};const fa=He=>{if(_||Jt!=="intent")return;if(!Cn){Ct();return}const We=He.currentTarget;if(Cs.has(We))return;const At=setTimeout(()=>{Cs.delete(We),Ct()},Cn);Cs.set(We,At)},Nr=He=>{_||Jt!=="intent"||Ct()},ht=He=>{if(_||!Jt||!Cn)return;const We=He.currentTarget,At=Cs.get(We);At&&(clearTimeout(At),Cs.delete(We))};return{...N,...be,...Ce,href:ge?.href,ref:i,onClick:hr([z,Un]),onBlur:hr([q,ht]),onFocus:hr([L,fa]),onMouseEnter:hr([D,fa]),onMouseLeave:hr([Q,ht]),onTouchStart:hr([oe,Nr]),disabled:!!_,target:M,...Ve&&{style:Ve},...Ge&&{className:Ge},..._&&E1,...ve&&T1,...G&&Ht&&C1}}var _f={},R1={className:"active"},E1={role:"link","aria-disabled":!0},T1={"data-status":"active","aria-current":"page"},C1={"data-transitioning":"transitioning"},Cs=new WeakMap,M1={rootMargin:"100px"},hr=n=>o=>{for(const r of n)if(r){if(o.defaultPrevented)return;r(o)}};function _1(n,o,r,i){if(!i)return o?{href:n,external:!0}:{href:r.createHref(n)||"/",external:!1}}function A1(n){if(typeof n!="string")return!1;const o=n.charCodeAt(0);return o===47?n.charCodeAt(1)!==47:o===46}var Iv=w.forwardRef((n,o)=>{const{_asChild:r,...i}=n,{type:l,...u}=w1(i,o),d=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;if(!r){const{disabled:h,...p}=u;return w.createElement("a",p,d)}return w.createElement(r,u,d)});function N1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var O1=class extends _v{constructor(n){super(n),this.useMatch=o=>Co({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>Hv({...o,from:this.id}),this.useSearch=o=>Bv({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Dv({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>kv({...o,from:this.id}),this.useLoaderData=o=>Lv({...o,from:this.id}),this.useNavigate=()=>Uv({from:this.fullPath}),this.Link=Qt.forwardRef((o,r)=>b.jsx(Iv,{ref:r,from:this.fullPath,...o}))}};function j1(n){return new O1(n)}var z1=class extends o1{constructor(n){super(n),this.useMatch=o=>Co({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>Hv({...o,from:this.id}),this.useSearch=o=>Bv({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Dv({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>kv({...o,from:this.id}),this.useLoaderData=o=>Lv({...o,from:this.id}),this.useNavigate=()=>Uv({from:this.fullPath}),this.Link=Qt.forwardRef((o,r)=>b.jsx(Iv,{ref:r,from:this.fullPath,...o}))}};function L1(n){return new z1(n)}function k1(n){const o=dn(),r=`not-found-${Zt(o.stores.location,i=>i.pathname)}-${Zt(o.stores.status,i=>i)}`;return b.jsx(yd,{getResetKey:()=>r,onCatch:(i,l)=>{if(Et(i))n.onCatch?.(i,l);else throw i},errorComponent:({error:i})=>{if(Et(i))return n.fallback?.(i);throw i},children:n.children})}function D1(){return b.jsx("p",{children:"Not Found"})}function br(n){return b.jsx(b.Fragment,{children:n.children})}function Pv(n,o,r){return o.options.notFoundComponent?b.jsx(o.options.notFoundComponent,{...r}):n.options.defaultNotFoundComponent?b.jsx(n.options.defaultNotFoundComponent,{...r}):b.jsx(D1,{})}function B1(n){return null}function U1(){return B1(dn()),null}var qv=w.memo(function({matchId:o}){const r=dn(),i=r.stores.matchStores.get(o);i||sa();const l=Zt(r.stores.loadedAt,d=>d),u=Zt(i,d=>d);return b.jsx(H1,{router:r,matchId:o,resetKey:l,matchState:w.useMemo(()=>{const d=u.routeId,h=r.routesById[d].parentRoute?.id;return{routeId:d,ssr:u.ssr,_displayPending:u._displayPending,parentRouteId:h}},[u._displayPending,u.routeId,u.ssr,r.routesById])})});function H1({router:n,matchId:o,resetKey:r,matchState:i}){const l=n.routesById[i.routeId],u=l.options.pendingComponent??n.options.defaultPendingComponent,d=u?b.jsx(u,{}):null,h=l.options.errorComponent??n.options.defaultErrorComponent,p=l.options.onCatch??n.options.defaultOnCatch,m=l.isRoot?l.options.notFoundComponent??n.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=i.ssr===!1||i.ssr==="data-only",g=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||y))?w.Suspense:br,S=h?yd:br,x=m?k1:br;return b.jsxs(l.isRoot?l.options.shellComponent??br:br,{children:[b.jsx(ql.Provider,{value:o,children:b.jsx(g,{fallback:d,children:b.jsx(S,{getResetKey:()=>r,errorComponent:h||vd,onCatch:(T,E)=>{if(Et(T))throw T.routeId??=i.routeId,T;p?.(T,E)},children:b.jsx(x,{fallback:T=>{if(T.routeId??=i.routeId,!m||T.routeId&&T.routeId!==i.routeId||!T.routeId&&!l.isRoot)throw T;return w.createElement(m,T)},children:y||i._displayPending?b.jsx(s1,{fallback:d,children:b.jsx(py,{matchId:o})}):b.jsx(py,{matchId:o})})})})}),i.parentRouteId===xo?b.jsxs(b.Fragment,{children:[b.jsx(I1,{resetKey:r}),n.options.scrollRestoration&&hv?b.jsx(U1,{}):null]}):null]})}function I1({resetKey:n}){const o=dn(),r=w.useRef(void 0);return As(()=>{const i=o.latestLocation.href;(r.current===void 0||r.current!==i)&&(o.emit({type:"onRendered",...Sr(o.stores.location.get(),o.stores.resolvedLocation.get())}),r.current=i)},[o.latestLocation.state.__TSR_key,n,o]),null}var py=w.memo(function({matchId:o}){const r=dn(),i=(y,g)=>r.getMatch(y.id)?._nonReactive[g]??y._nonReactive[g],l=r.stores.matchStores.get(o);l||sa();const u=Zt(l,y=>y),d=u.routeId,h=r.routesById[d],p=w.useMemo(()=>{const y=(r.routesById[d].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:d,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return y?JSON.stringify(y):void 0},[d,u.loaderDeps,u._strictParams,u._strictSearch,r.options.defaultRemountDeps,r.routesById]),m=w.useMemo(()=>{const y=h.options.component??r.options.defaultComponent;return y?b.jsx(y,{},p):b.jsx(Vv,{})},[p,h.options.component,r.options.defaultComponent]);if(u._displayPending)throw i(u,"displayPendingPromise");if(u._forcePending)throw i(u,"minPendingPromise");if(u.status==="pending"){const y=h.options.pendingMinMs??r.options.defaultPendingMinMs;if(y){const g=r.getMatch(u.id);if(g&&!g._nonReactive.minPendingPromise){const S=Er();g._nonReactive.minPendingPromise=S,setTimeout(()=>{S.resolve(),g._nonReactive.minPendingPromise=void 0},y)}}throw i(u,"loadPromise")}if(u.status==="notFound")return Et(u.error)||sa(),Pv(r,h,u.error);if(u.status==="redirected")throw Bt(u.error)||sa(),i(u,"loadPromise");if(u.status==="error")throw u.error;return m}),Vv=w.memo(function(){const o=dn(),r=w.useContext(ql);let i,l=!1,u;{const m=r?o.stores.matchStores.get(r):void 0;[i,l]=Zt(m,y=>[y?.routeId,y?.globalNotFound??!1]),u=Zt(o.stores.matchesId,y=>y[y.findIndex(g=>g===r)+1])}const d=i?o.routesById[i]:void 0,h=o.options.defaultPendingComponent?b.jsx(o.options.defaultPendingComponent,{}):null;if(l)return d||sa(),Pv(o,d,void 0);if(!u)return null;const p=b.jsx(qv,{matchId:u});return i===xo?b.jsx(w.Suspense,{fallback:h,children:p}):p});function P1(){const n=dn(),o=w.useRef({router:n,mounted:!1}),[r,i]=w.useState(!1),l=Zt(n.stores.isLoading,g=>g),u=Zt(n.stores.hasPending,g=>g),d=yf(l),h=l||r||u,p=yf(h),m=l||u,y=yf(m);return n.startTransition=g=>{i(!0),w.startTransition(()=>{g(),i(!1)})},w.useEffect(()=>{const g=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ra(n.latestLocation.publicHref)!==ra(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{g()}},[n,n.history]),As(()=>{if(typeof window<"u"&&n.ssr||o.current.router===n&&o.current.mounted)return;o.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),As(()=>{d&&!l&&n.emit({type:"onLoad",...Sr(n.stores.location.get(),n.stores.resolvedLocation.get())})},[d,n,l]),As(()=>{y&&!m&&n.emit({type:"onBeforeRouteMount",...Sr(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,y,n]),As(()=>{if(p&&!h){const g=Sr(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...g}),jv(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[h,p,n]),null}function q1(){const n=dn(),o=n.routesById[xo].options.pendingComponent??n.options.defaultPendingComponent,r=o?b.jsx(o,{}):null,i=b.jsxs(typeof document<"u"&&n.ssr?br:w.Suspense,{fallback:r,children:[b.jsx(P1,{}),b.jsx(V1,{})]});return n.options.InnerWrap?b.jsx(n.options.InnerWrap,{children:i}):i}function V1(){const n=dn(),o=Zt(n.stores.firstId,l=>l),r=Zt(n.stores.loadedAt,l=>l),i=o?b.jsx(qv,{matchId:o}):null;return b.jsx(ql.Provider,{value:o,children:n.options.disableGlobalCatchBoundary?i:b.jsx(yd,{getResetKey:()=>r,errorComponent:vd,onCatch:void 0,children:i})})}var Y1=n=>({createMutableStore:uy,createReadonlyStore:uy,batch:jv}),G1=n=>new X1(n),X1=class extends Vw{constructor(n){super(n,Y1)}};function Q1({router:n,children:o,...r}){pv(r)&&n.update({...n.options,...r,context:{...n.options.context,...r.context}});const i=b.jsx(Nv.Provider,{value:n,children:o});return n.options.Wrap?b.jsx(n.options.Wrap,{children:i}):i}function F1({router:n,...o}){return b.jsx(Q1,{router:n,...o,children:b.jsx(q1,{})})}function Yv(n){var o,r,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(o=0;o<l;o++)n[o]&&(r=Yv(n[o]))&&(i&&(i+=" "),i+=r)}else for(r in n)n[r]&&(i&&(i+=" "),i+=r);return i}function Gv(){for(var n,o,r=0,i="",l=arguments.length;r<l;r++)(n=arguments[r])&&(o=Yv(n))&&(i&&(i+=" "),i+=o);return i}const K1=(n,o)=>{const r=new Array(n.length+o.length);for(let i=0;i<n.length;i++)r[i]=n[i];for(let i=0;i<o.length;i++)r[n.length+i]=o[i];return r},Z1=(n,o)=>({classGroupId:n,validator:o}),Xv=(n=new Map,o=null,r)=>({nextPart:n,validators:o,classGroupId:r}),Nl="-",gy=[],J1="arbitrary..",W1=n=>{const o=eR(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return $1(d);const h=d.split(Nl),p=h[0]===""&&h.length>1?1:0;return Qv(h,p,o)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=i[d],m=r[d];return p?m?K1(m,p):p:m||gy}return r[d]||gy}}},Qv=(n,o,r)=>{if(n.length-o===0)return r.classGroupId;const l=n[o],u=r.nextPart.get(l);if(u){const m=Qv(n,o+1,u);if(m)return m}const d=r.validators;if(d===null)return;const h=o===0?n.join(Nl):n.slice(o).join(Nl),p=d.length;for(let m=0;m<p;m++){const y=d[m];if(y.validator(h))return y.classGroupId}},$1=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=n.slice(1,-1),r=o.indexOf(":"),i=o.slice(0,r);return i?J1+i:void 0})(),eR=n=>{const{theme:o,classGroups:r}=n;return tR(r,o)},tR=(n,o)=>{const r=Xv();for(const i in n){const l=n[i];bd(l,r,i,o)}return r},bd=(n,o,r,i)=>{const l=n.length;for(let u=0;u<l;u++){const d=n[u];nR(d,o,r,i)}},nR=(n,o,r,i)=>{if(typeof n=="string"){aR(n,o,r);return}if(typeof n=="function"){oR(n,o,r,i);return}rR(n,o,r,i)},aR=(n,o,r)=>{const i=n===""?o:Fv(o,n);i.classGroupId=r},oR=(n,o,r,i)=>{if(sR(n)){bd(n(i),o,r,i);return}o.validators===null&&(o.validators=[]),o.validators.push(Z1(r,n))},rR=(n,o,r,i)=>{const l=Object.entries(n),u=l.length;for(let d=0;d<u;d++){const[h,p]=l[d];bd(p,Fv(o,h),r,i)}},Fv=(n,o)=>{let r=n;const i=o.split(Nl),l=i.length;for(let u=0;u<l;u++){const d=i[u];let h=r.nextPart.get(d);h||(h=Xv(),r.nextPart.set(d,h)),r=h}return r},sR=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,iR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,r=Object.create(null),i=Object.create(null);const l=(u,d)=>{r[u]=d,o++,o>n&&(o=0,i=r,r=Object.create(null))};return{get(u){let d=r[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return l(u,d),d},set(u,d){u in r?r[u]=d:l(u,d)}}},Jf="!",yy=":",lR=[],vy=(n,o,r,i,l)=>({modifiers:n,hasImportantModifier:o,baseClassName:r,maybePostfixModifierPosition:i,isExternal:l}),cR=n=>{const{prefix:o,experimentalParseClassName:r}=n;let i=l=>{const u=[];let d=0,h=0,p=0,m;const y=l.length;for(let E=0;E<y;E++){const C=l[E];if(d===0&&h===0){if(C===yy){u.push(l.slice(p,E)),p=E+1;continue}if(C==="/"){m=E;continue}}C==="["?d++:C==="]"?d--:C==="("?h++:C===")"&&h--}const g=u.length===0?l:l.slice(p);let S=g,x=!1;g.endsWith(Jf)?(S=g.slice(0,-1),x=!0):g.startsWith(Jf)&&(S=g.slice(1),x=!0);const T=m&&m>p?m-p:void 0;return vy(u,x,S,T)};if(o){const l=o+yy,u=i;i=d=>d.startsWith(l)?u(d.slice(l.length)):vy(lR,!1,d,void 0,!0)}if(r){const l=i;i=u=>r({className:u,parseClassName:l})}return i},uR=n=>{const o=new Map;return n.orderSensitiveModifiers.forEach((r,i)=>{o.set(r,1e6+i)}),r=>{const i=[];let l=[];for(let u=0;u<r.length;u++){const d=r[u],h=d[0]==="[",p=o.has(d);h||p?(l.length>0&&(l.sort(),i.push(...l),l=[]),i.push(d)):l.push(d)}return l.length>0&&(l.sort(),i.push(...l)),i}},fR=n=>({cache:iR(n.cacheSize),parseClassName:cR(n),sortModifiers:uR(n),postfixLookupClassGroupIds:dR(n),...W1(n)}),dR=n=>{const o=Object.create(null),r=n.postfixLookupClassGroups;if(r)for(let i=0;i<r.length;i++)o[r[i]]=!0;return o},hR=/\s+/,mR=(n,o)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:u,postfixLookupClassGroupIds:d}=o,h=[],p=n.trim().split(hR);let m="";for(let y=p.length-1;y>=0;y-=1){const g=p[y],{isExternal:S,modifiers:x,hasImportantModifier:T,baseClassName:E,maybePostfixModifierPosition:C}=r(g);if(S){m=g+(m.length>0?" "+m:m);continue}let M=!!C,_;if(M){const L=E.substring(0,C);_=i(L);const D=_&&d[_]?i(E):void 0;D&&D!==_&&(_=D,M=!1)}else _=i(E);if(!_){if(!M){m=g+(m.length>0?" "+m:m);continue}if(_=i(E),!_){m=g+(m.length>0?" "+m:m);continue}M=!1}const j=x.length===0?"":x.length===1?x[0]:u(x).join(":"),k=T?j+Jf:j,z=k+_;if(h.indexOf(z)>-1)continue;h.push(z);const q=l(_,M);for(let L=0;L<q.length;++L){const D=q[L];h.push(k+D)}m=g+(m.length>0?" "+m:m)}return m},pR=(...n)=>{let o=0,r,i,l="";for(;o<n.length;)(r=n[o++])&&(i=Kv(r))&&(l&&(l+=" "),l+=i);return l},Kv=n=>{if(typeof n=="string")return n;let o,r="";for(let i=0;i<n.length;i++)n[i]&&(o=Kv(n[i]))&&(r&&(r+=" "),r+=o);return r},gR=(n,...o)=>{let r,i,l,u;const d=p=>{const m=o.reduce((y,g)=>g(y),n());return r=fR(m),i=r.cache.get,l=r.cache.set,u=h,h(p)},h=p=>{const m=i(p);if(m)return m;const y=mR(p,r);return l(p,y),y};return u=d,(...p)=>u(pR(...p))},yR=[],ft=n=>{const o=r=>r[n]||yR;return o.isThemeGetter=!0,o},Zv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,bR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ba=n=>vR.test(n),Te=n=>!!n&&!Number.isNaN(Number(n)),On=n=>!!n&&Number.isInteger(Number(n)),Af=n=>n.endsWith("%")&&Te(n.slice(0,-1)),aa=n=>bR.test(n),Wv=()=>!0,ER=n=>xR.test(n)&&!SR.test(n),xd=()=>!1,TR=n=>wR.test(n),CR=n=>RR.test(n),MR=n=>!ie(n)&&!le(n),_R=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),AR=n=>Ga(n,t0,xd),ie=n=>Zv.test(n),mo=n=>Ga(n,n0,ER),by=n=>Ga(n,BR,Te),NR=n=>Ga(n,o0,Wv),OR=n=>Ga(n,a0,xd),xy=n=>Ga(n,$v,xd),jR=n=>Ga(n,e0,CR),il=n=>Ga(n,r0,TR),le=n=>Jv.test(n),Ms=n=>Mo(n,n0),zR=n=>Mo(n,a0),Sy=n=>Mo(n,$v),LR=n=>Mo(n,t0),kR=n=>Mo(n,e0),ll=n=>Mo(n,r0,!0),DR=n=>Mo(n,o0,!0),Ga=(n,o,r)=>{const i=Zv.exec(n);return i?i[1]?o(i[1]):r(i[2]):!1},Mo=(n,o,r=!1)=>{const i=Jv.exec(n);return i?i[1]?o(i[1]):r:!1},$v=n=>n==="position"||n==="percentage",e0=n=>n==="image"||n==="url",t0=n=>n==="length"||n==="size"||n==="bg-size",n0=n=>n==="length",BR=n=>n==="number",a0=n=>n==="family-name",o0=n=>n==="number"||n==="weight",r0=n=>n==="shadow",UR=()=>{const n=ft("color"),o=ft("font"),r=ft("text"),i=ft("font-weight"),l=ft("tracking"),u=ft("leading"),d=ft("breakpoint"),h=ft("container"),p=ft("spacing"),m=ft("radius"),y=ft("shadow"),g=ft("inset-shadow"),S=ft("text-shadow"),x=ft("drop-shadow"),T=ft("blur"),E=ft("perspective"),C=ft("aspect"),M=ft("ease"),_=ft("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...k(),le,ie],q=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],D=()=>[le,ie,p],Q=()=>[Ba,"full","auto",...D()],oe=()=>[On,"none","subgrid",le,ie],ne=()=>["auto",{span:["full",On,le,ie]},On,le,ie],$=()=>[On,"auto",le,ie],pe=()=>["auto","min","max","fr",le,ie],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],me=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...D()],Y=()=>[Ba,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],Z=()=>[Ba,"screen","full","dvw","lvw","svw","min","max","fit",...D()],ue=()=>[Ba,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],J=()=>[n,le,ie],N=()=>[...k(),Sy,xy,{position:[le,ie]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",LR,AR,{size:[le,ie]}],ee=()=>[Af,Ms,mo],ae=()=>["","none","full",m,le,ie],se=()=>["",Te,Ms,mo],te=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[Te,Af,Sy,xy],ve=()=>["","none",T,le,ie],be=()=>["none",Te,le,ie],Ce=()=>["none",Te,le,ie],Ge=()=>[Te,le,ie],Ve=()=>[Ba,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[aa],breakpoint:[aa],color:[Wv],container:[aa],"drop-shadow":[aa],ease:["in","out","in-out"],font:[MR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[aa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[aa],shadow:[aa],spacing:["px",Te],text:[aa],"text-shadow":[aa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ba,ie,le,C]}],container:["container"],"container-type":[{"@container":["","normal","size",le,ie]}],"container-named":[_R],columns:[{columns:[Te,ie,le,h]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[On,"auto",le,ie]}],basis:[{basis:[Ba,"full","auto",h,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Ba,"auto","initial","none",ie]}],grow:[{grow:["",Te,le,ie]}],shrink:[{shrink:["",Te,le,ie]}],order:[{order:[On,"first","last","none",le,ie]}],"grid-cols":[{"grid-cols":oe()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":oe()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...me(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...ue()]}],"min-block-size":[{"min-block":["auto",...ue()]}],"max-block-size":[{"max-block":["none",...ue()]}],w:[{w:[h,"screen",...Y()]}],"min-w":[{"min-w":[h,"screen","none",...Y()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Ms,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,DR,NR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Af,ie]}],"font-family":[{font:[zR,OR,o]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,le,ie]}],"line-clamp":[{"line-clamp":[Te,"none",le,by]}],leading:[{leading:[u,...D()]}],"list-image":[{"list-image":["none",le,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",le,mo]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[Te,"auto",le,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"tab-size":[{tab:[On,le,ie]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},On,le,ie],radial:["",le,ie],conic:[On,le,ie]},kR,jR]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-bs":[{"border-bs":J()}],"border-color-be":[{"border-be":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,le,ie]}],"outline-w":[{outline:["",Te,Ms,mo]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",y,ll,il]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",g,ll,il]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[Te,mo]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",S,ll,il]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[Te,le,ie]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[le,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ie]}],filter:[{filter:["","none",le,ie]}],blur:[{blur:ve()}],brightness:[{brightness:[Te,le,ie]}],contrast:[{contrast:[Te,le,ie]}],"drop-shadow":[{"drop-shadow":["","none",x,ll,il]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",Te,le,ie]}],"hue-rotate":[{"hue-rotate":[Te,le,ie]}],invert:[{invert:["",Te,le,ie]}],saturate:[{saturate:[Te,le,ie]}],sepia:[{sepia:["",Te,le,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ie]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Te,le,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Te,le,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,le,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,le,ie]}],"backdrop-invert":[{"backdrop-invert":["",Te,le,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Te,le,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Te,le,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,le,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",le,ie]}],ease:[{ease:["linear","initial",M,le,ie]}],delay:[{delay:[Te,le,ie]}],animate:[{animate:["none",_,le,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,le,ie]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:Ge()}],"skew-x":[{"skew-x":Ge()}],"skew-y":[{"skew-y":Ge()}],transform:[{transform:[le,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],zoom:[{zoom:[On,le,ie]}],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":J()}],"scrollbar-track-color":[{"scrollbar-track":J()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ie]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[Te,Ms,mo,by]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},HR=gR(UR);function Je(...n){return HR(Gv(n))}const hn=w.forwardRef(({className:n,...o},r)=>b.jsx("div",{ref:r,className:Je("rounded-lg border bg-card text-card-foreground shadow-sm",n),...o}));hn.displayName="Card";const mn=w.forwardRef(({className:n,...o},r)=>b.jsx("div",{ref:r,className:Je("flex flex-col space-y-1.5 p-4",n),...o}));mn.displayName="CardHeader";const pn=w.forwardRef(({className:n,...o},r)=>b.jsx("h3",{ref:r,className:Je("text-base font-semibold leading-none tracking-tight",n),...o}));pn.displayName="CardTitle";const gn=w.forwardRef(({className:n,...o},r)=>b.jsx("p",{ref:r,className:Je("text-sm text-muted-foreground",n),...o}));gn.displayName="CardDescription";const yn=w.forwardRef(({className:n,...o},r)=>b.jsx("div",{ref:r,className:Je("p-4 pt-0",n),...o}));yn.displayName="CardContent";function Ln(n){return n>=1e3?`${(n/1e3).toFixed(2)}s`:`${Math.round(n)}ms`}function s0(n){if(n!==void 0)return n.endsWith(".error")?n.slice(0,-6):n}const IR=new Set(["rate_limit","network_timeout"]),PR=new Set(["authentication","invalid_input","internal_fault","resource_exhausted"]);function wy(n,o){const r=s0(n);return r==="pipeline"?"recoverable":r==="session"?o==="initialization"||o==="startup_timeout"?"fatal":"unknown":r==="transport"?o==="invalid_input"?"recoverable":o==="session_timeout"||o==="idle_timeout"?"fatal":"unknown":o===void 0?"unknown":IR.has(o)?"recoverable":PR.has(o)?"fatal":"unknown"}function qR(n){const o=[];for(const r of n.turns)for(const i of r.errors)o.push({atMs:i.atMs,turnId:r.turnId,component:i.component,category:i.category,message:i.message,severity:wy(i.component,i.category)});for(const r of n.sessionEvents){if(r.message.type!=="error")continue;const i=r.message;o.push({atMs:r.atMs,component:typeof i.component=="string"?i.component:void 0,category:typeof i.category=="string"?i.category:void 0,message:typeof i.message=="string"?i.message:"",severity:wy(typeof i.component=="string"?i.component:void 0,typeof i.category=="string"?i.category:void 0)})}return o.sort((r,i)=>i.atMs-r.atMs)}const VR={stt:"Transcription failed",tts:"Speech synthesis failed",llm:"The reasoner failed",vad:"Speech detection failed",eos:"Turn-end detection failed",denoiser:"Noise suppression failed",bridge:"The realtime bridge failed",pipeline:"A pipeline handler failed",iu_ledger:"The turn ledger failed",session:"The session could not start",transport:"The connection rejected something"},YR={rate_limit:"The provider is rate limiting or the quota is used up. It will be retried.",network_timeout:"The connection to the provider timed out. It will be retried.",authentication:"The provider rejected the credentials — check the API key for this component.",invalid_input:"The input was rejected as invalid — check the audio format and sample rate.",internal_fault:"The provider returned an unexpected failure. Its own status page is the next place to look.",resource_exhausted:"The provider's credits or quota are gone. Top up or switch provider.",initialization:"Building the agent threw before the session was ready — usually a missing key or a bad provider option.",startup_timeout:"Building the agent took longer than the startup budget allows.",session_timeout:"The session ran past its maximum duration and the server ended it.",idle_timeout:"Nothing arrived from this page for longer than the idle limit, so the server ended it."},GR={recoverable:"Session survived",fatal:"Ended the session",unknown:"Effect not known"},XR={recoverable:"border-amber-500/40 bg-amber-500/10",fatal:"border-destructive/50 bg-destructive/10",unknown:"border-border bg-muted"},QR={recoverable:"bg-amber-500/20 text-amber-900 dark:text-amber-200",fatal:"bg-destructive/20 text-destructive",unknown:"bg-muted-foreground/15 text-muted-foreground"};function FR({record:n}){const o=qR(n);if(o.length===0)return null;const r=o.filter(l=>l.severity==="fatal").length,i=o.filter(l=>l.severity==="recoverable").length;return b.jsxs(hn,{className:"border-destructive/50","data-testid":"agent-errors",children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Errors"}),b.jsxs(gn,{"data-testid":"agent-errors-summary",children:[o.length," reported this session",r>0?`, ${String(r)} of which ended it`:"",i>0?`, ${String(i)} the session survived`:"",". Newest first, and they stay here for the rest of the session."]})]}),b.jsx(yn,{children:b.jsx("ul",{className:"space-y-2",children:o.map((l,u)=>{const d=s0(l.component),h=(d!==void 0?VR[d]:void 0)??"Something failed",p=l.category!==void 0?YR[l.category]:void 0;return b.jsxs("li",{className:Je("space-y-1 rounded border px-2 py-1.5",XR[l.severity]),"data-testid":"agent-error","data-severity":l.severity,"data-component":d,children:[b.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[b.jsx("span",{className:"text-sm font-medium","data-testid":"agent-error-subject",children:h}),b.jsx("span",{className:Je("rounded-full px-2 py-0.5 text-[11px] font-medium",QR[l.severity]),"data-testid":"agent-error-severity",children:GR[l.severity]}),b.jsxs("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground","data-testid":"agent-error-where",children:[l.turnId!==void 0?`turn ${l.turnId}`:"outside any turn"," · +",Ln(l.atMs)]})]}),p!==void 0&&b.jsx("p",{className:"text-xs","data-testid":"agent-error-cause",children:p}),l.severity==="unknown"&&b.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"agent-error-unknown",children:'This combination is not one the studio can map to "the session carried on" or "the session ended" — check whether the session is still live before trusting it.'}),b.jsx("p",{className:"text-xs","data-testid":"agent-error-message",children:l.message}),(l.component!==void 0||l.category!==void 0)&&b.jsx("p",{className:"font-mono text-[11px] text-muted-foreground","data-testid":"agent-error-raw",children:[l.component,l.category].filter(m=>m!==void 0).join(" · ")})]},`${String(l.atMs)}-${l.turnId??"session"}-${String(u)}`)})})})]})}function KR(n,o,r){const i=typeof o.type=="string"?o.type:"",l=typeof o.turnId=="string"?o.turnId:n.turnId,u=d=>d===n.state?{...n,turnId:l}:{state:d,sinceMs:r,turnId:l};switch(i){case"speech_started":return u("listening");case"speech_ended":return u("endpointing");case"stt_output":case"turn_complete":return u("thinking");case"agent_tool_call":case"tool_call_started":case"tool_call_delayed":return u("thinking");case"agent_chunk":return n.state==="speaking"?u("speaking"):u("thinking");case"tts_chunk":return u("speaking");case"agent_interrupted":return u("interrupted");case"tts_end":case"agent_end":return n.state==="speaking"?u("idle"):n;default:return n}}const Ry={state:"idle",sinceMs:0},ZR={idle:Number.POSITIVE_INFINITY,listening:6e4,endpointing:5e3,thinking:3e4,speaking:12e4,interrupted:1e4};function JR(n,o){return o-n.sinceMs>ZR[n.state]}const WR={idle:"Idle",listening:"Listening to you",endpointing:"Deciding you're done",thinking:"Thinking",speaking:"Speaking",interrupted:"Interrupted"},$R={idle:"bg-muted text-muted-foreground",listening:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300",endpointing:"bg-amber-500/15 text-amber-700 dark:text-amber-300",thinking:"bg-sky-500/15 text-sky-700 dark:text-sky-300",speaking:"bg-violet-500/15 text-violet-700 dark:text-violet-300",interrupted:"bg-rose-500/15 text-rose-700 dark:text-rose-300"};function eE({snapshot:n}){const[o,r]=w.useState(()=>performance.now());w.useEffect(()=>{const u=window.setInterval(()=>r(performance.now()),500);return()=>window.clearInterval(u)},[]);const i=Math.max(0,o-n.sinceMs),l=JR(n,o);return b.jsxs("span",{className:Je("inline-flex items-center gap-2 rounded-full px-3 py-1 text-xs font-medium transition-colors",$R[n.state],l&&"ring-2 ring-rose-500/60"),title:l?"Held far longer than expected — likely stalled":void 0,"data-testid":"agent-state-badge","data-state":n.state,"data-stalled":l?"true":"false",children:[b.jsxs("span",{className:"relative flex h-2 w-2",children:[n.state!=="idle"&&b.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60"}),b.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-current"})]}),WR[n.state],n.state!=="idle"&&b.jsxs("span",{className:"tabular-nums opacity-70",children:[(i/1e3).toFixed(1),"s"]})]})}function Ey(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Sd(...n){return o=>{let r=!1;const i=n.map(l=>{const u=Ey(l,o);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let l=0;l<i.length;l++){const u=i[l];typeof u=="function"?u():Ey(n[l],null)}}}}function wt(...n){return w.useCallback(Sd(...n),n)}var tE=Symbol.for("react.lazy"),Ol=hd[" use ".trim().toString()];function nE(n){return typeof n=="object"&&n!==null&&"then"in n}function i0(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===tE&&"_payload"in n&&nE(n._payload)}function l0(n){const o=oE(n),r=w.forwardRef((i,l)=>{let{children:u,...d}=i;i0(u)&&typeof Ol=="function"&&(u=Ol(u._payload));const h=w.Children.toArray(u),p=h.find(sE);if(p){const m=p.props.children,y=h.map(g=>g===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return b.jsx(o,{...d,ref:l,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return b.jsx(o,{...d,ref:l,children:u})});return r.displayName=`${n}.Slot`,r}var aE=l0("Slot");function oE(n){const o=w.forwardRef((r,i)=>{let{children:l,...u}=r;if(i0(l)&&typeof Ol=="function"&&(l=Ol(l._payload)),w.isValidElement(l)){const d=lE(l),h=iE(u,l.props);return l.type!==w.Fragment&&(h.ref=i?Sd(i,d):d),w.cloneElement(l,h)}return w.Children.count(l)>1?w.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var rE=Symbol("radix.slottable");function sE(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===rE}function iE(n,o){const r={...o};for(const i in o){const l=n[i],u=o[i];/^on[A-Z]/.test(i)?l&&u?r[i]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(r[i]=l):i==="style"?r[i]={...l,...u}:i==="className"&&(r[i]=[l,u].filter(Boolean).join(" "))}return{...n,...r}}function lE(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,r=o&&"isReactWarning"in o&&o.isReactWarning;return r?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,r=o&&"isReactWarning"in o&&o.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}const Ty=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Cy=Gv,cE=(n,o)=>r=>{var i;if(o?.variants==null)return Cy(n,r?.class,r?.className);const{variants:l,defaultVariants:u}=o,d=Object.keys(l).map(m=>{const y=r?.[m],g=u?.[m];if(y===null)return null;const S=Ty(y)||Ty(g);return l[m][S]}),h=r&&Object.entries(r).reduce((m,y)=>{let[g,S]=y;return S===void 0||(m[g]=S),m},{}),p=o==null||(i=o.compoundVariants)===null||i===void 0?void 0:i.reduce((m,y)=>{let{class:g,className:S,...x}=y;return Object.entries(x).every(T=>{let[E,C]=T;return Array.isArray(C)?C.includes({...u,...h}[E]):{...u,...h}[E]===C})?[...m,g,S]:m},[]);return Cy(n,d,p,r?.class,r?.className)},uE=cE("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),fn=w.forwardRef(({className:n,variant:o,size:r,asChild:i=!1,...l},u)=>{const d=i?aE:"button";return b.jsx(d,{className:Je(uE({variant:o,size:r,className:n})),ref:u,...l})});fn.displayName="Button";function fE(n){const o=typeof n=="object"&&n!==null?n:{},r=typeof o.name=="string"?o.name:"",i=typeof o.message=="string"?o.message:String(n);switch(r){case"NotAllowedError":case"PermissionDeniedError":return{kind:"denied",detail:i};case"NotFoundError":case"DevicesNotFoundError":case"OverconstrainedError":return{kind:"no-device",detail:i};case"NotReadableError":case"TrackStartError":case"AbortError":return{kind:"in-use",detail:i};case"SecurityError":return{kind:"insecure-context",detail:i};case"TypeError":return{kind:"unsupported",detail:i};default:return{kind:"unknown",detail:i}}}function dE(n){const{serverAudioBytes:o,framesReceived:r,peakLevel:i,playbackState:l,turnCount:u}=n;return r>0&&l==="suspended"?"playback-suspended":o>0&&r===0?"not-reaching-page":r>0&&i===0?"arriving-silent":r>0?"healthy":u>0?"silent":"idle"}const hE={denied:"This page is blocked from using the microphone","no-device":"No microphone is attached","in-use":"Something else is holding the microphone","insecure-context":"This page is not allowed a microphone on an insecure address",unsupported:"This browser gave no way to ask for a microphone",unknown:"The microphone request failed"},mE={denied:"Open the site controls in the address bar — the padlock, or the blocked-microphone icon — set Microphone to Allow, then reload this page. The browser will not ask again on its own once it has been refused.","no-device":"Plug in a microphone, or enable the built-in one in your system sound settings, then switch back to voice. The browser only sees devices that exist when it asks.","in-use":"Close whatever is holding it — a call, a recording app, another tab of this studio — then switch back to voice. Only one program at a time gets exclusive access on some systems.","insecure-context":"Browsers only hand out a microphone over https, or on localhost and 127.0.0.1. Reach this page by one of those.",unsupported:"Use a current Chrome, Edge, Firefox or Safari. Voice mode needs the browser's microphone API; text mode does not.",unknown:"The browser did not name a cause. The message it gave is below — reload and retry, and check the device in your system sound settings."},pE={"not-reaching-page":"The server sent speech that never arrived here","arriving-silent":"Audio is arriving, but every frame of it is silent","playback-suspended":"Audio is arriving and playback is paused by the browser",silent:"The agent has not produced any speech"},gE={"not-reaching-page":"The server accounted for speech it sent, and no audio frames reached this page at all. That is a broken downlink, not a quiet agent — the usual causes are a codec or envelope the client did not expect, or something between you stripping binary frames.","arriving-silent":"Frames are arriving and decoding, and every one of them is digital silence. The speech synthesiser produced nothing audible, or the sample rate it declared does not match the bytes it sent.","playback-suspended":"The audio is here and decoded. The browser is holding playback because the page has had no user interaction yet, so nothing reaches the speakers.",silent:"A turn completed and the server reported no speech for it. This is real silence upstream, not a playback problem — check the speech synthesiser and its key."};function yE({micFailure:n,mode:o,onModeChange:r}){return b.jsxs("div",{className:"space-y-2 rounded bg-destructive/10 px-2 py-1.5","data-testid":"mic-failure","data-kind":n.kind,children:[b.jsx("p",{className:"text-sm font-medium","data-testid":"mic-failure-problem",children:hE[n.kind]}),b.jsx("p",{className:"text-xs","data-testid":"mic-failure-recovery",children:mE[n.kind]}),b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"mic-failure-text-mode",children:"Text mode needs no microphone — you can keep working on prompts and tools right now, and only lose transcription and turn-taking."}),o!=="text"&&r&&b.jsx(fn,{variant:"outline",size:"sm",onClick:()=>r("text"),children:"Switch to text"})]}),n.kind==="unknown"&&n.detail!==""&&b.jsx("p",{className:"font-mono text-[11px] text-muted-foreground","data-testid":"mic-failure-detail",children:n.detail})]})}function vE({micFailure:n,mode:o,serverAudioBytes:r,framesReceived:i,peakLevel:l,playbackState:u,turnCount:d,onModeChange:h,onResumePlayback:p}){const m=dE({serverAudioBytes:r,framesReceived:i,peakLevel:l,playbackState:u,turnCount:d}),y=pE[m];return!n&&y===void 0?null:b.jsxs(hn,{className:"border-destructive/50","data-testid":"audio-health",children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Audio"}),b.jsx(gn,{children:"What is stopping sound getting in or out, and what to do about it."})]}),b.jsxs(yn,{className:"space-y-3",children:[n&&b.jsx(yE,{micFailure:n,mode:o,onModeChange:h}),y!==void 0&&b.jsxs("div",{className:"space-y-2","data-testid":"audio-output-condition","data-condition":m,children:[b.jsx("p",{className:"text-sm font-medium","data-testid":"audio-output-problem",children:y}),b.jsx("p",{className:"text-xs","data-testid":"audio-output-explanation",children:gE[m]}),m==="playback-suspended"&&p&&b.jsx(fn,{size:"sm",onClick:p,"data-testid":"resume-playback",children:"Start playback"}),m==="not-reaching-page"&&b.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"audio-output-counts",children:[r," bytes reported sent, 0 frames received."]})]})]})]})}function bE({micAnalyser:n,playbackLevel:o=0,active:r=!1}){const i=w.useRef(null),l=w.useRef(o);return w.useEffect(()=>{l.current=o},[o]),w.useEffect(()=>{const u=i.current;if(!u)return;const d=u.getContext("2d");if(!d)return;let h=0;const p=new Uint8Array(n?.frequencyBinCount??64),m=()=>{h=requestAnimationFrame(m);const y=u.clientWidth*window.devicePixelRatio,g=u.clientHeight*window.devicePixelRatio;(u.width!==y||u.height!==g)&&(u.width=y,u.height=g),d.clearRect(0,0,y,g),d.fillStyle="oklch(0.995 0.001 106)",d.fillRect(0,0,y,g);let S=0;if(n&&r){n.getByteFrequencyData(p);let M=0;for(let _=0;_<p.length;_+=1)M+=p[_];S=M/(p.length*255)}const x=Math.min(1,Math.max(S,l.current*4)),T=24,E=3,C=(y-E*(T-1))/T;for(let M=0;M<T;M+=1){const _=M/T*Math.PI,j=.35+.65*Math.sin(_+performance.now()/180),k=Math.max(4,g*x*j),z=M*(C+E),q=(g-k)/2;d.fillStyle=r?"oklch(0.45 0.12 150)":"oklch(0.72 0.01 106)",d.fillRect(z,q,C,k)}d.strokeStyle="oklch(0.86 0.012 106)",d.strokeRect(.5,.5,y-1,g-1)};return m(),()=>cancelAnimationFrame(h)},[r,n]),b.jsx("canvas",{ref:i,className:"h-16 w-full rounded-md border bg-card","aria-label":"Audio visualizer"})}const xE="wss://syrinx-voice-server-workers.mithushancj.workers.dev/ws",Bs="ws://127.0.0.1:4173/ws";function SE(){const o=new URLSearchParams(window.location.search).get("ws")?.trim();return o?{target:"custom",url:o}:{target:"local",url:Bs}}function c0(n,o){return n==="hosted"?xE:o.trim()||Bs}function wE(n){switch(n){case"connected":return"Connected";case"connecting":return"Connecting";case"error":return"Error";default:return"Offline"}}function u0({className:n,variant:o="default",...r}){return b.jsx("span",{className:Je("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-semibold",o==="default"&&"border-border bg-secondary text-secondary-foreground",o==="success"&&"border-emerald-200 bg-emerald-50 text-emerald-800",o==="warning"&&"border-amber-200 bg-amber-50 text-amber-800",o==="destructive"&&"border-red-200 bg-red-50 text-red-800",n),...r})}const js=w.forwardRef(({className:n,type:o,...r},i)=>b.jsx("input",{type:o,className:Je("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:i,...r}));js.displayName="Input";var RE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],EE=RE.reduce((n,o)=>{const r=l0(`Primitive.${o}`),i=w.forwardRef((l,u)=>{const{asChild:d,...h}=l,p=d?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${o}`,{...n,[o]:i}},{}),TE="Label",f0=w.forwardRef((n,o)=>b.jsx(EE.label,{...n,ref:o,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(n.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));f0.displayName=TE;var d0=f0;const Wf=w.forwardRef(({className:n,...o},r)=>b.jsx(d0,{ref:r,className:Je("text-xs font-medium uppercase tracking-wide text-muted-foreground",n),...o}));Wf.displayName=d0.displayName;function My(n,[o,r]){return Math.min(r,Math.max(o,n))}function ct(n,o,{checkForDefaultPrevented:r=!0}={}){return function(l){if(n?.(l),r===!1||!l.defaultPrevented)return o?.(l)}}function wd(n,o=[]){let r=[];function i(u,d){const h=w.createContext(d),p=r.length;r=[...r,d];const m=g=>{const{scope:S,children:x,...T}=g,E=S?.[n]?.[p]||h,C=w.useMemo(()=>T,Object.values(T));return b.jsx(E.Provider,{value:C,children:x})};m.displayName=u+"Provider";function y(g,S){const x=S?.[n]?.[p]||h,T=w.useContext(x);if(T)return T;if(d!==void 0)return d;throw new Error(`\`${g}\` must be used within \`${u}\``)}return[m,y]}const l=()=>{const u=r.map(d=>w.createContext(d));return function(h){const p=h?.[n]||u;return w.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return l.scopeName=n,[i,CE(l,...o)]}function CE(...n){const o=n[0];if(n.length===1)return o;const r=()=>{const i=n.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(u){const d=i.reduce((h,{useScope:p,scopeName:m})=>{const g=p(u)[`__scope${m}`];return{...h,...g}},{});return w.useMemo(()=>({[`__scope${o.scopeName}`]:d}),[d])}};return r.scopeName=o.scopeName,r}function jl(n){const o=ME(n),r=w.forwardRef((i,l)=>{const{children:u,...d}=i,h=w.Children.toArray(u),p=h.find(AE);if(p){const m=p.props.children,y=h.map(g=>g===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:g);return b.jsx(o,{...d,ref:l,children:w.isValidElement(m)?w.cloneElement(m,void 0,y):null})}return b.jsx(o,{...d,ref:l,children:u})});return r.displayName=`${n}.Slot`,r}function ME(n){const o=w.forwardRef((r,i)=>{const{children:l,...u}=r;if(w.isValidElement(l)){const d=OE(l),h=NE(u,l.props);return l.type!==w.Fragment&&(h.ref=i?Sd(i,d):d),w.cloneElement(l,h)}return w.Children.count(l)>1?w.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var _E=Symbol("radix.slottable");function AE(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===_E}function NE(n,o){const r={...o};for(const i in o){const l=n[i],u=o[i];/^on[A-Z]/.test(i)?l&&u?r[i]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(r[i]=l):i==="style"?r[i]={...l,...u}:i==="className"&&(r[i]=[l,u].filter(Boolean).join(" "))}return{...n,...r}}function OE(n){let o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,r=o&&"isReactWarning"in o&&o.isReactWarning;return r?n.ref:(o=Object.getOwnPropertyDescriptor(n,"ref")?.get,r=o&&"isReactWarning"in o&&o.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}function jE(n){const o=n+"CollectionProvider",[r,i]=wd(o),[l,u]=r(o,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:C,children:M}=E,_=Qt.useRef(null),j=Qt.useRef(new Map).current;return b.jsx(l,{scope:C,itemMap:j,collectionRef:_,children:M})};d.displayName=o;const h=n+"CollectionSlot",p=jl(h),m=Qt.forwardRef((E,C)=>{const{scope:M,children:_}=E,j=u(h,M),k=wt(C,j.collectionRef);return b.jsx(p,{ref:k,children:_})});m.displayName=h;const y=n+"CollectionItemSlot",g="data-radix-collection-item",S=jl(y),x=Qt.forwardRef((E,C)=>{const{scope:M,children:_,...j}=E,k=Qt.useRef(null),z=wt(C,k),q=u(y,M);return Qt.useEffect(()=>(q.itemMap.set(k,{ref:k,...j}),()=>{q.itemMap.delete(k)})),b.jsx(S,{[g]:"",ref:z,children:_})});x.displayName=y;function T(E){const C=u(n+"CollectionConsumer",E);return Qt.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const j=Array.from(_.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((q,L)=>j.indexOf(q.ref.current)-j.indexOf(L.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:d,Slot:m,ItemSlot:x},T,i]}var zE=w.createContext(void 0);function LE(n){const o=w.useContext(zE);return n||o||"ltr"}var kE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ot=kE.reduce((n,o)=>{const r=jl(`Primitive.${o}`),i=w.forwardRef((l,u)=>{const{asChild:d,...h}=l,p=d?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${o}`,{...n,[o]:i}},{});function DE(n,o){n&&Cr.flushSync(()=>n.dispatchEvent(o))}function wo(n){const o=w.useRef(n);return w.useEffect(()=>{o.current=n}),w.useMemo(()=>(...r)=>o.current?.(...r),[])}function BE(n,o=globalThis?.document){const r=wo(n);w.useEffect(()=>{const i=l=>{l.key==="Escape"&&r(l)};return o.addEventListener("keydown",i,{capture:!0}),()=>o.removeEventListener("keydown",i,{capture:!0})},[r,o])}var UE="DismissableLayer",$f="dismissableLayer.update",HE="dismissableLayer.pointerDownOutside",IE="dismissableLayer.focusOutside",_y,h0=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m0=w.forwardRef((n,o)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=n,m=w.useContext(h0),[y,g]=w.useState(null),S=y?.ownerDocument??globalThis?.document,[,x]=w.useState({}),T=wt(o,L=>g(L)),E=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),M=E.indexOf(C),_=y?E.indexOf(y):-1,j=m.layersWithOutsidePointerEventsDisabled.size>0,k=_>=M,z=VE(L=>{const D=L.target,Q=[...m.branches].some(oe=>oe.contains(D));!k||Q||(l?.(L),d?.(L),L.defaultPrevented||h?.())},S),q=YE(L=>{const D=L.target;[...m.branches].some(oe=>oe.contains(D))||(u?.(L),d?.(L),L.defaultPrevented||h?.())},S);return BE(L=>{_===m.layers.size-1&&(i?.(L),!L.defaultPrevented&&h&&(L.preventDefault(),h()))},S),w.useEffect(()=>{if(y)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(_y=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),Ay(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=_y)}},[y,S,r,m]),w.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),Ay())},[y,m]),w.useEffect(()=>{const L=()=>x({});return document.addEventListener($f,L),()=>document.removeEventListener($f,L)},[]),b.jsx(ot.div,{...p,ref:T,style:{pointerEvents:j?k?"auto":"none":void 0,...n.style},onFocusCapture:ct(n.onFocusCapture,q.onFocusCapture),onBlurCapture:ct(n.onBlurCapture,q.onBlurCapture),onPointerDownCapture:ct(n.onPointerDownCapture,z.onPointerDownCapture)})});m0.displayName=UE;var PE="DismissableLayerBranch",qE=w.forwardRef((n,o)=>{const r=w.useContext(h0),i=w.useRef(null),l=wt(o,i);return w.useEffect(()=>{const u=i.current;if(u)return r.branches.add(u),()=>{r.branches.delete(u)}},[r.branches]),b.jsx(ot.div,{...n,ref:l})});qE.displayName=PE;function VE(n,o=globalThis?.document){const r=wo(n),i=w.useRef(!1),l=w.useRef(()=>{});return w.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let p=function(){p0(HE,r,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(o.removeEventListener("click",l.current),l.current=p,o.addEventListener("click",l.current,{once:!0})):p()}else o.removeEventListener("click",l.current);i.current=!1},d=window.setTimeout(()=>{o.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),o.removeEventListener("pointerdown",u),o.removeEventListener("click",l.current)}},[o,r]),{onPointerDownCapture:()=>i.current=!0}}function YE(n,o=globalThis?.document){const r=wo(n),i=w.useRef(!1);return w.useEffect(()=>{const l=u=>{u.target&&!i.current&&p0(IE,r,{originalEvent:u},{discrete:!1})};return o.addEventListener("focusin",l),()=>o.removeEventListener("focusin",l)},[o,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Ay(){const n=new CustomEvent($f);document.dispatchEvent(n)}function p0(n,o,r,{discrete:i}){const l=r.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});o&&l.addEventListener(n,o,{once:!0}),i?DE(l,u):l.dispatchEvent(u)}var Nf=0;function GE(){w.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ny()),document.body.insertAdjacentElement("beforeend",n[1]??Ny()),Nf++,()=>{Nf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),Nf--}},[])}function Ny(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Of="focusScope.autoFocusOnMount",jf="focusScope.autoFocusOnUnmount",Oy={bubbles:!1,cancelable:!0},XE="FocusScope",g0=w.forwardRef((n,o)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:u,...d}=n,[h,p]=w.useState(null),m=wo(l),y=wo(u),g=w.useRef(null),S=wt(o,E=>p(E)),x=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let E=function(j){if(x.paused||!h)return;const k=j.target;h.contains(k)?g.current=k:Ua(g.current,{select:!0})},C=function(j){if(x.paused||!h)return;const k=j.relatedTarget;k!==null&&(h.contains(k)||Ua(g.current,{select:!0}))},M=function(j){if(document.activeElement===document.body)for(const z of j)z.removedNodes.length>0&&Ua(h)};document.addEventListener("focusin",E),document.addEventListener("focusout",C);const _=new MutationObserver(M);return h&&_.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",C),_.disconnect()}}},[i,h,x.paused]),w.useEffect(()=>{if(h){zy.add(x);const E=document.activeElement;if(!h.contains(E)){const M=new CustomEvent(Of,Oy);h.addEventListener(Of,m),h.dispatchEvent(M),M.defaultPrevented||(QE(WE(y0(h)),{select:!0}),document.activeElement===E&&Ua(h))}return()=>{h.removeEventListener(Of,m),setTimeout(()=>{const M=new CustomEvent(jf,Oy);h.addEventListener(jf,y),h.dispatchEvent(M),M.defaultPrevented||Ua(E??document.body,{select:!0}),h.removeEventListener(jf,y),zy.remove(x)},0)}}},[h,m,y,x]);const T=w.useCallback(E=>{if(!r&&!i||x.paused)return;const C=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,M=document.activeElement;if(C&&M){const _=E.currentTarget,[j,k]=FE(_);j&&k?!E.shiftKey&&M===k?(E.preventDefault(),r&&Ua(j,{select:!0})):E.shiftKey&&M===j&&(E.preventDefault(),r&&Ua(k,{select:!0})):M===_&&E.preventDefault()}},[r,i,x.paused]);return b.jsx(ot.div,{tabIndex:-1,...d,ref:S,onKeyDown:T})});g0.displayName=XE;function QE(n,{select:o=!1}={}){const r=document.activeElement;for(const i of n)if(Ua(i,{select:o}),document.activeElement!==r)return}function FE(n){const o=y0(n),r=jy(o,n),i=jy(o.reverse(),n);return[r,i]}function y0(n){const o=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)o.push(r.currentNode);return o}function jy(n,o){for(const r of n)if(!KE(r,{upTo:o}))return r}function KE(n,{upTo:o}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(o!==void 0&&n===o)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function ZE(n){return n instanceof HTMLInputElement&&"select"in n}function Ua(n,{select:o=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&ZE(n)&&o&&n.select()}}var zy=JE();function JE(){let n=[];return{add(o){const r=n[0];o!==r&&r?.pause(),n=Ly(n,o),n.unshift(o)},remove(o){n=Ly(n,o),n[0]?.resume()}}}function Ly(n,o){const r=[...n],i=r.indexOf(o);return i!==-1&&r.splice(i,1),r}function WE(n){return n.filter(o=>o.tagName!=="A")}var Ut=globalThis?.document?w.useLayoutEffect:()=>{},$E=hd[" useId ".trim().toString()]||(()=>{}),eT=0;function Rd(n){const[o,r]=w.useState($E());return Ut(()=>{r(i=>i??String(eT++))},[n]),o?`radix-${o}`:""}const tT=["top","right","bottom","left"],Va=Math.min,Ft=Math.max,zl=Math.round,cl=Math.floor,Dn=n=>({x:n,y:n}),nT={left:"right",right:"left",bottom:"top",top:"bottom"};function ed(n,o,r){return Ft(n,Va(o,r))}function ia(n,o){return typeof n=="function"?n(o):n}function la(n){return n.split("-")[0]}function Mr(n){return n.split("-")[1]}function Ed(n){return n==="x"?"y":"x"}function Td(n){return n==="y"?"height":"width"}function kn(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function Cd(n){return Ed(kn(n))}function aT(n,o,r){r===void 0&&(r=!1);const i=Mr(n),l=Cd(n),u=Td(l);let d=l==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return o.reference[u]>o.floating[u]&&(d=Ll(d)),[d,Ll(d)]}function oT(n){const o=Ll(n);return[td(n),o,td(o)]}function td(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const ky=["left","right"],Dy=["right","left"],rT=["top","bottom"],sT=["bottom","top"];function iT(n,o,r){switch(n){case"top":case"bottom":return r?o?Dy:ky:o?ky:Dy;case"left":case"right":return o?rT:sT;default:return[]}}function lT(n,o,r,i){const l=Mr(n);let u=iT(la(n),r==="start",i);return l&&(u=u.map(d=>d+"-"+l),o&&(u=u.concat(u.map(td)))),u}function Ll(n){const o=la(n);return nT[o]+n.slice(o.length)}function cT(n){return{top:0,right:0,bottom:0,left:0,...n}}function v0(n){return typeof n!="number"?cT(n):{top:n,right:n,bottom:n,left:n}}function kl(n){const{x:o,y:r,width:i,height:l}=n;return{width:i,height:l,top:r,left:o,right:o+i,bottom:r+l,x:o,y:r}}function By(n,o,r){let{reference:i,floating:l}=n;const u=kn(o),d=Cd(o),h=Td(d),p=la(o),m=u==="y",y=i.x+i.width/2-l.width/2,g=i.y+i.height/2-l.height/2,S=i[h]/2-l[h]/2;let x;switch(p){case"top":x={x:y,y:i.y-l.height};break;case"bottom":x={x:y,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:g};break;case"left":x={x:i.x-l.width,y:g};break;default:x={x:i.x,y:i.y}}switch(Mr(o)){case"start":x[d]-=S*(r&&m?-1:1);break;case"end":x[d]+=S*(r&&m?-1:1);break}return x}async function uT(n,o){var r;o===void 0&&(o={});const{x:i,y:l,platform:u,rects:d,elements:h,strategy:p}=n,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:S=!1,padding:x=0}=ia(o,n),T=v0(x),C=h[S?g==="floating"?"reference":"floating":g],M=kl(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(C)))==null||r?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:m,rootBoundary:y,strategy:p})),_=g==="floating"?{x:i,y:l,width:d.floating.width,height:d.floating.height}:d.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),k=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},z=kl(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:_,offsetParent:j,strategy:p}):_);return{top:(M.top-z.top+T.top)/k.y,bottom:(z.bottom-M.bottom+T.bottom)/k.y,left:(M.left-z.left+T.left)/k.x,right:(z.right-M.right+T.right)/k.x}}const fT=50,dT=async(n,o,r)=>{const{placement:i="bottom",strategy:l="absolute",middleware:u=[],platform:d}=r,h=d.detectOverflow?d:{...d,detectOverflow:uT},p=await(d.isRTL==null?void 0:d.isRTL(o));let m=await d.getElementRects({reference:n,floating:o,strategy:l}),{x:y,y:g}=By(m,i,p),S=i,x=0;const T={};for(let E=0;E<u.length;E++){const C=u[E];if(!C)continue;const{name:M,fn:_}=C,{x:j,y:k,data:z,reset:q}=await _({x:y,y:g,initialPlacement:i,placement:S,strategy:l,middlewareData:T,rects:m,platform:h,elements:{reference:n,floating:o}});y=j??y,g=k??g,T[M]={...T[M],...z},q&&x<fT&&(x++,typeof q=="object"&&(q.placement&&(S=q.placement),q.rects&&(m=q.rects===!0?await d.getElementRects({reference:n,floating:o,strategy:l}):q.rects),{x:y,y:g}=By(m,S,p)),E=-1)}return{x:y,y:g,placement:S,strategy:l,middlewareData:T}},hT=n=>({name:"arrow",options:n,async fn(o){const{x:r,y:i,placement:l,rects:u,platform:d,elements:h,middlewareData:p}=o,{element:m,padding:y=0}=ia(n,o)||{};if(m==null)return{};const g=v0(y),S={x:r,y:i},x=Cd(l),T=Td(x),E=await d.getDimensions(m),C=x==="y",M=C?"top":"left",_=C?"bottom":"right",j=C?"clientHeight":"clientWidth",k=u.reference[T]+u.reference[x]-S[x]-u.floating[T],z=S[x]-u.reference[x],q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m));let L=q?q[j]:0;(!L||!await(d.isElement==null?void 0:d.isElement(q)))&&(L=h.floating[j]||u.floating[T]);const D=k/2-z/2,Q=L/2-E[T]/2-1,oe=Va(g[M],Q),ne=Va(g[_],Q),$=oe,pe=L-E[T]-ne,fe=L/2-E[T]/2+D,me=ed($,fe,pe),U=!p.arrow&&Mr(l)!=null&&fe!==me&&u.reference[T]/2-(fe<$?oe:ne)-E[T]/2<0,Y=U?fe<$?fe-$:fe-pe:0;return{[x]:S[x]+Y,data:{[x]:me,centerOffset:fe-me-Y,...U&&{alignmentOffset:Y}},reset:U}}}),mT=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var r,i;const{placement:l,middlewareData:u,rects:d,initialPlacement:h,platform:p,elements:m}=o,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:S,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:E=!0,...C}=ia(n,o);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const M=la(l),_=kn(h),j=la(h)===h,k=await(p.isRTL==null?void 0:p.isRTL(m.floating)),z=S||(j||!E?[Ll(h)]:oT(h)),q=T!=="none";!S&&q&&z.push(...lT(h,E,T,k));const L=[h,...z],D=await p.detectOverflow(o,C),Q=[];let oe=((i=u.flip)==null?void 0:i.overflows)||[];if(y&&Q.push(D[M]),g){const fe=aT(l,d,k);Q.push(D[fe[0]],D[fe[1]])}if(oe=[...oe,{placement:l,overflows:Q}],!Q.every(fe=>fe<=0)){var ne,$;const fe=(((ne=u.flip)==null?void 0:ne.index)||0)+1,me=L[fe];if(me&&(!(g==="alignment"?_!==kn(me):!1)||oe.every(Z=>kn(Z.placement)===_?Z.overflows[0]>0:!0)))return{data:{index:fe,overflows:oe},reset:{placement:me}};let U=($=oe.filter(Y=>Y.overflows[0]<=0).sort((Y,Z)=>Y.overflows[1]-Z.overflows[1])[0])==null?void 0:$.placement;if(!U)switch(x){case"bestFit":{var pe;const Y=(pe=oe.filter(Z=>{if(q){const ue=kn(Z.placement);return ue===_||ue==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ue=>ue>0).reduce((ue,J)=>ue+J,0)]).sort((Z,ue)=>Z[1]-ue[1])[0])==null?void 0:pe[0];Y&&(U=Y);break}case"initialPlacement":U=h;break}if(l!==U)return{reset:{placement:U}}}return{}}}};function Uy(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function Hy(n){return tT.some(o=>n[o]>=0)}const pT=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:r,platform:i}=o,{strategy:l="referenceHidden",...u}=ia(n,o);switch(l){case"referenceHidden":{const d=await i.detectOverflow(o,{...u,elementContext:"reference"}),h=Uy(d,r.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Hy(h)}}}case"escaped":{const d=await i.detectOverflow(o,{...u,altBoundary:!0}),h=Uy(d,r.floating);return{data:{escapedOffsets:h,escaped:Hy(h)}}}default:return{}}}}},b0=new Set(["left","top"]);async function gT(n,o){const{placement:r,platform:i,elements:l}=n,u=await(i.isRTL==null?void 0:i.isRTL(l.floating)),d=la(r),h=Mr(r),p=kn(r)==="y",m=b0.has(d)?-1:1,y=u&&p?-1:1,g=ia(o,n);let{mainAxis:S,crossAxis:x,alignmentAxis:T}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return h&&typeof T=="number"&&(x=h==="end"?T*-1:T),p?{x:x*y,y:S*m}:{x:S*m,y:x*y}}const yT=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var r,i;const{x:l,y:u,placement:d,middlewareData:h}=o,p=await gT(o,n);return d===((r=h.offset)==null?void 0:r.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:l+p.x,y:u+p.y,data:{...p,placement:d}}}}},vT=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:r,y:i,placement:l,platform:u}=o,{mainAxis:d=!0,crossAxis:h=!1,limiter:p={fn:M=>{let{x:_,y:j}=M;return{x:_,y:j}}},...m}=ia(n,o),y={x:r,y:i},g=await u.detectOverflow(o,m),S=kn(la(l)),x=Ed(S);let T=y[x],E=y[S];if(d){const M=x==="y"?"top":"left",_=x==="y"?"bottom":"right",j=T+g[M],k=T-g[_];T=ed(j,T,k)}if(h){const M=S==="y"?"top":"left",_=S==="y"?"bottom":"right",j=E+g[M],k=E-g[_];E=ed(j,E,k)}const C=p.fn({...o,[x]:T,[S]:E});return{...C,data:{x:C.x-r,y:C.y-i,enabled:{[x]:d,[S]:h}}}}}},bT=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:r,y:i,placement:l,rects:u,middlewareData:d}=o,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=ia(n,o),y={x:r,y:i},g=kn(l),S=Ed(g);let x=y[S],T=y[g];const E=ia(h,o),C=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(p){const j=S==="y"?"height":"width",k=u.reference[S]-u.floating[j]+C.mainAxis,z=u.reference[S]+u.reference[j]-C.mainAxis;x<k?x=k:x>z&&(x=z)}if(m){var M,_;const j=S==="y"?"width":"height",k=b0.has(la(l)),z=u.reference[g]-u.floating[j]+(k&&((M=d.offset)==null?void 0:M[g])||0)+(k?0:C.crossAxis),q=u.reference[g]+u.reference[j]+(k?0:((_=d.offset)==null?void 0:_[g])||0)-(k?C.crossAxis:0);T<z?T=z:T>q&&(T=q)}return{[S]:x,[g]:T}}}},xT=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var r,i;const{placement:l,rects:u,platform:d,elements:h}=o,{apply:p=()=>{},...m}=ia(n,o),y=await d.detectOverflow(o,m),g=la(l),S=Mr(l),x=kn(l)==="y",{width:T,height:E}=u.floating;let C,M;g==="top"||g==="bottom"?(C=g,M=S===(await(d.isRTL==null?void 0:d.isRTL(h.floating))?"start":"end")?"left":"right"):(M=g,C=S==="end"?"top":"bottom");const _=E-y.top-y.bottom,j=T-y.left-y.right,k=Va(E-y[C],_),z=Va(T-y[M],j),q=!o.middlewareData.shift;let L=k,D=z;if((r=o.middlewareData.shift)!=null&&r.enabled.x&&(D=j),(i=o.middlewareData.shift)!=null&&i.enabled.y&&(L=_),q&&!S){const oe=Ft(y.left,0),ne=Ft(y.right,0),$=Ft(y.top,0),pe=Ft(y.bottom,0);x?D=T-2*(oe!==0||ne!==0?oe+ne:Ft(y.left,y.right)):L=E-2*($!==0||pe!==0?$+pe:Ft(y.top,y.bottom))}await p({...o,availableWidth:D,availableHeight:L});const Q=await d.getDimensions(h.floating);return T!==Q.width||E!==Q.height?{reset:{rects:!0}}:{}}}};function Vl(){return typeof window<"u"}function _r(n){return x0(n)?(n.nodeName||"").toLowerCase():"#document"}function Kt(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function Bn(n){var o;return(o=(x0(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function x0(n){return Vl()?n instanceof Node||n instanceof Kt(n).Node:!1}function En(n){return Vl()?n instanceof Element||n instanceof Kt(n).Element:!1}function ca(n){return Vl()?n instanceof HTMLElement||n instanceof Kt(n).HTMLElement:!1}function Iy(n){return!Vl()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Kt(n).ShadowRoot}function Is(n){const{overflow:o,overflowX:r,overflowY:i,display:l}=Tn(n);return/auto|scroll|overlay|hidden|clip/.test(o+i+r)&&l!=="inline"&&l!=="contents"}function ST(n){return/^(table|td|th)$/.test(_r(n))}function Yl(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const wT=/transform|translate|scale|rotate|perspective|filter/,RT=/paint|layout|strict|content/,po=n=>!!n&&n!=="none";let zf;function Md(n){const o=En(n)?Tn(n):n;return po(o.transform)||po(o.translate)||po(o.scale)||po(o.rotate)||po(o.perspective)||!_d()&&(po(o.backdropFilter)||po(o.filter))||wT.test(o.willChange||"")||RT.test(o.contain||"")}function ET(n){let o=Ya(n);for(;ca(o)&&!Tr(o);){if(Md(o))return o;if(Yl(o))return null;o=Ya(o)}return null}function _d(){return zf==null&&(zf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zf}function Tr(n){return/^(html|body|#document)$/.test(_r(n))}function Tn(n){return Kt(n).getComputedStyle(n)}function Gl(n){return En(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ya(n){if(_r(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Iy(n)&&n.host||Bn(n);return Iy(o)?o.host:o}function S0(n){const o=Ya(n);return Tr(o)?n.ownerDocument?n.ownerDocument.body:n.body:ca(o)&&Is(o)?o:S0(o)}function Us(n,o,r){var i;o===void 0&&(o=[]),r===void 0&&(r=!0);const l=S0(n),u=l===((i=n.ownerDocument)==null?void 0:i.body),d=Kt(l);if(u){const h=nd(d);return o.concat(d,d.visualViewport||[],Is(l)?l:[],h&&r?Us(h):[])}else return o.concat(l,Us(l,[],r))}function nd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function w0(n){const o=Tn(n);let r=parseFloat(o.width)||0,i=parseFloat(o.height)||0;const l=ca(n),u=l?n.offsetWidth:r,d=l?n.offsetHeight:i,h=zl(r)!==u||zl(i)!==d;return h&&(r=u,i=d),{width:r,height:i,$:h}}function Ad(n){return En(n)?n:n.contextElement}function wr(n){const o=Ad(n);if(!ca(o))return Dn(1);const r=o.getBoundingClientRect(),{width:i,height:l,$:u}=w0(o);let d=(u?zl(r.width):r.width)/i,h=(u?zl(r.height):r.height)/l;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const TT=Dn(0);function R0(n){const o=Kt(n);return!_d()||!o.visualViewport?TT:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function CT(n,o,r){return o===void 0&&(o=!1),!r||o&&r!==Kt(n)?!1:o}function Ro(n,o,r,i){o===void 0&&(o=!1),r===void 0&&(r=!1);const l=n.getBoundingClientRect(),u=Ad(n);let d=Dn(1);o&&(i?En(i)&&(d=wr(i)):d=wr(n));const h=CT(u,r,i)?R0(u):Dn(0);let p=(l.left+h.x)/d.x,m=(l.top+h.y)/d.y,y=l.width/d.x,g=l.height/d.y;if(u){const S=Kt(u),x=i&&En(i)?Kt(i):i;let T=S,E=nd(T);for(;E&&i&&x!==T;){const C=wr(E),M=E.getBoundingClientRect(),_=Tn(E),j=M.left+(E.clientLeft+parseFloat(_.paddingLeft))*C.x,k=M.top+(E.clientTop+parseFloat(_.paddingTop))*C.y;p*=C.x,m*=C.y,y*=C.x,g*=C.y,p+=j,m+=k,T=Kt(E),E=nd(T)}}return kl({width:y,height:g,x:p,y:m})}function Xl(n,o){const r=Gl(n).scrollLeft;return o?o.left+r:Ro(Bn(n)).left+r}function E0(n,o){const r=n.getBoundingClientRect(),i=r.left+o.scrollLeft-Xl(n,r),l=r.top+o.scrollTop;return{x:i,y:l}}function MT(n){let{elements:o,rect:r,offsetParent:i,strategy:l}=n;const u=l==="fixed",d=Bn(i),h=o?Yl(o.floating):!1;if(i===d||h&&u)return r;let p={scrollLeft:0,scrollTop:0},m=Dn(1);const y=Dn(0),g=ca(i);if((g||!g&&!u)&&((_r(i)!=="body"||Is(d))&&(p=Gl(i)),g)){const x=Ro(i);m=wr(i),y.x=x.x+i.clientLeft,y.y=x.y+i.clientTop}const S=d&&!g&&!u?E0(d,p):Dn(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-p.scrollLeft*m.x+y.x+S.x,y:r.y*m.y-p.scrollTop*m.y+y.y+S.y}}function _T(n){return Array.from(n.getClientRects())}function AT(n){const o=Bn(n),r=Gl(n),i=n.ownerDocument.body,l=Ft(o.scrollWidth,o.clientWidth,i.scrollWidth,i.clientWidth),u=Ft(o.scrollHeight,o.clientHeight,i.scrollHeight,i.clientHeight);let d=-r.scrollLeft+Xl(n);const h=-r.scrollTop;return Tn(i).direction==="rtl"&&(d+=Ft(o.clientWidth,i.clientWidth)-l),{width:l,height:u,x:d,y:h}}const Py=25;function NT(n,o){const r=Kt(n),i=Bn(n),l=r.visualViewport;let u=i.clientWidth,d=i.clientHeight,h=0,p=0;if(l){u=l.width,d=l.height;const y=_d();(!y||y&&o==="fixed")&&(h=l.offsetLeft,p=l.offsetTop)}const m=Xl(i);if(m<=0){const y=i.ownerDocument,g=y.body,S=getComputedStyle(g),x=y.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,T=Math.abs(i.clientWidth-g.clientWidth-x);T<=Py&&(u-=T)}else m<=Py&&(u+=m);return{width:u,height:d,x:h,y:p}}function OT(n,o){const r=Ro(n,!0,o==="fixed"),i=r.top+n.clientTop,l=r.left+n.clientLeft,u=ca(n)?wr(n):Dn(1),d=n.clientWidth*u.x,h=n.clientHeight*u.y,p=l*u.x,m=i*u.y;return{width:d,height:h,x:p,y:m}}function qy(n,o,r){let i;if(o==="viewport")i=NT(n,r);else if(o==="document")i=AT(Bn(n));else if(En(o))i=OT(o,r);else{const l=R0(n);i={x:o.x-l.x,y:o.y-l.y,width:o.width,height:o.height}}return kl(i)}function T0(n,o){const r=Ya(n);return r===o||!En(r)||Tr(r)?!1:Tn(r).position==="fixed"||T0(r,o)}function jT(n,o){const r=o.get(n);if(r)return r;let i=Us(n,[],!1).filter(h=>En(h)&&_r(h)!=="body"),l=null;const u=Tn(n).position==="fixed";let d=u?Ya(n):n;for(;En(d)&&!Tr(d);){const h=Tn(d),p=Md(d);!p&&h.position==="fixed"&&(l=null),(u?!p&&!l:!p&&h.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||Is(d)&&!p&&T0(n,d))?i=i.filter(y=>y!==d):l=h,d=Ya(d)}return o.set(n,i),i}function zT(n){let{element:o,boundary:r,rootBoundary:i,strategy:l}=n;const d=[...r==="clippingAncestors"?Yl(o)?[]:jT(o,this._c):[].concat(r),i],h=qy(o,d[0],l);let p=h.top,m=h.right,y=h.bottom,g=h.left;for(let S=1;S<d.length;S++){const x=qy(o,d[S],l);p=Ft(x.top,p),m=Va(x.right,m),y=Va(x.bottom,y),g=Ft(x.left,g)}return{width:m-g,height:y-p,x:g,y:p}}function LT(n){const{width:o,height:r}=w0(n);return{width:o,height:r}}function kT(n,o,r){const i=ca(o),l=Bn(o),u=r==="fixed",d=Ro(n,!0,u,o);let h={scrollLeft:0,scrollTop:0};const p=Dn(0);function m(){p.x=Xl(l)}if(i||!i&&!u)if((_r(o)!=="body"||Is(l))&&(h=Gl(o)),i){const x=Ro(o,!0,u,o);p.x=x.x+o.clientLeft,p.y=x.y+o.clientTop}else l&&m();u&&!i&&l&&m();const y=l&&!i&&!u?E0(l,h):Dn(0),g=d.left+h.scrollLeft-p.x-y.x,S=d.top+h.scrollTop-p.y-y.y;return{x:g,y:S,width:d.width,height:d.height}}function Lf(n){return Tn(n).position==="static"}function Vy(n,o){if(!ca(n)||Tn(n).position==="fixed")return null;if(o)return o(n);let r=n.offsetParent;return Bn(n)===r&&(r=r.ownerDocument.body),r}function C0(n,o){const r=Kt(n);if(Yl(n))return r;if(!ca(n)){let l=Ya(n);for(;l&&!Tr(l);){if(En(l)&&!Lf(l))return l;l=Ya(l)}return r}let i=Vy(n,o);for(;i&&ST(i)&&Lf(i);)i=Vy(i,o);return i&&Tr(i)&&Lf(i)&&!Md(i)?r:i||ET(n)||r}const DT=async function(n){const o=this.getOffsetParent||C0,r=this.getDimensions,i=await r(n.floating);return{reference:kT(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function BT(n){return Tn(n).direction==="rtl"}const UT={convertOffsetParentRelativeRectToViewportRelativeRect:MT,getDocumentElement:Bn,getClippingRect:zT,getOffsetParent:C0,getElementRects:DT,getClientRects:_T,getDimensions:LT,getScale:wr,isElement:En,isRTL:BT};function M0(n,o){return n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function HT(n,o){let r=null,i;const l=Bn(n);function u(){var h;clearTimeout(i),(h=r)==null||h.disconnect(),r=null}function d(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),u();const m=n.getBoundingClientRect(),{left:y,top:g,width:S,height:x}=m;if(h||o(),!S||!x)return;const T=cl(g),E=cl(l.clientWidth-(y+S)),C=cl(l.clientHeight-(g+x)),M=cl(y),j={rootMargin:-T+"px "+-E+"px "+-C+"px "+-M+"px",threshold:Ft(0,Va(1,p))||1};let k=!0;function z(q){const L=q[0].intersectionRatio;if(L!==p){if(!k)return d();L?d(!1,L):i=setTimeout(()=>{d(!1,1e-7)},1e3)}L===1&&!M0(m,n.getBoundingClientRect())&&d(),k=!1}try{r=new IntersectionObserver(z,{...j,root:l.ownerDocument})}catch{r=new IntersectionObserver(z,j)}r.observe(n)}return d(!0),u}function IT(n,o,r,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=Ad(n),y=l||u?[...m?Us(m):[],...o?Us(o):[]]:[];y.forEach(M=>{l&&M.addEventListener("scroll",r,{passive:!0}),u&&M.addEventListener("resize",r)});const g=m&&h?HT(m,r):null;let S=-1,x=null;d&&(x=new ResizeObserver(M=>{let[_]=M;_&&_.target===m&&x&&o&&(x.unobserve(o),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var j;(j=x)==null||j.observe(o)})),r()}),m&&!p&&x.observe(m),o&&x.observe(o));let T,E=p?Ro(n):null;p&&C();function C(){const M=Ro(n);E&&!M0(E,M)&&r(),E=M,T=requestAnimationFrame(C)}return r(),()=>{var M;y.forEach(_=>{l&&_.removeEventListener("scroll",r),u&&_.removeEventListener("resize",r)}),g?.(),(M=x)==null||M.disconnect(),x=null,p&&cancelAnimationFrame(T)}}const PT=yT,qT=vT,VT=mT,YT=xT,GT=pT,Yy=hT,XT=bT,QT=(n,o,r)=>{const i=new Map,l={platform:UT,...r},u={...l.platform,_c:i};return dT(n,o,{...l,platform:u})};var FT=typeof document<"u",KT=function(){},bl=FT?w.useLayoutEffect:KT;function Dl(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let r,i,l;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==o.length)return!1;for(i=r;i--!==0;)if(!Dl(n[i],o[i]))return!1;return!0}if(l=Object.keys(n),r=l.length,r!==Object.keys(o).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(o,l[i]))return!1;for(i=r;i--!==0;){const u=l[i];if(!(u==="_owner"&&n.$$typeof)&&!Dl(n[u],o[u]))return!1}return!0}return n!==n&&o!==o}function _0(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Gy(n,o){const r=_0(n);return Math.round(o*r)/r}function kf(n){const o=w.useRef(n);return bl(()=>{o.current=n}),o}function ZT(n){n===void 0&&(n={});const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l,elements:{reference:u,floating:d}={},transform:h=!0,whileElementsMounted:p,open:m}=n,[y,g]=w.useState({x:0,y:0,strategy:r,placement:o,middlewareData:{},isPositioned:!1}),[S,x]=w.useState(i);Dl(S,i)||x(i);const[T,E]=w.useState(null),[C,M]=w.useState(null),_=w.useCallback(Z=>{Z!==q.current&&(q.current=Z,E(Z))},[]),j=w.useCallback(Z=>{Z!==L.current&&(L.current=Z,M(Z))},[]),k=u||T,z=d||C,q=w.useRef(null),L=w.useRef(null),D=w.useRef(y),Q=p!=null,oe=kf(p),ne=kf(l),$=kf(m),pe=w.useCallback(()=>{if(!q.current||!L.current)return;const Z={placement:o,strategy:r,middleware:S};ne.current&&(Z.platform=ne.current),QT(q.current,L.current,Z).then(ue=>{const J={...ue,isPositioned:$.current!==!1};fe.current&&!Dl(D.current,J)&&(D.current=J,Cr.flushSync(()=>{g(J)}))})},[S,o,r,ne,$]);bl(()=>{m===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,g(Z=>({...Z,isPositioned:!1})))},[m]);const fe=w.useRef(!1);bl(()=>(fe.current=!0,()=>{fe.current=!1}),[]),bl(()=>{if(k&&(q.current=k),z&&(L.current=z),k&&z){if(oe.current)return oe.current(k,z,pe);pe()}},[k,z,pe,oe,Q]);const me=w.useMemo(()=>({reference:q,floating:L,setReference:_,setFloating:j}),[_,j]),U=w.useMemo(()=>({reference:k,floating:z}),[k,z]),Y=w.useMemo(()=>{const Z={position:r,left:0,top:0};if(!U.floating)return Z;const ue=Gy(U.floating,y.x),J=Gy(U.floating,y.y);return h?{...Z,transform:"translate("+ue+"px, "+J+"px)",..._0(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ue,top:J}},[r,h,U.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:pe,refs:me,elements:U,floatingStyles:Y}),[y,pe,me,U,Y])}const JT=n=>{function o(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:n,fn(r){const{element:i,padding:l}=typeof n=="function"?n(r):n;return i&&o(i)?i.current!=null?Yy({element:i.current,padding:l}).fn(r):{}:i?Yy({element:i,padding:l}).fn(r):{}}}},WT=(n,o)=>{const r=PT(n);return{name:r.name,fn:r.fn,options:[n,o]}},$T=(n,o)=>{const r=qT(n);return{name:r.name,fn:r.fn,options:[n,o]}},eC=(n,o)=>({fn:XT(n).fn,options:[n,o]}),tC=(n,o)=>{const r=VT(n);return{name:r.name,fn:r.fn,options:[n,o]}},nC=(n,o)=>{const r=YT(n);return{name:r.name,fn:r.fn,options:[n,o]}},aC=(n,o)=>{const r=GT(n);return{name:r.name,fn:r.fn,options:[n,o]}},oC=(n,o)=>{const r=JT(n);return{name:r.name,fn:r.fn,options:[n,o]}};var rC="Arrow",A0=w.forwardRef((n,o)=>{const{children:r,width:i=10,height:l=5,...u}=n;return b.jsx(ot.svg,{...u,ref:o,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?r:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});A0.displayName=rC;var sC=A0;function iC(n){const[o,r]=w.useState(void 0);return Ut(()=>{if(n){r({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let d,h;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;d=m.inlineSize,h=m.blockSize}else d=n.offsetWidth,h=n.offsetHeight;r({width:d,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else r(void 0)},[n]),o}var Nd="Popper",[N0,O0]=wd(Nd),[lC,j0]=N0(Nd),z0=n=>{const{__scopePopper:o,children:r}=n,[i,l]=w.useState(null);return b.jsx(lC,{scope:o,anchor:i,onAnchorChange:l,children:r})};z0.displayName=Nd;var L0="PopperAnchor",k0=w.forwardRef((n,o)=>{const{__scopePopper:r,virtualRef:i,...l}=n,u=j0(L0,r),d=w.useRef(null),h=wt(o,d),p=w.useRef(null);return w.useEffect(()=>{const m=p.current;p.current=i?.current||d.current,m!==p.current&&u.onAnchorChange(p.current)}),i?null:b.jsx(ot.div,{...l,ref:h})});k0.displayName=L0;var Od="PopperContent",[cC,uC]=N0(Od),D0=w.forwardRef((n,o)=>{const{__scopePopper:r,side:i="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:S=!1,updatePositionStrategy:x="optimized",onPlaced:T,...E}=n,C=j0(Od,r),[M,_]=w.useState(null),j=wt(o,te=>_(te)),[k,z]=w.useState(null),q=iC(k),L=q?.width??0,D=q?.height??0,Q=i+(u!=="center"?"-"+u:""),oe=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ne=Array.isArray(m)?m:[m],$=ne.length>0,pe={padding:oe,boundary:ne.filter(dC),altBoundary:$},{refs:fe,floatingStyles:me,placement:U,isPositioned:Y,middlewareData:Z}=ZT({strategy:"fixed",placement:Q,whileElementsMounted:(...te)=>IT(...te,{animationFrame:x==="always"}),elements:{reference:C.anchor},middleware:[WT({mainAxis:l+D,alignmentAxis:d}),p&&$T({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?eC():void 0,...pe}),p&&tC({...pe}),nC({...pe,apply:({elements:te,rects:ge,availableWidth:re,availableHeight:ve})=>{const{width:be,height:Ce}=ge.reference,Ge=te.floating.style;Ge.setProperty("--radix-popper-available-width",`${re}px`),Ge.setProperty("--radix-popper-available-height",`${ve}px`),Ge.setProperty("--radix-popper-anchor-width",`${be}px`),Ge.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),k&&oC({element:k,padding:h}),hC({arrowWidth:L,arrowHeight:D}),S&&aC({strategy:"referenceHidden",...pe})]}),[ue,J]=H0(U),N=wo(T);Ut(()=>{Y&&N?.()},[Y,N]);const G=Z.arrow?.x,W=Z.arrow?.y,ee=Z.arrow?.centerOffset!==0,[ae,se]=w.useState();return Ut(()=>{M&&se(window.getComputedStyle(M).zIndex)},[M]),b.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:Y?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[Z.transformOrigin?.x,Z.transformOrigin?.y].join(" "),...Z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:b.jsx(cC,{scope:r,placedSide:ue,onArrowChange:z,arrowX:G,arrowY:W,shouldHideArrow:ee,children:b.jsx(ot.div,{"data-side":ue,"data-align":J,...E,ref:j,style:{...E.style,animation:Y?void 0:"none"}})})})});D0.displayName=Od;var B0="PopperArrow",fC={top:"bottom",right:"left",bottom:"top",left:"right"},U0=w.forwardRef(function(o,r){const{__scopePopper:i,...l}=o,u=uC(B0,i),d=fC[u.placedSide];return b.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:b.jsx(sC,{...l,ref:r,style:{...l.style,display:"block"}})})});U0.displayName=B0;function dC(n){return n!==null}var hC=n=>({name:"transformOrigin",options:n,fn(o){const{placement:r,rects:i,middlewareData:l}=o,d=l.arrow?.centerOffset!==0,h=d?0:n.arrowWidth,p=d?0:n.arrowHeight,[m,y]=H0(r),g={start:"0%",center:"50%",end:"100%"}[y],S=(l.arrow?.x??0)+h/2,x=(l.arrow?.y??0)+p/2;let T="",E="";return m==="bottom"?(T=d?g:`${S}px`,E=`${-p}px`):m==="top"?(T=d?g:`${S}px`,E=`${i.floating.height+p}px`):m==="right"?(T=`${-p}px`,E=d?g:`${x}px`):m==="left"&&(T=`${i.floating.width+p}px`,E=d?g:`${x}px`),{data:{x:T,y:E}}}});function H0(n){const[o,r="center"]=n.split("-");return[o,r]}var mC=z0,pC=k0,gC=D0,yC=U0,vC="Portal",I0=w.forwardRef((n,o)=>{const{container:r,...i}=n,[l,u]=w.useState(!1);Ut(()=>u(!0),[]);const d=r||l&&globalThis?.document?.body;return d?S1.createPortal(b.jsx(ot.div,{...i,ref:o}),d):null});I0.displayName=vC;var bC=hd[" useInsertionEffect ".trim().toString()]||Ut;function Xy({prop:n,defaultProp:o,onChange:r=()=>{},caller:i}){const[l,u,d]=xC({defaultProp:o,onChange:r}),h=n!==void 0,p=h?n:l;{const y=w.useRef(n!==void 0);w.useEffect(()=>{const g=y.current;g!==h&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,i])}const m=w.useCallback(y=>{if(h){const g=SC(y)?y(n):y;g!==n&&d.current?.(g)}else u(y)},[h,n,u,d]);return[p,m]}function xC({defaultProp:n,onChange:o}){const[r,i]=w.useState(n),l=w.useRef(r),u=w.useRef(o);return bC(()=>{u.current=o},[o]),w.useEffect(()=>{l.current!==r&&(u.current?.(r),l.current=r)},[r,l]),[r,i,u]}function SC(n){return typeof n=="function"}function wC(n){const o=w.useRef({value:n,previous:n});return w.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n])}var P0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),RC="VisuallyHidden",EC=w.forwardRef((n,o)=>b.jsx(ot.span,{...n,ref:o,style:{...P0,...n.style}}));EC.displayName=RC;var TC=function(n){if(typeof document>"u")return null;var o=Array.isArray(n)?n[0]:n;return o.ownerDocument.body},mr=new WeakMap,ul=new WeakMap,fl={},Df=0,q0=function(n){return n&&(n.host||q0(n.parentNode))},CC=function(n,o){return o.map(function(r){if(n.contains(r))return r;var i=q0(r);return i&&n.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",n,". Doing nothing"),null)}).filter(function(r){return!!r})},MC=function(n,o,r,i){var l=CC(o,Array.isArray(n)?n:[n]);fl[r]||(fl[r]=new WeakMap);var u=fl[r],d=[],h=new Set,p=new Set(l),m=function(g){!g||h.has(g)||(h.add(g),m(g.parentNode))};l.forEach(m);var y=function(g){!g||p.has(g)||Array.prototype.forEach.call(g.children,function(S){if(h.has(S))y(S);else try{var x=S.getAttribute(i),T=x!==null&&x!=="false",E=(mr.get(S)||0)+1,C=(u.get(S)||0)+1;mr.set(S,E),u.set(S,C),d.push(S),E===1&&T&&ul.set(S,!0),C===1&&S.setAttribute(r,"true"),T||S.setAttribute(i,"true")}catch(M){console.error("aria-hidden: cannot operate on ",S,M)}})};return y(o),h.clear(),Df++,function(){d.forEach(function(g){var S=mr.get(g)-1,x=u.get(g)-1;mr.set(g,S),u.set(g,x),S||(ul.has(g)||g.removeAttribute(i),ul.delete(g)),x||g.removeAttribute(r)}),Df--,Df||(mr=new WeakMap,mr=new WeakMap,ul=new WeakMap,fl={})}},_C=function(n,o,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),l=TC(n);return l?(i.push.apply(i,Array.from(l.querySelectorAll("[aria-live], script"))),MC(i,l,r,"aria-hidden")):function(){return null}},zn=function(){return zn=Object.assign||function(o){for(var r,i=1,l=arguments.length;i<l;i++){r=arguments[i];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(o[u]=r[u])}return o},zn.apply(this,arguments)};function V0(n,o){var r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.indexOf(i)<0&&(r[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(n);l<i.length;l++)o.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(n,i[l])&&(r[i[l]]=n[i[l]]);return r}function AC(n,o,r){if(r||arguments.length===2)for(var i=0,l=o.length,u;i<l;i++)(u||!(i in o))&&(u||(u=Array.prototype.slice.call(o,0,i)),u[i]=o[i]);return n.concat(u||Array.prototype.slice.call(o))}var xl="right-scroll-bar-position",Sl="width-before-scroll-bar",NC="with-scroll-bars-hidden",OC="--removed-body-scroll-bar-size";function Bf(n,o){return typeof n=="function"?n(o):n&&(n.current=o),n}function jC(n,o){var r=w.useState(function(){return{value:n,callback:o,facade:{get current(){return r.value},set current(i){var l=r.value;l!==i&&(r.value=i,r.callback(i,l))}}}})[0];return r.callback=o,r.facade}var zC=typeof window<"u"?w.useLayoutEffect:w.useEffect,Qy=new WeakMap;function LC(n,o){var r=jC(null,function(i){return n.forEach(function(l){return Bf(l,i)})});return zC(function(){var i=Qy.get(r);if(i){var l=new Set(i),u=new Set(n),d=r.current;l.forEach(function(h){u.has(h)||Bf(h,null)}),u.forEach(function(h){l.has(h)||Bf(h,d)})}Qy.set(r,n)},[n]),r}function kC(n){return n}function DC(n,o){o===void 0&&(o=kC);var r=[],i=!1,l={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(u){var d=o(u,i);return r.push(d),function(){r=r.filter(function(h){return h!==d})}},assignSyncMedium:function(u){for(i=!0;r.length;){var d=r;r=[],d.forEach(u)}r={push:function(h){return u(h)},filter:function(){return r}}},assignMedium:function(u){i=!0;var d=[];if(r.length){var h=r;r=[],h.forEach(u),d=r}var p=function(){var y=d;d=[],y.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),r={push:function(y){d.push(y),m()},filter:function(y){return d=d.filter(y),r}}}};return l}function BC(n){n===void 0&&(n={});var o=DC(null);return o.options=zn({async:!0,ssr:!1},n),o}var Y0=function(n){var o=n.sideCar,r=V0(n,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=o.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,zn({},r))};Y0.isSideCarExport=!0;function UC(n,o){return n.useMedium(o),Y0}var G0=BC(),Uf=function(){},Ql=w.forwardRef(function(n,o){var r=w.useRef(null),i=w.useState({onScrollCapture:Uf,onWheelCapture:Uf,onTouchMoveCapture:Uf}),l=i[0],u=i[1],d=n.forwardProps,h=n.children,p=n.className,m=n.removeScrollBar,y=n.enabled,g=n.shards,S=n.sideCar,x=n.noRelative,T=n.noIsolation,E=n.inert,C=n.allowPinchZoom,M=n.as,_=M===void 0?"div":M,j=n.gapMode,k=V0(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=S,q=LC([r,o]),L=zn(zn({},k),l);return w.createElement(w.Fragment,null,y&&w.createElement(z,{sideCar:G0,removeScrollBar:m,shards:g,noRelative:x,noIsolation:T,inert:E,setCallbacks:u,allowPinchZoom:!!C,lockRef:r,gapMode:j}),d?w.cloneElement(w.Children.only(h),zn(zn({},L),{ref:q})):w.createElement(_,zn({},L,{className:p,ref:q}),h))});Ql.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ql.classNames={fullWidth:Sl,zeroRight:xl};var HC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var o=HC();return o&&n.setAttribute("nonce",o),n}function PC(n,o){n.styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o))}function qC(n){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(n)}var VC=function(){var n=0,o=null;return{add:function(r){n==0&&(o=IC())&&(PC(o,r),qC(o)),n++},remove:function(){n--,!n&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},YC=function(){var n=VC();return function(o,r){w.useEffect(function(){return n.add(o),function(){n.remove()}},[o&&r])}},X0=function(){var n=YC(),o=function(r){var i=r.styles,l=r.dynamic;return n(i,l),null};return o},GC={left:0,top:0,right:0,gap:0},Hf=function(n){return parseInt(n||"",10)||0},XC=function(n){var o=window.getComputedStyle(document.body),r=o[n==="padding"?"paddingLeft":"marginLeft"],i=o[n==="padding"?"paddingTop":"marginTop"],l=o[n==="padding"?"paddingRight":"marginRight"];return[Hf(r),Hf(i),Hf(l)]},QC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return GC;var o=XC(n),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,i-r+o[2]-o[0])}},FC=X0(),Rr="data-scroll-locked",KC=function(n,o,r,i){var l=n.left,u=n.top,d=n.right,h=n.gap;return r===void 0&&(r="margin"),`
66
+ .`.concat(NC,` {
67
+ overflow: hidden `).concat(i,`;
68
+ padding-right: `).concat(h,"px ").concat(i,`;
69
+ }
70
+ body[`).concat(Rr,`] {
71
+ overflow: hidden `).concat(i,`;
72
+ overscroll-behavior: contain;
73
+ `).concat([o&&"position: relative ".concat(i,";"),r==="margin"&&`
74
+ padding-left: `.concat(l,`px;
75
+ padding-top: `).concat(u,`px;
76
+ padding-right: `).concat(d,`px;
77
+ margin-left:0;
78
+ margin-top:0;
79
+ margin-right: `).concat(h,"px ").concat(i,`;
80
+ `),r==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
81
+ }
82
+
83
+ .`).concat(xl,` {
84
+ right: `).concat(h,"px ").concat(i,`;
85
+ }
86
+
87
+ .`).concat(Sl,` {
88
+ margin-right: `).concat(h,"px ").concat(i,`;
89
+ }
90
+
91
+ .`).concat(xl," .").concat(xl,` {
92
+ right: 0 `).concat(i,`;
93
+ }
94
+
95
+ .`).concat(Sl," .").concat(Sl,` {
96
+ margin-right: 0 `).concat(i,`;
97
+ }
98
+
99
+ body[`).concat(Rr,`] {
100
+ `).concat(OC,": ").concat(h,`px;
101
+ }
102
+ `)},Fy=function(){var n=parseInt(document.body.getAttribute(Rr)||"0",10);return isFinite(n)?n:0},ZC=function(){w.useEffect(function(){return document.body.setAttribute(Rr,(Fy()+1).toString()),function(){var n=Fy()-1;n<=0?document.body.removeAttribute(Rr):document.body.setAttribute(Rr,n.toString())}},[])},JC=function(n){var o=n.noRelative,r=n.noImportant,i=n.gapMode,l=i===void 0?"margin":i;ZC();var u=w.useMemo(function(){return QC(l)},[l]);return w.createElement(FC,{styles:KC(u,!o,l,r?"":"!important")})},ad=!1;if(typeof window<"u")try{var dl=Object.defineProperty({},"passive",{get:function(){return ad=!0,!0}});window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{ad=!1}var pr=ad?{passive:!1}:!1,WC=function(n){return n.tagName==="TEXTAREA"},Q0=function(n,o){if(!(n instanceof Element))return!1;var r=window.getComputedStyle(n);return r[o]!=="hidden"&&!(r.overflowY===r.overflowX&&!WC(n)&&r[o]==="visible")},$C=function(n){return Q0(n,"overflowY")},eM=function(n){return Q0(n,"overflowX")},Ky=function(n,o){var r=o.ownerDocument,i=o;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var l=F0(n,i);if(l){var u=K0(n,i),d=u[1],h=u[2];if(d>h)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},tM=function(n){var o=n.scrollTop,r=n.scrollHeight,i=n.clientHeight;return[o,r,i]},nM=function(n){var o=n.scrollLeft,r=n.scrollWidth,i=n.clientWidth;return[o,r,i]},F0=function(n,o){return n==="v"?$C(o):eM(o)},K0=function(n,o){return n==="v"?tM(o):nM(o)},aM=function(n,o){return n==="h"&&o==="rtl"?-1:1},oM=function(n,o,r,i,l){var u=aM(n,window.getComputedStyle(o).direction),d=u*i,h=r.target,p=o.contains(h),m=!1,y=d>0,g=0,S=0;do{if(!h)break;var x=K0(n,h),T=x[0],E=x[1],C=x[2],M=E-C-u*T;(T||M)&&F0(n,h)&&(g+=M,S+=T);var _=h.parentNode;h=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!p&&h!==document.body||p&&(o.contains(h)||o===h));return(y&&Math.abs(g)<1||!y&&Math.abs(S)<1)&&(m=!0),m},hl=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Zy=function(n){return[n.deltaX,n.deltaY]},Jy=function(n){return n&&"current"in n?n.current:n},rM=function(n,o){return n[0]===o[0]&&n[1]===o[1]},sM=function(n){return`
103
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
104
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
105
+ `)},iM=0,gr=[];function lM(n){var o=w.useRef([]),r=w.useRef([0,0]),i=w.useRef(),l=w.useState(iM++)[0],u=w.useState(X0)[0],d=w.useRef(n);w.useEffect(function(){d.current=n},[n]),w.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(l));var E=AC([n.lockRef.current],(n.shards||[]).map(Jy),!0).filter(Boolean);return E.forEach(function(C){return C.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),E.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(l))})}}},[n.inert,n.lockRef.current,n.shards]);var h=w.useCallback(function(E,C){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!d.current.allowPinchZoom;var M=hl(E),_=r.current,j="deltaX"in E?E.deltaX:_[0]-M[0],k="deltaY"in E?E.deltaY:_[1]-M[1],z,q=E.target,L=Math.abs(j)>Math.abs(k)?"h":"v";if("touches"in E&&L==="h"&&q.type==="range")return!1;var D=window.getSelection(),Q=D&&D.anchorNode,oe=Q?Q===q||Q.contains(q):!1;if(oe)return!1;var ne=Ky(L,q);if(!ne)return!0;if(ne?z=L:(z=L==="v"?"h":"v",ne=Ky(L,q)),!ne)return!1;if(!i.current&&"changedTouches"in E&&(j||k)&&(i.current=z),!z)return!0;var $=i.current||z;return oM($,C,E,$==="h"?j:k)},[]),p=w.useCallback(function(E){var C=E;if(!(!gr.length||gr[gr.length-1]!==u)){var M="deltaY"in C?Zy(C):hl(C),_=o.current.filter(function(z){return z.name===C.type&&(z.target===C.target||C.target===z.shadowParent)&&rM(z.delta,M)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var j=(d.current.shards||[]).map(Jy).filter(Boolean).filter(function(z){return z.contains(C.target)}),k=j.length>0?h(C,j[0]):!d.current.noIsolation;k&&C.cancelable&&C.preventDefault()}}},[]),m=w.useCallback(function(E,C,M,_){var j={name:E,delta:C,target:M,should:_,shadowParent:cM(M)};o.current.push(j),setTimeout(function(){o.current=o.current.filter(function(k){return k!==j})},1)},[]),y=w.useCallback(function(E){r.current=hl(E),i.current=void 0},[]),g=w.useCallback(function(E){m(E.type,Zy(E),E.target,h(E,n.lockRef.current))},[]),S=w.useCallback(function(E){m(E.type,hl(E),E.target,h(E,n.lockRef.current))},[]);w.useEffect(function(){return gr.push(u),n.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:S}),document.addEventListener("wheel",p,pr),document.addEventListener("touchmove",p,pr),document.addEventListener("touchstart",y,pr),function(){gr=gr.filter(function(E){return E!==u}),document.removeEventListener("wheel",p,pr),document.removeEventListener("touchmove",p,pr),document.removeEventListener("touchstart",y,pr)}},[]);var x=n.removeScrollBar,T=n.inert;return w.createElement(w.Fragment,null,T?w.createElement(u,{styles:sM(l)}):null,x?w.createElement(JC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function cM(n){for(var o=null;n!==null;)n instanceof ShadowRoot&&(o=n.host,n=n.host),n=n.parentNode;return o}const uM=UC(G0,lM);var Z0=w.forwardRef(function(n,o){return w.createElement(Ql,zn({},n,{ref:o,sideCar:uM}))});Z0.classNames=Ql.classNames;var fM=[" ","Enter","ArrowUp","ArrowDown"],dM=[" ","Enter"],Eo="Select",[Fl,Kl,hM]=jE(Eo),[Ar]=wd(Eo,[hM,O0]),Zl=O0(),[mM,Xa]=Ar(Eo),[pM,gM]=Ar(Eo),J0=n=>{const{__scopeSelect:o,children:r,open:i,defaultOpen:l,onOpenChange:u,value:d,defaultValue:h,onValueChange:p,dir:m,name:y,autoComplete:g,disabled:S,required:x,form:T}=n,E=Zl(o),[C,M]=w.useState(null),[_,j]=w.useState(null),[k,z]=w.useState(!1),q=LE(m),[L,D]=Xy({prop:i,defaultProp:l??!1,onChange:u,caller:Eo}),[Q,oe]=Xy({prop:d,defaultProp:h,onChange:p,caller:Eo}),ne=w.useRef(null),$=C?T||!!C.closest("form"):!0,[pe,fe]=w.useState(new Set),me=Array.from(pe).map(U=>U.props.value).join(";");return b.jsx(mC,{...E,children:b.jsxs(mM,{required:x,scope:o,trigger:C,onTriggerChange:M,valueNode:_,onValueNodeChange:j,valueNodeHasChildren:k,onValueNodeHasChildrenChange:z,contentId:Rd(),value:Q,onValueChange:oe,open:L,onOpenChange:D,dir:q,triggerPointerDownPosRef:ne,disabled:S,children:[b.jsx(Fl.Provider,{scope:o,children:b.jsx(pM,{scope:n.__scopeSelect,onNativeOptionAdd:w.useCallback(U=>{fe(Y=>new Set(Y).add(U))},[]),onNativeOptionRemove:w.useCallback(U=>{fe(Y=>{const Z=new Set(Y);return Z.delete(U),Z})},[]),children:r})}),$?b.jsxs(yb,{"aria-hidden":!0,required:x,tabIndex:-1,name:y,autoComplete:g,value:Q,onChange:U=>oe(U.target.value),disabled:S,form:T,children:[Q===void 0?b.jsx("option",{value:""}):null,Array.from(pe)]},me):null]})})};J0.displayName=Eo;var W0="SelectTrigger",$0=w.forwardRef((n,o)=>{const{__scopeSelect:r,disabled:i=!1,...l}=n,u=Zl(r),d=Xa(W0,r),h=d.disabled||i,p=wt(o,d.onTriggerChange),m=Kl(r),y=w.useRef("touch"),[g,S,x]=bb(E=>{const C=m().filter(j=>!j.disabled),M=C.find(j=>j.value===d.value),_=xb(C,E,M);_!==void 0&&d.onValueChange(_.value)}),T=E=>{h||(d.onOpenChange(!0),x()),E&&(d.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return b.jsx(pC,{asChild:!0,...u,children:b.jsx(ot.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":vb(d.value)?"":void 0,...l,ref:p,onClick:ct(l.onClick,E=>{E.currentTarget.focus(),y.current!=="mouse"&&T(E)}),onPointerDown:ct(l.onPointerDown,E=>{y.current=E.pointerType;const C=E.target;C.hasPointerCapture(E.pointerId)&&C.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(T(E),E.preventDefault())}),onKeyDown:ct(l.onKeyDown,E=>{const C=g.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&S(E.key),!(C&&E.key===" ")&&fM.includes(E.key)&&(T(),E.preventDefault())})})})});$0.displayName=W0;var eb="SelectValue",tb=w.forwardRef((n,o)=>{const{__scopeSelect:r,className:i,style:l,children:u,placeholder:d="",...h}=n,p=Xa(eb,r),{onValueNodeHasChildrenChange:m}=p,y=u!==void 0,g=wt(o,p.onValueNodeChange);return Ut(()=>{m(y)},[m,y]),b.jsx(ot.span,{...h,ref:g,style:{pointerEvents:"none"},children:vb(p.value)?b.jsx(b.Fragment,{children:d}):u})});tb.displayName=eb;var yM="SelectIcon",nb=w.forwardRef((n,o)=>{const{__scopeSelect:r,children:i,...l}=n;return b.jsx(ot.span,{"aria-hidden":!0,...l,ref:o,children:i||"▼"})});nb.displayName=yM;var vM="SelectPortal",ab=n=>b.jsx(I0,{asChild:!0,...n});ab.displayName=vM;var To="SelectContent",ob=w.forwardRef((n,o)=>{const r=Xa(To,n.__scopeSelect),[i,l]=w.useState();if(Ut(()=>{l(new DocumentFragment)},[]),!r.open){const u=i;return u?Cr.createPortal(b.jsx(rb,{scope:n.__scopeSelect,children:b.jsx(Fl.Slot,{scope:n.__scopeSelect,children:b.jsx("div",{children:n.children})})}),u):null}return b.jsx(sb,{...n,ref:o})});ob.displayName=To;var Rn=10,[rb,Qa]=Ar(To),bM="SelectContentImpl",xM=jl("SelectContent.RemoveScroll"),sb=w.forwardRef((n,o)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:p,align:m,alignOffset:y,arrowPadding:g,collisionBoundary:S,collisionPadding:x,sticky:T,hideWhenDetached:E,avoidCollisions:C,...M}=n,_=Xa(To,r),[j,k]=w.useState(null),[z,q]=w.useState(null),L=wt(o,te=>k(te)),[D,Q]=w.useState(null),[oe,ne]=w.useState(null),$=Kl(r),[pe,fe]=w.useState(!1),me=w.useRef(!1);w.useEffect(()=>{if(j)return _C(j)},[j]),GE();const U=w.useCallback(te=>{const[ge,...re]=$().map(Ce=>Ce.ref.current),[ve]=re.slice(-1),be=document.activeElement;for(const Ce of te)if(Ce===be||(Ce?.scrollIntoView({block:"nearest"}),Ce===ge&&z&&(z.scrollTop=0),Ce===ve&&z&&(z.scrollTop=z.scrollHeight),Ce?.focus(),document.activeElement!==be))return},[$,z]),Y=w.useCallback(()=>U([D,j]),[U,D,j]);w.useEffect(()=>{pe&&Y()},[pe,Y]);const{onOpenChange:Z,triggerPointerDownPosRef:ue}=_;w.useEffect(()=>{if(j){let te={x:0,y:0};const ge=ve=>{te={x:Math.abs(Math.round(ve.pageX)-(ue.current?.x??0)),y:Math.abs(Math.round(ve.pageY)-(ue.current?.y??0))}},re=ve=>{te.x<=10&&te.y<=10?ve.preventDefault():j.contains(ve.target)||Z(!1),document.removeEventListener("pointermove",ge),ue.current=null};return ue.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",re,{capture:!0})}}},[j,Z,ue]),w.useEffect(()=>{const te=()=>Z(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[Z]);const[J,N]=bb(te=>{const ge=$().filter(be=>!be.disabled),re=ge.find(be=>be.ref.current===document.activeElement),ve=xb(ge,te,re);ve&&setTimeout(()=>ve.ref.current.focus())}),G=w.useCallback((te,ge,re)=>{const ve=!me.current&&!re;(_.value!==void 0&&_.value===ge||ve)&&(Q(te),ve&&(me.current=!0))},[_.value]),W=w.useCallback(()=>j?.focus(),[j]),ee=w.useCallback((te,ge,re)=>{const ve=!me.current&&!re;(_.value!==void 0&&_.value===ge||ve)&&ne(te)},[_.value]),ae=i==="popper"?od:ib,se=ae===od?{side:h,sideOffset:p,align:m,alignOffset:y,arrowPadding:g,collisionBoundary:S,collisionPadding:x,sticky:T,hideWhenDetached:E,avoidCollisions:C}:{};return b.jsx(rb,{scope:r,content:j,viewport:z,onViewportChange:q,itemRefCallback:G,selectedItem:D,onItemLeave:W,itemTextRefCallback:ee,focusSelectedItem:Y,selectedItemText:oe,position:i,isPositioned:pe,searchRef:J,children:b.jsx(Z0,{as:xM,allowPinchZoom:!0,children:b.jsx(g0,{asChild:!0,trapped:_.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:ct(l,te=>{_.trigger?.focus({preventScroll:!0}),te.preventDefault()}),children:b.jsx(m0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:b.jsx(ae,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:te=>te.preventDefault(),...M,...se,onPlaced:()=>fe(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:ct(M.onKeyDown,te=>{const ge=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!ge&&te.key.length===1&&N(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let ve=$().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(te.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const be=te.target,Ce=ve.indexOf(be);ve=ve.slice(Ce+1)}setTimeout(()=>U(ve)),te.preventDefault()}})})})})})})});sb.displayName=bM;var SM="SelectItemAlignedPosition",ib=w.forwardRef((n,o)=>{const{__scopeSelect:r,onPlaced:i,...l}=n,u=Xa(To,r),d=Qa(To,r),[h,p]=w.useState(null),[m,y]=w.useState(null),g=wt(o,L=>y(L)),S=Kl(r),x=w.useRef(!1),T=w.useRef(!0),{viewport:E,selectedItem:C,selectedItemText:M,focusSelectedItem:_}=d,j=w.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&m&&E&&C&&M){const L=u.trigger.getBoundingClientRect(),D=m.getBoundingClientRect(),Q=u.valueNode.getBoundingClientRect(),oe=M.getBoundingClientRect();if(u.dir!=="rtl"){const be=oe.left-D.left,Ce=Q.left-be,Ge=L.left-Ce,Ve=L.width+Ge,Ht=Math.max(Ve,D.width),_t=window.innerWidth-Rn,Tt=My(Ce,[Rn,Math.max(Rn,_t-Ht)]);h.style.minWidth=Ve+"px",h.style.left=Tt+"px"}else{const be=D.right-oe.right,Ce=window.innerWidth-Q.right-be,Ge=window.innerWidth-L.right-Ce,Ve=L.width+Ge,Ht=Math.max(Ve,D.width),_t=window.innerWidth-Rn,Tt=My(Ce,[Rn,Math.max(Rn,_t-Ht)]);h.style.minWidth=Ve+"px",h.style.right=Tt+"px"}const ne=S(),$=window.innerHeight-Rn*2,pe=E.scrollHeight,fe=window.getComputedStyle(m),me=parseInt(fe.borderTopWidth,10),U=parseInt(fe.paddingTop,10),Y=parseInt(fe.borderBottomWidth,10),Z=parseInt(fe.paddingBottom,10),ue=me+U+pe+Z+Y,J=Math.min(C.offsetHeight*5,ue),N=window.getComputedStyle(E),G=parseInt(N.paddingTop,10),W=parseInt(N.paddingBottom,10),ee=L.top+L.height/2-Rn,ae=$-ee,se=C.offsetHeight/2,te=C.offsetTop+se,ge=me+U+te,re=ue-ge;if(ge<=ee){const be=ne.length>0&&C===ne[ne.length-1].ref.current;h.style.bottom="0px";const Ce=m.clientHeight-E.offsetTop-E.offsetHeight,Ge=Math.max(ae,se+(be?W:0)+Ce+Y),Ve=ge+Ge;h.style.height=Ve+"px"}else{const be=ne.length>0&&C===ne[0].ref.current;h.style.top="0px";const Ge=Math.max(ee,me+E.offsetTop+(be?G:0)+se)+re;h.style.height=Ge+"px",E.scrollTop=ge-ee+E.offsetTop}h.style.margin=`${Rn}px 0`,h.style.minHeight=J+"px",h.style.maxHeight=$+"px",i?.(),requestAnimationFrame(()=>x.current=!0)}},[S,u.trigger,u.valueNode,h,m,E,C,M,u.dir,i]);Ut(()=>j(),[j]);const[k,z]=w.useState();Ut(()=>{m&&z(window.getComputedStyle(m).zIndex)},[m]);const q=w.useCallback(L=>{L&&T.current===!0&&(j(),_?.(),T.current=!1)},[j,_]);return b.jsx(RM,{scope:r,contentWrapper:h,shouldExpandOnScrollRef:x,onScrollButtonChange:q,children:b.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:b.jsx(ot.div,{...l,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});ib.displayName=SM;var wM="SelectPopperPosition",od=w.forwardRef((n,o)=>{const{__scopeSelect:r,align:i="start",collisionPadding:l=Rn,...u}=n,d=Zl(r);return b.jsx(gC,{...d,...u,ref:o,align:i,collisionPadding:l,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});od.displayName=wM;var[RM,jd]=Ar(To,{}),rd="SelectViewport",lb=w.forwardRef((n,o)=>{const{__scopeSelect:r,nonce:i,...l}=n,u=Qa(rd,r),d=jd(rd,r),h=wt(o,u.onViewportChange),p=w.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),b.jsx(Fl.Slot,{scope:r,children:b.jsx(ot.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:ct(l.onScroll,m=>{const y=m.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:S}=d;if(S?.current&&g){const x=Math.abs(p.current-y.scrollTop);if(x>0){const T=window.innerHeight-Rn*2,E=parseFloat(g.style.minHeight),C=parseFloat(g.style.height),M=Math.max(E,C);if(M<T){const _=M+x,j=Math.min(T,_),k=_-j;g.style.height=j+"px",g.style.bottom==="0px"&&(y.scrollTop=k>0?k:0,g.style.justifyContent="flex-end")}}}p.current=y.scrollTop})})})]})});lb.displayName=rd;var cb="SelectGroup",[EM,TM]=Ar(cb),CM=w.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n,l=Rd();return b.jsx(EM,{scope:r,id:l,children:b.jsx(ot.div,{role:"group","aria-labelledby":l,...i,ref:o})})});CM.displayName=cb;var ub="SelectLabel",MM=w.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n,l=TM(ub,r);return b.jsx(ot.div,{id:l.id,...i,ref:o})});MM.displayName=ub;var Bl="SelectItem",[_M,fb]=Ar(Bl),db=w.forwardRef((n,o)=>{const{__scopeSelect:r,value:i,disabled:l=!1,textValue:u,...d}=n,h=Xa(Bl,r),p=Qa(Bl,r),m=h.value===i,[y,g]=w.useState(u??""),[S,x]=w.useState(!1),T=wt(o,_=>p.itemRefCallback?.(_,i,l)),E=Rd(),C=w.useRef("touch"),M=()=>{l||(h.onValueChange(i),h.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(_M,{scope:r,value:i,disabled:l,textId:E,isSelected:m,onItemTextChange:w.useCallback(_=>{g(j=>j||(_?.textContent??"").trim())},[]),children:b.jsx(Fl.ItemSlot,{scope:r,value:i,disabled:l,textValue:y,children:b.jsx(ot.div,{role:"option","aria-labelledby":E,"data-highlighted":S?"":void 0,"aria-selected":m&&S,"data-state":m?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:T,onFocus:ct(d.onFocus,()=>x(!0)),onBlur:ct(d.onBlur,()=>x(!1)),onClick:ct(d.onClick,()=>{C.current!=="mouse"&&M()}),onPointerUp:ct(d.onPointerUp,()=>{C.current==="mouse"&&M()}),onPointerDown:ct(d.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:ct(d.onPointerMove,_=>{C.current=_.pointerType,l?p.onItemLeave?.():C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ct(d.onPointerLeave,_=>{_.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:ct(d.onKeyDown,_=>{p.searchRef?.current!==""&&_.key===" "||(dM.includes(_.key)&&M(),_.key===" "&&_.preventDefault())})})})})});db.displayName=Bl;var Ns="SelectItemText",hb=w.forwardRef((n,o)=>{const{__scopeSelect:r,className:i,style:l,...u}=n,d=Xa(Ns,r),h=Qa(Ns,r),p=fb(Ns,r),m=gM(Ns,r),[y,g]=w.useState(null),S=wt(o,M=>g(M),p.onItemTextChange,M=>h.itemTextRefCallback?.(M,p.value,p.disabled)),x=y?.textContent,T=w.useMemo(()=>b.jsx("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:E,onNativeOptionRemove:C}=m;return Ut(()=>(E(T),()=>C(T)),[E,C,T]),b.jsxs(b.Fragment,{children:[b.jsx(ot.span,{id:p.textId,...u,ref:S}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Cr.createPortal(u.children,d.valueNode):null]})});hb.displayName=Ns;var mb="SelectItemIndicator",pb=w.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n;return fb(mb,r).isSelected?b.jsx(ot.span,{"aria-hidden":!0,...i,ref:o}):null});pb.displayName=mb;var sd="SelectScrollUpButton",AM=w.forwardRef((n,o)=>{const r=Qa(sd,n.__scopeSelect),i=jd(sd,n.__scopeSelect),[l,u]=w.useState(!1),d=wt(o,i.onScrollButtonChange);return Ut(()=>{if(r.viewport&&r.isPositioned){let h=function(){const m=p.scrollTop>0;u(m)};const p=r.viewport;return h(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[r.viewport,r.isPositioned]),l?b.jsx(gb,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:p}=r;h&&p&&(h.scrollTop=h.scrollTop-p.offsetHeight)}}):null});AM.displayName=sd;var id="SelectScrollDownButton",NM=w.forwardRef((n,o)=>{const r=Qa(id,n.__scopeSelect),i=jd(id,n.__scopeSelect),[l,u]=w.useState(!1),d=wt(o,i.onScrollButtonChange);return Ut(()=>{if(r.viewport&&r.isPositioned){let h=function(){const m=p.scrollHeight-p.clientHeight,y=Math.ceil(p.scrollTop)<m;u(y)};const p=r.viewport;return h(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[r.viewport,r.isPositioned]),l?b.jsx(gb,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:p}=r;h&&p&&(h.scrollTop=h.scrollTop+p.offsetHeight)}}):null});NM.displayName=id;var gb=w.forwardRef((n,o)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=n,u=Qa("SelectScrollButton",r),d=w.useRef(null),h=Kl(r),p=w.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return w.useEffect(()=>()=>p(),[p]),Ut(()=>{h().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),b.jsx(ot.div,{"aria-hidden":!0,...l,ref:o,style:{flexShrink:0,...l.style},onPointerDown:ct(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:ct(l.onPointerMove,()=>{u.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:ct(l.onPointerLeave,()=>{p()})})}),OM="SelectSeparator",jM=w.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n;return b.jsx(ot.div,{"aria-hidden":!0,...i,ref:o})});jM.displayName=OM;var ld="SelectArrow",zM=w.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n,l=Zl(r),u=Xa(ld,r),d=Qa(ld,r);return u.open&&d.position==="popper"?b.jsx(yC,{...l,...i,ref:o}):null});zM.displayName=ld;var LM="SelectBubbleInput",yb=w.forwardRef(({__scopeSelect:n,value:o,...r},i)=>{const l=w.useRef(null),u=wt(i,l),d=wC(o);return w.useEffect(()=>{const h=l.current;if(!h)return;const p=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(p,"value").set;if(d!==o&&y){const g=new Event("change",{bubbles:!0});y.call(h,o),h.dispatchEvent(g)}},[d,o]),b.jsx(ot.select,{...r,style:{...P0,...r.style},ref:u,defaultValue:o})});yb.displayName=LM;function vb(n){return n===""||n===void 0}function bb(n){const o=wo(n),r=w.useRef(""),i=w.useRef(0),l=w.useCallback(d=>{const h=r.current+d;o(h),(function p(m){r.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>p(""),1e3))})(h)},[o]),u=w.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,l,u]}function xb(n,o,r){const l=o.length>1&&Array.from(o).every(m=>m===o[0])?o[0]:o,u=r?n.indexOf(r):-1;let d=kM(n,Math.max(u,0));l.length===1&&(d=d.filter(m=>m!==r));const p=d.find(m=>m.textValue.toLowerCase().startsWith(l.toLowerCase()));return p!==r?p:void 0}function kM(n,o){return n.map((r,i)=>n[(o+i)%n.length])}var DM=J0,Sb=$0,BM=tb,UM=nb,HM=ab,wb=ob,IM=lb,Rb=db,PM=hb,qM=pb;/**
106
+ * @license lucide-react v0.544.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const VM=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YM=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,r,i)=>i?i.toUpperCase():r.toLowerCase()),Wy=n=>{const o=YM(n);return o.charAt(0).toUpperCase()+o.slice(1)},Eb=(...n)=>n.filter((o,r,i)=>!!o&&o.trim()!==""&&i.indexOf(o)===r).join(" ").trim(),GM=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};/**
111
+ * @license lucide-react v0.544.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */var XM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
116
+ * @license lucide-react v0.544.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const QM=w.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:l="",children:u,iconNode:d,...h},p)=>w.createElement("svg",{ref:p,...XM,width:o,height:o,stroke:n,strokeWidth:i?Number(r)*24/Number(o):r,className:Eb("lucide",l),...!u&&!GM(h)&&{"aria-hidden":"true"},...h},[...d.map(([m,y])=>w.createElement(m,y)),...Array.isArray(u)?u:[u]]));/**
121
+ * @license lucide-react v0.544.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const ua=(n,o)=>{const r=w.forwardRef(({className:i,...l},u)=>w.createElement(QM,{ref:u,iconNode:o,className:Eb(`lucide-${VM(Wy(n))}`,`lucide-${n}`,i),...l}));return r.displayName=Wy(n),r};/**
126
+ * @license lucide-react v0.544.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const FM=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],KM=ua("check",FM);/**
131
+ * @license lucide-react v0.544.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const ZM=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],JM=ua("chevron-down",ZM);/**
136
+ * @license lucide-react v0.544.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const WM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$M=ua("circle-check",WM);/**
141
+ * @license lucide-react v0.544.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const e_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],t_=ua("loader-circle",e_);/**
146
+ * @license lucide-react v0.544.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const n_=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],a_=ua("mic-off",n_);/**
151
+ * @license lucide-react v0.544.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const o_=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],r_=ua("mic",o_);/**
156
+ * @license lucide-react v0.544.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const s_=[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],i_=ua("octagon",s_);/**
161
+ * @license lucide-react v0.544.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const l_=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],c_=ua("timer",l_);/**
166
+ * @license lucide-react v0.544.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const u_=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],f_=ua("triangle-alert",u_),d_=DM,h_=BM,Tb=w.forwardRef(({className:n,children:o,...r},i)=>b.jsxs(Sb,{ref:i,className:Je("flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),...r,children:[o,b.jsx(UM,{asChild:!0,children:b.jsx(JM,{className:"h-4 w-4 opacity-50"})})]}));Tb.displayName=Sb.displayName;const Cb=w.forwardRef(({className:n,children:o,position:r="popper",...i},l)=>b.jsx(HM,{children:b.jsx(wb,{ref:l,className:Je("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",n),position:r,...i,children:b.jsx(IM,{className:"p-1",children:o})})}));Cb.displayName=wb.displayName;const wl=w.forwardRef(({className:n,children:o,...r},i)=>b.jsxs(Rb,{ref:i,className:Je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...r,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(qM,{children:b.jsx(KM,{className:"h-4 w-4"})})}),b.jsx(PM,{children:o})]}));wl.displayName=Rb.displayName;function m_({target:n,localUrl:o,customUrl:r,status:i,sessionId:l,errorMessage:u,onTargetChange:d,onLocalUrlChange:h,onCustomUrlChange:p,onConnect:m,onDisconnect:y,onClearTranscript:g,onPlaySample:S}){const x=n==="custom"?r:c0(n,o),T=i==="connected",E=i==="connected"?"success":i==="connecting"?"warning":i==="error"?"destructive":"default";return b.jsxs(hn,{children:[b.jsxs(mn,{className:"flex flex-row items-start justify-between gap-4 space-y-0",children:[b.jsxs("div",{children:[b.jsx(pn,{children:"Syrinx Studio"}),b.jsx(gn,{children:"WebSocket voice session — always-on mic, server-side VAD and endpointing."})]}),b.jsxs(u0,{variant:E,children:[b.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-current opacity-80"}),wE(i)]})]}),b.jsxs(yn,{className:"grid gap-4 lg:grid-cols-[220px_minmax(0,1fr)_auto]",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx(Wf,{htmlFor:"ws-target",children:"Backend"}),b.jsxs(d_,{value:n,onValueChange:C=>d(C),disabled:T,children:[b.jsx(Tb,{id:"ws-target",children:b.jsx(h_,{placeholder:"Select backend"})}),b.jsxs(Cb,{children:[b.jsx(wl,{value:"local",children:"Local"}),b.jsx(wl,{value:"hosted",children:"Hosted (Cloudflare)"}),b.jsx(wl,{value:"custom",children:"Custom URL"})]})]})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx(Wf,{htmlFor:"ws-url",children:n==="local"?"Local WebSocket URL":n==="hosted"?"Hosted endpoint":"Custom WebSocket URL"}),n==="local"?b.jsx(js,{id:"ws-url",value:o,onChange:C=>h(C.target.value),spellCheck:!1}):n==="hosted"?b.jsx(js,{id:"ws-url",value:x,onChange:C=>{p(C.target.value),d("custom")},spellCheck:!1}):b.jsx(js,{id:"ws-url",value:r,onChange:C=>p(C.target.value),spellCheck:!1,placeholder:Bs}),b.jsxs("p",{className:"text-xs text-muted-foreground",children:["Override with ",b.jsx("code",{className:"rounded bg-muted px-1",children:"?ws="})," query param. Active URL: ",x]}),l?b.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session: ",l]}):null,u?b.jsx("p",{className:"text-xs text-destructive",children:u}):null]}),b.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[T?b.jsx(fn,{variant:"destructive",onClick:y,children:"Disconnect"}):b.jsx(fn,{onClick:m,disabled:i==="connecting"||!x.trim(),children:"Connect"}),b.jsx(fn,{variant:"outline",onClick:S,disabled:i==="connecting",children:"Play sample"}),b.jsx(fn,{variant:"outline",onClick:g,children:"Clear transcript"})]})]})]})}function p_(n){return n.everOpened?"agent-init-failed":n.reachable===!0?"upgrade-rejected":n.reachable===!1?"refused":"unclassified"}function g_(n){if(n===n.toUpperCase()&&n!==n.toLowerCase())return n.toLowerCase().replace(/_/g,"-");const o=n.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`);return(o.startsWith("-")?o.slice(1):o).replace(/_/g,"-").replace(/-$/,"")}const y_="default";function v_(n,o){const r=[];for(const i of o){const l=`/agents/${g_(i.className)}/${y_}`;let u;try{const d=new URL(n);d.pathname=l,u=d.toString()}catch{continue}r.push({worker:i.worker,className:i.className,path:l,url:u})}return r}function b_(n){const{resumeWindowMs:o,disconnectedAtMs:r,nowMs:i}=n;if(o===void 0||o<=0||r===void 0)return{state:"none",remainingMs:0};const l=o-(i-r);return l>0?{state:"open",remainingMs:l}:{state:"elapsed",remainingMs:0}}function x_(n){try{const o=new URL(n);if(o.protocol==="ws:")o.protocol="http:";else if(o.protocol==="wss:")o.protocol="https:";else if(o.protocol!=="http:"&&o.protocol!=="https:")return;return o.toString()}catch{return}}async function S_(n,o=typeof fetch=="function"?fetch:void 0){const r=x_(n);if(!(r===void 0||o===void 0))try{return await o(r,{method:"GET",mode:"no-cors",cache:"no-store"}),!0}catch(i){return i instanceof TypeError?!1:void 0}}var w_=[{worker:"syrinx-voice-server-workers",className:"VoiceConversation",source:"packages/server-workers/wrangler.jsonc"},{worker:"syrinx-voice-server-workers",className:"TwilioVoiceConversation",source:"packages/server-workers/wrangler.jsonc"},{worker:"syrinx-voice-server-workers",className:"TelnyxVoiceConversation",source:"packages/server-workers/wrangler.jsonc"},{worker:"syrinx-cf-agent-voice-example",className:"RealtimeVoiceAgent",source:"examples/03-cf-agent-voice/wrangler.jsonc"},{worker:"syrinx-cf-agent-voice-example",className:"CascadedVoiceAgent",source:"examples/03-cf-agent-voice/wrangler.jsonc"}];const R_={refused:"Nothing is listening at that address","upgrade-rejected":"The server answered, but not on that path","agent-init-failed":"The connection was accepted, then the agent failed to start",unclassified:"The connection failed, and the browser did not say why"},E_={refused:"A plain request to the same address got no answer at all, so the dev server is not running or is on a different port.","upgrade-rejected":"A plain request to the same address was answered, so something is running there — it just does not serve a voice session on this path.","agent-init-failed":"The address and the path were both right: the socket opened. It closed before the session was ready, which means building the agent failed.",unclassified:"The socket never opened, and the reachability check could not decide whether anything is running there. A browser is not told why an upgrade was refused."},T_={refused:"Start the backend, then connect again. If it is already running, check the port.","upgrade-rejected":"Point the URL at the path that serves a voice session.","agent-init-failed":"Read the startup error below and the backend's own log — a missing provider key is the usual cause.",unclassified:"Check the backend is running and reachable from this page, then look at its log for a refused upgrade."};function C_({resumeWindowMs:n,disconnectedAtMs:o}){const[r,i]=w.useState(()=>Date.now());w.useEffect(()=>{const u=window.setInterval(()=>i(Date.now()),500);return()=>window.clearInterval(u)},[]);const l=b_({resumeWindowMs:n,disconnectedAtMs:o,nowMs:r});return l.state==="none"?null:l.state==="open"?b.jsxs("p",{className:"rounded bg-amber-500/10 px-2 py-1.5 text-xs text-amber-900 dark:text-amber-200","data-testid":"resume-window-open",children:["Reconnecting within the next ",Ln(l.remainingMs)," picks this session back up, with its history intact. After that the server forgets it."]}):b.jsxs("p",{className:"rounded bg-muted px-2 py-1.5 text-xs text-muted-foreground","data-testid":"resume-window-elapsed",children:["The ",Ln(n??0)," resume window has elapsed. Connecting now starts a new session — the previous conversation is gone from the server."]})}function M_({failure:n,resumeWindowMs:o,disconnectedAtMs:r,declaredDurableObjects:i=w_,onUseUrl:l}){if(!n&&r===void 0)return null;const u=n?.kind==="upgrade-rejected"||n?.kind==="unclassified"?v_(n.wsUrl,i):[];return b.jsxs(hn,{className:Je(n&&"border-destructive/50"),children:[b.jsxs(mn,{children:[b.jsx(pn,{"data-testid":"connection-failure-headline",children:n?R_[n.kind]:"The session dropped"}),b.jsx(gn,{children:n?E_[n.kind]:"The socket closed after the session was running. Nothing about the address or the agent is wrong."})]}),b.jsxs(yn,{className:"space-y-3",children:[n&&b.jsxs(b.Fragment,{children:[b.jsx("p",{className:"text-sm","data-testid":"connection-failure-next",children:T_[n.kind]}),b.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"connection-failure-target",children:["Tried ",b.jsx("code",{className:"rounded bg-muted px-1",children:n.wsUrl}),n.retryingAttempt!==void 0?` — still retrying (attempt ${String(n.retryingAttempt)}).`:" — the client has stopped retrying."]}),n.serverError&&b.jsxs("div",{className:"rounded bg-destructive/10 px-2 py-1.5 text-xs","data-testid":"connection-failure-server-error",children:[b.jsx("p",{className:"font-medium",children:"The server said:"}),b.jsx("p",{className:"mt-0.5",children:n.serverError.message}),(n.serverError.component!==void 0||n.serverError.category!==void 0)&&b.jsx("p",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground",children:[n.serverError.component,n.serverError.category].filter(d=>d!==void 0).join(" · ")})]}),(n.kind==="upgrade-rejected"||n.kind==="unclassified")&&b.jsxs("div",{className:"space-y-2","data-testid":"agent-route-hint",children:[b.jsxs("p",{className:"text-xs text-muted-foreground",children:["A Cloudflare worker built on the Agents SDK serves each agent at"," ",b.jsx("code",{className:"rounded bg-muted px-1",children:"/agents/<class-name-kebab>/<id>"}),", where the first segment is the exported Durable Object class in kebab-case and the second is any instance name you choose."]}),u.length>0?b.jsx("ul",{className:"space-y-1","data-testid":"agent-route-candidates",children:u.map(d=>b.jsxs("li",{className:"flex flex-wrap items-center gap-2 text-xs","data-testid":"agent-route-candidate",children:[b.jsx("code",{className:"rounded bg-muted px-1",children:d.path}),b.jsxs("span",{className:"text-muted-foreground",children:[d.className," in ",d.worker]}),l&&b.jsx(fn,{variant:"outline",size:"sm",className:"ml-auto",onClick:()=>l(d.url),children:"Use this path"})]},`${d.worker}:${d.className}`))}):b.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"agent-route-unknown",children:["No worker config was readable when this studio was built, so there is no class to name here. Take the class from the Durable Object binding in your",b.jsx("code",{className:"mx-1 rounded bg-muted px-1",children:"wrangler.jsonc"}),"— a wrong one fails deploy, so that file cannot drift from what is running."]})]}),(n.closeCode!==void 0||n.transportMessage!==void 0)&&b.jsx("p",{className:"font-mono text-[11px] text-muted-foreground","data-testid":"connection-failure-raw",children:[n.closeCode!==void 0?`close ${String(n.closeCode)}`:void 0,n.closeReason!==void 0&&n.closeReason!==""?n.closeReason:void 0,n.transportMessage].filter(d=>d!==void 0).join(" · ")})]}),b.jsx(C_,{resumeWindowMs:o,disconnectedAtMs:r})]})]})}const wn="__all__",_s="__session__",Rl={tts_chunk:"audio frames",agent_chunk:"reply tokens",stt_chunk:"partial transcripts"},__=n=>n>=1e3?`${(n/1e3).toFixed(2)}s`:`${Math.round(n)}ms`;function A_(n){const o=[],r=(i,l)=>{o.push({seq:o.length,atMs:i.atMs,type:i.message.type,turnId:l,message:i.message})};for(const i of n.turns)for(const l of i.events)r(l,i.turnId);for(const i of n.sessionEvents)r(i);return o.sort((i,l)=>l.atMs-i.atMs||l.seq-i.seq)}function N_(n){return[...n].sort((o,r)=>r[1]-o[1]).map(([o,r])=>`${r} ${Rl[o]??o}`).join(", ")}function O_({row:n}){const[o,r]=w.useState(!1);return b.jsxs("li",{className:"border-b border-border/60 last:border-0","data-testid":"event-row","data-type":n.type,children:[b.jsxs("button",{type:"button",onClick:()=>r(i=>!i),"aria-expanded":o,className:"flex w-full items-baseline gap-2 py-1 text-left text-xs hover:bg-muted/50",children:[b.jsxs("span",{className:"w-16 shrink-0 tabular-nums text-muted-foreground",children:["+",__(n.atMs)]}),b.jsx("span",{className:"font-mono",children:n.type}),n.turnId!==void 0&&b.jsxs("span",{className:"ml-auto shrink-0 text-muted-foreground","data-testid":"event-turn",children:["turn ",n.turnId]})]}),o&&b.jsx("pre",{className:"overflow-x-auto rounded bg-muted p-2 text-[11px] leading-tight","data-testid":"event-payload",children:JSON.stringify(n.message,null,2)})]})}function j_({record:n}){const[o,r]=w.useState(wn),[i,l]=w.useState(wn),[u,d]=w.useState(!1),[h,p]=w.useState(null),m=w.useMemo(()=>A_(n),[n]),y=w.useMemo(()=>n.turns.map(z=>z.turnId),[n]),g=o!==wn&&o!==_s&&!y.includes(o)?wn:o,x=m.filter(z=>g===wn?!0:g===_s?z.turnId===void 0:z.turnId===g).filter(z=>i===wn?!0:z.type===i),T=!u&&!(i in Rl),E=new Map;for(const z of x)z.type in Rl&&E.set(z.type,(E.get(z.type)??0)+1);const C=T?x.filter(z=>!(z.type in Rl)):x,M=w.useMemo(()=>{const z=new Map;for(const q of m)z.set(q.type,(z.get(q.type)??0)+1);return z},[m]),_=[...new Set([...M.keys(),...i===wn?[]:[i]])].sort(),j=n.turns.reduce((z,q)=>z+q.droppedEvents,0);w.useEffect(()=>{if(h===null)return;const z=window.setTimeout(()=>p(null),2e3);return()=>window.clearTimeout(z)},[h]);const k=()=>{const z=n.turns.find(q=>q.turnId===g);z&&(navigator.clipboard?.writeText(JSON.stringify({config:n.config,turn:z},null,2)),p(z.turnId))};return b.jsxs(hn,{children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Event log"}),b.jsx(gn,{children:"Everything the server sent, newest first. The timeline answers most questions faster — reach here for the ones it does not cover."})]}),b.jsxs(yn,{className:"space-y-2",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[b.jsxs("select",{"aria-label":"Filter by turn",value:g,onChange:z=>r(z.target.value),className:"h-8 rounded-md border border-input bg-background px-2",children:[b.jsx("option",{value:wn,children:"All turns"}),b.jsx("option",{value:_s,children:"Session-wide only"}),y.map(z=>b.jsxs("option",{value:z,children:["Turn ",z]},z))]}),b.jsxs("select",{"aria-label":"Filter by message type",value:i,onChange:z=>l(z.target.value),className:"h-8 rounded-md border border-input bg-background px-2 font-mono",children:[b.jsx("option",{value:wn,children:"All types"}),_.map(z=>b.jsxs("option",{value:z,children:[z," (",M.get(z)??0,")"]},z))]}),b.jsx(fn,{variant:"outline",size:"sm",onClick:k,disabled:g===wn||g===_s,title:g===wn||g===_s?"Pick a turn first — this copies everything that turn recorded, ready to paste into a bug report.":void 0,"data-testid":"copy-turn",children:h!==null?`Copied turn ${h}`:"Copy turn as JSON"})]}),E.size>0&&b.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[b.jsxs("span",{"data-testid":"per-frame-count",children:[N_(E)," ",T?"hidden":"shown"]}),b.jsx("button",{type:"button",onClick:()=>d(z=>!z),className:"underline underline-offset-2 hover:text-foreground","data-testid":"per-frame-toggle",children:T?"Show":"Hide"})]}),(n.droppedTurns>0||j>0)&&b.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-300","data-testid":"event-log-dropped",children:["Oldest entries were discarded to bound memory (",n.droppedTurns," turns,"," ",j," events). What is below is the most recent."]}),m.length===0?b.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"event-log-empty",children:"Nothing on the wire yet. Connect and speak — or send a text turn — and every message the server sends lands here in order, with its full payload one click away."}):C.length===0&&E.size>0?b.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"event-log-all-suppressed",children:"Everything here is a per-frame stream, hidden by default. Use Show above to see it."}):C.length===0?b.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"event-log-no-match",children:"No entries match these filters. Widen them to see the rest of the stream."}):b.jsx("ul",{className:"max-h-96 overflow-y-auto",children:C.map(z=>b.jsx(O_,{row:z},`${z.turnId??"session"}-${z.seq}`))})]})]})}const cd=700,z_=[{field:"speechEndMs",label:"You stopped speaking"},{field:"textReadyMs",label:"Deciding you're done, transcribing, and thinking"},{field:"firstAudioByteMs",label:"Voice (to first audio)"},{field:"firstAudioPlayedMs",label:"First audio out"},{field:"lastAudioPlayedMs",label:"Agent speaking"}];function L_(n){const o=n.timings;if(!o)return{turnId:n.turnId,segments:[],totalMs:0,unavailable:"no-metrics"};const r=z_.map(({field:m,label:y})=>({label:y,at:o[m]})).filter(m=>typeof m.at=="number");if(r.length<2)return{turnId:n.turnId,segments:[],totalMs:o.e2eMs??0,unavailable:"insufficient-marks"};const i=r[0]?.at??0,l=r.slice(1).map((m,y)=>{const g=r[y],S=(g?.at??i)-i;return{key:m.label,label:m.label,startMs:S,durationMs:Math.max(0,m.at-(g?.at??i))}}),u=l.reduce((m,y)=>Math.max(m,y.durationMs),0),d=l.map(m=>({...m,slowest:u>0&&m.durationMs===u})),h=o.e2eMs??(r[r.length-1]?.at??i)-i,p=h>0&&h<cd?{totalMs:h,floorMs:cd}:void 0;return{turnId:n.turnId,segments:d,totalMs:h,...p?{suspiciouslyFast:p}:{}}}function k_(n,o){if(n==="text")return{kind:"typed",text:"You typed this turn — nothing transcribed you and nothing judged when you finished, so no endpointer ran."};const r=n==="provider_stt"?"The speech-to-text provider":n==="smart_turn"?"The Smart Turn model":n==="timer"?"A turn timer":void 0;return r===void 0?{kind:"unknown",text:"This backend did not report what ended the turn, so the cause is unknown."}:{kind:"endpoint",text:o==="force_finalized"?`${r} force-finalized the transcript after a timeout, not a natural end of speech.`:`${r} decided you had finished speaking.`}}const D_=[{key:"sttMs",stage:"stt",label:"Hearing you"},{key:"llmTTFTMs",stage:"llm",label:"Thinking (to first word)"},{key:"ttsTTFBMs",stage:"tts",label:"Voice (to first audio)"},{key:"e2eMs",stage:"e2e",label:"End to end"}];function $y(n,o){if(n.length===0)return 0;const r=Math.ceil(o/100*n.length),i=Math.min(n.length-1,Math.max(0,r-1));return n[i]??0}function B_(n,o=cd){const r=n.filter(u=>u.timings!==void 0),i=D_.map(({key:u,stage:d,label:h})=>{const p=r.map(m=>m.timings?.[u]).filter(m=>typeof m=="number").sort((m,y)=>m-y);return{stage:d,label:h,count:p.length,medianMs:$y(p,50),p95Ms:$y(p,95),maxMs:p.length>0?p[p.length-1]??0:0}}).filter(u=>u.count>0),l=r.filter(u=>{const d=u.timings?.e2eMs;return typeof d=="number"&&d>0&&d<o}).map(u=>u.turnId);return{turnCount:n.length,measuredTurnCount:r.length,stages:i,suspiciouslyFastTurnIds:l,floorMs:o,unavailable:r.length===0}}const ml=n=>n>=1e3?`${(n/1e3).toFixed(2)}s`:`${Math.round(n)}ms`;function U_({record:n,textTurnIds:o}){const r=n.turns.filter(l=>o?.has(l.turnId)).length,i=B_(n.turns);return b.jsxs(hn,{children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Session metrics"}),b.jsx(gn,{children:"Median and p95 per stage. A one-off spike and a real regression look the same on a single turn."})]}),b.jsxs(yn,{className:"space-y-3",children:[i.unavailable?b.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"metrics-unavailable",children:i.turnCount===0?"No turns yet.":`${i.turnCount} turn${i.turnCount===1?"":"s"} recorded, but this backend sent no per-turn timings, so there is nothing to aggregate.`}):b.jsxs(b.Fragment,{children:[b.jsxs("table",{className:"w-full text-xs","data-testid":"metrics-table",children:[b.jsx("thead",{className:"text-muted-foreground",children:b.jsxs("tr",{children:[b.jsx("th",{className:"text-left font-normal",children:"Stage"}),b.jsx("th",{className:"text-right font-normal",children:"n"}),b.jsx("th",{className:"text-right font-normal",children:"median"}),b.jsx("th",{className:"text-right font-normal",children:"p95"}),b.jsx("th",{className:"text-right font-normal",children:"max"})]})}),b.jsx("tbody",{children:i.stages.map(l=>b.jsxs("tr",{"data-testid":`metrics-row-${l.stage}`,children:[b.jsx("td",{className:"py-0.5",children:l.label}),b.jsx("td",{className:"py-0.5 text-right tabular-nums text-muted-foreground",children:l.count}),b.jsx("td",{className:"py-0.5 text-right tabular-nums",children:ml(l.medianMs)}),b.jsx("td",{className:"py-0.5 text-right tabular-nums",children:ml(l.p95Ms)}),b.jsx("td",{className:"py-0.5 text-right tabular-nums text-muted-foreground",children:ml(l.maxMs)})]},l.stage))})]}),i.measuredTurnCount<i.turnCount&&b.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"metrics-partial",children:["Based on ",i.measuredTurnCount," of ",i.turnCount," turns — the rest carried no timings."]}),i.suspiciouslyFastTurnIds.length>0&&b.jsxs("p",{className:"rounded bg-rose-500/10 px-2 py-1 text-xs text-rose-700 dark:text-rose-300","data-testid":"metrics-fast-warning",children:[i.suspiciouslyFastTurnIds.length," turn",i.suspiciouslyFastTurnIds.length===1?"":"s"," replied under ",ml(i.floorMs)," (",i.suspiciouslyFastTurnIds.join(", "),"). That is usually the endpointer firing while the caller is still speaking — not a fast agent."]})]}),r>0&&b.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"metrics-text-turns",children:[r," of these turn",r===1?" was":"s were"," typed, so",r===1?" it":" they"," never reached the transcription row. The reply was still spoken, so the voice rows include ",r===1?"it":"them","."]})]})]})}const H_={pcm_s16le:"16-bit signed PCM, little-endian",opus:"Opus, decoded in the browser"};function I_(n){return n.sessionId!==void 0||n.inputSampleRateHz!==void 0||n.outputSampleRateHz!==void 0||n.encoding!==void 0}function P_(n){return[{key:"sessionId",label:"Session id",value:n.sessionId},{key:"target",label:"Connection target",value:n.wsUrl,note:"the address this record came from"},{key:"inputSampleRateHz",label:"Microphone uplink",value:n.inputSampleRateHz===void 0?void 0:`${String(n.inputSampleRateHz)} Hz`,note:"what the server expects you to send"},{key:"outputSampleRateHz",label:"Assistant playback",value:n.outputSampleRateHz===void 0?void 0:`${String(n.outputSampleRateHz)} Hz`,note:"what the server sends back"},{key:"encoding",label:"Audio encoding",value:n.encoding,note:n.encoding===void 0?void 0:H_[n.encoding]},{key:"targetFrameDurationMs",label:"Audio frame duration",value:n.targetFrameDurationMs===void 0?void 0:`${String(n.targetFrameDurationMs)} ms`,note:"how much audio each frame carries; not stated by every host"},{key:"binaryEnvelope",label:"Binary audio framing",value:n.binaryEnvelope,note:"the header wrapped around each audio frame"},{key:"rawBinaryInput",label:"Accepts raw binary uplink",value:n.rawBinaryInput===void 0?void 0:n.rawBinaryInput?"yes":"no",note:"whether audio may be sent without the framing header"},{key:"resumeWindowMs",label:"Resume window",value:n.resumeWindowMs===void 0?void 0:Ln(n.resumeWindowMs),note:"how long a dropped session stays resumable"},{key:"endpointingOwner",label:"Endpointing owner",value:n.endpointingOwner,note:"which side decides your turn ended"}]}function q_({record:n}){const o=P_(n.config),r=I_(n.config);return b.jsxs(hn,{children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Session info"}),b.jsx(gn,{children:"What the server negotiated when this session opened. A mismatch between these numbers and what your agent produces is the usual cause of audio that plays as silence."})]}),b.jsx(yn,{children:r?b.jsx("dl",{className:"space-y-1.5 text-xs","data-testid":"session-info",children:o.map(i=>b.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2","data-testid":`session-info-${i.key}`,"data-stated":i.value===void 0?"false":"true",children:[b.jsx("dt",{className:"w-44 shrink-0 text-muted-foreground",children:i.label}),i.value===void 0?b.jsx("dd",{className:"italic text-muted-foreground",children:"not stated by this server"}):b.jsx("dd",{className:"font-mono break-all",children:i.value}),i.value!==void 0&&i.note!==void 0&&b.jsxs("dd",{className:"text-muted-foreground",children:["— ",i.note]})]},i.key))}):b.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"session-info-waiting",children:"The server has not described this session yet. Connect, and every value it negotiates appears here."})})]})}function V_({mode:n,connected:o,micActive:r,onModeChange:i,onSend:l}){const[u,d]=w.useState(""),h=o&&u.trim()!=="",p=()=>{h&&(l(u),d(""))};return b.jsxs(hn,{children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Conversation mode"}),b.jsx(gn,{children:"Talk to the agent, or type to it. Switching keeps the same session — the transcript, timeline and metrics above carry straight on."})]}),b.jsxs(yn,{className:"space-y-3",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",role:"group","aria-label":"Conversation mode",children:[b.jsx(fn,{size:"sm",variant:n==="voice"?"default":"outline","aria-pressed":n==="voice","data-testid":"mode-voice",onClick:()=>i("voice"),children:"Voice"}),b.jsx(fn,{size:"sm",variant:n==="text"?"default":"outline","aria-pressed":n==="text","data-testid":"mode-text",onClick:()=>i("text"),children:"Text"}),b.jsx("span",{className:Je("ml-auto inline-flex items-center gap-1.5 text-xs",r?"text-emerald-700 dark:text-emerald-300":"text-muted-foreground"),"data-testid":"mic-status",children:r?b.jsxs(b.Fragment,{children:[b.jsx(r_,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),"Microphone on"]}):b.jsxs(b.Fragment,{children:[b.jsx(a_,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),"Microphone off"]})})]}),n==="text"?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(js,{value:u,onChange:m=>d(m.target.value),onKeyDown:m=>{m.key!=="Enter"||m.shiftKey||(m.preventDefault(),p())},disabled:!o,spellCheck:!1,"aria-label":"Message to the agent",placeholder:o?"Type a turn, press Enter to send":"Connect to send a turn","data-testid":"text-composer-input"}),b.jsx(fn,{onClick:p,disabled:!h,"data-testid":"text-composer-send",children:"Send"})]}),b.jsx("p",{className:"rounded bg-amber-500/10 px-2 py-1.5 text-xs text-amber-900 dark:text-amber-200","data-testid":"text-mode-trade",children:"Typing goes straight to the agent: nothing transcribes you and nothing judges when you finished talking, so mishearings and turn-taking are untested here. A turn that works typed can still fail out loud. The reply is still spoken, so you will hear it and its voice timings are real — but you cannot interrupt what you did not start by talking."})]}):b.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"voice-mode-note",children:"The microphone streams continuously and the server decides where your turn ends. Switch to text to iterate on prompts and tools without paying for transcription."})]})]})}function Y_({timeline:n}){const o=Math.max(n.totalMs,...n.segments.map(r=>r.startMs+r.durationMs),1);return b.jsxs("div",{className:"space-y-1","data-testid":"timeline-lane","data-turn":n.turnId,children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs",children:[b.jsxs("span",{className:"font-medium",children:["Turn ",n.turnId]}),n.unavailable?b.jsx("span",{className:"text-muted-foreground",children:n.unavailable==="no-metrics"?"no timing data from this backend":"not enough timing marks"}):b.jsx("span",{className:"tabular-nums text-muted-foreground",children:Ln(n.totalMs)})]}),n.suspiciouslyFast&&b.jsxs("p",{className:"rounded bg-rose-500/10 px-2 py-1 text-xs text-rose-700 dark:text-rose-300","data-testid":"fast-turn-warning",children:["Replied in ",Ln(n.suspiciouslyFast.totalMs)," — below the"," ",Ln(n.suspiciouslyFast.floorMs)," floor. The endpointer probably fired while you were still speaking. Check ",b.jsx("code",{children:"minSpeechMs"})," and the endpointing owner."]}),n.unavailable==="no-metrics"?b.jsx("p",{className:"text-xs text-muted-foreground",children:"This backend does not send per-turn timings, so there is nothing to chart."}):b.jsx("div",{className:"space-y-0.5",children:n.segments.map(r=>b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"w-56 shrink-0 truncate text-muted-foreground",title:r.label,children:r.label}),b.jsx("span",{className:"relative h-3 flex-1 overflow-hidden rounded bg-muted",children:b.jsx("span",{className:Je("absolute inset-y-0 rounded",r.slowest?"bg-amber-500/70":"bg-sky-500/50"),style:{left:`${r.startMs/o*100}%`,width:`${Math.max(.5,r.durationMs/o*100)}%`}})}),b.jsx("span",{className:Je("w-16 shrink-0 text-right tabular-nums",r.slowest&&"font-semibold"),children:Ln(r.durationMs)})]},r.key))})]})}function G_({marker:n}){const o=n.kind==="unknown";return b.jsx("p",{className:Je("rounded px-2 py-1 text-xs",o?"bg-muted text-muted-foreground":"bg-sky-500/10 text-sky-700 dark:text-sky-300"),"data-testid":"timeline-endpointing","data-endpoint-kind":n.kind,children:n.text})}function X_(){return b.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"timeline-text-turn",children:"Typed turn — nothing transcribed you and nothing judged when you finished, so those steps are absent below. The reply was still spoken, so the voice timings are real."})}function Q_({record:n,textTurnIds:o}){const r=n.turns.map(i=>({turn:i,isText:o?.has(i.turnId)??!1,timeline:L_(i)}));return b.jsxs(hn,{children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Turn timeline"}),b.jsx(gn,{children:"Where each turn spent its time. The slowest step is highlighted."})]}),b.jsx(yn,{children:r.length===0?b.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"timeline-empty",children:"No turns yet. Speak, or send a text turn — each one gets a lane here showing how long it took to hear you, decide you were done, think, and reply."}):b.jsx("div",{className:"space-y-4",children:r.map(({turn:i,isText:l,timeline:u})=>{const d=k_(i.endpointingOwner,i.endpointingReason),h=l||d.kind==="typed",p=!h&&i.timings!==void 0;return b.jsxs("div",{className:"space-y-1","data-mode":h?"text":"voice",children:[h?b.jsx(X_,{}):p?b.jsx(G_,{marker:d}):null,b.jsx(Y_,{timeline:u})]},i.turnId)})})})]})}function F_({turn:n,onSave:o,blockedReason:r}){return b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[r!==void 0&&b.jsx("span",{className:"text-[10px] text-muted-foreground","data-testid":"save-fixture-blocked",children:r}),b.jsx("button",{type:"button",disabled:r!==void 0,onClick:()=>{o(n)},"data-testid":"save-fixture","data-turn":n.turnId,title:r??"Download this turn's audio and its expected transcript",className:Je("rounded border px-2 py-0.5 text-[10px] font-medium",r===void 0?"border-emerald-300 text-emerald-800 hover:bg-emerald-50 dark:border-emerald-800 dark:text-emerald-300 dark:hover:bg-emerald-950/40":"border-muted text-muted-foreground opacity-60"),children:"Save as fixture"})]})}function K_(n){return n.phase?n.phase:n.result===void 0?"started":"complete"}function Z_(n){return!n||n==="barge_in"?"you started speaking":n.replace(/_/g," ")}const J_={started:{label:"working",variant:"default",Icon:t_,spin:!0},delayed:{label:"slow",variant:"warning",Icon:c_,spin:!1},complete:{label:"done",variant:"success",Icon:$M,spin:!1},failed:{label:"failed",variant:"destructive",Icon:f_,spin:!1}};function W_({tool:n}){const o=K_(n),r=J_[o],i=n.name??"tool",{Icon:l}=r;return b.jsxs("div",{className:"ml-auto max-w-[85%] rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-sm dark:border-slate-700 dark:bg-slate-900/40","data-testid":"transcript-tool","data-tool-name":i,"data-phase":o,children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx(l,{className:Je("h-3.5 w-3.5 shrink-0",r.spin&&"animate-spin"),"aria-hidden":!0}),b.jsx("code",{className:"text-xs font-semibold",children:i}),b.jsxs(u0,{variant:r.variant,children:[r.label,o==="delayed"&&n.afterMs!==void 0?b.jsxs(b.Fragment,{children:[" · ",Ln(n.afterMs)]}):null]})]}),(n.args!==void 0||n.result!==void 0)&&b.jsxs("div",{className:"mt-2 space-y-1",children:[n.args!==void 0&&b.jsxs("details",{className:"text-xs","data-testid":"transcript-tool-args",children:[b.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"arguments"}),b.jsx("pre",{className:"mt-1 overflow-x-auto rounded bg-background p-2 text-[11px] leading-snug",children:ev(n.args)})]}),n.result!==void 0&&b.jsxs("details",{className:"text-xs","data-testid":"transcript-tool-result",children:[b.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"result"}),b.jsx("pre",{className:"mt-1 overflow-x-auto rounded bg-background p-2 text-[11px] leading-snug",children:ev(n.result)})]})]})]})}function ev(n){if(typeof n=="string")return n;try{return JSON.stringify(n,null,2)}catch{return String(n)}}function $_({turn:n}){if(!n.interrupted)return null;const o=Math.max(0,n.interrupted.atMs-n.startedAtMs);return b.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-1.5 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200","data-testid":"transcript-interruption","data-turn":n.turnId,children:[b.jsx(i_,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),b.jsxs("span",{children:["Interrupted — ",Z_(n.interrupted.reason)," after"," ",b.jsx("span",{className:"font-semibold tabular-nums","data-testid":"transcript-interruption-elapsed",children:Ln(o)})]})]})}function eA({turn:n,onSaveFixture:o,canSaveFixture:r}){const i=n.userTranscript!==void 0||n.userInterim!==void 0,l=n.userTranscript===void 0&&n.userInterim!==void 0,u=n.agentText.length>0,d=n.toolCalls.length>0,h=u&&!n.complete;return b.jsxs("div",{className:"space-y-2","data-testid":"transcript-turn","data-turn":n.turnId,children:[o!==void 0&&b.jsx(F_,{turn:n,onSave:o,blockedReason:r?.(n)}),i&&b.jsxs("div",{"data-testid":l?"transcript-user-interim":"transcript-user",className:Je("max-w-[85%] rounded-lg border px-3 py-2 text-sm leading-relaxed","border-sky-200 bg-sky-50 dark:border-sky-900 dark:bg-sky-950/40",l&&"opacity-60 italic"),children:[b.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:[b.jsxs("span",{children:["You",l?" · listening":""]}),n.userConfidence!==void 0&&!l&&b.jsxs("span",{className:"font-normal normal-case tabular-nums",children:[Math.round(n.userConfidence*100),"% confident"]})]}),l?n.userInterim:n.userTranscript]}),d&&b.jsx("div",{className:"space-y-1.5",children:n.toolCalls.map((p,m)=>b.jsx(W_,{tool:p},p.id??`${p.name??"tool"}-${m}`))}),u&&b.jsxs("div",{"data-testid":"transcript-assistant",className:Je("ml-auto max-w-[85%] rounded-lg border px-3 py-2 text-sm leading-relaxed","border-emerald-200 bg-emerald-50 dark:border-emerald-900 dark:bg-emerald-950/40",h&&"opacity-90"),children:[b.jsxs("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Assistant",h?" · speaking":""]}),n.agentText]}),b.jsx($_,{turn:n})]})}function tA({record:n,onSaveFixture:o,canSaveFixture:r}){const i=w.useRef(null),l=n.turns;return w.useEffect(()=>{const u=i.current;u&&(u.scrollTop=u.scrollHeight)},[l]),b.jsxs(hn,{className:"flex min-h-0 flex-1 flex-col",children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Live transcript"}),b.jsx(gn,{children:"What was heard, what the agent is doing, and where it yielded — straight from the session record."})]}),b.jsx(yn,{className:"flex min-h-0 flex-1 flex-col",children:b.jsx("div",{ref:i,className:"min-h-[420px] flex-1 space-y-3 overflow-y-auto rounded-md border bg-background p-4","data-testid":"transcript-panel",children:l.length===0?b.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"Connect and speak — transcripts, tool calls, and barge-ins appear here as the session progresses."}):l.map(u=>b.jsx(eA,{turn:u,onSaveFixture:o,canSaveFixture:r},u.turnId))})})]})}const nA="syrinx.fixture.v1";function aA(n,o){const r=(n.userTranscript??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").split("-").filter(Boolean).slice(0,8).join("-"),i=o.replace(/[:.]/g,"-").replace(/T/,"_").slice(0,19);return r===""?`turn-${n.turnId}-${i}`:`${r}-${i}`}function oA(n){const{turn:o,config:r,wav:i,sampleRateHz:l,durationMs:u,truncated:d,capturedAtIso:h}=n,p=aA(o,h),m=`${p}.wav`,y={format:nA,turnId:o.turnId,...o.userTranscript!==void 0?{expectedTranscript:o.userTranscript}:{},...o.agentText!==""?{agentText:o.agentText}:{},capturedAtIso:h,audioFile:m,audio:{sampleRateHz:l,channels:1,encoding:"pcm_s16le",durationMs:u,truncated:d},capture:{...r.wsUrl!==void 0?{wsUrl:r.wsUrl}:{},...r.inputSampleRateHz!==void 0?{inputSampleRateHz:r.inputSampleRateHz}:{},...r.outputSampleRateHz!==void 0?{outputSampleRateHz:r.outputSampleRateHz}:{},...r.encoding!==void 0?{encoding:r.encoding}:{},...r.endpointingOwner!==void 0?{endpointingOwner:r.endpointingOwner}:{},...r.targetFrameDurationMs!==void 0?{targetFrameDurationMs:r.targetFrameDurationMs}:{}},...o.timings!==void 0?{observedTimings:o.timings}:{}};return{baseName:p,wavFileName:m,jsonFileName:`${p}.json`,wav:i,json:`${JSON.stringify(y,null,2)}
171
+ `,sidecar:y}}function rA(n,o){if(!o)return"No recorded audio for this turn — typed turns have none, and the oldest turns' audio is dropped to bound memory.";if(n.userTranscript===void 0)return"This turn was never transcribed, so there is nothing for a replay to assert against."}function tv(n,o){const r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=o,document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>{URL.revokeObjectURL(r)},0)}function sA(n){tv(new Blob([n.wav],{type:"audio/wav"}),n.wavFileName),tv(new Blob([n.json],{type:"application/json"}),n.jsonFileName)}const oa=new Uint8Array([83,89,82,88,65,49,10]);function iA(n){if(n.channels!==1)throw new Error("audio must be mono");if(!Number.isInteger(n.sampleRateHz)||n.sampleRateHz<=0)throw new Error("sampleRateHz must be a positive integer")}function lA(n,o){if(n.encoding==="opus"){if(o.byteLength===0)throw new Error("opus payload must not be empty");return}if(n.encoding==="mulaw"){if(o.byteLength===0)throw new Error("mulaw payload must not be empty");return}if(o.byteLength%2!==0)throw new Error("PCM16 payload must contain an even number of bytes")}function zd(n,o){_b(n,o);const r=new TextEncoder().encode(JSON.stringify(n)),i=new Uint8Array(oa.byteLength+4+r.byteLength+o.byteLength);return i.set(oa,0),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(oa.byteLength,r.byteLength,!0),i.set(r,oa.byteLength+4),i.set(o,oa.byteLength+4+r.byteLength),i}function cA(n){if(!Mb(n))throw new Error("Syrinx binary audio envelope magic is missing");const o=oa.byteLength;if(n.byteLength<o+4)throw new Error("Syrinx binary audio envelope is truncated");const i=new DataView(n.buffer,n.byteOffset,n.byteLength).getUint32(o,!0),l=o+4,u=l+i;if(i<=0||u>n.byteLength)throw new Error("Syrinx binary audio envelope has an invalid header length");const d=JSON.parse(new TextDecoder().decode(n.subarray(l,u)));if(!d||typeof d!="object")throw new Error("Syrinx binary audio envelope header must be an object");const h=d,p=n.subarray(u);return _b(h,p),{header:h,audio:p}}function Mb(n){if(n.byteLength<oa.byteLength)return!1;for(let o=0;o<oa.byteLength;o+=1)if(n[o]!==oa[o])return!1;return!0}function _b(n,o){if(n.type!=="audio")throw new Error("Syrinx binary audio envelope type must be audio");if(!uA(n.sampleRateHz))throw new Error("Syrinx binary audio envelope sampleRateHz must be a positive integer");if(n.encoding&&n.encoding!=="pcm_s16le"&&n.encoding!=="opus")throw new Error(`Unsupported Syrinx binary audio encoding: ${n.encoding}`);if(n.sequence!==void 0&&!If(n.sequence))throw new Error("Syrinx binary audio envelope sequence must be a non-negative integer");if(n.durationMs!==void 0&&!If(n.durationMs))throw new Error("Syrinx binary audio envelope durationMs must be a non-negative integer");if(n.byteLength!==void 0&&!If(n.byteLength))throw new Error("Syrinx binary audio envelope byteLength must be a non-negative integer");if(n.byteLength!==void 0&&n.byteLength!==o.byteLength)throw new Error("Syrinx binary audio envelope byteLength does not match payload");const r={encoding:n.encoding==="opus"?"opus":"pcm_s16le",sampleRateHz:n.sampleRateHz,channels:n.channels??1};if(iA(r),lA(r,o),r.encoding!=="opus"&&n.durationMs!==void 0){const i=Math.round(o.byteLength/2/n.sampleRateHz*1e3);if(Math.abs(n.durationMs-i)>1)throw new Error("Syrinx binary audio envelope durationMs does not match payload and sampleRateHz")}}function uA(n){return typeof n=="number"&&Number.isInteger(n)&&n>0}function If(n){return typeof n=="number"&&Number.isInteger(n)&&n>=0}function ud(n){if(n.byteLength%2!==0)throw new Error("PCM16 audio payload must contain an even number of bytes");const o=new DataView(n.buffer,n.byteOffset,n.byteLength),r=new Int16Array(n.byteLength/2);for(let i=0;i<r.length;i+=1)r[i]=o.getInt16(i*2,!0);return r}function Ul(n){const o=new Uint8Array(n.byteLength),r=new DataView(o.buffer);for(let i=0;i<n.length;i+=1)r.setInt16(i*2,n[i],!0);return o}const Os=127;function fA(n){const o=Os-1,r=new Float64Array(Os);let i=0;for(let l=0;l<Os;l+=1){const u=l-o/2,d=u===0?2*n:Math.sin(2*Math.PI*n*u)/(Math.PI*u),h=.5-.5*Math.cos(2*Math.PI*l/o);r[l]=d*h,i+=r[l]}for(let l=0;l<Os;l+=1)r[l]/=i;return r}const nv=new Map;function dA(n){const o=Math.round(n*1e6);let r=nv.get(o);return r===void 0&&(r=fA(n),nv.set(o,r)),r}function hA(n,o,r,i){const l=i.length,u=Math.floor(l/2),d=new Int16Array(o);for(let h=0;h<o;h+=1){const p=Math.round(h*r);let m=0;for(let y=0;y<l;y+=1){const g=p-y+u;g>=0&&g<n.length&&(m+=i[y]*n[g])}d[h]=Math.max(-32768,Math.min(32767,Math.round(m)))}return d}function mA(n,o,r){const i=new Int16Array(o);for(let l=0;l<o;l+=1){const u=l*r,d=Math.floor(u),h=Math.min(n.length-1,d+1),p=u-d;i[l]=Math.round(n[d]*(1-p)+n[h]*p)}return i}function av(n,o,r){return Math.max(1,Math.round(n*r/o))}class pA{history=new Int16Array(0);ratio;fir;sourceSampleRateHz;targetSampleRateHz;constructor(o,r){if(this.sourceSampleRateHz=o,this.targetSampleRateHz=r,this.ratio=o/r,this.ratio>1){const i=.45*r/o;this.fir=dA(i)}else this.fir=null}process(o){if(o.length===0)return new Int16Array(0);if(this.sourceSampleRateHz===this.targetSampleRateHz)return o;if(this.ratio<=1||this.fir===null){const m=av(o.length,this.sourceSampleRateHz,this.targetSampleRateHz);return mA(o,m,this.ratio)}const r=this.history.length,i=new Int16Array(r+o.length);i.set(this.history,0),i.set(o,r);const l=av(i.length,this.sourceSampleRateHz,this.targetSampleRateHz),u=hA(i,l,this.ratio,this.fir);let d=0;if(r>0)for(;d<u.length&&!(Math.round(d*this.ratio)>=r);)d+=1;const h=u.subarray(d),p=Math.min(Os-1,i.length);return this.history=i.subarray(i.length-p),h}}function ov(n,o,r,i){if(o.length===0)return new Int16Array(0);if(r===i)return o;const l=`${String(r)}->${String(i)}`;let u=n.get(l);return u||(u=new pA(r,i),n.set(l,u)),u.process(o)}function Ld(n,o){const r=fd(o.fromSampleRateHz,"fromSampleRateHz"),i=fd(o.toSampleRateHz,"toSampleRateHz");if(r===i)return n;const l=Math.max(1,Math.round(n.length*i/r)),u=new Float32Array(l),d=r/i;for(let h=0;h<l;h+=1){const p=h*d,m=Math.floor(p),y=Math.min(n.length-1,m+1),g=p-m;u[h]=n[m]*(1-g)+n[y]*g}return u}function kd(n){const o=new Int16Array(n.length);for(let r=0;r<n.length;r+=1){const i=Math.max(-1,Math.min(1,n[r]));o[r]=i<0?Math.round(i*32768):Math.round(i*32767)}return o}function gA(n,o){const r=fd(o.toSampleRateHz,"toSampleRateHz"),i=Ld(n,o),l=kd(i),u=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);return zd({type:"audio",contextId:o.contextId,sampleRateHz:r,sequence:o.sequence,encoding:"pcm_s16le",channels:1,byteLength:u.byteLength,durationMs:Math.round(l.length/r*1e3)},u)}function yA(n,o=null){const r=ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n);if(!Mb(r))return{data:Pf(r)};const i=cA(r);if(i.header.encoding==="opus"){if(!o)return{data:new ArrayBuffer(0),metadata:i.header};const l=i.header.sampleRateHz,u=o.decodeOpusFrame(i.audio),d=Ul(u);return{data:Pf(d),metadata:{...i.header,encoding:"pcm_s16le",sampleRateHz:l,byteLength:d.byteLength}}}return{data:Pf(i.audio),metadata:i.header}}function fd(n,o){if(!Number.isFinite(n)||n<=0)throw new Error(`${o} must be a positive sample rate`);return n}function Pf(n){const o=new Uint8Array(n.byteLength);return o.set(n),o.buffer}class rv{context;scheduledFrames=new Set;nextScheduledTime=0;targetBufferMs;sampleRateHz;contextIds=new Set;lastEnqueuedContextId=null;playoutWindow=new Map;get isPlayingOut(){return this.scheduledFrames.size>0}playedOutMs(o){const r=this.playoutWindow.get(o);if(!r)return 0;const i=(this.context.currentTime-r.startTime)*1e3,l=(r.endTime-r.startTime)*1e3;return Math.max(0,Math.min(i,l))}isPlayoutComplete(o){const r=this.playoutWindow.get(o);return r?this.context.currentTime>=r.endTime:!1}get activeContextId(){return this.scheduledFrames.size>0?this.lastEnqueuedContextId:null}constructor(o,r){this.context=o,this.sampleRateHz=r.sampleRateHz,this.targetBufferMs=r.targetBufferMs??100}enqueue(o,r){try{const i=new Int16Array(o);if(i.length===0)return;const l=new Float32Array(i.length);for(let m=0;m<i.length;m++)l[m]=i[m]/(i[m]<0?32768:32767);const u=this.context.createBuffer(1,l.length,this.sampleRateHz);u.copyToChannel(l,0);const d=this.context.currentTime;(this.nextScheduledTime===0||this.nextScheduledTime<d)&&(this.nextScheduledTime=d+this.targetBufferMs/1e3);const h={buffer:u,scheduledTime:this.nextScheduledTime,contextId:r,source:null};if(this.scheduledFrames.add(h),r){this.contextIds.add(r),this.lastEnqueuedContextId=r;const m=this.playoutWindow.get(r);m?m.endTime=this.nextScheduledTime+u.duration:this.playoutWindow.set(r,{startTime:this.nextScheduledTime,endTime:this.nextScheduledTime+u.duration})}const p=this.context.createBufferSource();p.buffer=u,p.connect(this.context.destination),h.source=p,p.start(h.scheduledTime),p.onended=()=>{this.scheduledFrames.delete(h),h.source=null},this.nextScheduledTime+=u.duration}catch(i){console.warn("AudioJitterBuffer: Failed to enqueue audio frame:",i)}}clear(o){if(o){for(const r of this.scheduledFrames)if(r.contextId===o){if(r.source)try{r.source.stop()}catch{}this.scheduledFrames.delete(r)}this.contextIds.delete(o),this.playoutWindow.delete(o),this.lastEnqueuedContextId===o&&(this.lastEnqueuedContextId=null),this.recomputeNextScheduledTime()}else{for(const r of this.scheduledFrames)if(r.source)try{r.source.stop()}catch{}this.scheduledFrames.clear(),this.contextIds.clear(),this.lastEnqueuedContextId=null,this.nextScheduledTime=0}}get bufferedDurationMs(){if(this.scheduledFrames.size===0)return 0;const o=this.context.currentTime;return Math.max(0,(this.nextScheduledTime-o)*1e3)}get activeContextIds(){return[...this.contextIds]}recomputeNextScheduledTime(){if(this.scheduledFrames.size===0){this.nextScheduledTime=0;return}let o=0;for(const r of this.scheduledFrames){const i=r.scheduledTime+r.buffer.duration;i>o&&(o=i)}this.nextScheduledTime=o}}const vA="modulepreload",bA=function(n){return"/"+n},sv={},xA=function(o,r,i){let l=Promise.resolve();if(r&&r.length>0){let d=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=h?.nonce||h?.getAttribute("nonce");l=d(r.map(m=>{if(m=bA(m),m in sv)return;sv[m]=!0;const y=m.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const S=document.createElement("link");if(S.rel=y?"stylesheet":vA,y||(S.as="script"),S.crossOrigin="",S.href=m,p&&S.setAttribute("nonce",p),document.head.appendChild(S),y)return new Promise((x,T)=>{S.addEventListener("load",x),S.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return l.then(d=>{for(const h of d||[])h.status==="rejected"&&u(h.reason);return o().catch(u)})},Ab=48e3,Nb=20;let iv=null;function Ob(){return iv??=xA(()=>import("./lib-CP0Q61Ui.js"),[]),iv}async function SA(n=Ab){const{Encoder:o,Decoder:r}=await Ob(),i=new o({channels:1,sample_rate:n,application:"voip"}),l=new r({channels:1,sample_rate:n}),u=Math.max(1,Math.round(n*Nb/1e3));let d=new Int16Array(0);return{sampleRateHz:n,frameSamples:u,reset(){d=new Int16Array(0)},decodeOpusFrame(h){return ud(l.decode(h))},encodePcm16Frame(h,p=!1){const m=new Int16Array(d.length+h.length);m.set(d),m.set(h,d.length);const y=Math.floor(m.length/u),g=[];for(let T=0;T<y;T+=1){const E=m.subarray(T*u,(T+1)*u);g.push(i.encode(Ul(E)))}const S=y*u,x=m.subarray(S);if(p&&x.length>0){const T=new Int16Array(u);T.set(x),g.push(i.encode(Ul(T))),d=new Int16Array(0)}else d=new Int16Array(x);return g}}}function wA(n,o){return n?.includes("opus")?"opus":"pcm_s16le"}function RA(n,o,r){return zd({type:"audio",contextId:r.contextId,sampleRateHz:o,sequence:r.sequence,encoding:"opus",channels:1,byteLength:n.byteLength,durationMs:Nb},n)}function EA(n,o,r){return zd({type:"audio",contextId:r.contextId,sampleRateHz:o,sequence:r.sequence,encoding:"pcm_s16le",channels:1,byteLength:n.byteLength,durationMs:Math.round(n.byteLength/2/o*1e3)},n)}class TA{constructor(o={}){this.options=o}options;socket=null;pendingUrl=null;handlers={};get connected(){return this.socket?.readyState===WebSocket.OPEN}setHandlers(o){this.handlers=o}connect(o){const r=this.socket?.readyState;if(r===WebSocket.OPEN)return;if(r===WebSocket.CLOSING){this.pendingUrl=o;const l=this.socket,u=()=>{if(l.removeEventListener("close",u),this.socket!==l)return;const d=this.pendingUrl;this.pendingUrl=null,this.socket=null,d&&this.connect(d)};l.addEventListener("close",u);return}if(r===WebSocket.CONNECTING)return;this.pendingUrl=null;const i=new WebSocket(o,this.options.protocols);i.binaryType="arraybuffer",this.socket=i,i.addEventListener("open",()=>{this.handlers.onOpen?.()}),i.addEventListener("close",l=>{this.handlers.onClose?.(l.code,l.reason)}),i.addEventListener("error",l=>{this.handlers.onError?.(l)}),i.addEventListener("message",l=>{this.dispatchMessage(l.data)})}disconnect(o,r){this.pendingUrl=null,this.socket?.close(o,r)}sendAudio(o){const r=this.requireOpenSocket(),i=o instanceof Uint8Array?o:new Uint8Array(o);r.send(i)}sendJson(o){this.requireOpenSocket().send(JSON.stringify(o))}requireOpenSocket(){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new Error("ClientTransport WebSocket is not open");return this.socket}dispatchMessage(o){if(typeof o=="string"){this.handlers.onMessage?.(o);return}if(o instanceof Blob){o.arrayBuffer().then(r=>{this.handlers.onAudio?.(r)}).catch(r=>{this.handlers.onError?.(r instanceof Error?r:new Error(String(r)))});return}o instanceof ArrayBuffer&&this.handlers.onAudio?.(o)}}const CA=10,MA=1e3,_A=3e4,AA=5e3,NA=3,OA=1e4,jA=new Set(["provider_stt","smart_turn","timer","text"]),zA=new Set(["end_of_speech","force_finalized","typed"]);class LA{constructor(o){this.options=o,this.transport=o.transport??new TA({protocols:o.protocols}),this.transport.setHandlers({onOpen:()=>this.handleTransportOpen(),onClose:(r,i)=>this.handleTransportClose(r,i),onError:r=>this.emit({type:"error",error:r}),onMessage:r=>this.handleTransportMessage(r),onAudio:r=>this.handleTransportAudio(r)}),o.audioContext&&(this.jitterBuffer=new rv(o.audioContext,{sampleRateHz:this.outputSampleRateHz,...o.jitterBuffer}))}options;transport;handlers=new Set;audioSequence=0;currentSessionId=null;cleanClose=!1;reconnectAttempt=0;quickFailures=0;openedAt=0;reconnectTimer=null;keepaliveTimer=null;playoutProgressTimer=null;lastProgressContextId=null;jitterBuffer=null;outputSampleRateHz=16e3;wireCodec="pcm_s16le";inputSampleRateHz=16e3;opusCodec=null;opusLoadFailed=!1;codecNegotiation=null;uplinkCodecDecided=!1;pendingUplink=[];streamingResamplers=new Map;bargeInNoiseFloorRms=.005;bargeInSpeechMs=0;bargeInInterruptSent=!1;get connected(){return this.transport.connected}get sessionId(){return this.currentSessionId}on(o){return this.handlers.add(o),()=>{this.handlers.delete(o)}}connect(){this.transport.connected||(this.cleanClose=!1,this.cancelReconnect(),Ob().catch(()=>{}),this.openTransport())}close(o,r){this.cleanClose=!0,this.cancelReconnect(),this.stopKeepalive(),this.jitterBuffer?.clear(),this.transport.disconnect(o,r)}sendAudioPcm(o,r,i={}){const l=ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o);if(l.byteLength%2!==0)throw new Error("PCM16 audio payload must contain an even number of bytes");const u=lv(r);i.sequence!==void 0&&this.assertAudioSequenceCanAdvance(i.sequence),this.observeUplinkForBargeIn(HA(l),l.byteLength/2/u*1e3),this.scheduleUplink(()=>{for(const d of this.encodeUplinkPcm(l,u,i))this.requireOpenTransport().sendAudio(d)})}sendAudioBase64(o,r,i={}){this.sendJson({type:"audio",audio:o,sampleRateHz:r,contextId:i.contextId,sequence:this.nextAudioSequence(i.sequence)})}sendFloat32Audio(o,r){if(r.sequence!==void 0&&this.assertAudioSequenceCanAdvance(r.sequence),this.observeUplinkForBargeIn(IA(o),o.length/r.fromSampleRateHz*1e3),this.wireCodec==="opus"&&this.opusCodec){const l=lv(r.toSampleRateHz),u=Ld(o,r),d=kd(u),h=new Uint8Array(d.buffer,d.byteOffset,d.byteLength);this.scheduleUplink(()=>{for(const p of this.encodeUplinkPcm(h,l,r))this.requireOpenTransport().sendAudio(p)});return}const i=this.nextAudioSequence(r.sequence);this.scheduleUplink(()=>{this.requireOpenTransport().sendAudio(gA(o,{...r,sequence:i}))})}sendText(o){this.sendJson({type:"text",text:o})}observeUplinkForBargeIn(o,r){const i=this.options.bargeIn;if(i===!1)return;const l=i?.minSpeechMs??280,u=i?.thresholdFactor??3,d=i?.minRms??.015,h=this.jitterBuffer?.isPlayingOut??!1;h||(this.bargeInSpeechMs=0,this.bargeInInterruptSent=!1);const p=Math.max(d,this.bargeInNoiseFloorRms*u);if(o<p){this.bargeInNoiseFloorRms=this.bargeInNoiseFloorRms*.95+o*.05,this.bargeInSpeechMs=0;return}if(!h||this.bargeInInterruptSent||(this.bargeInSpeechMs+=r,this.bargeInSpeechMs<l))return;this.bargeInInterruptSent=!0;const m=this.jitterBuffer?.activeContextId??void 0;this.sendJson({type:"client_interrupt",...m?{assistantContextId:m}:{}})}sendJson(o){this.transport.sendJson(o)}openTransport(){this.uplinkCodecDecided=!1;const o=this.currentSessionId!==null?kA(this.options.url,this.currentSessionId):this.options.url;this.transport.connect(o)}handleTransportOpen(){if(this.openedAt=Date.now(),this.reconnectAttempt>0){const o=this.reconnectAttempt;this.reconnectAttempt=0,this.emit({type:"reconnected",attempt:o})}else this.emit({type:"open"});this.startKeepalive(),this.startPlayoutProgressReporting()}handleTransportClose(o,r){if(this.stopKeepalive(),this.stopPlayoutProgressReporting(),this.cleanClose||this.jitterBuffer?.clear(),this.cleanClose){this.emit({type:"close",code:o,reason:r});return}this.scheduleReconnect(o,r)}handleTransportMessage(o){this.handleJsonMessage(o)}handleTransportAudio(o){this.handleBinaryMessage(o)}scheduleReconnect(o,r){const i=this.options.reconnect;if(i===!1){this.emit({type:"close",code:o,reason:r});return}const l=i?.maxAttempts??CA,u=i?.baseDelayMs??MA,d=i?.maxDelayMs??_A,h=i?.minStableMs??AA,p=i?.maxQuickFailures??NA,m=this.openedAt>0,y=m&&Date.now()-this.openedAt>=h;if(this.openedAt=0,y)this.quickFailures=0;else if(m&&(this.quickFailures+=1,this.quickFailures>=p)){this.quickFailures=0,this.emit({type:"close",code:o,reason:r});return}if(this.reconnectAttempt+=1,l>0&&this.reconnectAttempt>l){this.emit({type:"close",code:o,reason:r});return}const g=Math.min(u*Math.pow(2,this.reconnectAttempt-1),d),S=g*.2*Math.random(),x=Math.round(g+S);this.emit({type:"reconnecting",attempt:this.reconnectAttempt,delayMs:x}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,!this.cleanClose&&this.openTransport()},x)}cancelReconnect(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectAttempt=0,this.quickFailures=0,this.openedAt=0}startKeepalive(){this.stopKeepalive();const o=this.options.keepaliveIntervalMs;if(o===!1)return;const r=typeof o=="number"&&o>0?o:OA;this.keepaliveTimer=setInterval(()=>{if(this.transport.connected)try{this.transport.sendJson({type:"ping"})}catch(i){this.stopKeepalive(),this.emit({type:"error",error:i instanceof Error?i:new Error(String(i))})}else this.stopKeepalive()},r)}stopKeepalive(){this.keepaliveTimer!==null&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null)}startPlayoutProgressReporting(){this.stopPlayoutProgressReporting(),this.jitterBuffer&&(this.playoutProgressTimer=setInterval(()=>{const o=this.jitterBuffer;if(!o||!this.transport.connected)return;const r=o.activeContextId??this.lastProgressContextId;if(!r)return;const i=o.isPlayoutComplete(r);try{this.sendJson({type:"playout_progress",contextId:r,playedOutMs:Math.round(o.playedOutMs(r)),complete:i})}catch{this.stopPlayoutProgressReporting();return}this.lastProgressContextId=i?null:r},200))}stopPlayoutProgressReporting(){this.playoutProgressTimer!==null&&(clearInterval(this.playoutProgressTimer),this.playoutProgressTimer=null),this.lastProgressContextId=null}handleJsonMessage(o){if(typeof o=="string")try{const r=JSON.parse(o);if(Dd(r)&&typeof r.type=="string"&&r.type.startsWith("cf_agent"))return;const i=DA(r);i.type==="ready"&&(i.sessionId!==void 0&&(this.currentSessionId=i.sessionId),i.audio?.outputSampleRateHz&&i.audio.outputSampleRateHz!==this.outputSampleRateHz&&(this.outputSampleRateHz=i.audio.outputSampleRateHz,this.options.audioContext&&(this.jitterBuffer=new rv(this.options.audioContext,{sampleRateHz:this.outputSampleRateHz,...this.options.jitterBuffer}))),i.audio?.supportedInputCodecs?.includes("opus")&&!this.opusLoadFailed?this.codecNegotiation=this.negotiateWireCodec(i.audio).finally(()=>{this.codecNegotiation=null,this.flushPendingUplink()}):this.negotiateWireCodec(i.audio).finally(()=>{this.flushPendingUplink()})),(i.type==="audio_clear"||i.type==="agent_interrupted")&&this.jitterBuffer&&this.jitterBuffer.clear(i.turnId),this.emit({type:"message",message:i}),i.type==="ready"&&i.resumed===!0&&this.emit({type:"resumed"})}catch(r){this.emit({type:"error",error:r instanceof Error?r:new Error(String(r))})}}handleBinaryMessage(o){try{const r=yA(o,this.opusCodec);if(r.data.byteLength===0)return;let i=r.data;const l=r.metadata?.sampleRateHz;if(l!==void 0&&l!==this.outputSampleRateHz){const u=ud(new Uint8Array(i)),d=Ul(ov(this.streamingResamplers,u,l,this.outputSampleRateHz)),h=new Uint8Array(d.byteLength);h.set(d),i=h.buffer}this.handleAudioData(i,r.metadata)}catch(r){this.emit({type:"error",error:r instanceof Error?r:new Error(String(r))})}}scheduleUplink(o){if(!this.uplinkCodecDecided||this.codecNegotiation){this.pendingUplink.push(o);return}o()}flushPendingUplink(){this.uplinkCodecDecided=!0;const o=this.pendingUplink;this.pendingUplink=[];for(const r of o)r()}async negotiateWireCodec(o){if(!o)return;this.inputSampleRateHz=o.inputSampleRateHz;const r=o.supportedInputCodecs;if(!r?.includes("opus")||this.opusLoadFailed){this.wireCodec="pcm_s16le",this.reportDownlinkCodecCapability();return}try{this.opusCodec=await SA(Ab),this.wireCodec=wA(r,!0)}catch{this.opusLoadFailed=!0,this.opusCodec=null,this.wireCodec="pcm_s16le"}this.reportDownlinkCodecCapability()}reportDownlinkCodecCapability(){if(!this.transport.connected)return;const o=this.opusCodec?"opus":"pcm_s16le";this.sendJson({type:"codec_capability",downlinkEncoding:o})}encodeUplinkPcm(o,r,i){if(this.wireCodec==="opus"&&this.opusCodec){const u=[];let d=i.sequence;const h=ud(o),p=r===this.opusCodec.sampleRateHz?h:ov(this.streamingResamplers,h,r,this.opusCodec.sampleRateHz);for(const m of this.opusCodec.encodePcm16Frame(p,!0)){const y=this.nextAudioSequence(d);u.push(RA(m,this.opusCodec.sampleRateHz,{...i,sequence:y})),d=y}return u}const l=this.nextAudioSequence(i.sequence);return[EA(o,r,{...i,sequence:l})]}requireOpenTransport(){if(!this.transport.connected)throw new Error("SyrinxBrowserClient transport is not connected");return this.transport}assertAudioSequenceCanAdvance(o){if(!Number.isInteger(o)||o<0)throw new Error("audio sequence must be a non-negative integer");if(o<=this.audioSequence)throw new Error(`audio sequence must increase monotonically: ${String(this.audioSequence)} -> ${String(o)}`)}nextAudioSequence(o){if(o!==void 0){if(!Number.isInteger(o)||o<0)throw new Error("audio sequence must be a non-negative integer");if(o<=this.audioSequence)throw new Error(`audio sequence must increase monotonically: ${String(this.audioSequence)} -> ${String(o)}`);return this.audioSequence=Math.max(this.audioSequence,o),o}return this.audioSequence+=1,this.audioSequence}handleAudioData(o,r){this.jitterBuffer&&this.jitterBuffer.enqueue(o,r?.contextId),this.emit({type:"audio",data:o,metadata:r})}emit(o){for(const r of this.handlers)r(o)}}function kA(n,o){try{const r=new URL(n);return r.searchParams.set("sessionId",o),r.toString()}catch{const r=n.includes("?")?"&":"?";return`${n}${r}sessionId=${encodeURIComponent(o)}`}}function lv(n){if(!Number.isInteger(n)||n<=0)throw new Error("sampleRateHz must be a positive integer");return n}function DA(n){if(!Dd(n))throw new Error("Syrinx websocket message must be an object");const o=xr(n.type,"Syrinx websocket message type");if(o==="ready")return{type:o,sessionId:dt(n.sessionId,"ready.sessionId"),resumed:jb(n.resumed,"ready.resumed"),resumeWindowMs:un(n.resumeWindowMs,"ready.resumeWindowMs"),audio:BA(n.audio)};if(o==="speech_started"||o==="speech_ended"||o==="agent_end"||o==="tts_end")return{type:o,turnId:dt(n.turnId,`${o}.turnId`)};if(o==="stt_chunk"||o==="stt_output")return{type:o,turnId:dt(n.turnId,`${o}.turnId`),transcript:xr(n.transcript,`${o}.transcript`),...o==="stt_output"?{confidence:un(n.confidence,"stt_output.confidence")}:{}};if(o==="agent_chunk")return{type:o,turnId:dt(n.turnId,"agent_chunk.turnId"),text:xr(n.text,"agent_chunk.text")};if(o==="agent_tool_call")return{type:o,turnId:dt(n.turnId,"agent_tool_call.turnId"),id:dt(n.id,"agent_tool_call.id"),name:xr(n.name,"agent_tool_call.name"),args:n.args};if(o==="agent_tool_result")return{type:o,turnId:dt(n.turnId,"agent_tool_result.turnId"),id:dt(n.id,"agent_tool_result.id"),result:n.result};if(o==="tool_call_started"||o==="tool_call_delayed"||o==="tool_call_complete"||o==="tool_call_failed")return{type:o,turnId:dt(n.turnId,`${o}.turnId`),toolId:dt(n.toolId,`${o}.toolId`),toolName:dt(n.toolName,`${o}.toolName`),...o==="tool_call_delayed"?{afterMs:un(n.afterMs,"tool_call_delayed.afterMs")}:{}};if(o==="agent_interrupted"||o==="audio_clear")return{type:o,turnId:dt(n.turnId,`${o}.turnId`),reason:dt(n.reason,`${o}.reason`)};if(o==="tts_chunk")return{type:o,turnId:dt(n.turnId,"tts_chunk.turnId"),sequence:qf(n.sequence,"tts_chunk.sequence"),sampleRateHz:dd(n.sampleRateHz,"tts_chunk.sampleRateHz"),encoding:Hl(n.encoding,"pcm_s16le","tts_chunk.encoding"),channels:Hl(n.channels,1,"tts_chunk.channels"),byteLength:qf(n.byteLength,"tts_chunk.byteLength"),durationMs:qf(n.durationMs,"tts_chunk.durationMs")};if(o==="metrics"){const r=cv(n.endpointingOwner,jA),i=cv(n.endpointingReason,zA);return{type:o,turnId:dt(n.turnId,"metrics.turnId"),correlationId:dt(n.correlationId,"metrics.correlationId"),speechEndMs:un(n.speechEndMs,"metrics.speechEndMs"),textReadyMs:un(n.textReadyMs,"metrics.textReadyMs"),firstAudioByteMs:un(n.firstAudioByteMs,"metrics.firstAudioByteMs"),firstAudioPlayedMs:un(n.firstAudioPlayedMs,"metrics.firstAudioPlayedMs"),lastAudioPlayedMs:un(n.lastAudioPlayedMs,"metrics.lastAudioPlayedMs"),sttMs:un(n.sttMs,"metrics.sttMs"),llmTTFTMs:un(n.llmTTFTMs,"metrics.llmTTFTMs"),ttsTTFBMs:un(n.ttsTTFBMs,"metrics.ttsTTFBMs"),e2eMs:un(n.e2eMs,"metrics.e2eMs"),...r!==void 0?{endpointingOwner:r}:{},...i!==void 0?{endpointingReason:i}:{}}}if(o==="error")return{type:o,component:dt(n.component,"error.component"),category:dt(n.category,"error.category"),message:xr(n.message,"error.message")};if(o==="turn_complete")return{type:o,turnId:dt(n.turnId,"turn_complete.turnId"),transcript:typeof n.transcript=="string"?n.transcript:""};throw new Error(`Unsupported Syrinx websocket message type: ${o}`)}function BA(n){if(n===void 0)return;if(!Dd(n))throw new Error("ready.audio must be an object");const o=n.encoding;if(o!=="pcm_s16le"&&o!=="opus")throw new Error("ready.audio.encoding must be pcm_s16le or opus");return{inputSampleRateHz:dd(n.inputSampleRateHz,"ready.audio.inputSampleRateHz"),outputSampleRateHz:dd(n.outputSampleRateHz,"ready.audio.outputSampleRateHz"),encoding:o,supportedInputCodecs:UA(n.supportedInputCodecs),channels:Hl(n.channels,1,"ready.audio.channels"),binaryEnvelope:n.binaryEnvelope===void 0?void 0:Hl(n.binaryEnvelope,"syrinx.audio.v1","ready.audio.binaryEnvelope"),rawBinaryInput:jb(n.rawBinaryInput,"ready.audio.rawBinaryInput")}}function UA(n){if(n!==void 0){if(!Array.isArray(n)||n.some(o=>typeof o!="string"))throw new Error("ready.audio.supportedInputCodecs must be an array of strings");return n}}function Dd(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function xr(n,o){if(typeof n!="string"||n.length===0)throw new Error(`${o} must be a non-empty string`);return n}function HA(n){const o=Math.floor(n.byteLength/2);if(o===0)return 0;const r=new Int16Array(n.buffer,n.byteOffset,o);let i=0;for(const l of r){const u=l/32768;i+=u*u}return Math.sqrt(i/o)}function IA(n){if(n.length===0)return 0;let o=0;for(const r of n)o+=r*r;return Math.sqrt(o/n.length)}function dt(n,o){if(!(n==null||n===""))return xr(n,o)}function dd(n,o){if(typeof n!="number"||!Number.isInteger(n)||n<=0)throw new Error(`${o} must be a positive integer`);return n}function qf(n,o){if(typeof n!="number"||!Number.isInteger(n)||n<0)throw new Error(`${o} must be a non-negative integer`);return n}function un(n,o){if(n!==void 0){if(typeof n!="number"||!Number.isFinite(n))throw new Error(`${o} must be a finite number`);return n}}function jb(n,o){if(n!==void 0){if(typeof n!="boolean")throw new Error(`${o} must be a boolean`);return n}}function cv(n,o){return typeof n=="string"&&o.has(n)?n:void 0}function Hl(n,o,r){if(n!==o)throw new Error(`${r} must be ${String(o)}`);return o}const PA={maxTurns:50,maxEventsPerTurn:500};function uv(n={}){return{config:n,turns:[],droppedTurns:0,sessionEvents:[]}}const qA=n=>typeof n.turnId=="string"?n.turnId:void 0;function VA(n,o){return{turnId:n,startedAtMs:o,events:[],agentText:"",toolCalls:[],ttsAudioBytes:0,errors:[],complete:!1,droppedEvents:0}}function YA(n,o,r){return n.events.length<r.maxEventsPerTurn?{...n,events:[...n.events,o]}:{...n,events:[...n.events.slice(1),o],droppedEvents:n.droppedEvents+1}}function Vf(n,o,r){const i=Object.fromEntries(Object.entries(r).filter(([,d])=>d!==void 0)),l=o===void 0?-1:n.findIndex(d=>d.id===o);if(l===-1)return[...n,{...i,id:o}];const u=[...n];return u[l]={...u[l],...i},u}function GA(n,o,r,i=PA){const l={atMs:r,message:o},u=typeof o?.type=="string"?o.type:"";if(u==="ready"){const g=o;return{...n,config:{...n.config,sessionId:g.sessionId??n.config.sessionId,resumeWindowMs:g.resumeWindowMs??n.config.resumeWindowMs,inputSampleRateHz:g.audio?.inputSampleRateHz??n.config.inputSampleRateHz,outputSampleRateHz:g.audio?.outputSampleRateHz??n.config.outputSampleRateHz,encoding:g.audio?.encoding??n.config.encoding,binaryEnvelope:g.audio?.binaryEnvelope??n.config.binaryEnvelope,rawBinaryInput:g.audio?.rawBinaryInput??n.config.rawBinaryInput,targetFrameDurationMs:g.audio?.targetFrameDurationMs??n.config.targetFrameDurationMs},sessionEvents:[...n.sessionEvents,l]}}const d=qA(o);if(d===void 0)return{...n,sessionEvents:[...n.sessionEvents,l]};let h=n.turns,p=n.droppedTurns,m=h.find(g=>g.turnId===d);if(!m){m=VA(d,r);let g=[...h,m];g.length>i.maxTurns&&(g=g.slice(g.length-i.maxTurns),p+=1),h=g}let y=YA(m,l,i);switch(u){case"stt_chunk":y={...y,userInterim:o.transcript};break;case"stt_output":{const g=o;y={...y,userTranscript:g.transcript,userInterim:void 0,userConfidence:g.confidence};break}case"agent_chunk":y={...y,agentText:y.agentText+o.text};break;case"agent_tool_call":{const g=o;y={...y,toolCalls:Vf(y.toolCalls,g.id,{name:g.name,args:g.args})};break}case"agent_tool_result":{const g=o;y={...y,toolCalls:Vf(y.toolCalls,g.id,{result:g.result})};break}case"tool_call_started":case"tool_call_delayed":case"tool_call_complete":case"tool_call_failed":{const g=o,S=u.slice(10);y={...y,toolCalls:Vf(y.toolCalls,g.toolId,{name:g.toolName,phase:S,afterMs:g.afterMs})};break}case"tts_chunk":y={...y,ttsAudioBytes:y.ttsAudioBytes+(o.byteLength??0)};break;case"agent_interrupted":y={...y,interrupted:{atMs:r,reason:o.reason}};break;case"turn_complete":y={...y,complete:!0,userTranscript:o.transcript??y.userTranscript};break;case"metrics":{const{type:g,turnId:S,correlationId:x,endpointingOwner:T,endpointingReason:E,...C}=o,M=typeof T=="string"?T:y.endpointingOwner,_=typeof E=="string"?E:y.endpointingReason;y={...y,timings:C,...M!==void 0?{endpointingOwner:M}:{},..._!==void 0?{endpointingReason:_}:{}};break}case"error":{const g=o;y={...y,errors:[...y.errors,{atMs:r,component:g.component,category:g.category,message:g.message}]};break}}return{...n,turns:h.map(g=>g.turnId===d?y:g),droppedTurns:p}}const XA={maxTurns:10,preRollMs:300,maxTurnMs:6e4},QA=16e3;function FA(n,o){if(!Number.isFinite(o)||o<=0)throw new Error(`encodeWav: invalid sampleRateHz ${String(o)}`);const r=n.length*2,i=new Uint8Array(44+r),l=new DataView(i.buffer),u=(d,h)=>{for(let p=0;p<h.length;p+=1)i[d+p]=h.charCodeAt(p)};u(0,"RIFF"),l.setUint32(4,36+r,!0),u(8,"WAVE"),u(12,"fmt "),l.setUint32(16,16,!0),l.setUint16(20,1,!0),l.setUint16(22,1,!0),l.setUint32(24,o,!0),l.setUint32(28,o*2,!0),l.setUint16(32,2,!0),l.setUint16(34,16,!0),u(36,"data"),l.setUint32(40,r,!0);for(let d=0;d<n.length;d+=1)l.setInt16(44+d*2,n[d]??0,!0);return i}class KA{options;sampleRateHz=QA;preRoll=[];preRollLength=0;open;pending;turns=new Map;constructor(o={}){this.options={...XA,...o}}pushFrame(o){if(o.length===0)return;if(this.open){const i=Math.floor(this.options.maxTurnMs/1e3*this.sampleRateHz);if(this.open.length>=i){this.open.truncated=!0;return}this.open.samples.push(o),this.open.length+=o.length;return}this.preRoll.push(o),this.preRollLength+=o.length;const r=Math.floor(this.options.preRollMs/1e3*this.sampleRateHz);for(;this.preRollLength-(this.preRoll[0]?.length??0)>=r&&this.preRoll.length>1;)this.preRollLength-=this.preRoll.shift()?.length??0}onMessage(o){const r=o.type;if(r==="ready"){const l=o.audio?.inputSampleRateHz;typeof l=="number"&&Number.isFinite(l)&&l>0&&(this.sampleRateHz=l);return}const i=typeof o.turnId=="string"?o.turnId:void 0;if(r==="speech_started"){this.open={samples:[...this.preRoll],length:this.preRollLength,truncated:!1},this.preRoll=[],this.preRollLength=0,i!==void 0&&(this.attributeOnSeal=i);return}if(r==="speech_ended"||r==="stt_output"||r==="turn_complete"){this.seal(i);return}}attributeOnSeal;seal(o){if(this.open){const i=new Int16Array(this.open.length);let l=0;for(const u of this.open.samples)i.set(u,l),l+=u.length;this.pending={samples:i,truncated:this.open.truncated},this.open=void 0}if(!this.pending)return;const r=o??this.attributeOnSeal;if(r!==void 0)for(this.attributeOnSeal=void 0,this.turns.set(r,this.pending),this.pending=void 0;this.turns.size>this.options.maxTurns;){const i=this.turns.keys().next().value;if(i===void 0)break;this.turns.delete(i)}}getWav(o){const r=this.turns.get(o);return r?FA(r.samples,this.sampleRateHz):void 0}list(){return[...this.turns.entries()].map(([o,r])=>({turnId:o,sampleRateHz:this.sampleRateHz,durationMs:Math.round(r.samples.length/this.sampleRateHz*1e3),byteLength:r.samples.length*2,truncated:r.truncated}))}retainedBytes(){let o=0;for(const r of this.turns.values())o+=r.samples.length*2;return o}reset(){this.preRoll=[],this.preRollLength=0,this.open=void 0,this.pending=void 0,this.attributeOnSeal=void 0,this.turns.clear()}}function ZA(n){const o=new Int16Array(n);if(o.length===0)return 0;let r=0;for(let i=0;i<o.length;i+=1){const l=o[i]/32768;r+=l*l}return Math.sqrt(r/o.length)}function JA(n){const[o,r]=w.useState("offline"),[i,l]=w.useState(null),[u,d]=w.useState(),[h,p]=w.useState(),[m,y]=w.useState(),[g,S]=w.useState(!1),[x,T]=w.useState(),[E,C]=w.useState(null),[M,_]=w.useState(0),[j,k]=w.useState(0),[z,q]=w.useState(0),[L,D]=w.useState(),[Q,oe]=w.useState(16e3),[ne,$]=w.useState(()=>uv()),[pe,fe]=w.useState(Ry),[me,U]=w.useState("voice"),[Y,Z]=w.useState(()=>new Set),ue=w.useRef(0),J=w.useRef(new KA),N=w.useRef("voice"),G=w.useRef(new Set),W=w.useRef(null),ee=w.useRef(null),ae=w.useRef(null),se=w.useRef(null),te=w.useRef(null),ge=w.useRef(null),re=w.useRef(!1),ve=w.useRef(""),be=w.useRef(null),Ce=w.useRef(null),Ge=w.useRef(!1),Ve=w.useRef(void 0),Ht=w.useRef(0),_t=w.useRef(null),Tt=w.useCallback(()=>{te.current?.disconnect(),ge.current?.disconnect(),se.current?.getTracks().forEach(Se=>Se.stop()),te.current=null,ge.current=null,se.current=null,ae.current?.close(),ae.current=null,C(null),S(!1)},[]),Jt=w.useCallback(()=>{ee.current?.close().catch(()=>{}),ee.current=null},[]),Cn=w.useCallback(Se=>{if(Se.type==="ready"){re.current=!0,ve.current||(ve.current=crypto.randomUUID()),Se.sessionId&&l(Se.sessionId),Se.audio?.inputSampleRateHz&&oe(Se.audio.inputSampleRateHz);return}if(Se.type==="error"){Ve.current={component:Se.component,category:Se.category,message:Se.message};return}Se.type==="turn_complete"&&(ve.current=crypto.randomUUID())},[]),Ct=w.useCallback(async Se=>{const $e=Ht.current,Xe=Ge.current;let je;if(!Xe&&(_t.current??=S_(n),je=await _t.current,Ht.current!==$e))return;const we=Ve.current;p({kind:p_({everOpened:Xe,reachable:je,...Se}),wsUrl:n,...Se,...we?{serverError:we}:{}}),r("error")},[n]),Un=w.useCallback(async(Se,$e)=>{const Xe=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),je=new AudioContext,we=je.createMediaStreamSource(Xe),ze=je.createAnalyser();ze.fftSize=256;const mt=je.createScriptProcessor(2048,1,1);mt.onaudioprocess=Wt=>{if(!re.current||!Se.connected)return;const vn=Wt.inputBuffer.getChannelData(0);Se.sendFloat32Audio(vn,{contextId:ve.current,fromSampleRateHz:je.sampleRate,toSampleRateHz:$e}),J.current.pushFrame(kd(Ld(vn,{fromSampleRateHz:je.sampleRate,toSampleRateHz:$e})))},we.connect(ze),ze.connect(mt),mt.connect(je.destination),se.current=Xe,ae.current=je,ge.current=we,te.current=mt,C(ze),S(!0),T(void 0)},[]),fa=w.useCallback((Se,$e)=>{Un(Se,$e).catch(Xe=>{T(fE(Xe)),S(!1)})},[Un]),Nr=w.useCallback(Se=>{if(N.current=Se,U(Se),Se==="text"){Tt(),T(void 0);return}const $e=W.current;!$e?.connected||!re.current||fa($e,Q)},[Q,fa,Tt]),ht=w.useCallback(Se=>{const $e=Se.trim();$e!==""&&W.current?.sendText($e)},[]),He=w.useCallback(Se=>{const $e=J.current.getWav(Se);if(!$e)return;const Xe=J.current.list().find(je=>je.turnId===Se);if(Xe)return{wav:$e,sampleRateHz:Xe.sampleRateHz,durationMs:Xe.durationMs,truncated:Xe.truncated}},[]),We=w.useCallback(()=>{re.current=!1,ve.current="",Ce.current?.(),Ce.current=null,Tt(),Jt(),W.current?.close(),W.current=null,r("offline"),l(null),_(0)},[Tt,Jt]),At=w.useCallback(async Se=>{const $e=Se?.mic!==!1&&N.current==="voice";We(),r("connecting"),d(void 0),p(void 0),y(void 0),T(void 0),k(0),q(0),Ht.current+=1,Ge.current=!1,Ve.current=void 0,_t.current=null;const Xe=new AudioContext;await Xe.resume(),ee.current=Xe,D(Xe.state),Xe.addEventListener?.("statechange",()=>{D(ee.current?.state)});const je=new LA({url:n,audioContext:Xe,jitterBuffer:{targetBufferMs:100}});W.current=je,ue.current=performance.now(),$(uv({wsUrl:n})),fe(Ry),J.current.reset(),G.current=new Set,Z(new Set),Ce.current=je.on(we=>{if(we.type==="open"||we.type==="reconnected"){Ge.current=!0,r("connected"),p(void 0),y(void 0);return}if(we.type==="close"||we.type==="reconnecting"){if(Tt(),re.current){we.type==="close"&&(re.current=!1),y(ze=>ze??Date.now()),r(we.type==="close"?"offline":"connecting");return}Ct(we.type==="close"?{closeCode:we.code,closeReason:we.reason}:{retryingAttempt:we.attempt});return}if(we.type==="error"){const ze=we.error instanceof Error?we.error.message:"WebSocket error";d(ze),re.current||Ct({transportMessage:ze});return}if(we.type==="message"){const ze=Math.round(performance.now()-ue.current),mt=we.message.turnId;typeof mt=="string"&&!G.current.has(mt)&&(G.current.add(mt),N.current==="text"&&Z(Wt=>new Set(Wt).add(mt))),J.current.onMessage(we.message),$(Wt=>GA(Wt,we.message,ze)),fe(Wt=>KR(Wt,we.message,ze)),Cn(we.message),$e&&we.message.type==="ready"&&we.message.audio?.inputSampleRateHz&&fa(je,we.message.audio.inputSampleRateHz);return}if(we.type==="audio"){const ze=ZA(we.data);k(mt=>mt+1),q(mt=>Math.max(mt,ze)),_(ze),be.current!==null&&window.clearTimeout(be.current),be.current=window.setTimeout(()=>_(0),120)}}),je.connect()},[We,Cn,Ct,Un,Tt,n]),da=w.useCallback(async()=>{W.current?.connected||await At({mic:!1});const Se=W.current,$e=ee.current;if(!Se||!$e)return;const Xe=Date.now()+8e3;for(;!(re.current&&Se.connected);){if(Date.now()>Xe)throw new Error("session not ready for sample playback");await new Promise(vn=>setTimeout(vn,50))}const je=await(await fetch("/sample.wav")).arrayBuffer(),we=await $e.decodeAudioData(je),ze=we.getChannelData(0),mt=we.sampleRate,Wt=Math.max(1,Math.round(mt*.02));for(let vn=0;vn<ze.length;vn+=Wt)Se.sendFloat32Audio(ze.subarray(vn,Math.min(vn+Wt,ze.length)),{contextId:ve.current,fromSampleRateHz:mt,toSampleRateHz:Q}),await new Promise(_o=>setTimeout(_o,20))},[At,Q]),Jl=w.useCallback(async()=>{const Se=ee.current;Se&&(await Se.resume(),D(Se.state))},[]),Ps=w.useCallback(()=>{$(Se=>({...Se,turns:[],droppedTurns:0,sessionEvents:[]}))},[]);return w.useEffect(()=>()=>{We(),be.current!==null&&window.clearTimeout(be.current)},[We]),{status:o,sessionId:i,errorMessage:u,failure:h,disconnectedAtMs:m,micActive:g,micFailure:x,micAnalyser:E,playbackLevel:M,audioFramesReceived:j,peakPlaybackLevel:z,playbackState:L,inputSampleRateHz:Q,record:ne,agentState:pe,mode:me,textTurnIds:Y,connect:At,disconnect:We,clearTranscript:Ps,playSample:da,getTurnAudio:He,setMode:Nr,sendText:ht,resumePlayback:Jl}}function WA(){const n=w.useMemo(()=>SE(),[]),[o,r]=w.useState(n.target),[i,l]=w.useState(n.target==="local"?n.url:Bs),[u,d]=w.useState(n.target==="custom"?n.url:""),h=w.useMemo(()=>o==="custom"?u.trim():c0(o,i),[u,i,o]),p=JA(h);return b.jsxs("div",{className:"mx-auto flex min-h-screen w-full max-w-6xl flex-col gap-4 p-4 md:p-6",children:[b.jsx(m_,{target:o,localUrl:i,customUrl:u,status:p.status,sessionId:p.sessionId,errorMessage:p.errorMessage,onTargetChange:r,onLocalUrlChange:l,onCustomUrlChange:d,onConnect:()=>{p.connect()},onDisconnect:p.disconnect,onClearTranscript:p.clearTranscript,onPlaySample:()=>{p.playSample()}}),b.jsx(M_,{failure:p.failure,resumeWindowMs:p.record.config.resumeWindowMs,disconnectedAtMs:p.disconnectedAtMs,onUseUrl:m=>{d(m),r("custom")}}),b.jsx("div",{className:"flex items-center gap-3",children:b.jsx(eE,{snapshot:p.agentState})}),b.jsxs("div",{className:"grid min-h-0 flex-1 gap-4 lg:grid-cols-[minmax(0,1fr)_280px]",children:[b.jsxs("div",{className:"flex min-h-0 flex-col gap-4",children:[b.jsx(FR,{record:p.record}),b.jsx(tA,{record:p.record,canSaveFixture:m=>rA(m,p.getTurnAudio(m.turnId)!==void 0),onSaveFixture:m=>{const y=p.getTurnAudio(m.turnId);y&&sA(oA({turn:m,config:p.record.config,wav:y.wav,sampleRateHz:y.sampleRateHz,durationMs:y.durationMs,truncated:y.truncated,capturedAtIso:new Date().toISOString()}))}}),b.jsx(V_,{mode:p.mode,connected:p.status==="connected",micActive:p.micActive,onModeChange:p.setMode,onSend:p.sendText}),b.jsx(Q_,{record:p.record,textTurnIds:p.textTurnIds}),b.jsx(U_,{record:p.record,textTurnIds:p.textTurnIds}),b.jsx(j_,{record:p.record})]}),b.jsxs("div",{className:"flex flex-col gap-4",children:[b.jsxs(hn,{children:[b.jsxs(mn,{children:[b.jsx(pn,{children:"Audio"}),b.jsxs(gn,{children:["Mic uplink at ",p.inputSampleRateHz," Hz · assistant playback with jitter buffer."]})]}),b.jsxs(yn,{className:"space-y-3",children:[b.jsx(bE,{micAnalyser:p.micAnalyser,playbackLevel:p.playbackLevel,active:p.micActive||p.playbackLevel>0}),b.jsx("p",{className:"text-xs text-muted-foreground",children:p.micActive?"Microphone streaming — server VAD decides turn boundaries.":p.mode==="text"?"Microphone released — text mode. Switch back to voice to re-request it.":p.micFailure?"No microphone — see the reason below.":p.status==="connected"?"Waiting for microphone…":"Connect to start a session."})]})]}),b.jsx(q_,{record:p.record}),b.jsx(vE,{micFailure:p.micFailure,mode:p.mode,serverAudioBytes:p.record.turns.reduce((m,y)=>m+y.ttsAudioBytes,0),framesReceived:p.audioFramesReceived,peakLevel:p.peakPlaybackLevel,playbackState:p.playbackState,turnCount:p.record.turns.length,onModeChange:p.setMode,onResumePlayback:()=>{p.resumePlayback()}})]})]})]})}const zb=L1({component:()=>b.jsx(Vv,{})}),$A=j1({getParentRoute:()=>zb,path:"/",component:WA}),e2=zb.addChildren([$A]),t2=G1({routeTree:e2});nw.createRoot(document.getElementById("root")).render(b.jsx(w.StrictMode,{children:b.jsx(F1,{router:t2})}));export{fv as a,n2 as g};