@mcpspec/server 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +216 -3
- package/package.json +3 -3
- package/ui-dist/assets/index-CMNP6jgH.js +361 -0
- package/ui-dist/assets/index-CMNP6jgH.js.map +1 -0
- package/ui-dist/assets/index-Cx7lB-i0.css +1 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/index-Bo7hG4mU.css +0 -1
- package/ui-dist/assets/index-DxT3O3nb.js +0 -351
- package/ui-dist/assets/index-DxT3O3nb.js.map +0 -1
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
var Lv=e=>{throw TypeError(e)};var Hf=(e,t,n)=>t.has(e)||Lv("Cannot "+n);var F=(e,t,n)=>(Hf(e,t,"read from private field"),n?n.call(e):t.get(e)),Pe=(e,t,n)=>t.has(e)?Lv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ye=(e,t,n,i)=>(Hf(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Qe=(e,t,n)=>(Hf(e,t,"access private method"),n);var Kc=(e,t,n,i)=>({set _(o){ye(e,t,o,n)},get _(){return F(e,t,i)}});function eC(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();var Fv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kf={exports:{}},Ja={},Qf={exports:{}},qe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 Dv;function tC(){if(Dv)return qe;Dv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function C(I,Y,je){this.props=I,this.context=Y,this.refs=S,this.updater=je||w}C.prototype.isReactComponent={},C.prototype.setState=function(I,Y){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,Y,"setState")},C.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function N(){}N.prototype=C.prototype;function k(I,Y,je){this.props=I,this.context=Y,this.refs=S,this.updater=je||w}var R=k.prototype=new N;R.constructor=k,_(R,C.prototype),R.isPureReactComponent=!0;var j=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function L(I,Y,je){var fe,Ne={},te=null,re=null;if(Y!=null)for(fe in Y.ref!==void 0&&(re=Y.ref),Y.key!==void 0&&(te=""+Y.key),Y)P.call(Y,fe)&&!O.hasOwnProperty(fe)&&(Ne[fe]=Y[fe]);var ve=arguments.length-2;if(ve===1)Ne.children=je;else if(1<ve){for(var Oe=Array(ve),Te=0;Te<ve;Te++)Oe[Te]=arguments[Te+2];Ne.children=Oe}if(I&&I.defaultProps)for(fe in ve=I.defaultProps,ve)Ne[fe]===void 0&&(Ne[fe]=ve[fe]);return{$$typeof:e,type:I,key:te,ref:re,props:Ne,_owner:T.current}}function V(I,Y){return{$$typeof:e,type:I.type,key:Y,ref:I.ref,props:I.props,_owner:I._owner}}function M(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Z(I){var Y={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(je){return Y[je]})}var W=/\/+/g;function ee(I,Y){return typeof I=="object"&&I!==null&&I.key!=null?Z(""+I.key):Y.toString(36)}function se(I,Y,je,fe,Ne){var te=typeof I;(te==="undefined"||te==="boolean")&&(I=null);var re=!1;if(I===null)re=!0;else switch(te){case"string":case"number":re=!0;break;case"object":switch(I.$$typeof){case e:case t:re=!0}}if(re)return re=I,Ne=Ne(re),I=fe===""?"."+ee(re,0):fe,j(Ne)?(je="",I!=null&&(je=I.replace(W,"$&/")+"/"),se(Ne,Y,je,"",function(Te){return Te})):Ne!=null&&(M(Ne)&&(Ne=V(Ne,je+(!Ne.key||re&&re.key===Ne.key?"":(""+Ne.key).replace(W,"$&/")+"/")+I)),Y.push(Ne)),1;if(re=0,fe=fe===""?".":fe+":",j(I))for(var ve=0;ve<I.length;ve++){te=I[ve];var Oe=fe+ee(te,ve);re+=se(te,Y,je,Oe,Ne)}else if(Oe=x(I),typeof Oe=="function")for(I=Oe.call(I),ve=0;!(te=I.next()).done;)te=te.value,Oe=fe+ee(te,ve++),re+=se(te,Y,je,Oe,Ne);else if(te==="object")throw Y=String(I),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return re}function oe(I,Y,je){if(I==null)return I;var fe=[],Ne=0;return se(I,fe,"","",function(te){return Y.call(je,te,Ne++)}),fe}function X(I){if(I._status===-1){var Y=I._result;Y=Y(),Y.then(function(je){(I._status===0||I._status===-1)&&(I._status=1,I._result=je)},function(je){(I._status===0||I._status===-1)&&(I._status=2,I._result=je)}),I._status===-1&&(I._status=0,I._result=Y)}if(I._status===1)return I._result.default;throw I._result}var ie={current:null},B={transition:null},U={ReactCurrentDispatcher:ie,ReactCurrentBatchConfig:B,ReactCurrentOwner:T};function Q(){throw Error("act(...) is not supported in production builds of React.")}return qe.Children={map:oe,forEach:function(I,Y,je){oe(I,function(){Y.apply(this,arguments)},je)},count:function(I){var Y=0;return oe(I,function(){Y++}),Y},toArray:function(I){return oe(I,function(Y){return Y})||[]},only:function(I){if(!M(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},qe.Component=C,qe.Fragment=n,qe.Profiler=o,qe.PureComponent=k,qe.StrictMode=i,qe.Suspense=h,qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,qe.act=Q,qe.cloneElement=function(I,Y,je){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var fe=_({},I.props),Ne=I.key,te=I.ref,re=I._owner;if(Y!=null){if(Y.ref!==void 0&&(te=Y.ref,re=T.current),Y.key!==void 0&&(Ne=""+Y.key),I.type&&I.type.defaultProps)var ve=I.type.defaultProps;for(Oe in Y)P.call(Y,Oe)&&!O.hasOwnProperty(Oe)&&(fe[Oe]=Y[Oe]===void 0&&ve!==void 0?ve[Oe]:Y[Oe])}var Oe=arguments.length-2;if(Oe===1)fe.children=je;else if(1<Oe){ve=Array(Oe);for(var Te=0;Te<Oe;Te++)ve[Te]=arguments[Te+2];fe.children=ve}return{$$typeof:e,type:I.type,key:Ne,ref:te,props:fe,_owner:re}},qe.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:l,_context:I},I.Consumer=I},qe.createElement=L,qe.createFactory=function(I){var Y=L.bind(null,I);return Y.type=I,Y},qe.createRef=function(){return{current:null}},qe.forwardRef=function(I){return{$$typeof:c,render:I}},qe.isValidElement=M,qe.lazy=function(I){return{$$typeof:g,_payload:{_status:-1,_result:I},_init:X}},qe.memo=function(I,Y){return{$$typeof:m,type:I,compare:Y===void 0?null:Y}},qe.startTransition=function(I){var Y=B.transition;B.transition={};try{I()}finally{B.transition=Y}},qe.unstable_act=Q,qe.useCallback=function(I,Y){return ie.current.useCallback(I,Y)},qe.useContext=function(I){return ie.current.useContext(I)},qe.useDebugValue=function(){},qe.useDeferredValue=function(I){return ie.current.useDeferredValue(I)},qe.useEffect=function(I,Y){return ie.current.useEffect(I,Y)},qe.useId=function(){return ie.current.useId()},qe.useImperativeHandle=function(I,Y,je){return ie.current.useImperativeHandle(I,Y,je)},qe.useInsertionEffect=function(I,Y){return ie.current.useInsertionEffect(I,Y)},qe.useLayoutEffect=function(I,Y){return ie.current.useLayoutEffect(I,Y)},qe.useMemo=function(I,Y){return ie.current.useMemo(I,Y)},qe.useReducer=function(I,Y,je){return ie.current.useReducer(I,Y,je)},qe.useRef=function(I){return ie.current.useRef(I)},qe.useState=function(I){return ie.current.useState(I)},qe.useSyncExternalStore=function(I,Y,je){return ie.current.useSyncExternalStore(I,Y,je)},qe.useTransition=function(){return ie.current.useTransition()},qe.version="18.3.1",qe}var zv;function ua(){return zv||(zv=1,Qf.exports=tC()),Qf.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 Vv;function nC(){if(Vv)return Ja;Vv=1;var e=ua(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(c,h,m){var g,y={},x=null,w=null;m!==void 0&&(x=""+m),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(w=h.ref);for(g in h)i.call(h,g)&&!l.hasOwnProperty(g)&&(y[g]=h[g]);if(c&&c.defaultProps)for(g in h=c.defaultProps,h)y[g]===void 0&&(y[g]=h[g]);return{$$typeof:t,type:c,key:x,ref:w,props:y,_owner:o.current}}return Ja.Fragment=n,Ja.jsx=u,Ja.jsxs=u,Ja}var $v;function rC(){return $v||($v=1,Kf.exports=nC()),Kf.exports}var d=rC(),b=ua();const at=$u(b),fp=eC({__proto__:null,default:at},[b]);var Qc={},qf={exports:{}},_n={},Zf={exports:{}},Gf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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 Bv;function sC(){return Bv||(Bv=1,(function(e){function t(B,U){var Q=B.length;B.push(U);e:for(;0<Q;){var I=Q-1>>>1,Y=B[I];if(0<o(Y,U))B[I]=U,B[Q]=Y,Q=I;else break e}}function n(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var U=B[0],Q=B.pop();if(Q!==U){B[0]=Q;e:for(var I=0,Y=B.length,je=Y>>>1;I<je;){var fe=2*(I+1)-1,Ne=B[fe],te=fe+1,re=B[te];if(0>o(Ne,Q))te<Y&&0>o(re,Ne)?(B[I]=re,B[te]=Q,I=te):(B[I]=Ne,B[fe]=Q,I=fe);else if(te<Y&&0>o(re,Q))B[I]=re,B[te]=Q,I=te;else break e}}return U}function o(B,U){var Q=B.sortIndex-U.sortIndex;return Q!==0?Q:B.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var h=[],m=[],g=1,y=null,x=3,w=!1,_=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(B){for(var U=n(m);U!==null;){if(U.callback===null)i(m);else if(U.startTime<=B)i(m),U.sortIndex=U.expirationTime,t(h,U);else break;U=n(m)}}function j(B){if(S=!1,R(B),!_)if(n(h)!==null)_=!0,X(P);else{var U=n(m);U!==null&&ie(j,U.startTime-B)}}function P(B,U){_=!1,S&&(S=!1,N(L),L=-1),w=!0;var Q=x;try{for(R(U),y=n(h);y!==null&&(!(y.expirationTime>U)||B&&!Z());){var I=y.callback;if(typeof I=="function"){y.callback=null,x=y.priorityLevel;var Y=I(y.expirationTime<=U);U=e.unstable_now(),typeof Y=="function"?y.callback=Y:y===n(h)&&i(h),R(U)}else i(h);y=n(h)}if(y!==null)var je=!0;else{var fe=n(m);fe!==null&&ie(j,fe.startTime-U),je=!1}return je}finally{y=null,x=Q,w=!1}}var T=!1,O=null,L=-1,V=5,M=-1;function Z(){return!(e.unstable_now()-M<V)}function W(){if(O!==null){var B=e.unstable_now();M=B;var U=!0;try{U=O(!0,B)}finally{U?ee():(T=!1,O=null)}}else T=!1}var ee;if(typeof k=="function")ee=function(){k(W)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,oe=se.port2;se.port1.onmessage=W,ee=function(){oe.postMessage(null)}}else ee=function(){C(W,0)};function X(B){O=B,T||(T=!0,ee())}function ie(B,U){L=C(function(){B(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){_||w||(_=!0,X(P))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var U=3;break;default:U=x}var Q=x;x=U;try{return B()}finally{x=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,U){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Q=x;x=B;try{return U()}finally{x=Q}},e.unstable_scheduleCallback=function(B,U,Q){var I=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?I+Q:I):Q=I,B){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=Q+Y,B={id:g++,callback:U,priorityLevel:B,startTime:Q,expirationTime:Y,sortIndex:-1},Q>I?(B.sortIndex=Q,t(m,B),n(h)===null&&B===n(m)&&(S?(N(L),L=-1):S=!0,ie(j,Q-I))):(B.sortIndex=Y,t(h,B),_||w||(_=!0,X(P))),B},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(B){var U=x;return function(){var Q=x;x=U;try{return B.apply(this,arguments)}finally{x=Q}}}})(Gf)),Gf}var Uv;function iC(){return Uv||(Uv=1,Zf.exports=sC()),Zf.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its 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 Wv;function oC(){if(Wv)return _n;Wv=1;var e=ua(),t=iC();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,s){u(r,s),u(r+"Capture",s)}function u(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[: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]*$/,g={},y={};function x(r){return h.call(y,r)?!0:h.call(g,r)?!1:m.test(r)?y[r]=!0:(g[r]=!0,!1)}function w(r,s,a,f){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function _(r,s,a,f){if(s===null||typeof s>"u"||w(r,s,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(r,s,a,f,p,v,E){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=p,this.mustUseProperty=a,this.propertyName=r,this.type=s,this.sanitizeURL=v,this.removeEmptyString=E}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){C[r]=new S(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];C[s]=new S(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){C[r]=new S(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){C[r]=new S(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){C[r]=new S(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){C[r]=new S(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){C[r]=new S(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){C[r]=new S(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){C[r]=new S(r,5,!1,r.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function k(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(N,k);C[s]=new S(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(N,k);C[s]=new S(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(N,k);C[s]=new S(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!0,!0)});function R(r,s,a,f){var p=C.hasOwnProperty(s)?C[s]:null;(p!==null?p.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,a,p,f)&&(a=null),f||p===null?x(s)&&(a===null?r.removeAttribute(s):r.setAttribute(s,""+a)):p.mustUseProperty?r[p.propertyName]=a===null?p.type===3?!1:"":a:(s=p.attributeName,f=p.attributeNamespace,a===null?r.removeAttribute(s):(p=p.type,a=p===3||p===4&&a===!0?"":""+a,f?r.setAttributeNS(f,s,a):r.setAttribute(s,a))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),T=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),Z=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),B=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=B&&r[B]||r["@@iterator"],typeof r=="function"?r:null)}var Q=Object.assign,I;function Y(r){if(I===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
|
34
|
+
`+I+r}var je=!1;function fe(r,s){if(!r||je)return"";je=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(G){var f=G}Reflect.construct(r,[],s)}else{try{s.call()}catch(G){f=G}r.call(s.prototype)}else{try{throw Error()}catch(G){f=G}r()}}catch(G){if(G&&f&&typeof G.stack=="string"){for(var p=G.stack.split(`
|
|
35
|
+
`),v=f.stack.split(`
|
|
36
|
+
`),E=p.length-1,A=v.length-1;1<=E&&0<=A&&p[E]!==v[A];)A--;for(;1<=E&&0<=A;E--,A--)if(p[E]!==v[A]){if(E!==1||A!==1)do if(E--,A--,0>A||p[E]!==v[A]){var z=`
|
|
37
|
+
`+p[E].replace(" at new "," at ");return r.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",r.displayName)),z}while(1<=E&&0<=A);break}}}finally{je=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?Y(r):""}function Ne(r){switch(r.tag){case 5:return Y(r.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return r=fe(r.type,!1),r;case 11:return r=fe(r.type.render,!1),r;case 1:return r=fe(r.type,!0),r;default:return""}}function te(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case O:return"Fragment";case T:return"Portal";case V:return"Profiler";case L:return"StrictMode";case ee:return"Suspense";case se:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Z:return(r.displayName||"Context")+".Consumer";case M:return(r._context.displayName||"Context")+".Provider";case W:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case oe:return s=r.displayName||null,s!==null?s:te(r.type)||"Memo";case X:s=r._payload,r=r._init;try{return te(r(s))}catch{}}return null}function re(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(s);case 8:return s===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function ve(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Oe(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Te(r){var s=Oe(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,v=a.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return p.call(this)},set:function(E){f=""+E,v.call(this,E)}}),Object.defineProperty(r,s,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(E){f=""+E},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Fe(r){r._valueTracker||(r._valueTracker=Te(r))}function We(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var a=s.getValue(),f="";return r&&(f=Oe(r)?r.checked?"true":"false":r.value),r=f,r!==a?(s.setValue(r),!0):!1}function ft(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Mt(r,s){var a=s.checked;return Q({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function tn(r,s){var a=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;a=ve(s.value!=null?s.value:a),r._wrapperState={initialChecked:f,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Xt(r,s){s=s.checked,s!=null&&R(r,"checked",s,!1)}function Dt(r,s){Xt(r,s);var a=ve(s.value),f=s.type;if(a!=null)f==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Pt(r,s.type,a):s.hasOwnProperty("defaultValue")&&Pt(r,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function rt(r,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,a||s===r.value||(r.value=s),r.defaultValue=s}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function Pt(r,s,a){(s!=="number"||ft(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var On=Array.isArray;function D(r,s,a,f){if(r=r.options,s){s={};for(var p=0;p<a.length;p++)s["$"+a[p]]=!0;for(a=0;a<r.length;a++)p=s.hasOwnProperty("$"+r[a].value),r[a].selected!==p&&(r[a].selected=p),p&&f&&(r[a].defaultSelected=!0)}else{for(a=""+ve(a),s=null,p=0;p<r.length;p++){if(r[p].value===a){r[p].selected=!0,f&&(r[p].defaultSelected=!0);return}s!==null||r[p].disabled||(s=r[p])}s!==null&&(s.selected=!0)}}function K(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return Q({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function J(r,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(n(92));if(On(a)){if(1<a.length)throw Error(n(93));a=a[0]}s=a}s==null&&(s=""),a=s}r._wrapperState={initialValue:ve(a)}}function ge(r,s){var a=ve(s.value),f=ve(s.defaultValue);a!=null&&(a=""+a,a!==r.value&&(r.value=a),s.defaultValue==null&&r.defaultValue!==a&&(r.defaultValue=a)),f!=null&&(r.defaultValue=""+f)}function ue(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function ne(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?ne(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Le,Be=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,a,f,p){MSApp.execUnsafeLocalFunction(function(){return r(s,a,f,p)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Le=Le||document.createElement("div"),Le.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Le.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function jt(r,s){if(s){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=s;return}}r.textContent=s}var fn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kn=["Webkit","ms","Moz","O"];Object.keys(fn).forEach(function(r){Kn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),fn[s]=fn[r]})});function lo(r,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||fn.hasOwnProperty(r)&&fn[r]?(""+s).trim():s+"px"}function pe(r,s){r=r.style;for(var a in s)if(s.hasOwnProperty(a)){var f=a.indexOf("--")===0,p=lo(a,s[a],f);a==="float"&&(a="cssFloat"),f?r.setProperty(a,p):r[a]=p}}var et=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $e(r,s){if(s){if(et[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Ue(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 vt=null;function Tt(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var An=null,Qn=null,qn=null;function qr(r){if(r=Da(r)){if(typeof An!="function")throw Error(n(280));var s=r.stateNode;s&&(s=ac(s),An(r.stateNode,r.type,s))}}function In(r){Qn?qn?qn.push(r):qn=[r]:Qn=r}function ur(){if(Qn){var r=Qn,s=qn;if(qn=Qn=null,qr(r),s)for(r=0;r<s.length;r++)qr(s[r])}}function bs(r,s){return r(s)}function nn(){}var Zr=!1;function Vl(r,s,a){if(Zr)return r(s,a);Zr=!0;try{return bs(r,s,a)}finally{Zr=!1,(Qn!==null||qn!==null)&&(nn(),ur())}}function Gr(r,s){var a=r.stateNode;if(a===null)return null;var f=ac(a);if(f===null)return null;a=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(n(231,s,typeof a));return a}var Cs=!1;if(c)try{var ks={};Object.defineProperty(ks,"passive",{get:function(){Cs=!0}}),window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch{Cs=!1}function dr(r,s,a,f,p,v,E,A,z){var G=Array.prototype.slice.call(arguments,3);try{s.apply(a,G)}catch(le){this.onError(le)}}var fr=!1,Si=null,bi=!1,co=null,ab={onError:function(r){fr=!0,Si=r}};function lb(r,s,a,f,p,v,E,A,z){fr=!1,Si=null,dr.apply(ab,arguments)}function cb(r,s,a,f,p,v,E,A,z){if(lb.apply(this,arguments),fr){if(fr){var G=Si;fr=!1,Si=null}else throw Error(n(198));bi||(bi=!0,co=G)}}function Ci(r){var s=r,a=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(a=s.return),r=s.return;while(r)}return s.tag===3?a:null}function im(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function om(r){if(Ci(r)!==r)throw Error(n(188))}function ub(r){var s=r.alternate;if(!s){if(s=Ci(r),s===null)throw Error(n(188));return s!==r?null:r}for(var a=r,f=s;;){var p=a.return;if(p===null)break;var v=p.alternate;if(v===null){if(f=p.return,f!==null){a=f;continue}break}if(p.child===v.child){for(v=p.child;v;){if(v===a)return om(p),r;if(v===f)return om(p),s;v=v.sibling}throw Error(n(188))}if(a.return!==f.return)a=p,f=v;else{for(var E=!1,A=p.child;A;){if(A===a){E=!0,a=p,f=v;break}if(A===f){E=!0,f=p,a=v;break}A=A.sibling}if(!E){for(A=v.child;A;){if(A===a){E=!0,a=v,f=p;break}if(A===f){E=!0,f=v,a=p;break}A=A.sibling}if(!E)throw Error(n(189))}}if(a.alternate!==f)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?r:s}function am(r){return r=ub(r),r!==null?lm(r):null}function lm(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=lm(r);if(s!==null)return s;r=r.sibling}return null}var cm=t.unstable_scheduleCallback,um=t.unstable_cancelCallback,db=t.unstable_shouldYield,fb=t.unstable_requestPaint,Lt=t.unstable_now,hb=t.unstable_getCurrentPriorityLevel,ud=t.unstable_ImmediatePriority,dm=t.unstable_UserBlockingPriority,$l=t.unstable_NormalPriority,pb=t.unstable_LowPriority,fm=t.unstable_IdlePriority,Bl=null,Nr=null;function mb(r){if(Nr&&typeof Nr.onCommitFiberRoot=="function")try{Nr.onCommitFiberRoot(Bl,r,void 0,(r.current.flags&128)===128)}catch{}}var hr=Math.clz32?Math.clz32:yb,gb=Math.log,vb=Math.LN2;function yb(r){return r>>>=0,r===0?32:31-(gb(r)/vb|0)|0}var Ul=64,Wl=4194304;function wa(r){switch(r&-r){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: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Hl(r,s){var a=r.pendingLanes;if(a===0)return 0;var f=0,p=r.suspendedLanes,v=r.pingedLanes,E=a&268435455;if(E!==0){var A=E&~p;A!==0?f=wa(A):(v&=E,v!==0&&(f=wa(v)))}else E=a&~p,E!==0?f=wa(E):v!==0&&(f=wa(v));if(f===0)return 0;if(s!==0&&s!==f&&(s&p)===0&&(p=f&-f,v=s&-s,p>=v||p===16&&(v&4194240)!==0))return s;if((f&4)!==0&&(f|=a&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=f;0<s;)a=31-hr(s),p=1<<a,f|=r[a],s&=~p;return f}function xb(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wb(r,s){for(var a=r.suspendedLanes,f=r.pingedLanes,p=r.expirationTimes,v=r.pendingLanes;0<v;){var E=31-hr(v),A=1<<E,z=p[E];z===-1?((A&a)===0||(A&f)!==0)&&(p[E]=xb(A,s)):z<=s&&(r.expiredLanes|=A),v&=~A}}function dd(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function hm(){var r=Ul;return Ul<<=1,(Ul&4194240)===0&&(Ul=64),r}function fd(r){for(var s=[],a=0;31>a;a++)s.push(r);return s}function Sa(r,s,a){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-hr(s),r[s]=a}function Sb(r,s){var a=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<a;){var p=31-hr(a),v=1<<p;s[p]=0,f[p]=-1,r[p]=-1,a&=~v}}function hd(r,s){var a=r.entangledLanes|=s;for(r=r.entanglements;a;){var f=31-hr(a),p=1<<f;p&s|r[f]&s&&(r[f]|=s),a&=~p}}var mt=0;function pm(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var mm,pd,gm,vm,ym,md=!1,Kl=[],_s=null,js=null,Es=null,ba=new Map,Ca=new Map,Rs=[],bb="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 submit".split(" ");function xm(r,s){switch(r){case"focusin":case"focusout":_s=null;break;case"dragenter":case"dragleave":js=null;break;case"mouseover":case"mouseout":Es=null;break;case"pointerover":case"pointerout":ba.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(s.pointerId)}}function ka(r,s,a,f,p,v){return r===null||r.nativeEvent!==v?(r={blockedOn:s,domEventName:a,eventSystemFlags:f,nativeEvent:v,targetContainers:[p]},s!==null&&(s=Da(s),s!==null&&pd(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),r)}function Cb(r,s,a,f,p){switch(s){case"focusin":return _s=ka(_s,r,s,a,f,p),!0;case"dragenter":return js=ka(js,r,s,a,f,p),!0;case"mouseover":return Es=ka(Es,r,s,a,f,p),!0;case"pointerover":var v=p.pointerId;return ba.set(v,ka(ba.get(v)||null,r,s,a,f,p)),!0;case"gotpointercapture":return v=p.pointerId,Ca.set(v,ka(Ca.get(v)||null,r,s,a,f,p)),!0}return!1}function wm(r){var s=ki(r.target);if(s!==null){var a=Ci(s);if(a!==null){if(s=a.tag,s===13){if(s=im(a),s!==null){r.blockedOn=s,ym(r.priority,function(){gm(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Ql(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var a=vd(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(a===null){a=r.nativeEvent;var f=new a.constructor(a.type,a);vt=f,a.target.dispatchEvent(f),vt=null}else return s=Da(a),s!==null&&pd(s),r.blockedOn=a,!1;s.shift()}return!0}function Sm(r,s,a){Ql(r)&&a.delete(s)}function kb(){md=!1,_s!==null&&Ql(_s)&&(_s=null),js!==null&&Ql(js)&&(js=null),Es!==null&&Ql(Es)&&(Es=null),ba.forEach(Sm),Ca.forEach(Sm)}function _a(r,s){r.blockedOn===s&&(r.blockedOn=null,md||(md=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kb)))}function ja(r){function s(p){return _a(p,r)}if(0<Kl.length){_a(Kl[0],r);for(var a=1;a<Kl.length;a++){var f=Kl[a];f.blockedOn===r&&(f.blockedOn=null)}}for(_s!==null&&_a(_s,r),js!==null&&_a(js,r),Es!==null&&_a(Es,r),ba.forEach(s),Ca.forEach(s),a=0;a<Rs.length;a++)f=Rs[a],f.blockedOn===r&&(f.blockedOn=null);for(;0<Rs.length&&(a=Rs[0],a.blockedOn===null);)wm(a),a.blockedOn===null&&Rs.shift()}var uo=j.ReactCurrentBatchConfig,ql=!0;function _b(r,s,a,f){var p=mt,v=uo.transition;uo.transition=null;try{mt=1,gd(r,s,a,f)}finally{mt=p,uo.transition=v}}function jb(r,s,a,f){var p=mt,v=uo.transition;uo.transition=null;try{mt=4,gd(r,s,a,f)}finally{mt=p,uo.transition=v}}function gd(r,s,a,f){if(ql){var p=vd(r,s,a,f);if(p===null)Id(r,s,f,Zl,a),xm(r,f);else if(Cb(p,r,s,a,f))f.stopPropagation();else if(xm(r,f),s&4&&-1<bb.indexOf(r)){for(;p!==null;){var v=Da(p);if(v!==null&&mm(v),v=vd(r,s,a,f),v===null&&Id(r,s,f,Zl,a),v===p)break;p=v}p!==null&&f.stopPropagation()}else Id(r,s,f,null,a)}}var Zl=null;function vd(r,s,a,f){if(Zl=null,r=Tt(f),r=ki(r),r!==null)if(s=Ci(r),s===null)r=null;else if(a=s.tag,a===13){if(r=im(s),r!==null)return r;r=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Zl=r,null}function bm(r){switch(r){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(hb()){case ud:return 1;case dm:return 4;case $l:case pb:return 16;case fm:return 536870912;default:return 16}default:return 16}}var Ns=null,yd=null,Gl=null;function Cm(){if(Gl)return Gl;var r,s=yd,a=s.length,f,p="value"in Ns?Ns.value:Ns.textContent,v=p.length;for(r=0;r<a&&s[r]===p[r];r++);var E=a-r;for(f=1;f<=E&&s[a-f]===p[v-f];f++);return Gl=p.slice(r,1<f?1-f:void 0)}function Yl(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Xl(){return!0}function km(){return!1}function Mn(r){function s(a,f,p,v,E){this._reactName=a,this._targetInst=p,this.type=f,this.nativeEvent=v,this.target=E,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(a=r[A],this[A]=a?a(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Xl:km,this.isPropagationStopped=km,this}return Q(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Xl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Xl)},persist:function(){},isPersistent:Xl}),s}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xd=Mn(fo),Ea=Q({},fo,{view:0,detail:0}),Eb=Mn(Ea),wd,Sd,Ra,Jl=Q({},Ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ra&&(Ra&&r.type==="mousemove"?(wd=r.screenX-Ra.screenX,Sd=r.screenY-Ra.screenY):Sd=wd=0,Ra=r),wd)},movementY:function(r){return"movementY"in r?r.movementY:Sd}}),_m=Mn(Jl),Rb=Q({},Jl,{dataTransfer:0}),Nb=Mn(Rb),Pb=Q({},Ea,{relatedTarget:0}),bd=Mn(Pb),Tb=Q({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Ob=Mn(Tb),Ab=Q({},fo,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Ib=Mn(Ab),Mb=Q({},fo,{data:0}),jm=Mn(Mb),Lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fb={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"},Db={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zb(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=Db[r])?!!s[r]:!1}function Cd(){return zb}var Vb=Q({},Ea,{key:function(r){if(r.key){var s=Lb[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Yl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Fb[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cd,charCode:function(r){return r.type==="keypress"?Yl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Yl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),$b=Mn(Vb),Bb=Q({},Jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Em=Mn(Bb),Ub=Q({},Ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cd}),Wb=Mn(Ub),Hb=Q({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kb=Mn(Hb),Qb=Q({},Jl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),qb=Mn(Qb),Zb=[9,13,27,32],kd=c&&"CompositionEvent"in window,Na=null;c&&"documentMode"in document&&(Na=document.documentMode);var Gb=c&&"TextEvent"in window&&!Na,Rm=c&&(!kd||Na&&8<Na&&11>=Na),Nm=" ",Pm=!1;function Tm(r,s){switch(r){case"keyup":return Zb.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ho=!1;function Yb(r,s){switch(r){case"compositionend":return Om(s);case"keypress":return s.which!==32?null:(Pm=!0,Nm);case"textInput":return r=s.data,r===Nm&&Pm?null:r;default:return null}}function Xb(r,s){if(ho)return r==="compositionend"||!kd&&Tm(r,s)?(r=Cm(),Gl=yd=Ns=null,ho=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Rm&&s.locale!=="ko"?null:s.data;default:return null}}var Jb={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 Am(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Jb[r.type]:s==="textarea"}function Im(r,s,a,f){In(f),s=sc(s,"onChange"),0<s.length&&(a=new xd("onChange","change",null,a,f),r.push({event:a,listeners:s}))}var Pa=null,Ta=null;function e1(r){Xm(r,0)}function ec(r){var s=yo(r);if(We(s))return r}function t1(r,s){if(r==="change")return s}var Mm=!1;if(c){var _d;if(c){var jd="oninput"in document;if(!jd){var Lm=document.createElement("div");Lm.setAttribute("oninput","return;"),jd=typeof Lm.oninput=="function"}_d=jd}else _d=!1;Mm=_d&&(!document.documentMode||9<document.documentMode)}function Fm(){Pa&&(Pa.detachEvent("onpropertychange",Dm),Ta=Pa=null)}function Dm(r){if(r.propertyName==="value"&&ec(Ta)){var s=[];Im(s,Ta,r,Tt(r)),Vl(e1,s)}}function n1(r,s,a){r==="focusin"?(Fm(),Pa=s,Ta=a,Pa.attachEvent("onpropertychange",Dm)):r==="focusout"&&Fm()}function r1(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ec(Ta)}function s1(r,s){if(r==="click")return ec(s)}function i1(r,s){if(r==="input"||r==="change")return ec(s)}function o1(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var pr=typeof Object.is=="function"?Object.is:o1;function Oa(r,s){if(pr(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var a=Object.keys(r),f=Object.keys(s);if(a.length!==f.length)return!1;for(f=0;f<a.length;f++){var p=a[f];if(!h.call(s,p)||!pr(r[p],s[p]))return!1}return!0}function zm(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Vm(r,s){var a=zm(r);r=0;for(var f;a;){if(a.nodeType===3){if(f=r+a.textContent.length,r<=s&&f>=s)return{node:a,offset:s-r};r=f}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=zm(a)}}function $m(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?$m(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Bm(){for(var r=window,s=ft();s instanceof r.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)r=s.contentWindow;else break;s=ft(r.document)}return s}function Ed(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function a1(r){var s=Bm(),a=r.focusedElem,f=r.selectionRange;if(s!==a&&a&&a.ownerDocument&&$m(a.ownerDocument.documentElement,a)){if(f!==null&&Ed(a)){if(s=f.start,r=f.end,r===void 0&&(r=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(r,a.value.length);else if(r=(s=a.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var p=a.textContent.length,v=Math.min(f.start,p);f=f.end===void 0?v:Math.min(f.end,p),!r.extend&&v>f&&(p=f,f=v,v=p),p=Vm(a,v);var E=Vm(a,f);p&&E&&(r.rangeCount!==1||r.anchorNode!==p.node||r.anchorOffset!==p.offset||r.focusNode!==E.node||r.focusOffset!==E.offset)&&(s=s.createRange(),s.setStart(p.node,p.offset),r.removeAllRanges(),v>f?(r.addRange(s),r.extend(E.node,E.offset)):(s.setEnd(E.node,E.offset),r.addRange(s)))}}for(s=[],r=a;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)r=s[a],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var l1=c&&"documentMode"in document&&11>=document.documentMode,po=null,Rd=null,Aa=null,Nd=!1;function Um(r,s,a){var f=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Nd||po==null||po!==ft(f)||(f=po,"selectionStart"in f&&Ed(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Aa&&Oa(Aa,f)||(Aa=f,f=sc(Rd,"onSelect"),0<f.length&&(s=new xd("onSelect","select",null,s,a),r.push({event:s,listeners:f}),s.target=po)))}function tc(r,s){var a={};return a[r.toLowerCase()]=s.toLowerCase(),a["Webkit"+r]="webkit"+s,a["Moz"+r]="moz"+s,a}var mo={animationend:tc("Animation","AnimationEnd"),animationiteration:tc("Animation","AnimationIteration"),animationstart:tc("Animation","AnimationStart"),transitionend:tc("Transition","TransitionEnd")},Pd={},Wm={};c&&(Wm=document.createElement("div").style,"AnimationEvent"in window||(delete mo.animationend.animation,delete mo.animationiteration.animation,delete mo.animationstart.animation),"TransitionEvent"in window||delete mo.transitionend.transition);function nc(r){if(Pd[r])return Pd[r];if(!mo[r])return r;var s=mo[r],a;for(a in s)if(s.hasOwnProperty(a)&&a in Wm)return Pd[r]=s[a];return r}var Hm=nc("animationend"),Km=nc("animationiteration"),Qm=nc("animationstart"),qm=nc("transitionend"),Zm=new Map,Gm="abort auxClick 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(" ");function Ps(r,s){Zm.set(r,s),l(s,[r])}for(var Td=0;Td<Gm.length;Td++){var Od=Gm[Td],c1=Od.toLowerCase(),u1=Od[0].toUpperCase()+Od.slice(1);Ps(c1,"on"+u1)}Ps(Hm,"onAnimationEnd"),Ps(Km,"onAnimationIteration"),Ps(Qm,"onAnimationStart"),Ps("dblclick","onDoubleClick"),Ps("focusin","onFocus"),Ps("focusout","onBlur"),Ps(qm,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ia="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(" "),d1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ia));function Ym(r,s,a){var f=r.type||"unknown-event";r.currentTarget=a,cb(f,s,void 0,r),r.currentTarget=null}function Xm(r,s){s=(s&4)!==0;for(var a=0;a<r.length;a++){var f=r[a],p=f.event;f=f.listeners;e:{var v=void 0;if(s)for(var E=f.length-1;0<=E;E--){var A=f[E],z=A.instance,G=A.currentTarget;if(A=A.listener,z!==v&&p.isPropagationStopped())break e;Ym(p,A,G),v=z}else for(E=0;E<f.length;E++){if(A=f[E],z=A.instance,G=A.currentTarget,A=A.listener,z!==v&&p.isPropagationStopped())break e;Ym(p,A,G),v=z}}}if(bi)throw r=co,bi=!1,co=null,r}function St(r,s){var a=s[Vd];a===void 0&&(a=s[Vd]=new Set);var f=r+"__bubble";a.has(f)||(Jm(s,r,2,!1),a.add(f))}function Ad(r,s,a){var f=0;s&&(f|=4),Jm(a,r,f,s)}var rc="_reactListening"+Math.random().toString(36).slice(2);function Ma(r){if(!r[rc]){r[rc]=!0,i.forEach(function(a){a!=="selectionchange"&&(d1.has(a)||Ad(a,!1,r),Ad(a,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[rc]||(s[rc]=!0,Ad("selectionchange",!1,s))}}function Jm(r,s,a,f){switch(bm(s)){case 1:var p=_b;break;case 4:p=jb;break;default:p=gd}a=p.bind(null,s,a,r),p=void 0,!Cs||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(p=!0),f?p!==void 0?r.addEventListener(s,a,{capture:!0,passive:p}):r.addEventListener(s,a,!0):p!==void 0?r.addEventListener(s,a,{passive:p}):r.addEventListener(s,a,!1)}function Id(r,s,a,f,p){var v=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var E=f.tag;if(E===3||E===4){var A=f.stateNode.containerInfo;if(A===p||A.nodeType===8&&A.parentNode===p)break;if(E===4)for(E=f.return;E!==null;){var z=E.tag;if((z===3||z===4)&&(z=E.stateNode.containerInfo,z===p||z.nodeType===8&&z.parentNode===p))return;E=E.return}for(;A!==null;){if(E=ki(A),E===null)return;if(z=E.tag,z===5||z===6){f=v=E;continue e}A=A.parentNode}}f=f.return}Vl(function(){var G=v,le=Tt(a),ce=[];e:{var ae=Zm.get(r);if(ae!==void 0){var xe=xd,be=r;switch(r){case"keypress":if(Yl(a)===0)break e;case"keydown":case"keyup":xe=$b;break;case"focusin":be="focus",xe=bd;break;case"focusout":be="blur",xe=bd;break;case"beforeblur":case"afterblur":xe=bd;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":xe=_m;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=Nb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=Wb;break;case Hm:case Km:case Qm:xe=Ob;break;case qm:xe=Kb;break;case"scroll":xe=Eb;break;case"wheel":xe=qb;break;case"copy":case"cut":case"paste":xe=Ib;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=Em}var ke=(s&4)!==0,Ft=!ke&&r==="scroll",H=ke?ae!==null?ae+"Capture":null:ae;ke=[];for(var $=G,q;$!==null;){q=$;var de=q.stateNode;if(q.tag===5&&de!==null&&(q=de,H!==null&&(de=Gr($,H),de!=null&&ke.push(La($,de,q)))),Ft)break;$=$.return}0<ke.length&&(ae=new xe(ae,be,null,a,le),ce.push({event:ae,listeners:ke}))}}if((s&7)===0){e:{if(ae=r==="mouseover"||r==="pointerover",xe=r==="mouseout"||r==="pointerout",ae&&a!==vt&&(be=a.relatedTarget||a.fromElement)&&(ki(be)||be[Yr]))break e;if((xe||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,xe?(be=a.relatedTarget||a.toElement,xe=G,be=be?ki(be):null,be!==null&&(Ft=Ci(be),be!==Ft||be.tag!==5&&be.tag!==6)&&(be=null)):(xe=null,be=G),xe!==be)){if(ke=_m,de="onMouseLeave",H="onMouseEnter",$="mouse",(r==="pointerout"||r==="pointerover")&&(ke=Em,de="onPointerLeave",H="onPointerEnter",$="pointer"),Ft=xe==null?ae:yo(xe),q=be==null?ae:yo(be),ae=new ke(de,$+"leave",xe,a,le),ae.target=Ft,ae.relatedTarget=q,de=null,ki(le)===G&&(ke=new ke(H,$+"enter",be,a,le),ke.target=q,ke.relatedTarget=Ft,de=ke),Ft=de,xe&&be)t:{for(ke=xe,H=be,$=0,q=ke;q;q=go(q))$++;for(q=0,de=H;de;de=go(de))q++;for(;0<$-q;)ke=go(ke),$--;for(;0<q-$;)H=go(H),q--;for(;$--;){if(ke===H||H!==null&&ke===H.alternate)break t;ke=go(ke),H=go(H)}ke=null}else ke=null;xe!==null&&eg(ce,ae,xe,ke,!1),be!==null&&Ft!==null&&eg(ce,Ft,be,ke,!0)}}e:{if(ae=G?yo(G):window,xe=ae.nodeName&&ae.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ae.type==="file")var Ee=t1;else if(Am(ae))if(Mm)Ee=i1;else{Ee=r1;var Ae=n1}else(xe=ae.nodeName)&&xe.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Ee=s1);if(Ee&&(Ee=Ee(r,G))){Im(ce,Ee,a,le);break e}Ae&&Ae(r,ae,G),r==="focusout"&&(Ae=ae._wrapperState)&&Ae.controlled&&ae.type==="number"&&Pt(ae,"number",ae.value)}switch(Ae=G?yo(G):window,r){case"focusin":(Am(Ae)||Ae.contentEditable==="true")&&(po=Ae,Rd=G,Aa=null);break;case"focusout":Aa=Rd=po=null;break;case"mousedown":Nd=!0;break;case"contextmenu":case"mouseup":case"dragend":Nd=!1,Um(ce,a,le);break;case"selectionchange":if(l1)break;case"keydown":case"keyup":Um(ce,a,le)}var Ie;if(kd)e:{switch(r){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else ho?Tm(r,a)&&(De="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(De="onCompositionStart");De&&(Rm&&a.locale!=="ko"&&(ho||De!=="onCompositionStart"?De==="onCompositionEnd"&&ho&&(Ie=Cm()):(Ns=le,yd="value"in Ns?Ns.value:Ns.textContent,ho=!0)),Ae=sc(G,De),0<Ae.length&&(De=new jm(De,r,null,a,le),ce.push({event:De,listeners:Ae}),Ie?De.data=Ie:(Ie=Om(a),Ie!==null&&(De.data=Ie)))),(Ie=Gb?Yb(r,a):Xb(r,a))&&(G=sc(G,"onBeforeInput"),0<G.length&&(le=new jm("onBeforeInput","beforeinput",null,a,le),ce.push({event:le,listeners:G}),le.data=Ie))}Xm(ce,s)})}function La(r,s,a){return{instance:r,listener:s,currentTarget:a}}function sc(r,s){for(var a=s+"Capture",f=[];r!==null;){var p=r,v=p.stateNode;p.tag===5&&v!==null&&(p=v,v=Gr(r,a),v!=null&&f.unshift(La(r,v,p)),v=Gr(r,s),v!=null&&f.push(La(r,v,p))),r=r.return}return f}function go(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function eg(r,s,a,f,p){for(var v=s._reactName,E=[];a!==null&&a!==f;){var A=a,z=A.alternate,G=A.stateNode;if(z!==null&&z===f)break;A.tag===5&&G!==null&&(A=G,p?(z=Gr(a,v),z!=null&&E.unshift(La(a,z,A))):p||(z=Gr(a,v),z!=null&&E.push(La(a,z,A)))),a=a.return}E.length!==0&&r.push({event:s,listeners:E})}var f1=/\r\n?/g,h1=/\u0000|\uFFFD/g;function tg(r){return(typeof r=="string"?r:""+r).replace(f1,`
|
|
38
|
+
`).replace(h1,"")}function ic(r,s,a){if(s=tg(s),tg(r)!==s&&a)throw Error(n(425))}function oc(){}var Md=null,Ld=null;function Fd(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Dd=typeof setTimeout=="function"?setTimeout:void 0,p1=typeof clearTimeout=="function"?clearTimeout:void 0,ng=typeof Promise=="function"?Promise:void 0,m1=typeof queueMicrotask=="function"?queueMicrotask:typeof ng<"u"?function(r){return ng.resolve(null).then(r).catch(g1)}:Dd;function g1(r){setTimeout(function(){throw r})}function zd(r,s){var a=s,f=0;do{var p=a.nextSibling;if(r.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"){if(f===0){r.removeChild(p),ja(s);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=p}while(a);ja(s)}function Ts(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function rg(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return r;s--}else a==="/$"&&s++}r=r.previousSibling}return null}var vo=Math.random().toString(36).slice(2),Pr="__reactFiber$"+vo,Fa="__reactProps$"+vo,Yr="__reactContainer$"+vo,Vd="__reactEvents$"+vo,v1="__reactListeners$"+vo,y1="__reactHandles$"+vo;function ki(r){var s=r[Pr];if(s)return s;for(var a=r.parentNode;a;){if(s=a[Yr]||a[Pr]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(r=rg(r);r!==null;){if(a=r[Pr])return a;r=rg(r)}return s}r=a,a=r.parentNode}return null}function Da(r){return r=r[Pr]||r[Yr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function yo(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ac(r){return r[Fa]||null}var $d=[],xo=-1;function Os(r){return{current:r}}function bt(r){0>xo||(r.current=$d[xo],$d[xo]=null,xo--)}function yt(r,s){xo++,$d[xo]=r.current,r.current=s}var As={},rn=Os(As),wn=Os(!1),_i=As;function wo(r,s){var a=r.type.contextTypes;if(!a)return As;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var p={},v;for(v in a)p[v]=s[v];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=p),p}function Sn(r){return r=r.childContextTypes,r!=null}function lc(){bt(wn),bt(rn)}function sg(r,s,a){if(rn.current!==As)throw Error(n(168));yt(rn,s),yt(wn,a)}function ig(r,s,a){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var p in f)if(!(p in s))throw Error(n(108,re(r)||"Unknown",p));return Q({},a,f)}function cc(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||As,_i=rn.current,yt(rn,r),yt(wn,wn.current),!0}function og(r,s,a){var f=r.stateNode;if(!f)throw Error(n(169));a?(r=ig(r,s,_i),f.__reactInternalMemoizedMergedChildContext=r,bt(wn),bt(rn),yt(rn,r)):bt(wn),yt(wn,a)}var Xr=null,uc=!1,Bd=!1;function ag(r){Xr===null?Xr=[r]:Xr.push(r)}function x1(r){uc=!0,ag(r)}function Is(){if(!Bd&&Xr!==null){Bd=!0;var r=0,s=mt;try{var a=Xr;for(mt=1;r<a.length;r++){var f=a[r];do f=f(!0);while(f!==null)}Xr=null,uc=!1}catch(p){throw Xr!==null&&(Xr=Xr.slice(r+1)),cm(ud,Is),p}finally{mt=s,Bd=!1}}return null}var So=[],bo=0,dc=null,fc=0,Zn=[],Gn=0,ji=null,Jr=1,es="";function Ei(r,s){So[bo++]=fc,So[bo++]=dc,dc=r,fc=s}function lg(r,s,a){Zn[Gn++]=Jr,Zn[Gn++]=es,Zn[Gn++]=ji,ji=r;var f=Jr;r=es;var p=32-hr(f)-1;f&=~(1<<p),a+=1;var v=32-hr(s)+p;if(30<v){var E=p-p%5;v=(f&(1<<E)-1).toString(32),f>>=E,p-=E,Jr=1<<32-hr(s)+p|a<<p|f,es=v+r}else Jr=1<<v|a<<p|f,es=r}function Ud(r){r.return!==null&&(Ei(r,1),lg(r,1,0))}function Wd(r){for(;r===dc;)dc=So[--bo],So[bo]=null,fc=So[--bo],So[bo]=null;for(;r===ji;)ji=Zn[--Gn],Zn[Gn]=null,es=Zn[--Gn],Zn[Gn]=null,Jr=Zn[--Gn],Zn[Gn]=null}var Ln=null,Fn=null,kt=!1,mr=null;function cg(r,s){var a=er(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=r,s=r.deletions,s===null?(r.deletions=[a],r.flags|=16):s.push(a)}function ug(r,s){switch(r.tag){case 5:var a=r.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Ln=r,Fn=Ts(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Ln=r,Fn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=ji!==null?{id:Jr,overflow:es}:null,r.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=er(18,null,null,0),a.stateNode=s,a.return=r,r.child=a,Ln=r,Fn=null,!0):!1;default:return!1}}function Hd(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Kd(r){if(kt){var s=Fn;if(s){var a=s;if(!ug(r,s)){if(Hd(r))throw Error(n(418));s=Ts(a.nextSibling);var f=Ln;s&&ug(r,s)?cg(f,a):(r.flags=r.flags&-4097|2,kt=!1,Ln=r)}}else{if(Hd(r))throw Error(n(418));r.flags=r.flags&-4097|2,kt=!1,Ln=r}}}function dg(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Ln=r}function hc(r){if(r!==Ln)return!1;if(!kt)return dg(r),kt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Fd(r.type,r.memoizedProps)),s&&(s=Fn)){if(Hd(r))throw fg(),Error(n(418));for(;s;)cg(r,s),s=Ts(s.nextSibling)}if(dg(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"){if(s===0){Fn=Ts(r.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}r=r.nextSibling}Fn=null}}else Fn=Ln?Ts(r.stateNode.nextSibling):null;return!0}function fg(){for(var r=Fn;r;)r=Ts(r.nextSibling)}function Co(){Fn=Ln=null,kt=!1}function Qd(r){mr===null?mr=[r]:mr.push(r)}var w1=j.ReactCurrentBatchConfig;function za(r,s,a){if(r=a.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var f=a.stateNode}if(!f)throw Error(n(147,r));var p=f,v=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===v?s.ref:(s=function(E){var A=p.refs;E===null?delete A[v]:A[v]=E},s._stringRef=v,s)}if(typeof r!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,r))}return r}function pc(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function hg(r){var s=r._init;return s(r._payload)}function pg(r){function s(H,$){if(r){var q=H.deletions;q===null?(H.deletions=[$],H.flags|=16):q.push($)}}function a(H,$){if(!r)return null;for(;$!==null;)s(H,$),$=$.sibling;return null}function f(H,$){for(H=new Map;$!==null;)$.key!==null?H.set($.key,$):H.set($.index,$),$=$.sibling;return H}function p(H,$){return H=Bs(H,$),H.index=0,H.sibling=null,H}function v(H,$,q){return H.index=q,r?(q=H.alternate,q!==null?(q=q.index,q<$?(H.flags|=2,$):q):(H.flags|=2,$)):(H.flags|=1048576,$)}function E(H){return r&&H.alternate===null&&(H.flags|=2),H}function A(H,$,q,de){return $===null||$.tag!==6?($=zf(q,H.mode,de),$.return=H,$):($=p($,q),$.return=H,$)}function z(H,$,q,de){var Ee=q.type;return Ee===O?le(H,$,q.props.children,de,q.key):$!==null&&($.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===X&&hg(Ee)===$.type)?(de=p($,q.props),de.ref=za(H,$,q),de.return=H,de):(de=Dc(q.type,q.key,q.props,null,H.mode,de),de.ref=za(H,$,q),de.return=H,de)}function G(H,$,q,de){return $===null||$.tag!==4||$.stateNode.containerInfo!==q.containerInfo||$.stateNode.implementation!==q.implementation?($=Vf(q,H.mode,de),$.return=H,$):($=p($,q.children||[]),$.return=H,$)}function le(H,$,q,de,Ee){return $===null||$.tag!==7?($=Mi(q,H.mode,de,Ee),$.return=H,$):($=p($,q),$.return=H,$)}function ce(H,$,q){if(typeof $=="string"&&$!==""||typeof $=="number")return $=zf(""+$,H.mode,q),$.return=H,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case P:return q=Dc($.type,$.key,$.props,null,H.mode,q),q.ref=za(H,null,$),q.return=H,q;case T:return $=Vf($,H.mode,q),$.return=H,$;case X:var de=$._init;return ce(H,de($._payload),q)}if(On($)||U($))return $=Mi($,H.mode,q,null),$.return=H,$;pc(H,$)}return null}function ae(H,$,q,de){var Ee=$!==null?$.key:null;if(typeof q=="string"&&q!==""||typeof q=="number")return Ee!==null?null:A(H,$,""+q,de);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case P:return q.key===Ee?z(H,$,q,de):null;case T:return q.key===Ee?G(H,$,q,de):null;case X:return Ee=q._init,ae(H,$,Ee(q._payload),de)}if(On(q)||U(q))return Ee!==null?null:le(H,$,q,de,null);pc(H,q)}return null}function xe(H,$,q,de,Ee){if(typeof de=="string"&&de!==""||typeof de=="number")return H=H.get(q)||null,A($,H,""+de,Ee);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case P:return H=H.get(de.key===null?q:de.key)||null,z($,H,de,Ee);case T:return H=H.get(de.key===null?q:de.key)||null,G($,H,de,Ee);case X:var Ae=de._init;return xe(H,$,q,Ae(de._payload),Ee)}if(On(de)||U(de))return H=H.get(q)||null,le($,H,de,Ee,null);pc($,de)}return null}function be(H,$,q,de){for(var Ee=null,Ae=null,Ie=$,De=$=0,Gt=null;Ie!==null&&De<q.length;De++){Ie.index>De?(Gt=Ie,Ie=null):Gt=Ie.sibling;var ot=ae(H,Ie,q[De],de);if(ot===null){Ie===null&&(Ie=Gt);break}r&&Ie&&ot.alternate===null&&s(H,Ie),$=v(ot,$,De),Ae===null?Ee=ot:Ae.sibling=ot,Ae=ot,Ie=Gt}if(De===q.length)return a(H,Ie),kt&&Ei(H,De),Ee;if(Ie===null){for(;De<q.length;De++)Ie=ce(H,q[De],de),Ie!==null&&($=v(Ie,$,De),Ae===null?Ee=Ie:Ae.sibling=Ie,Ae=Ie);return kt&&Ei(H,De),Ee}for(Ie=f(H,Ie);De<q.length;De++)Gt=xe(Ie,H,De,q[De],de),Gt!==null&&(r&&Gt.alternate!==null&&Ie.delete(Gt.key===null?De:Gt.key),$=v(Gt,$,De),Ae===null?Ee=Gt:Ae.sibling=Gt,Ae=Gt);return r&&Ie.forEach(function(Us){return s(H,Us)}),kt&&Ei(H,De),Ee}function ke(H,$,q,de){var Ee=U(q);if(typeof Ee!="function")throw Error(n(150));if(q=Ee.call(q),q==null)throw Error(n(151));for(var Ae=Ee=null,Ie=$,De=$=0,Gt=null,ot=q.next();Ie!==null&&!ot.done;De++,ot=q.next()){Ie.index>De?(Gt=Ie,Ie=null):Gt=Ie.sibling;var Us=ae(H,Ie,ot.value,de);if(Us===null){Ie===null&&(Ie=Gt);break}r&&Ie&&Us.alternate===null&&s(H,Ie),$=v(Us,$,De),Ae===null?Ee=Us:Ae.sibling=Us,Ae=Us,Ie=Gt}if(ot.done)return a(H,Ie),kt&&Ei(H,De),Ee;if(Ie===null){for(;!ot.done;De++,ot=q.next())ot=ce(H,ot.value,de),ot!==null&&($=v(ot,$,De),Ae===null?Ee=ot:Ae.sibling=ot,Ae=ot);return kt&&Ei(H,De),Ee}for(Ie=f(H,Ie);!ot.done;De++,ot=q.next())ot=xe(Ie,H,De,ot.value,de),ot!==null&&(r&&ot.alternate!==null&&Ie.delete(ot.key===null?De:ot.key),$=v(ot,$,De),Ae===null?Ee=ot:Ae.sibling=ot,Ae=ot);return r&&Ie.forEach(function(J1){return s(H,J1)}),kt&&Ei(H,De),Ee}function Ft(H,$,q,de){if(typeof q=="object"&&q!==null&&q.type===O&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case P:e:{for(var Ee=q.key,Ae=$;Ae!==null;){if(Ae.key===Ee){if(Ee=q.type,Ee===O){if(Ae.tag===7){a(H,Ae.sibling),$=p(Ae,q.props.children),$.return=H,H=$;break e}}else if(Ae.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===X&&hg(Ee)===Ae.type){a(H,Ae.sibling),$=p(Ae,q.props),$.ref=za(H,Ae,q),$.return=H,H=$;break e}a(H,Ae);break}else s(H,Ae);Ae=Ae.sibling}q.type===O?($=Mi(q.props.children,H.mode,de,q.key),$.return=H,H=$):(de=Dc(q.type,q.key,q.props,null,H.mode,de),de.ref=za(H,$,q),de.return=H,H=de)}return E(H);case T:e:{for(Ae=q.key;$!==null;){if($.key===Ae)if($.tag===4&&$.stateNode.containerInfo===q.containerInfo&&$.stateNode.implementation===q.implementation){a(H,$.sibling),$=p($,q.children||[]),$.return=H,H=$;break e}else{a(H,$);break}else s(H,$);$=$.sibling}$=Vf(q,H.mode,de),$.return=H,H=$}return E(H);case X:return Ae=q._init,Ft(H,$,Ae(q._payload),de)}if(On(q))return be(H,$,q,de);if(U(q))return ke(H,$,q,de);pc(H,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,$!==null&&$.tag===6?(a(H,$.sibling),$=p($,q),$.return=H,H=$):(a(H,$),$=zf(q,H.mode,de),$.return=H,H=$),E(H)):a(H,$)}return Ft}var ko=pg(!0),mg=pg(!1),mc=Os(null),gc=null,_o=null,qd=null;function Zd(){qd=_o=gc=null}function Gd(r){var s=mc.current;bt(mc),r._currentValue=s}function Yd(r,s,a){for(;r!==null;){var f=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),r===a)break;r=r.return}}function jo(r,s){gc=r,qd=_o=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(bn=!0),r.firstContext=null)}function Yn(r){var s=r._currentValue;if(qd!==r)if(r={context:r,memoizedValue:s,next:null},_o===null){if(gc===null)throw Error(n(308));_o=r,gc.dependencies={lanes:0,firstContext:r}}else _o=_o.next=r;return s}var Ri=null;function Xd(r){Ri===null?Ri=[r]:Ri.push(r)}function gg(r,s,a,f){var p=s.interleaved;return p===null?(a.next=a,Xd(s)):(a.next=p.next,p.next=a),s.interleaved=a,ts(r,f)}function ts(r,s){r.lanes|=s;var a=r.alternate;for(a!==null&&(a.lanes|=s),a=r,r=r.return;r!==null;)r.childLanes|=s,a=r.alternate,a!==null&&(a.childLanes|=s),a=r,r=r.return;return a.tag===3?a.stateNode:null}var Ms=!1;function Jd(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vg(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function ns(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function Ls(r,s,a){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(st&2)!==0){var p=f.pending;return p===null?s.next=s:(s.next=p.next,p.next=s),f.pending=s,ts(r,a)}return p=f.interleaved,p===null?(s.next=s,Xd(f)):(s.next=p.next,p.next=s),f.interleaved=s,ts(r,a)}function vc(r,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var f=s.lanes;f&=r.pendingLanes,a|=f,s.lanes=a,hd(r,a)}}function yg(r,s){var a=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,a===f)){var p=null,v=null;if(a=a.firstBaseUpdate,a!==null){do{var E={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};v===null?p=v=E:v=v.next=E,a=a.next}while(a!==null);v===null?p=v=s:v=v.next=s}else p=v=s;a={baseState:f.baseState,firstBaseUpdate:p,lastBaseUpdate:v,shared:f.shared,effects:f.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=s:r.next=s,a.lastBaseUpdate=s}function yc(r,s,a,f){var p=r.updateQueue;Ms=!1;var v=p.firstBaseUpdate,E=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var z=A,G=z.next;z.next=null,E===null?v=G:E.next=G,E=z;var le=r.alternate;le!==null&&(le=le.updateQueue,A=le.lastBaseUpdate,A!==E&&(A===null?le.firstBaseUpdate=G:A.next=G,le.lastBaseUpdate=z))}if(v!==null){var ce=p.baseState;E=0,le=G=z=null,A=v;do{var ae=A.lane,xe=A.eventTime;if((f&ae)===ae){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var be=r,ke=A;switch(ae=s,xe=a,ke.tag){case 1:if(be=ke.payload,typeof be=="function"){ce=be.call(xe,ce,ae);break e}ce=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=ke.payload,ae=typeof be=="function"?be.call(xe,ce,ae):be,ae==null)break e;ce=Q({},ce,ae);break e;case 2:Ms=!0}}A.callback!==null&&A.lane!==0&&(r.flags|=64,ae=p.effects,ae===null?p.effects=[A]:ae.push(A))}else xe={eventTime:xe,lane:ae,tag:A.tag,payload:A.payload,callback:A.callback,next:null},le===null?(G=le=xe,z=ce):le=le.next=xe,E|=ae;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;ae=A,A=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);if(le===null&&(z=ce),p.baseState=z,p.firstBaseUpdate=G,p.lastBaseUpdate=le,s=p.shared.interleaved,s!==null){p=s;do E|=p.lane,p=p.next;while(p!==s)}else v===null&&(p.shared.lanes=0);Ti|=E,r.lanes=E,r.memoizedState=ce}}function xg(r,s,a){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var f=r[s],p=f.callback;if(p!==null){if(f.callback=null,f=a,typeof p!="function")throw Error(n(191,p));p.call(f)}}}var Va={},Tr=Os(Va),$a=Os(Va),Ba=Os(Va);function Ni(r){if(r===Va)throw Error(n(174));return r}function ef(r,s){switch(yt(Ba,s),yt($a,r),yt(Tr,Va),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:me(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=me(s,r)}bt(Tr),yt(Tr,s)}function Eo(){bt(Tr),bt($a),bt(Ba)}function wg(r){Ni(Ba.current);var s=Ni(Tr.current),a=me(s,r.type);s!==a&&(yt($a,r),yt(Tr,a))}function tf(r){$a.current===r&&(bt(Tr),bt($a))}var Et=Os(0);function xc(r){for(var s=r;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var nf=[];function rf(){for(var r=0;r<nf.length;r++)nf[r]._workInProgressVersionPrimary=null;nf.length=0}var wc=j.ReactCurrentDispatcher,sf=j.ReactCurrentBatchConfig,Pi=0,Rt=null,Wt=null,qt=null,Sc=!1,Ua=!1,Wa=0,S1=0;function sn(){throw Error(n(321))}function of(r,s){if(s===null)return!1;for(var a=0;a<s.length&&a<r.length;a++)if(!pr(r[a],s[a]))return!1;return!0}function af(r,s,a,f,p,v){if(Pi=v,Rt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,wc.current=r===null||r.memoizedState===null?_1:j1,r=a(f,p),Ua){v=0;do{if(Ua=!1,Wa=0,25<=v)throw Error(n(301));v+=1,qt=Wt=null,s.updateQueue=null,wc.current=E1,r=a(f,p)}while(Ua)}if(wc.current=kc,s=Wt!==null&&Wt.next!==null,Pi=0,qt=Wt=Rt=null,Sc=!1,s)throw Error(n(300));return r}function lf(){var r=Wa!==0;return Wa=0,r}function Or(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?Rt.memoizedState=qt=r:qt=qt.next=r,qt}function Xn(){if(Wt===null){var r=Rt.alternate;r=r!==null?r.memoizedState:null}else r=Wt.next;var s=qt===null?Rt.memoizedState:qt.next;if(s!==null)qt=s,Wt=r;else{if(r===null)throw Error(n(310));Wt=r,r={memoizedState:Wt.memoizedState,baseState:Wt.baseState,baseQueue:Wt.baseQueue,queue:Wt.queue,next:null},qt===null?Rt.memoizedState=qt=r:qt=qt.next=r}return qt}function Ha(r,s){return typeof s=="function"?s(r):s}function cf(r){var s=Xn(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var f=Wt,p=f.baseQueue,v=a.pending;if(v!==null){if(p!==null){var E=p.next;p.next=v.next,v.next=E}f.baseQueue=p=v,a.pending=null}if(p!==null){v=p.next,f=f.baseState;var A=E=null,z=null,G=v;do{var le=G.lane;if((Pi&le)===le)z!==null&&(z=z.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),f=G.hasEagerState?G.eagerState:r(f,G.action);else{var ce={lane:le,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};z===null?(A=z=ce,E=f):z=z.next=ce,Rt.lanes|=le,Ti|=le}G=G.next}while(G!==null&&G!==v);z===null?E=f:z.next=A,pr(f,s.memoizedState)||(bn=!0),s.memoizedState=f,s.baseState=E,s.baseQueue=z,a.lastRenderedState=f}if(r=a.interleaved,r!==null){p=r;do v=p.lane,Rt.lanes|=v,Ti|=v,p=p.next;while(p!==r)}else p===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function uf(r){var s=Xn(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var f=a.dispatch,p=a.pending,v=s.memoizedState;if(p!==null){a.pending=null;var E=p=p.next;do v=r(v,E.action),E=E.next;while(E!==p);pr(v,s.memoizedState)||(bn=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),a.lastRenderedState=v}return[v,f]}function Sg(){}function bg(r,s){var a=Rt,f=Xn(),p=s(),v=!pr(f.memoizedState,p);if(v&&(f.memoizedState=p,bn=!0),f=f.queue,df(_g.bind(null,a,f,r),[r]),f.getSnapshot!==s||v||qt!==null&&qt.memoizedState.tag&1){if(a.flags|=2048,Ka(9,kg.bind(null,a,f,p,s),void 0,null),Zt===null)throw Error(n(349));(Pi&30)!==0||Cg(a,s,p)}return p}function Cg(r,s,a){r.flags|=16384,r={getSnapshot:s,value:a},s=Rt.updateQueue,s===null?(s={lastEffect:null,stores:null},Rt.updateQueue=s,s.stores=[r]):(a=s.stores,a===null?s.stores=[r]:a.push(r))}function kg(r,s,a,f){s.value=a,s.getSnapshot=f,jg(s)&&Eg(r)}function _g(r,s,a){return a(function(){jg(s)&&Eg(r)})}function jg(r){var s=r.getSnapshot;r=r.value;try{var a=s();return!pr(r,a)}catch{return!0}}function Eg(r){var s=ts(r,1);s!==null&&xr(s,r,1,-1)}function Rg(r){var s=Or();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:r},s.queue=r,r=r.dispatch=k1.bind(null,Rt,r),[s.memoizedState,r]}function Ka(r,s,a,f){return r={tag:r,create:s,destroy:a,deps:f,next:null},s=Rt.updateQueue,s===null?(s={lastEffect:null,stores:null},Rt.updateQueue=s,s.lastEffect=r.next=r):(a=s.lastEffect,a===null?s.lastEffect=r.next=r:(f=a.next,a.next=r,r.next=f,s.lastEffect=r)),r}function Ng(){return Xn().memoizedState}function bc(r,s,a,f){var p=Or();Rt.flags|=r,p.memoizedState=Ka(1|s,a,void 0,f===void 0?null:f)}function Cc(r,s,a,f){var p=Xn();f=f===void 0?null:f;var v=void 0;if(Wt!==null){var E=Wt.memoizedState;if(v=E.destroy,f!==null&&of(f,E.deps)){p.memoizedState=Ka(s,a,v,f);return}}Rt.flags|=r,p.memoizedState=Ka(1|s,a,v,f)}function Pg(r,s){return bc(8390656,8,r,s)}function df(r,s){return Cc(2048,8,r,s)}function Tg(r,s){return Cc(4,2,r,s)}function Og(r,s){return Cc(4,4,r,s)}function Ag(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Ig(r,s,a){return a=a!=null?a.concat([r]):null,Cc(4,4,Ag.bind(null,s,r),a)}function ff(){}function Mg(r,s){var a=Xn();s=s===void 0?null:s;var f=a.memoizedState;return f!==null&&s!==null&&of(s,f[1])?f[0]:(a.memoizedState=[r,s],r)}function Lg(r,s){var a=Xn();s=s===void 0?null:s;var f=a.memoizedState;return f!==null&&s!==null&&of(s,f[1])?f[0]:(r=r(),a.memoizedState=[r,s],r)}function Fg(r,s,a){return(Pi&21)===0?(r.baseState&&(r.baseState=!1,bn=!0),r.memoizedState=a):(pr(a,s)||(a=hm(),Rt.lanes|=a,Ti|=a,r.baseState=!0),s)}function b1(r,s){var a=mt;mt=a!==0&&4>a?a:4,r(!0);var f=sf.transition;sf.transition={};try{r(!1),s()}finally{mt=a,sf.transition=f}}function Dg(){return Xn().memoizedState}function C1(r,s,a){var f=Vs(r);if(a={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null},zg(r))Vg(s,a);else if(a=gg(r,s,a,f),a!==null){var p=pn();xr(a,r,f,p),$g(a,s,f)}}function k1(r,s,a){var f=Vs(r),p={lane:f,action:a,hasEagerState:!1,eagerState:null,next:null};if(zg(r))Vg(s,p);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var E=s.lastRenderedState,A=v(E,a);if(p.hasEagerState=!0,p.eagerState=A,pr(A,E)){var z=s.interleaved;z===null?(p.next=p,Xd(s)):(p.next=z.next,z.next=p),s.interleaved=p;return}}catch{}finally{}a=gg(r,s,p,f),a!==null&&(p=pn(),xr(a,r,f,p),$g(a,s,f))}}function zg(r){var s=r.alternate;return r===Rt||s!==null&&s===Rt}function Vg(r,s){Ua=Sc=!0;var a=r.pending;a===null?s.next=s:(s.next=a.next,a.next=s),r.pending=s}function $g(r,s,a){if((a&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,a|=f,s.lanes=a,hd(r,a)}}var kc={readContext:Yn,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},_1={readContext:Yn,useCallback:function(r,s){return Or().memoizedState=[r,s===void 0?null:s],r},useContext:Yn,useEffect:Pg,useImperativeHandle:function(r,s,a){return a=a!=null?a.concat([r]):null,bc(4194308,4,Ag.bind(null,s,r),a)},useLayoutEffect:function(r,s){return bc(4194308,4,r,s)},useInsertionEffect:function(r,s){return bc(4,2,r,s)},useMemo:function(r,s){var a=Or();return s=s===void 0?null:s,r=r(),a.memoizedState=[r,s],r},useReducer:function(r,s,a){var f=Or();return s=a!==void 0?a(s):s,f.memoizedState=f.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},f.queue=r,r=r.dispatch=C1.bind(null,Rt,r),[f.memoizedState,r]},useRef:function(r){var s=Or();return r={current:r},s.memoizedState=r},useState:Rg,useDebugValue:ff,useDeferredValue:function(r){return Or().memoizedState=r},useTransition:function(){var r=Rg(!1),s=r[0];return r=b1.bind(null,r[1]),Or().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,a){var f=Rt,p=Or();if(kt){if(a===void 0)throw Error(n(407));a=a()}else{if(a=s(),Zt===null)throw Error(n(349));(Pi&30)!==0||Cg(f,s,a)}p.memoizedState=a;var v={value:a,getSnapshot:s};return p.queue=v,Pg(_g.bind(null,f,v,r),[r]),f.flags|=2048,Ka(9,kg.bind(null,f,v,a,s),void 0,null),a},useId:function(){var r=Or(),s=Zt.identifierPrefix;if(kt){var a=es,f=Jr;a=(f&~(1<<32-hr(f)-1)).toString(32)+a,s=":"+s+"R"+a,a=Wa++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=S1++,s=":"+s+"r"+a.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},j1={readContext:Yn,useCallback:Mg,useContext:Yn,useEffect:df,useImperativeHandle:Ig,useInsertionEffect:Tg,useLayoutEffect:Og,useMemo:Lg,useReducer:cf,useRef:Ng,useState:function(){return cf(Ha)},useDebugValue:ff,useDeferredValue:function(r){var s=Xn();return Fg(s,Wt.memoizedState,r)},useTransition:function(){var r=cf(Ha)[0],s=Xn().memoizedState;return[r,s]},useMutableSource:Sg,useSyncExternalStore:bg,useId:Dg,unstable_isNewReconciler:!1},E1={readContext:Yn,useCallback:Mg,useContext:Yn,useEffect:df,useImperativeHandle:Ig,useInsertionEffect:Tg,useLayoutEffect:Og,useMemo:Lg,useReducer:uf,useRef:Ng,useState:function(){return uf(Ha)},useDebugValue:ff,useDeferredValue:function(r){var s=Xn();return Wt===null?s.memoizedState=r:Fg(s,Wt.memoizedState,r)},useTransition:function(){var r=uf(Ha)[0],s=Xn().memoizedState;return[r,s]},useMutableSource:Sg,useSyncExternalStore:bg,useId:Dg,unstable_isNewReconciler:!1};function gr(r,s){if(r&&r.defaultProps){s=Q({},s),r=r.defaultProps;for(var a in r)s[a]===void 0&&(s[a]=r[a]);return s}return s}function hf(r,s,a,f){s=r.memoizedState,a=a(f,s),a=a==null?s:Q({},s,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var _c={isMounted:function(r){return(r=r._reactInternals)?Ci(r)===r:!1},enqueueSetState:function(r,s,a){r=r._reactInternals;var f=pn(),p=Vs(r),v=ns(f,p);v.payload=s,a!=null&&(v.callback=a),s=Ls(r,v,p),s!==null&&(xr(s,r,p,f),vc(s,r,p))},enqueueReplaceState:function(r,s,a){r=r._reactInternals;var f=pn(),p=Vs(r),v=ns(f,p);v.tag=1,v.payload=s,a!=null&&(v.callback=a),s=Ls(r,v,p),s!==null&&(xr(s,r,p,f),vc(s,r,p))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var a=pn(),f=Vs(r),p=ns(a,f);p.tag=2,s!=null&&(p.callback=s),s=Ls(r,p,f),s!==null&&(xr(s,r,f,a),vc(s,r,f))}};function Bg(r,s,a,f,p,v,E){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,v,E):s.prototype&&s.prototype.isPureReactComponent?!Oa(a,f)||!Oa(p,v):!0}function Ug(r,s,a){var f=!1,p=As,v=s.contextType;return typeof v=="object"&&v!==null?v=Yn(v):(p=Sn(s)?_i:rn.current,f=s.contextTypes,v=(f=f!=null)?wo(r,p):As),s=new s(a,v),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=_c,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=p,r.__reactInternalMemoizedMaskedChildContext=v),s}function Wg(r,s,a,f){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,f),s.state!==r&&_c.enqueueReplaceState(s,s.state,null)}function pf(r,s,a,f){var p=r.stateNode;p.props=a,p.state=r.memoizedState,p.refs={},Jd(r);var v=s.contextType;typeof v=="object"&&v!==null?p.context=Yn(v):(v=Sn(s)?_i:rn.current,p.context=wo(r,v)),p.state=r.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(hf(r,s,v,a),p.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(s=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),s!==p.state&&_c.enqueueReplaceState(p,p.state,null),yc(r,a,p,f),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308)}function Ro(r,s){try{var a="",f=s;do a+=Ne(f),f=f.return;while(f);var p=a}catch(v){p=`
|
|
39
|
+
Error generating stack: `+v.message+`
|
|
40
|
+
`+v.stack}return{value:r,source:s,stack:p,digest:null}}function mf(r,s,a){return{value:r,source:null,stack:a??null,digest:s??null}}function gf(r,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var R1=typeof WeakMap=="function"?WeakMap:Map;function Hg(r,s,a){a=ns(-1,a),a.tag=3,a.payload={element:null};var f=s.value;return a.callback=function(){Oc||(Oc=!0,Tf=f),gf(r,s)},a}function Kg(r,s,a){a=ns(-1,a),a.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var p=s.value;a.payload=function(){return f(p)},a.callback=function(){gf(r,s)}}var v=r.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(a.callback=function(){gf(r,s),typeof f!="function"&&(Ds===null?Ds=new Set([this]):Ds.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),a}function Qg(r,s,a){var f=r.pingCache;if(f===null){f=r.pingCache=new R1;var p=new Set;f.set(s,p)}else p=f.get(s),p===void 0&&(p=new Set,f.set(s,p));p.has(a)||(p.add(a),r=B1.bind(null,r,s,a),s.then(r,r))}function qg(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Zg(r,s,a,f,p){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=ns(-1,1),s.tag=2,Ls(a,s,1))),a.lanes|=1),r):(r.flags|=65536,r.lanes=p,r)}var N1=j.ReactCurrentOwner,bn=!1;function hn(r,s,a,f){s.child=r===null?mg(s,null,a,f):ko(s,r.child,a,f)}function Gg(r,s,a,f,p){a=a.render;var v=s.ref;return jo(s,p),f=af(r,s,a,f,v,p),a=lf(),r!==null&&!bn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~p,rs(r,s,p)):(kt&&a&&Ud(s),s.flags|=1,hn(r,s,f,p),s.child)}function Yg(r,s,a,f,p){if(r===null){var v=a.type;return typeof v=="function"&&!Df(v)&&v.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=v,Xg(r,s,v,f,p)):(r=Dc(a.type,null,f,s,s.mode,p),r.ref=s.ref,r.return=s,s.child=r)}if(v=r.child,(r.lanes&p)===0){var E=v.memoizedProps;if(a=a.compare,a=a!==null?a:Oa,a(E,f)&&r.ref===s.ref)return rs(r,s,p)}return s.flags|=1,r=Bs(v,f),r.ref=s.ref,r.return=s,s.child=r}function Xg(r,s,a,f,p){if(r!==null){var v=r.memoizedProps;if(Oa(v,f)&&r.ref===s.ref)if(bn=!1,s.pendingProps=f=v,(r.lanes&p)!==0)(r.flags&131072)!==0&&(bn=!0);else return s.lanes=r.lanes,rs(r,s,p)}return vf(r,s,a,f,p)}function Jg(r,s,a){var f=s.pendingProps,p=f.children,v=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Po,Dn),Dn|=a;else{if((a&1073741824)===0)return r=v!==null?v.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,yt(Po,Dn),Dn|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:a,yt(Po,Dn),Dn|=f}else v!==null?(f=v.baseLanes|a,s.memoizedState=null):f=a,yt(Po,Dn),Dn|=f;return hn(r,s,p,a),s.child}function ev(r,s){var a=s.ref;(r===null&&a!==null||r!==null&&r.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function vf(r,s,a,f,p){var v=Sn(a)?_i:rn.current;return v=wo(s,v),jo(s,p),a=af(r,s,a,f,v,p),f=lf(),r!==null&&!bn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~p,rs(r,s,p)):(kt&&f&&Ud(s),s.flags|=1,hn(r,s,a,p),s.child)}function tv(r,s,a,f,p){if(Sn(a)){var v=!0;cc(s)}else v=!1;if(jo(s,p),s.stateNode===null)Ec(r,s),Ug(s,a,f),pf(s,a,f,p),f=!0;else if(r===null){var E=s.stateNode,A=s.memoizedProps;E.props=A;var z=E.context,G=a.contextType;typeof G=="object"&&G!==null?G=Yn(G):(G=Sn(a)?_i:rn.current,G=wo(s,G));var le=a.getDerivedStateFromProps,ce=typeof le=="function"||typeof E.getSnapshotBeforeUpdate=="function";ce||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(A!==f||z!==G)&&Wg(s,E,f,G),Ms=!1;var ae=s.memoizedState;E.state=ae,yc(s,f,E,p),z=s.memoizedState,A!==f||ae!==z||wn.current||Ms?(typeof le=="function"&&(hf(s,a,le,f),z=s.memoizedState),(A=Ms||Bg(s,a,A,f,ae,z,G))?(ce||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=z),E.props=f,E.state=z,E.context=G,f=A):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{E=s.stateNode,vg(r,s),A=s.memoizedProps,G=s.type===s.elementType?A:gr(s.type,A),E.props=G,ce=s.pendingProps,ae=E.context,z=a.contextType,typeof z=="object"&&z!==null?z=Yn(z):(z=Sn(a)?_i:rn.current,z=wo(s,z));var xe=a.getDerivedStateFromProps;(le=typeof xe=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(A!==ce||ae!==z)&&Wg(s,E,f,z),Ms=!1,ae=s.memoizedState,E.state=ae,yc(s,f,E,p);var be=s.memoizedState;A!==ce||ae!==be||wn.current||Ms?(typeof xe=="function"&&(hf(s,a,xe,f),be=s.memoizedState),(G=Ms||Bg(s,a,G,f,ae,be,z)||!1)?(le||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(f,be,z),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(f,be,z)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=be),E.props=f,E.state=be,E.context=z,f=G):(typeof E.componentDidUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&ae===r.memoizedState||(s.flags|=1024),f=!1)}return yf(r,s,a,f,v,p)}function yf(r,s,a,f,p,v){ev(r,s);var E=(s.flags&128)!==0;if(!f&&!E)return p&&og(s,a,!1),rs(r,s,v);f=s.stateNode,N1.current=s;var A=E&&typeof a.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&E?(s.child=ko(s,r.child,null,v),s.child=ko(s,null,A,v)):hn(r,s,A,v),s.memoizedState=f.state,p&&og(s,a,!0),s.child}function nv(r){var s=r.stateNode;s.pendingContext?sg(r,s.pendingContext,s.pendingContext!==s.context):s.context&&sg(r,s.context,!1),ef(r,s.containerInfo)}function rv(r,s,a,f,p){return Co(),Qd(p),s.flags|=256,hn(r,s,a,f),s.child}var xf={dehydrated:null,treeContext:null,retryLane:0};function wf(r){return{baseLanes:r,cachePool:null,transitions:null}}function sv(r,s,a){var f=s.pendingProps,p=Et.current,v=!1,E=(s.flags&128)!==0,A;if((A=E)||(A=r!==null&&r.memoizedState===null?!1:(p&2)!==0),A?(v=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(p|=1),yt(Et,p&1),r===null)return Kd(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(E=f.children,r=f.fallback,v?(f=s.mode,v=s.child,E={mode:"hidden",children:E},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=E):v=zc(E,f,0,null),r=Mi(r,f,a,null),v.return=s,r.return=s,v.sibling=r,s.child=v,s.child.memoizedState=wf(a),s.memoizedState=xf,r):Sf(s,E));if(p=r.memoizedState,p!==null&&(A=p.dehydrated,A!==null))return P1(r,s,E,f,A,p,a);if(v){v=f.fallback,E=s.mode,p=r.child,A=p.sibling;var z={mode:"hidden",children:f.children};return(E&1)===0&&s.child!==p?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=Bs(p,z),f.subtreeFlags=p.subtreeFlags&14680064),A!==null?v=Bs(A,v):(v=Mi(v,E,a,null),v.flags|=2),v.return=s,f.return=s,f.sibling=v,s.child=f,f=v,v=s.child,E=r.child.memoizedState,E=E===null?wf(a):{baseLanes:E.baseLanes|a,cachePool:null,transitions:E.transitions},v.memoizedState=E,v.childLanes=r.childLanes&~a,s.memoizedState=xf,f}return v=r.child,r=v.sibling,f=Bs(v,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=a),f.return=s,f.sibling=null,r!==null&&(a=s.deletions,a===null?(s.deletions=[r],s.flags|=16):a.push(r)),s.child=f,s.memoizedState=null,f}function Sf(r,s){return s=zc({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function jc(r,s,a,f){return f!==null&&Qd(f),ko(s,r.child,null,a),r=Sf(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function P1(r,s,a,f,p,v,E){if(a)return s.flags&256?(s.flags&=-257,f=mf(Error(n(422))),jc(r,s,E,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(v=f.fallback,p=s.mode,f=zc({mode:"visible",children:f.children},p,0,null),v=Mi(v,p,E,null),v.flags|=2,f.return=s,v.return=s,f.sibling=v,s.child=f,(s.mode&1)!==0&&ko(s,r.child,null,E),s.child.memoizedState=wf(E),s.memoizedState=xf,v);if((s.mode&1)===0)return jc(r,s,E,null);if(p.data==="$!"){if(f=p.nextSibling&&p.nextSibling.dataset,f)var A=f.dgst;return f=A,v=Error(n(419)),f=mf(v,f,void 0),jc(r,s,E,f)}if(A=(E&r.childLanes)!==0,bn||A){if(f=Zt,f!==null){switch(E&-E){case 4:p=2;break;case 16:p=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(f.suspendedLanes|E))!==0?0:p,p!==0&&p!==v.retryLane&&(v.retryLane=p,ts(r,p),xr(f,r,p,-1))}return Ff(),f=mf(Error(n(421))),jc(r,s,E,f)}return p.data==="$?"?(s.flags|=128,s.child=r.child,s=U1.bind(null,r),p._reactRetry=s,null):(r=v.treeContext,Fn=Ts(p.nextSibling),Ln=s,kt=!0,mr=null,r!==null&&(Zn[Gn++]=Jr,Zn[Gn++]=es,Zn[Gn++]=ji,Jr=r.id,es=r.overflow,ji=s),s=Sf(s,f.children),s.flags|=4096,s)}function iv(r,s,a){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Yd(r.return,s,a)}function bf(r,s,a,f,p){var v=r.memoizedState;v===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:a,tailMode:p}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=a,v.tailMode=p)}function ov(r,s,a){var f=s.pendingProps,p=f.revealOrder,v=f.tail;if(hn(r,s,f.children,a),f=Et.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&iv(r,a,s);else if(r.tag===19)iv(r,a,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(yt(Et,f),(s.mode&1)===0)s.memoizedState=null;else switch(p){case"forwards":for(a=s.child,p=null;a!==null;)r=a.alternate,r!==null&&xc(r)===null&&(p=a),a=a.sibling;a=p,a===null?(p=s.child,s.child=null):(p=a.sibling,a.sibling=null),bf(s,!1,p,a,v);break;case"backwards":for(a=null,p=s.child,s.child=null;p!==null;){if(r=p.alternate,r!==null&&xc(r)===null){s.child=p;break}r=p.sibling,p.sibling=a,a=p,p=r}bf(s,!0,a,null,v);break;case"together":bf(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Ec(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function rs(r,s,a){if(r!==null&&(s.dependencies=r.dependencies),Ti|=s.lanes,(a&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,a=Bs(r,r.pendingProps),s.child=a,a.return=s;r.sibling!==null;)r=r.sibling,a=a.sibling=Bs(r,r.pendingProps),a.return=s;a.sibling=null}return s.child}function T1(r,s,a){switch(s.tag){case 3:nv(s),Co();break;case 5:wg(s);break;case 1:Sn(s.type)&&cc(s);break;case 4:ef(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,p=s.memoizedProps.value;yt(mc,f._currentValue),f._currentValue=p;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(yt(Et,Et.current&1),s.flags|=128,null):(a&s.child.childLanes)!==0?sv(r,s,a):(yt(Et,Et.current&1),r=rs(r,s,a),r!==null?r.sibling:null);yt(Et,Et.current&1);break;case 19:if(f=(a&s.childLanes)!==0,(r.flags&128)!==0){if(f)return ov(r,s,a);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),yt(Et,Et.current),f)break;return null;case 22:case 23:return s.lanes=0,Jg(r,s,a)}return rs(r,s,a)}var av,Cf,lv,cv;av=function(r,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)r.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Cf=function(){},lv=function(r,s,a,f){var p=r.memoizedProps;if(p!==f){r=s.stateNode,Ni(Tr.current);var v=null;switch(a){case"input":p=Mt(r,p),f=Mt(r,f),v=[];break;case"select":p=Q({},p,{value:void 0}),f=Q({},f,{value:void 0}),v=[];break;case"textarea":p=K(r,p),f=K(r,f),v=[];break;default:typeof p.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=oc)}$e(a,f);var E;a=null;for(G in p)if(!f.hasOwnProperty(G)&&p.hasOwnProperty(G)&&p[G]!=null)if(G==="style"){var A=p[G];for(E in A)A.hasOwnProperty(E)&&(a||(a={}),a[E]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?v||(v=[]):(v=v||[]).push(G,null));for(G in f){var z=f[G];if(A=p!=null?p[G]:void 0,f.hasOwnProperty(G)&&z!==A&&(z!=null||A!=null))if(G==="style")if(A){for(E in A)!A.hasOwnProperty(E)||z&&z.hasOwnProperty(E)||(a||(a={}),a[E]="");for(E in z)z.hasOwnProperty(E)&&A[E]!==z[E]&&(a||(a={}),a[E]=z[E])}else a||(v||(v=[]),v.push(G,a)),a=z;else G==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,A=A?A.__html:void 0,z!=null&&A!==z&&(v=v||[]).push(G,z)):G==="children"?typeof z!="string"&&typeof z!="number"||(v=v||[]).push(G,""+z):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(z!=null&&G==="onScroll"&&St("scroll",r),v||A===z||(v=[])):(v=v||[]).push(G,z))}a&&(v=v||[]).push("style",a);var G=v;(s.updateQueue=G)&&(s.flags|=4)}},cv=function(r,s,a,f){a!==f&&(s.flags|=4)};function Qa(r,s){if(!kt)switch(r.tailMode){case"hidden":s=r.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function on(r){var s=r.alternate!==null&&r.alternate.child===r.child,a=0,f=0;if(s)for(var p=r.child;p!==null;)a|=p.lanes|p.childLanes,f|=p.subtreeFlags&14680064,f|=p.flags&14680064,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)a|=p.lanes|p.childLanes,f|=p.subtreeFlags,f|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=f,r.childLanes=a,s}function O1(r,s,a){var f=s.pendingProps;switch(Wd(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(s),null;case 1:return Sn(s.type)&&lc(),on(s),null;case 3:return f=s.stateNode,Eo(),bt(wn),bt(rn),rf(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(hc(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(If(mr),mr=null))),Cf(r,s),on(s),null;case 5:tf(s);var p=Ni(Ba.current);if(a=s.type,r!==null&&s.stateNode!=null)lv(r,s,a,f,p),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return on(s),null}if(r=Ni(Tr.current),hc(s)){f=s.stateNode,a=s.type;var v=s.memoizedProps;switch(f[Pr]=s,f[Fa]=v,r=(s.mode&1)!==0,a){case"dialog":St("cancel",f),St("close",f);break;case"iframe":case"object":case"embed":St("load",f);break;case"video":case"audio":for(p=0;p<Ia.length;p++)St(Ia[p],f);break;case"source":St("error",f);break;case"img":case"image":case"link":St("error",f),St("load",f);break;case"details":St("toggle",f);break;case"input":tn(f,v),St("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},St("invalid",f);break;case"textarea":J(f,v),St("invalid",f)}$e(a,v),p=null;for(var E in v)if(v.hasOwnProperty(E)){var A=v[E];E==="children"?typeof A=="string"?f.textContent!==A&&(v.suppressHydrationWarning!==!0&&ic(f.textContent,A,r),p=["children",A]):typeof A=="number"&&f.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&ic(f.textContent,A,r),p=["children",""+A]):o.hasOwnProperty(E)&&A!=null&&E==="onScroll"&&St("scroll",f)}switch(a){case"input":Fe(f),rt(f,v,!0);break;case"textarea":Fe(f),ue(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=oc)}f=p,s.updateQueue=f,f!==null&&(s.flags|=4)}else{E=p.nodeType===9?p:p.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=ne(a)),r==="http://www.w3.org/1999/xhtml"?a==="script"?(r=E.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=E.createElement(a,{is:f.is}):(r=E.createElement(a),a==="select"&&(E=r,f.multiple?E.multiple=!0:f.size&&(E.size=f.size))):r=E.createElementNS(r,a),r[Pr]=s,r[Fa]=f,av(r,s,!1,!1),s.stateNode=r;e:{switch(E=Ue(a,f),a){case"dialog":St("cancel",r),St("close",r),p=f;break;case"iframe":case"object":case"embed":St("load",r),p=f;break;case"video":case"audio":for(p=0;p<Ia.length;p++)St(Ia[p],r);p=f;break;case"source":St("error",r),p=f;break;case"img":case"image":case"link":St("error",r),St("load",r),p=f;break;case"details":St("toggle",r),p=f;break;case"input":tn(r,f),p=Mt(r,f),St("invalid",r);break;case"option":p=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},p=Q({},f,{value:void 0}),St("invalid",r);break;case"textarea":J(r,f),p=K(r,f),St("invalid",r);break;default:p=f}$e(a,p),A=p;for(v in A)if(A.hasOwnProperty(v)){var z=A[v];v==="style"?pe(r,z):v==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Be(r,z)):v==="children"?typeof z=="string"?(a!=="textarea"||z!=="")&&jt(r,z):typeof z=="number"&&jt(r,""+z):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?z!=null&&v==="onScroll"&&St("scroll",r):z!=null&&R(r,v,z,E))}switch(a){case"input":Fe(r),rt(r,f,!1);break;case"textarea":Fe(r),ue(r);break;case"option":f.value!=null&&r.setAttribute("value",""+ve(f.value));break;case"select":r.multiple=!!f.multiple,v=f.value,v!=null?D(r,!!f.multiple,v,!1):f.defaultValue!=null&&D(r,!!f.multiple,f.defaultValue,!0);break;default:typeof p.onClick=="function"&&(r.onclick=oc)}switch(a){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return on(s),null;case 6:if(r&&s.stateNode!=null)cv(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(a=Ni(Ba.current),Ni(Tr.current),hc(s)){if(f=s.stateNode,a=s.memoizedProps,f[Pr]=s,(v=f.nodeValue!==a)&&(r=Ln,r!==null))switch(r.tag){case 3:ic(f.nodeValue,a,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ic(f.nodeValue,a,(r.mode&1)!==0)}v&&(s.flags|=4)}else f=(a.nodeType===9?a:a.ownerDocument).createTextNode(f),f[Pr]=s,s.stateNode=f}return on(s),null;case 13:if(bt(Et),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(kt&&Fn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)fg(),Co(),s.flags|=98560,v=!1;else if(v=hc(s),f!==null&&f.dehydrated!==null){if(r===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[Pr]=s}else Co(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;on(s),v=!1}else mr!==null&&(If(mr),mr=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=a,s):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(Et.current&1)!==0?Ht===0&&(Ht=3):Ff())),s.updateQueue!==null&&(s.flags|=4),on(s),null);case 4:return Eo(),Cf(r,s),r===null&&Ma(s.stateNode.containerInfo),on(s),null;case 10:return Gd(s.type._context),on(s),null;case 17:return Sn(s.type)&&lc(),on(s),null;case 19:if(bt(Et),v=s.memoizedState,v===null)return on(s),null;if(f=(s.flags&128)!==0,E=v.rendering,E===null)if(f)Qa(v,!1);else{if(Ht!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(E=xc(r),E!==null){for(s.flags|=128,Qa(v,!1),f=E.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=a,a=s.child;a!==null;)v=a,r=f,v.flags&=14680066,E=v.alternate,E===null?(v.childLanes=0,v.lanes=r,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=E.childLanes,v.lanes=E.lanes,v.child=E.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=E.memoizedProps,v.memoizedState=E.memoizedState,v.updateQueue=E.updateQueue,v.type=E.type,r=E.dependencies,v.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a=a.sibling;return yt(Et,Et.current&1|2),s.child}r=r.sibling}v.tail!==null&&Lt()>To&&(s.flags|=128,f=!0,Qa(v,!1),s.lanes=4194304)}else{if(!f)if(r=xc(E),r!==null){if(s.flags|=128,f=!0,a=r.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),Qa(v,!0),v.tail===null&&v.tailMode==="hidden"&&!E.alternate&&!kt)return on(s),null}else 2*Lt()-v.renderingStartTime>To&&a!==1073741824&&(s.flags|=128,f=!0,Qa(v,!1),s.lanes=4194304);v.isBackwards?(E.sibling=s.child,s.child=E):(a=v.last,a!==null?a.sibling=E:s.child=E,v.last=E)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=Lt(),s.sibling=null,a=Et.current,yt(Et,f?a&1|2:a&1),s):(on(s),null);case 22:case 23:return Lf(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Dn&1073741824)!==0&&(on(s),s.subtreeFlags&6&&(s.flags|=8192)):on(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function A1(r,s){switch(Wd(s),s.tag){case 1:return Sn(s.type)&&lc(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Eo(),bt(wn),bt(rn),rf(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return tf(s),null;case 13:if(bt(Et),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Co()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return bt(Et),null;case 4:return Eo(),null;case 10:return Gd(s.type._context),null;case 22:case 23:return Lf(),null;case 24:return null;default:return null}}var Rc=!1,an=!1,I1=typeof WeakSet=="function"?WeakSet:Set,Se=null;function No(r,s){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(f){Ot(r,s,f)}else a.current=null}function kf(r,s,a){try{a()}catch(f){Ot(r,s,f)}}var uv=!1;function M1(r,s){if(Md=ql,r=Bm(),Ed(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var f=a.getSelection&&a.getSelection();if(f&&f.rangeCount!==0){a=f.anchorNode;var p=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{a.nodeType,v.nodeType}catch{a=null;break e}var E=0,A=-1,z=-1,G=0,le=0,ce=r,ae=null;t:for(;;){for(var xe;ce!==a||p!==0&&ce.nodeType!==3||(A=E+p),ce!==v||f!==0&&ce.nodeType!==3||(z=E+f),ce.nodeType===3&&(E+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)ae=ce,ce=xe;for(;;){if(ce===r)break t;if(ae===a&&++G===p&&(A=E),ae===v&&++le===f&&(z=E),(xe=ce.nextSibling)!==null)break;ce=ae,ae=ce.parentNode}ce=xe}a=A===-1||z===-1?null:{start:A,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ld={focusedElem:r,selectionRange:a},ql=!1,Se=s;Se!==null;)if(s=Se,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Se=r;else for(;Se!==null;){s=Se;try{var be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var ke=be.memoizedProps,Ft=be.memoizedState,H=s.stateNode,$=H.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Ft);H.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var q=s.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){Ot(s,s.return,de)}if(r=s.sibling,r!==null){r.return=s.return,Se=r;break}Se=s.return}return be=uv,uv=!1,be}function qa(r,s,a){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var p=f=f.next;do{if((p.tag&r)===r){var v=p.destroy;p.destroy=void 0,v!==void 0&&kf(s,a,v)}p=p.next}while(p!==f)}}function Nc(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&r)===r){var f=a.create;a.destroy=f()}a=a.next}while(a!==s)}}function _f(r){var s=r.ref;if(s!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof s=="function"?s(r):s.current=r}}function dv(r){var s=r.alternate;s!==null&&(r.alternate=null,dv(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[Pr],delete s[Fa],delete s[Vd],delete s[v1],delete s[y1])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function fv(r){return r.tag===5||r.tag===3||r.tag===4}function hv(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||fv(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function jf(r,s,a){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(r,s):a.insertBefore(r,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(r,a)):(s=a,s.appendChild(r)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=oc));else if(f!==4&&(r=r.child,r!==null))for(jf(r,s,a),r=r.sibling;r!==null;)jf(r,s,a),r=r.sibling}function Ef(r,s,a){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?a.insertBefore(r,s):a.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(Ef(r,s,a),r=r.sibling;r!==null;)Ef(r,s,a),r=r.sibling}var Jt=null,vr=!1;function Fs(r,s,a){for(a=a.child;a!==null;)pv(r,s,a),a=a.sibling}function pv(r,s,a){if(Nr&&typeof Nr.onCommitFiberUnmount=="function")try{Nr.onCommitFiberUnmount(Bl,a)}catch{}switch(a.tag){case 5:an||No(a,s);case 6:var f=Jt,p=vr;Jt=null,Fs(r,s,a),Jt=f,vr=p,Jt!==null&&(vr?(r=Jt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):Jt.removeChild(a.stateNode));break;case 18:Jt!==null&&(vr?(r=Jt,a=a.stateNode,r.nodeType===8?zd(r.parentNode,a):r.nodeType===1&&zd(r,a),ja(r)):zd(Jt,a.stateNode));break;case 4:f=Jt,p=vr,Jt=a.stateNode.containerInfo,vr=!0,Fs(r,s,a),Jt=f,vr=p;break;case 0:case 11:case 14:case 15:if(!an&&(f=a.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){p=f=f.next;do{var v=p,E=v.destroy;v=v.tag,E!==void 0&&((v&2)!==0||(v&4)!==0)&&kf(a,s,E),p=p.next}while(p!==f)}Fs(r,s,a);break;case 1:if(!an&&(No(a,s),f=a.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=a.memoizedProps,f.state=a.memoizedState,f.componentWillUnmount()}catch(A){Ot(a,s,A)}Fs(r,s,a);break;case 21:Fs(r,s,a);break;case 22:a.mode&1?(an=(f=an)||a.memoizedState!==null,Fs(r,s,a),an=f):Fs(r,s,a);break;default:Fs(r,s,a)}}function mv(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new I1),s.forEach(function(f){var p=W1.bind(null,r,f);a.has(f)||(a.add(f),f.then(p,p))})}}function yr(r,s){var a=s.deletions;if(a!==null)for(var f=0;f<a.length;f++){var p=a[f];try{var v=r,E=s,A=E;e:for(;A!==null;){switch(A.tag){case 5:Jt=A.stateNode,vr=!1;break e;case 3:Jt=A.stateNode.containerInfo,vr=!0;break e;case 4:Jt=A.stateNode.containerInfo,vr=!0;break e}A=A.return}if(Jt===null)throw Error(n(160));pv(v,E,p),Jt=null,vr=!1;var z=p.alternate;z!==null&&(z.return=null),p.return=null}catch(G){Ot(p,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)gv(s,r),s=s.sibling}function gv(r,s){var a=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(yr(s,r),Ar(r),f&4){try{qa(3,r,r.return),Nc(3,r)}catch(ke){Ot(r,r.return,ke)}try{qa(5,r,r.return)}catch(ke){Ot(r,r.return,ke)}}break;case 1:yr(s,r),Ar(r),f&512&&a!==null&&No(a,a.return);break;case 5:if(yr(s,r),Ar(r),f&512&&a!==null&&No(a,a.return),r.flags&32){var p=r.stateNode;try{jt(p,"")}catch(ke){Ot(r,r.return,ke)}}if(f&4&&(p=r.stateNode,p!=null)){var v=r.memoizedProps,E=a!==null?a.memoizedProps:v,A=r.type,z=r.updateQueue;if(r.updateQueue=null,z!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&Xt(p,v),Ue(A,E);var G=Ue(A,v);for(E=0;E<z.length;E+=2){var le=z[E],ce=z[E+1];le==="style"?pe(p,ce):le==="dangerouslySetInnerHTML"?Be(p,ce):le==="children"?jt(p,ce):R(p,le,ce,G)}switch(A){case"input":Dt(p,v);break;case"textarea":ge(p,v);break;case"select":var ae=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!v.multiple;var xe=v.value;xe!=null?D(p,!!v.multiple,xe,!1):ae!==!!v.multiple&&(v.defaultValue!=null?D(p,!!v.multiple,v.defaultValue,!0):D(p,!!v.multiple,v.multiple?[]:"",!1))}p[Fa]=v}catch(ke){Ot(r,r.return,ke)}}break;case 6:if(yr(s,r),Ar(r),f&4){if(r.stateNode===null)throw Error(n(162));p=r.stateNode,v=r.memoizedProps;try{p.nodeValue=v}catch(ke){Ot(r,r.return,ke)}}break;case 3:if(yr(s,r),Ar(r),f&4&&a!==null&&a.memoizedState.isDehydrated)try{ja(s.containerInfo)}catch(ke){Ot(r,r.return,ke)}break;case 4:yr(s,r),Ar(r);break;case 13:yr(s,r),Ar(r),p=r.child,p.flags&8192&&(v=p.memoizedState!==null,p.stateNode.isHidden=v,!v||p.alternate!==null&&p.alternate.memoizedState!==null||(Pf=Lt())),f&4&&mv(r);break;case 22:if(le=a!==null&&a.memoizedState!==null,r.mode&1?(an=(G=an)||le,yr(s,r),an=G):yr(s,r),Ar(r),f&8192){if(G=r.memoizedState!==null,(r.stateNode.isHidden=G)&&!le&&(r.mode&1)!==0)for(Se=r,le=r.child;le!==null;){for(ce=Se=le;Se!==null;){switch(ae=Se,xe=ae.child,ae.tag){case 0:case 11:case 14:case 15:qa(4,ae,ae.return);break;case 1:No(ae,ae.return);var be=ae.stateNode;if(typeof be.componentWillUnmount=="function"){f=ae,a=ae.return;try{s=f,be.props=s.memoizedProps,be.state=s.memoizedState,be.componentWillUnmount()}catch(ke){Ot(f,a,ke)}}break;case 5:No(ae,ae.return);break;case 22:if(ae.memoizedState!==null){xv(ce);continue}}xe!==null?(xe.return=ae,Se=xe):xv(ce)}le=le.sibling}e:for(le=null,ce=r;;){if(ce.tag===5){if(le===null){le=ce;try{p=ce.stateNode,G?(v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=ce.stateNode,z=ce.memoizedProps.style,E=z!=null&&z.hasOwnProperty("display")?z.display:null,A.style.display=lo("display",E))}catch(ke){Ot(r,r.return,ke)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=G?"":ce.memoizedProps}catch(ke){Ot(r,r.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===r)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===r)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===r)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,r),Ar(r),f&4&&mv(r);break;case 21:break;default:yr(s,r),Ar(r)}}function Ar(r){var s=r.flags;if(s&2){try{e:{for(var a=r.return;a!==null;){if(fv(a)){var f=a;break e}a=a.return}throw Error(n(160))}switch(f.tag){case 5:var p=f.stateNode;f.flags&32&&(jt(p,""),f.flags&=-33);var v=hv(r);Ef(r,v,p);break;case 3:case 4:var E=f.stateNode.containerInfo,A=hv(r);jf(r,A,E);break;default:throw Error(n(161))}}catch(z){Ot(r,r.return,z)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function L1(r,s,a){Se=r,vv(r)}function vv(r,s,a){for(var f=(r.mode&1)!==0;Se!==null;){var p=Se,v=p.child;if(p.tag===22&&f){var E=p.memoizedState!==null||Rc;if(!E){var A=p.alternate,z=A!==null&&A.memoizedState!==null||an;A=Rc;var G=an;if(Rc=E,(an=z)&&!G)for(Se=p;Se!==null;)E=Se,z=E.child,E.tag===22&&E.memoizedState!==null?wv(p):z!==null?(z.return=E,Se=z):wv(p);for(;v!==null;)Se=v,vv(v),v=v.sibling;Se=p,Rc=A,an=G}yv(r)}else(p.subtreeFlags&8772)!==0&&v!==null?(v.return=p,Se=v):yv(r)}}function yv(r){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var a=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:an||Nc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!an)if(a===null)f.componentDidMount();else{var p=s.elementType===s.type?a.memoizedProps:gr(s.type,a.memoizedProps);f.componentDidUpdate(p,a.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&xg(s,v,f);break;case 3:var E=s.updateQueue;if(E!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}xg(s,E,a)}break;case 5:var A=s.stateNode;if(a===null&&s.flags&4){a=A;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&a.focus();break;case"img":z.src&&(a.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var le=G.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&ja(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}an||s.flags&512&&_f(s)}catch(ae){Ot(s,s.return,ae)}}if(s===r){Se=null;break}if(a=s.sibling,a!==null){a.return=s.return,Se=a;break}Se=s.return}}function xv(r){for(;Se!==null;){var s=Se;if(s===r){Se=null;break}var a=s.sibling;if(a!==null){a.return=s.return,Se=a;break}Se=s.return}}function wv(r){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{Nc(4,s)}catch(z){Ot(s,a,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var p=s.return;try{f.componentDidMount()}catch(z){Ot(s,p,z)}}var v=s.return;try{_f(s)}catch(z){Ot(s,v,z)}break;case 5:var E=s.return;try{_f(s)}catch(z){Ot(s,E,z)}}}catch(z){Ot(s,s.return,z)}if(s===r){Se=null;break}var A=s.sibling;if(A!==null){A.return=s.return,Se=A;break}Se=s.return}}var F1=Math.ceil,Pc=j.ReactCurrentDispatcher,Rf=j.ReactCurrentOwner,Jn=j.ReactCurrentBatchConfig,st=0,Zt=null,zt=null,en=0,Dn=0,Po=Os(0),Ht=0,Za=null,Ti=0,Tc=0,Nf=0,Ga=null,Cn=null,Pf=0,To=1/0,ss=null,Oc=!1,Tf=null,Ds=null,Ac=!1,zs=null,Ic=0,Ya=0,Of=null,Mc=-1,Lc=0;function pn(){return(st&6)!==0?Lt():Mc!==-1?Mc:Mc=Lt()}function Vs(r){return(r.mode&1)===0?1:(st&2)!==0&&en!==0?en&-en:w1.transition!==null?(Lc===0&&(Lc=hm()),Lc):(r=mt,r!==0||(r=window.event,r=r===void 0?16:bm(r.type)),r)}function xr(r,s,a,f){if(50<Ya)throw Ya=0,Of=null,Error(n(185));Sa(r,a,f),((st&2)===0||r!==Zt)&&(r===Zt&&((st&2)===0&&(Tc|=a),Ht===4&&$s(r,en)),kn(r,f),a===1&&st===0&&(s.mode&1)===0&&(To=Lt()+500,uc&&Is()))}function kn(r,s){var a=r.callbackNode;wb(r,s);var f=Hl(r,r===Zt?en:0);if(f===0)a!==null&&um(a),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(a!=null&&um(a),s===1)r.tag===0?x1(bv.bind(null,r)):ag(bv.bind(null,r)),m1(function(){(st&6)===0&&Is()}),a=null;else{switch(pm(f)){case 1:a=ud;break;case 4:a=dm;break;case 16:a=$l;break;case 536870912:a=fm;break;default:a=$l}a=Pv(a,Sv.bind(null,r))}r.callbackPriority=s,r.callbackNode=a}}function Sv(r,s){if(Mc=-1,Lc=0,(st&6)!==0)throw Error(n(327));var a=r.callbackNode;if(Oo()&&r.callbackNode!==a)return null;var f=Hl(r,r===Zt?en:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=Fc(r,f);else{s=f;var p=st;st|=2;var v=kv();(Zt!==r||en!==s)&&(ss=null,To=Lt()+500,Ai(r,s));do try{V1();break}catch(A){Cv(r,A)}while(!0);Zd(),Pc.current=v,st=p,zt!==null?s=0:(Zt=null,en=0,s=Ht)}if(s!==0){if(s===2&&(p=dd(r),p!==0&&(f=p,s=Af(r,p))),s===1)throw a=Za,Ai(r,0),$s(r,f),kn(r,Lt()),a;if(s===6)$s(r,f);else{if(p=r.current.alternate,(f&30)===0&&!D1(p)&&(s=Fc(r,f),s===2&&(v=dd(r),v!==0&&(f=v,s=Af(r,v))),s===1))throw a=Za,Ai(r,0),$s(r,f),kn(r,Lt()),a;switch(r.finishedWork=p,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Ii(r,Cn,ss);break;case 3:if($s(r,f),(f&130023424)===f&&(s=Pf+500-Lt(),10<s)){if(Hl(r,0)!==0)break;if(p=r.suspendedLanes,(p&f)!==f){pn(),r.pingedLanes|=r.suspendedLanes&p;break}r.timeoutHandle=Dd(Ii.bind(null,r,Cn,ss),s);break}Ii(r,Cn,ss);break;case 4:if($s(r,f),(f&4194240)===f)break;for(s=r.eventTimes,p=-1;0<f;){var E=31-hr(f);v=1<<E,E=s[E],E>p&&(p=E),f&=~v}if(f=p,f=Lt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*F1(f/1960))-f,10<f){r.timeoutHandle=Dd(Ii.bind(null,r,Cn,ss),f);break}Ii(r,Cn,ss);break;case 5:Ii(r,Cn,ss);break;default:throw Error(n(329))}}}return kn(r,Lt()),r.callbackNode===a?Sv.bind(null,r):null}function Af(r,s){var a=Ga;return r.current.memoizedState.isDehydrated&&(Ai(r,s).flags|=256),r=Fc(r,s),r!==2&&(s=Cn,Cn=a,s!==null&&If(s)),r}function If(r){Cn===null?Cn=r:Cn.push.apply(Cn,r)}function D1(r){for(var s=r;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var f=0;f<a.length;f++){var p=a[f],v=p.getSnapshot;p=p.value;try{if(!pr(v(),p))return!1}catch{return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function $s(r,s){for(s&=~Nf,s&=~Tc,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var a=31-hr(s),f=1<<a;r[a]=-1,s&=~f}}function bv(r){if((st&6)!==0)throw Error(n(327));Oo();var s=Hl(r,0);if((s&1)===0)return kn(r,Lt()),null;var a=Fc(r,s);if(r.tag!==0&&a===2){var f=dd(r);f!==0&&(s=f,a=Af(r,f))}if(a===1)throw a=Za,Ai(r,0),$s(r,s),kn(r,Lt()),a;if(a===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Ii(r,Cn,ss),kn(r,Lt()),null}function Mf(r,s){var a=st;st|=1;try{return r(s)}finally{st=a,st===0&&(To=Lt()+500,uc&&Is())}}function Oi(r){zs!==null&&zs.tag===0&&(st&6)===0&&Oo();var s=st;st|=1;var a=Jn.transition,f=mt;try{if(Jn.transition=null,mt=1,r)return r()}finally{mt=f,Jn.transition=a,st=s,(st&6)===0&&Is()}}function Lf(){Dn=Po.current,bt(Po)}function Ai(r,s){r.finishedWork=null,r.finishedLanes=0;var a=r.timeoutHandle;if(a!==-1&&(r.timeoutHandle=-1,p1(a)),zt!==null)for(a=zt.return;a!==null;){var f=a;switch(Wd(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&lc();break;case 3:Eo(),bt(wn),bt(rn),rf();break;case 5:tf(f);break;case 4:Eo();break;case 13:bt(Et);break;case 19:bt(Et);break;case 10:Gd(f.type._context);break;case 22:case 23:Lf()}a=a.return}if(Zt=r,zt=r=Bs(r.current,null),en=Dn=s,Ht=0,Za=null,Nf=Tc=Ti=0,Cn=Ga=null,Ri!==null){for(s=0;s<Ri.length;s++)if(a=Ri[s],f=a.interleaved,f!==null){a.interleaved=null;var p=f.next,v=a.pending;if(v!==null){var E=v.next;v.next=p,f.next=E}a.pending=f}Ri=null}return r}function Cv(r,s){do{var a=zt;try{if(Zd(),wc.current=kc,Sc){for(var f=Rt.memoizedState;f!==null;){var p=f.queue;p!==null&&(p.pending=null),f=f.next}Sc=!1}if(Pi=0,qt=Wt=Rt=null,Ua=!1,Wa=0,Rf.current=null,a===null||a.return===null){Ht=1,Za=s,zt=null;break}e:{var v=r,E=a.return,A=a,z=s;if(s=en,A.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var G=z,le=A,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var xe=qg(E);if(xe!==null){xe.flags&=-257,Zg(xe,E,A,v,s),xe.mode&1&&Qg(v,G,s),s=xe,z=G;var be=s.updateQueue;if(be===null){var ke=new Set;ke.add(z),s.updateQueue=ke}else be.add(z);break e}else{if((s&1)===0){Qg(v,G,s),Ff();break e}z=Error(n(426))}}else if(kt&&A.mode&1){var Ft=qg(E);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),Zg(Ft,E,A,v,s),Qd(Ro(z,A));break e}}v=z=Ro(z,A),Ht!==4&&(Ht=2),Ga===null?Ga=[v]:Ga.push(v),v=E;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var H=Hg(v,z,s);yg(v,H);break e;case 1:A=z;var $=v.type,q=v.stateNode;if((v.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(Ds===null||!Ds.has(q)))){v.flags|=65536,s&=-s,v.lanes|=s;var de=Kg(v,A,s);yg(v,de);break e}}v=v.return}while(v!==null)}jv(a)}catch(Ee){s=Ee,zt===a&&a!==null&&(zt=a=a.return);continue}break}while(!0)}function kv(){var r=Pc.current;return Pc.current=kc,r===null?kc:r}function Ff(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Zt===null||(Ti&268435455)===0&&(Tc&268435455)===0||$s(Zt,en)}function Fc(r,s){var a=st;st|=2;var f=kv();(Zt!==r||en!==s)&&(ss=null,Ai(r,s));do try{z1();break}catch(p){Cv(r,p)}while(!0);if(Zd(),st=a,Pc.current=f,zt!==null)throw Error(n(261));return Zt=null,en=0,Ht}function z1(){for(;zt!==null;)_v(zt)}function V1(){for(;zt!==null&&!db();)_v(zt)}function _v(r){var s=Nv(r.alternate,r,Dn);r.memoizedProps=r.pendingProps,s===null?jv(r):zt=s,Rf.current=null}function jv(r){var s=r;do{var a=s.alternate;if(r=s.return,(s.flags&32768)===0){if(a=O1(a,s,Dn),a!==null){zt=a;return}}else{if(a=A1(a,s),a!==null){a.flags&=32767,zt=a;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Ht=6,zt=null;return}}if(s=s.sibling,s!==null){zt=s;return}zt=s=r}while(s!==null);Ht===0&&(Ht=5)}function Ii(r,s,a){var f=mt,p=Jn.transition;try{Jn.transition=null,mt=1,$1(r,s,a,f)}finally{Jn.transition=p,mt=f}return null}function $1(r,s,a,f){do Oo();while(zs!==null);if((st&6)!==0)throw Error(n(327));a=r.finishedWork;var p=r.finishedLanes;if(a===null)return null;if(r.finishedWork=null,r.finishedLanes=0,a===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var v=a.lanes|a.childLanes;if(Sb(r,v),r===Zt&&(zt=Zt=null,en=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Ac||(Ac=!0,Pv($l,function(){return Oo(),null})),v=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||v){v=Jn.transition,Jn.transition=null;var E=mt;mt=1;var A=st;st|=4,Rf.current=null,M1(r,a),gv(a,r),a1(Ld),ql=!!Md,Ld=Md=null,r.current=a,L1(a),fb(),st=A,mt=E,Jn.transition=v}else r.current=a;if(Ac&&(Ac=!1,zs=r,Ic=p),v=r.pendingLanes,v===0&&(Ds=null),mb(a.stateNode),kn(r,Lt()),s!==null)for(f=r.onRecoverableError,a=0;a<s.length;a++)p=s[a],f(p.value,{componentStack:p.stack,digest:p.digest});if(Oc)throw Oc=!1,r=Tf,Tf=null,r;return(Ic&1)!==0&&r.tag!==0&&Oo(),v=r.pendingLanes,(v&1)!==0?r===Of?Ya++:(Ya=0,Of=r):Ya=0,Is(),null}function Oo(){if(zs!==null){var r=pm(Ic),s=Jn.transition,a=mt;try{if(Jn.transition=null,mt=16>r?16:r,zs===null)var f=!1;else{if(r=zs,zs=null,Ic=0,(st&6)!==0)throw Error(n(331));var p=st;for(st|=4,Se=r.current;Se!==null;){var v=Se,E=v.child;if((Se.flags&16)!==0){var A=v.deletions;if(A!==null){for(var z=0;z<A.length;z++){var G=A[z];for(Se=G;Se!==null;){var le=Se;switch(le.tag){case 0:case 11:case 15:qa(8,le,v)}var ce=le.child;if(ce!==null)ce.return=le,Se=ce;else for(;Se!==null;){le=Se;var ae=le.sibling,xe=le.return;if(dv(le),le===G){Se=null;break}if(ae!==null){ae.return=xe,Se=ae;break}Se=xe}}}var be=v.alternate;if(be!==null){var ke=be.child;if(ke!==null){be.child=null;do{var Ft=ke.sibling;ke.sibling=null,ke=Ft}while(ke!==null)}}Se=v}}if((v.subtreeFlags&2064)!==0&&E!==null)E.return=v,Se=E;else e:for(;Se!==null;){if(v=Se,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:qa(9,v,v.return)}var H=v.sibling;if(H!==null){H.return=v.return,Se=H;break e}Se=v.return}}var $=r.current;for(Se=$;Se!==null;){E=Se;var q=E.child;if((E.subtreeFlags&2064)!==0&&q!==null)q.return=E,Se=q;else e:for(E=$;Se!==null;){if(A=Se,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:Nc(9,A)}}catch(Ee){Ot(A,A.return,Ee)}if(A===E){Se=null;break e}var de=A.sibling;if(de!==null){de.return=A.return,Se=de;break e}Se=A.return}}if(st=p,Is(),Nr&&typeof Nr.onPostCommitFiberRoot=="function")try{Nr.onPostCommitFiberRoot(Bl,r)}catch{}f=!0}return f}finally{mt=a,Jn.transition=s}}return!1}function Ev(r,s,a){s=Ro(a,s),s=Hg(r,s,1),r=Ls(r,s,1),s=pn(),r!==null&&(Sa(r,1,s),kn(r,s))}function Ot(r,s,a){if(r.tag===3)Ev(r,r,a);else for(;s!==null;){if(s.tag===3){Ev(s,r,a);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ds===null||!Ds.has(f))){r=Ro(a,r),r=Kg(s,r,1),s=Ls(s,r,1),r=pn(),s!==null&&(Sa(s,1,r),kn(s,r));break}}s=s.return}}function B1(r,s,a){var f=r.pingCache;f!==null&&f.delete(s),s=pn(),r.pingedLanes|=r.suspendedLanes&a,Zt===r&&(en&a)===a&&(Ht===4||Ht===3&&(en&130023424)===en&&500>Lt()-Pf?Ai(r,0):Nf|=a),kn(r,s)}function Rv(r,s){s===0&&((r.mode&1)===0?s=1:(s=Wl,Wl<<=1,(Wl&130023424)===0&&(Wl=4194304)));var a=pn();r=ts(r,s),r!==null&&(Sa(r,s,a),kn(r,a))}function U1(r){var s=r.memoizedState,a=0;s!==null&&(a=s.retryLane),Rv(r,a)}function W1(r,s){var a=0;switch(r.tag){case 13:var f=r.stateNode,p=r.memoizedState;p!==null&&(a=p.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Rv(r,a)}var Nv;Nv=function(r,s,a){if(r!==null)if(r.memoizedProps!==s.pendingProps||wn.current)bn=!0;else{if((r.lanes&a)===0&&(s.flags&128)===0)return bn=!1,T1(r,s,a);bn=(r.flags&131072)!==0}else bn=!1,kt&&(s.flags&1048576)!==0&&lg(s,fc,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;Ec(r,s),r=s.pendingProps;var p=wo(s,rn.current);jo(s,a),p=af(null,s,f,r,p,a);var v=lf();return s.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Sn(f)?(v=!0,cc(s)):v=!1,s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Jd(s),p.updater=_c,s.stateNode=p,p._reactInternals=s,pf(s,f,r,a),s=yf(null,s,f,!0,v,a)):(s.tag=0,kt&&v&&Ud(s),hn(null,s,p,a),s=s.child),s;case 16:f=s.elementType;e:{switch(Ec(r,s),r=s.pendingProps,p=f._init,f=p(f._payload),s.type=f,p=s.tag=K1(f),r=gr(f,r),p){case 0:s=vf(null,s,f,r,a);break e;case 1:s=tv(null,s,f,r,a);break e;case 11:s=Gg(null,s,f,r,a);break e;case 14:s=Yg(null,s,f,gr(f.type,r),a);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,p=s.pendingProps,p=s.elementType===f?p:gr(f,p),vf(r,s,f,p,a);case 1:return f=s.type,p=s.pendingProps,p=s.elementType===f?p:gr(f,p),tv(r,s,f,p,a);case 3:e:{if(nv(s),r===null)throw Error(n(387));f=s.pendingProps,v=s.memoizedState,p=v.element,vg(r,s),yc(s,f,null,a);var E=s.memoizedState;if(f=E.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){p=Ro(Error(n(423)),s),s=rv(r,s,f,a,p);break e}else if(f!==p){p=Ro(Error(n(424)),s),s=rv(r,s,f,a,p);break e}else for(Fn=Ts(s.stateNode.containerInfo.firstChild),Ln=s,kt=!0,mr=null,a=mg(s,null,f,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Co(),f===p){s=rs(r,s,a);break e}hn(r,s,f,a)}s=s.child}return s;case 5:return wg(s),r===null&&Kd(s),f=s.type,p=s.pendingProps,v=r!==null?r.memoizedProps:null,E=p.children,Fd(f,p)?E=null:v!==null&&Fd(f,v)&&(s.flags|=32),ev(r,s),hn(r,s,E,a),s.child;case 6:return r===null&&Kd(s),null;case 13:return sv(r,s,a);case 4:return ef(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=ko(s,null,f,a):hn(r,s,f,a),s.child;case 11:return f=s.type,p=s.pendingProps,p=s.elementType===f?p:gr(f,p),Gg(r,s,f,p,a);case 7:return hn(r,s,s.pendingProps,a),s.child;case 8:return hn(r,s,s.pendingProps.children,a),s.child;case 12:return hn(r,s,s.pendingProps.children,a),s.child;case 10:e:{if(f=s.type._context,p=s.pendingProps,v=s.memoizedProps,E=p.value,yt(mc,f._currentValue),f._currentValue=E,v!==null)if(pr(v.value,E)){if(v.children===p.children&&!wn.current){s=rs(r,s,a);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var A=v.dependencies;if(A!==null){E=v.child;for(var z=A.firstContext;z!==null;){if(z.context===f){if(v.tag===1){z=ns(-1,a&-a),z.tag=2;var G=v.updateQueue;if(G!==null){G=G.shared;var le=G.pending;le===null?z.next=z:(z.next=le.next,le.next=z),G.pending=z}}v.lanes|=a,z=v.alternate,z!==null&&(z.lanes|=a),Yd(v.return,a,s),A.lanes|=a;break}z=z.next}}else if(v.tag===10)E=v.type===s.type?null:v.child;else if(v.tag===18){if(E=v.return,E===null)throw Error(n(341));E.lanes|=a,A=E.alternate,A!==null&&(A.lanes|=a),Yd(E,a,s),E=v.sibling}else E=v.child;if(E!==null)E.return=v;else for(E=v;E!==null;){if(E===s){E=null;break}if(v=E.sibling,v!==null){v.return=E.return,E=v;break}E=E.return}v=E}hn(r,s,p.children,a),s=s.child}return s;case 9:return p=s.type,f=s.pendingProps.children,jo(s,a),p=Yn(p),f=f(p),s.flags|=1,hn(r,s,f,a),s.child;case 14:return f=s.type,p=gr(f,s.pendingProps),p=gr(f.type,p),Yg(r,s,f,p,a);case 15:return Xg(r,s,s.type,s.pendingProps,a);case 17:return f=s.type,p=s.pendingProps,p=s.elementType===f?p:gr(f,p),Ec(r,s),s.tag=1,Sn(f)?(r=!0,cc(s)):r=!1,jo(s,a),Ug(s,f,p),pf(s,f,p,a),yf(null,s,f,!0,r,a);case 19:return ov(r,s,a);case 22:return Jg(r,s,a)}throw Error(n(156,s.tag))};function Pv(r,s){return cm(r,s)}function H1(r,s,a,f){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function er(r,s,a,f){return new H1(r,s,a,f)}function Df(r){return r=r.prototype,!(!r||!r.isReactComponent)}function K1(r){if(typeof r=="function")return Df(r)?1:0;if(r!=null){if(r=r.$$typeof,r===W)return 11;if(r===oe)return 14}return 2}function Bs(r,s){var a=r.alternate;return a===null?(a=er(r.tag,s,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=s,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,s=r.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function Dc(r,s,a,f,p,v){var E=2;if(f=r,typeof r=="function")Df(r)&&(E=1);else if(typeof r=="string")E=5;else e:switch(r){case O:return Mi(a.children,p,v,s);case L:E=8,p|=8;break;case V:return r=er(12,a,s,p|2),r.elementType=V,r.lanes=v,r;case ee:return r=er(13,a,s,p),r.elementType=ee,r.lanes=v,r;case se:return r=er(19,a,s,p),r.elementType=se,r.lanes=v,r;case ie:return zc(a,p,v,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case M:E=10;break e;case Z:E=9;break e;case W:E=11;break e;case oe:E=14;break e;case X:E=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=er(E,a,s,p),s.elementType=r,s.type=f,s.lanes=v,s}function Mi(r,s,a,f){return r=er(7,r,f,s),r.lanes=a,r}function zc(r,s,a,f){return r=er(22,r,f,s),r.elementType=ie,r.lanes=a,r.stateNode={isHidden:!1},r}function zf(r,s,a){return r=er(6,r,null,s),r.lanes=a,r}function Vf(r,s,a){return s=er(4,r.children!==null?r.children:[],r.key,s),s.lanes=a,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Q1(r,s,a,f,p){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fd(0),this.expirationTimes=fd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fd(0),this.identifierPrefix=f,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function $f(r,s,a,f,p,v,E,A,z){return r=new Q1(r,s,a,A,z),s===1?(s=1,v===!0&&(s|=8)):s=0,v=er(3,null,null,s),r.current=v,v.stateNode=r,v.memoizedState={element:f,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jd(v),r}function q1(r,s,a){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:f==null?null:""+f,children:r,containerInfo:s,implementation:a}}function Tv(r){if(!r)return As;r=r._reactInternals;e:{if(Ci(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Sn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var a=r.type;if(Sn(a))return ig(r,a,s)}return s}function Ov(r,s,a,f,p,v,E,A,z){return r=$f(a,f,!0,r,p,v,E,A,z),r.context=Tv(null),a=r.current,f=pn(),p=Vs(a),v=ns(f,p),v.callback=s??null,Ls(a,v,p),r.current.lanes=p,Sa(r,p,f),kn(r,f),r}function Vc(r,s,a,f){var p=s.current,v=pn(),E=Vs(p);return a=Tv(a),s.context===null?s.context=a:s.pendingContext=a,s=ns(v,E),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=Ls(p,s,E),r!==null&&(xr(r,p,E,v),vc(r,p,E)),E}function $c(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Av(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<s?a:s}}function Bf(r,s){Av(r,s),(r=r.alternate)&&Av(r,s)}function Z1(){return null}var Iv=typeof reportError=="function"?reportError:function(r){console.error(r)};function Uf(r){this._internalRoot=r}Bc.prototype.render=Uf.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Vc(r,s,null,null)},Bc.prototype.unmount=Uf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Oi(function(){Vc(null,r,null,null)}),s[Yr]=null}};function Bc(r){this._internalRoot=r}Bc.prototype.unstable_scheduleHydration=function(r){if(r){var s=vm();r={blockedOn:null,target:r,priority:s};for(var a=0;a<Rs.length&&s!==0&&s<Rs[a].priority;a++);Rs.splice(a,0,r),a===0&&wm(r)}};function Wf(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Uc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Mv(){}function G1(r,s,a,f,p){if(p){if(typeof f=="function"){var v=f;f=function(){var G=$c(E);v.call(G)}}var E=Ov(s,f,r,0,null,!1,!1,"",Mv);return r._reactRootContainer=E,r[Yr]=E.current,Ma(r.nodeType===8?r.parentNode:r),Oi(),E}for(;p=r.lastChild;)r.removeChild(p);if(typeof f=="function"){var A=f;f=function(){var G=$c(z);A.call(G)}}var z=$f(r,0,!1,null,null,!1,!1,"",Mv);return r._reactRootContainer=z,r[Yr]=z.current,Ma(r.nodeType===8?r.parentNode:r),Oi(function(){Vc(s,z,a,f)}),z}function Wc(r,s,a,f,p){var v=a._reactRootContainer;if(v){var E=v;if(typeof p=="function"){var A=p;p=function(){var z=$c(E);A.call(z)}}Vc(s,E,r,p)}else E=G1(a,s,r,p,f);return $c(E)}mm=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var a=wa(s.pendingLanes);a!==0&&(hd(s,a|1),kn(s,Lt()),(st&6)===0&&(To=Lt()+500,Is()))}break;case 13:Oi(function(){var f=ts(r,1);if(f!==null){var p=pn();xr(f,r,1,p)}}),Bf(r,1)}},pd=function(r){if(r.tag===13){var s=ts(r,134217728);if(s!==null){var a=pn();xr(s,r,134217728,a)}Bf(r,134217728)}},gm=function(r){if(r.tag===13){var s=Vs(r),a=ts(r,s);if(a!==null){var f=pn();xr(a,r,s,f)}Bf(r,s)}},vm=function(){return mt},ym=function(r,s){var a=mt;try{return mt=r,s()}finally{mt=a}},An=function(r,s,a){switch(s){case"input":if(Dt(r,a),s=a.name,a.type==="radio"&&s!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var f=a[s];if(f!==r&&f.form===r.form){var p=ac(f);if(!p)throw Error(n(90));We(f),Dt(f,p)}}}break;case"textarea":ge(r,a);break;case"select":s=a.value,s!=null&&D(r,!!a.multiple,s,!1)}},bs=Mf,nn=Oi;var Y1={usingClientEntryPoint:!1,Events:[Da,yo,ac,In,ur,Mf]},Xa={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},X1={bundleType:Xa.bundleType,version:Xa.version,rendererPackageName:Xa.rendererPackageName,rendererConfig:Xa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=am(r),r===null?null:r.stateNode},findFiberByHostInstance:Xa.findFiberByHostInstance||Z1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{Bl=Hc.inject(X1),Nr=Hc}catch{}}return _n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y1,_n.createPortal=function(r,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wf(s))throw Error(n(200));return q1(r,s,null,a)},_n.createRoot=function(r,s){if(!Wf(r))throw Error(n(299));var a=!1,f="",p=Iv;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(p=s.onRecoverableError)),s=$f(r,1,!1,null,null,a,!1,f,p),r[Yr]=s.current,Ma(r.nodeType===8?r.parentNode:r),new Uf(s)},_n.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=am(s),r=r===null?null:r.stateNode,r},_n.flushSync=function(r){return Oi(r)},_n.hydrate=function(r,s,a){if(!Uc(s))throw Error(n(200));return Wc(null,r,s,!0,a)},_n.hydrateRoot=function(r,s,a){if(!Wf(r))throw Error(n(405));var f=a!=null&&a.hydratedSources||null,p=!1,v="",E=Iv;if(a!=null&&(a.unstable_strictMode===!0&&(p=!0),a.identifierPrefix!==void 0&&(v=a.identifierPrefix),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),s=Ov(s,null,r,1,a??null,p,!1,v,E),r[Yr]=s.current,Ma(r),f)for(r=0;r<f.length;r++)a=f[r],p=a._getVersion,p=p(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,p]:s.mutableSourceEagerHydrationData.push(a,p);return new Bc(s)},_n.render=function(r,s,a){if(!Uc(s))throw Error(n(200));return Wc(null,r,s,!1,a)},_n.unmountComponentAtNode=function(r){if(!Uc(r))throw Error(n(40));return r._reactRootContainer?(Oi(function(){Wc(null,null,r,!1,function(){r._reactRootContainer=null,r[Yr]=null})}),!0):!1},_n.unstable_batchedUpdates=Mf,_n.unstable_renderSubtreeIntoContainer=function(r,s,a,f){if(!Uc(a))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Wc(r,s,a,!1,f)},_n.version="18.3.1-next-f1338f8080-20240426",_n}var Hv;function n0(){if(Hv)return qf.exports;Hv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qf.exports=oC(),qf.exports}var Kv;function aC(){if(Kv)return Qc;Kv=1;var e=n0();return Qc.createRoot=e.createRoot,Qc.hydrateRoot=e.hydrateRoot,Qc}var lC=aC(),da=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},cC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xs,dp,Hx,uC=(Hx=class{constructor(){Pe(this,Xs,cC);Pe(this,dp,!1)}setTimeoutProvider(e){ye(this,Xs,e)}setTimeout(e,t){return F(this,Xs).setTimeout(e,t)}clearTimeout(e){F(this,Xs).clearTimeout(e)}setInterval(e,t){return F(this,Xs).setInterval(e,t)}clearInterval(e){F(this,Xs).clearInterval(e)}},Xs=new WeakMap,dp=new WeakMap,Hx),Fi=new uC;function dC(e){setTimeout(e,0)}var Xi=typeof window>"u"||"Deno"in globalThis;function vn(){}function fC(e,t){return typeof e=="function"?e(t):e}function _h(e){return typeof e=="number"&&e>=0&&e!==1/0}function r0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ui(e,t){return typeof e=="function"?e(t):e}function nr(e,t){return typeof e=="function"?e(t):e}function Qv(e,t){const{type:n="all",exact:i,fetchStatus:o,predicate:l,queryKey:u,stale:c}=e;if(u){if(i){if(t.queryHash!==hp(u,t.options))return!1}else if(!ml(t.queryKey,u))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||l&&!l(t))}function qv(e,t){const{exact:n,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Ji(t.options.mutationKey)!==Ji(l))return!1}else if(!ml(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function hp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ji)(e)}function Ji(e){return JSON.stringify(e,(t,n)=>jh(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function ml(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ml(e[n],t[n])):!1}var hC=Object.prototype.hasOwnProperty;function s0(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=Zv(e)&&Zv(t);if(!i&&!(jh(e)&&jh(t)))return t;const l=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),c=u.length,h=i?new Array(c):{};let m=0;for(let g=0;g<c;g++){const y=i?g:u[g],x=e[y],w=t[y];if(x===w){h[y]=x,(i?g<l:hC.call(e,y))&&m++;continue}if(x===null||w===null||typeof x!="object"||typeof w!="object"){h[y]=w;continue}const _=s0(x,w,n+1);h[y]=_,_===x&&m++}return l===c&&m===l?e:h}function hu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Zv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jh(e){if(!Gv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Gv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gv(e){return Object.prototype.toString.call(e)==="[object Object]"}function pC(e){return new Promise(t=>{Fi.setTimeout(t,e)})}function Eh(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?s0(e,t):t}function mC(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function gC(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var pp=Symbol();function i0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mp(e,t){return typeof e=="function"?e(...t):!!e}function vC(e,t,n){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var $i,Js,Ho,Kx,yC=(Kx=class extends da{constructor(){super();Pe(this,$i);Pe(this,Js);Pe(this,Ho);ye(this,Ho,t=>{if(!Xi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Js)||this.setEventListener(F(this,Ho))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Js))==null||t.call(this),ye(this,Js,void 0))}setEventListener(t){var n;ye(this,Ho,t),(n=F(this,Js))==null||n.call(this),ye(this,Js,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){F(this,$i)!==t&&(ye(this,$i,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,$i)=="boolean"?F(this,$i):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$i=new WeakMap,Js=new WeakMap,Ho=new WeakMap,Kx),gp=new yC;function Rh(){let e,t;const n=new Promise((o,l)=>{e=o,t=l});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},n.reject=o=>{i({status:"rejected",reason:o}),t(o)},n}var xC=dC;function wC(){let e=[],t=0,n=c=>{c()},i=c=>{c()},o=xC;const l=c=>{t?e.push(c):o(()=>{n(c)})},u=()=>{const c=e;e=[],c.length&&o(()=>{i(()=>{c.forEach(h=>{n(h)})})})};return{batch:c=>{let h;t++;try{h=c()}finally{t--,t||u()}return h},batchCalls:c=>(...h)=>{l(()=>{c(...h)})},schedule:l,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{o=c}}}var Qt=wC(),Ko,ei,Qo,Qx,SC=(Qx=class extends da{constructor(){super();Pe(this,Ko,!0);Pe(this,ei);Pe(this,Qo);ye(this,Qo,t=>{if(!Xi&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){F(this,ei)||this.setEventListener(F(this,Qo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,ei))==null||t.call(this),ye(this,ei,void 0))}setEventListener(t){var n;ye(this,Qo,t),(n=F(this,ei))==null||n.call(this),ye(this,ei,t(this.setOnline.bind(this)))}setOnline(t){F(this,Ko)!==t&&(ye(this,Ko,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return F(this,Ko)}},Ko=new WeakMap,ei=new WeakMap,Qo=new WeakMap,Qx),pu=new SC;function bC(e){return Math.min(1e3*2**e,3e4)}function o0(e){return(e??"online")==="online"?pu.isOnline():!0}var Nh=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function a0(e){let t=!1,n=0,i;const o=Rh(),l=()=>o.status!=="pending",u=S=>{var C;if(!l()){const N=new Nh(S);x(N),(C=e.onCancel)==null||C.call(e,N)}},c=()=>{t=!0},h=()=>{t=!1},m=()=>gp.isFocused()&&(e.networkMode==="always"||pu.isOnline())&&e.canRun(),g=()=>o0(e.networkMode)&&e.canRun(),y=S=>{l()||(i==null||i(),o.resolve(S))},x=S=>{l()||(i==null||i(),o.reject(S))},w=()=>new Promise(S=>{var C;i=N=>{(l()||m())&&S(N)},(C=e.onPause)==null||C.call(e)}).then(()=>{var S;i=void 0,l()||(S=e.onContinue)==null||S.call(e)}),_=()=>{if(l())return;let S;const C=n===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(N){S=Promise.reject(N)}Promise.resolve(S).then(y).catch(N=>{var T;if(l())return;const k=e.retry??(Xi?0:3),R=e.retryDelay??bC,j=typeof R=="function"?R(n,N):R,P=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,N);if(t||!P){x(N);return}n++,(T=e.onFail)==null||T.call(e,n,N),pC(j).then(()=>m()?void 0:w()).then(()=>{t?x(N):_()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i==null||i(),o),cancelRetry:c,continueRetry:h,canStart:g,start:()=>(g()?_():w().then(_),o)}}var Bi,qx,l0=(qx=class{constructor(){Pe(this,Bi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_h(this.gcTime)&&ye(this,Bi,Fi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xi?1/0:300*1e3))}clearGcTimeout(){F(this,Bi)&&(Fi.clearTimeout(F(this,Bi)),ye(this,Bi,void 0))}},Bi=new WeakMap,qx),Ui,qo,tr,Wi,Yt,Rl,Hi,Sr,as,Zx,CC=(Zx=class extends l0{constructor(t){super();Pe(this,Sr);Pe(this,Ui);Pe(this,qo);Pe(this,tr);Pe(this,Wi);Pe(this,Yt);Pe(this,Rl);Pe(this,Hi);ye(this,Hi,!1),ye(this,Rl,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,Wi,t.client),ye(this,tr,F(this,Wi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Ui,Xv(this.options)),this.state=t.state??F(this,Ui),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,Yt))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,Rl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Xv(this.options);n.data!==void 0&&(this.setState(Yv(n.data,n.dataUpdatedAt)),ye(this,Ui,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,tr).remove(this)}setData(t,n){const i=Eh(this.state.data,t,this.options);return Qe(this,Sr,as).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){Qe(this,Sr,as).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,o;const n=(i=F(this,Yt))==null?void 0:i.promise;return(o=F(this,Yt))==null||o.cancel(t),n?n.then(vn).catch(vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,Ui))}isActive(){return this.observers.some(t=>nr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ui(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!r0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,Yt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,Yt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,tr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,Yt)&&(F(this,Hi)?F(this,Yt).cancel({revert:!0}):F(this,Yt).cancelRetry()),this.scheduleGc()),F(this,tr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Qe(this,Sr,as).call(this,{type:"invalidate"})}async fetch(t,n){var h,m,g,y,x,w,_,S,C,N,k,R;if(this.state.fetchStatus!=="idle"&&((h=F(this,Yt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,Yt))return F(this,Yt).continueRetry(),F(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(P=>P.options.queryFn);j&&this.setOptions(j.options)}const i=new AbortController,o=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(ye(this,Hi,!0),i.signal)})},l=()=>{const j=i0(this.options,n),T=(()=>{const O={client:F(this,Wi),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ye(this,Hi,!1),this.options.persister?this.options.persister(j,T,this):j(T)},c=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Wi),state:this.state,fetchFn:l};return o(j),j})();(m=this.options.behavior)==null||m.onFetch(c,this),ye(this,qo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=c.fetchOptions)==null?void 0:g.meta))&&Qe(this,Sr,as).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),ye(this,Yt,a0({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:j=>{j instanceof Nh&&j.revert&&this.setState({...F(this,qo),fetchStatus:"idle"}),i.abort()},onFail:(j,P)=>{Qe(this,Sr,as).call(this,{type:"failed",failureCount:j,error:P})},onPause:()=>{Qe(this,Sr,as).call(this,{type:"pause"})},onContinue:()=>{Qe(this,Sr,as).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const j=await F(this,Yt).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(w=(x=F(this,tr).config).onSuccess)==null||w.call(x,j,this),(S=(_=F(this,tr).config).onSettled)==null||S.call(_,j,this.state.error,this),j}catch(j){if(j instanceof Nh){if(j.silent)return F(this,Yt).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Qe(this,Sr,as).call(this,{type:"error",error:j}),(N=(C=F(this,tr).config).onError)==null||N.call(C,j,this),(R=(k=F(this,tr).config).onSettled)==null||R.call(k,this.state.data,j,this),j}finally{this.scheduleGc()}}},Ui=new WeakMap,qo=new WeakMap,tr=new WeakMap,Wi=new WeakMap,Yt=new WeakMap,Rl=new WeakMap,Hi=new WeakMap,Sr=new WeakSet,as=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...c0(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...Yv(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,qo,t.manual?o:void 0),o;case"error":const l=t.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),Qt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),F(this,tr).notify({query:this,type:"updated",action:t})})},Zx);function c0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:o0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Yv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var En,tt,Nl,mn,Ki,Zo,us,ti,Pl,Go,Yo,Qi,qi,ni,Xo,ht,ll,Ph,Th,Oh,Ah,Ih,Mh,Lh,u0,Gx,kC=(Gx=class extends da{constructor(t,n){super();Pe(this,ht);Pe(this,En);Pe(this,tt);Pe(this,Nl);Pe(this,mn);Pe(this,Ki);Pe(this,Zo);Pe(this,us);Pe(this,ti);Pe(this,Pl);Pe(this,Go);Pe(this,Yo);Pe(this,Qi);Pe(this,qi);Pe(this,ni);Pe(this,Xo,new Set);this.options=n,ye(this,En,t),ye(this,ti,null),ye(this,us,Rh()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,tt).addObserver(this),Jv(F(this,tt),this.options)?Qe(this,ht,ll).call(this):this.updateResult(),Qe(this,ht,Ah).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fh(F(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fh(F(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Qe(this,ht,Ih).call(this),Qe(this,ht,Mh).call(this),F(this,tt).removeObserver(this)}setOptions(t){const n=this.options,i=F(this,tt);if(this.options=F(this,En).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof nr(this.options.enabled,F(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Qe(this,ht,Lh).call(this),F(this,tt).setOptions(this.options),n._defaulted&&!hu(this.options,n)&&F(this,En).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,tt),observer:this});const o=this.hasListeners();o&&ey(F(this,tt),i,this.options,n)&&Qe(this,ht,ll).call(this),this.updateResult(),o&&(F(this,tt)!==i||nr(this.options.enabled,F(this,tt))!==nr(n.enabled,F(this,tt))||ui(this.options.staleTime,F(this,tt))!==ui(n.staleTime,F(this,tt)))&&Qe(this,ht,Ph).call(this);const l=Qe(this,ht,Th).call(this);o&&(F(this,tt)!==i||nr(this.options.enabled,F(this,tt))!==nr(n.enabled,F(this,tt))||l!==F(this,ni))&&Qe(this,ht,Oh).call(this,l)}getOptimisticResult(t){const n=F(this,En).getQueryCache().build(F(this,En),t),i=this.createResult(n,t);return jC(this,i)&&(ye(this,mn,i),ye(this,Zo,this.options),ye(this,Ki,F(this,tt).state)),i}getCurrentResult(){return F(this,mn)}trackResult(t,n){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&F(this,us).status==="pending"&&F(this,us).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){F(this,Xo).add(t)}getCurrentQuery(){return F(this,tt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,En).defaultQueryOptions(t),i=F(this,En).getQueryCache().build(F(this,En),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return Qe(this,ht,ll).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,mn)))}createResult(t,n){var V;const i=F(this,tt),o=this.options,l=F(this,mn),u=F(this,Ki),c=F(this,Zo),m=t!==i?t.state:F(this,Nl),{state:g}=t;let y={...g},x=!1,w;if(n._optimisticResults){const M=this.hasListeners(),Z=!M&&Jv(t,n),W=M&&ey(t,i,n,o);(Z||W)&&(y={...y,...c0(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:C}=y;w=y.data;let N=!1;if(n.placeholderData!==void 0&&w===void 0&&C==="pending"){let M;l!=null&&l.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(M=l.data,N=!0):M=typeof n.placeholderData=="function"?n.placeholderData((V=F(this,Yo))==null?void 0:V.state.data,F(this,Yo)):n.placeholderData,M!==void 0&&(C="success",w=Eh(l==null?void 0:l.data,M,n),x=!0)}if(n.select&&w!==void 0&&!N)if(l&&w===(u==null?void 0:u.data)&&n.select===F(this,Pl))w=F(this,Go);else try{ye(this,Pl,n.select),w=n.select(w),w=Eh(l==null?void 0:l.data,w,n),ye(this,Go,w),ye(this,ti,null)}catch(M){ye(this,ti,M)}F(this,ti)&&(_=F(this,ti),w=F(this,Go),S=Date.now(),C="error");const k=y.fetchStatus==="fetching",R=C==="pending",j=C==="error",P=R&&k,T=w!==void 0,L={status:C,fetchStatus:y.fetchStatus,isPending:R,isSuccess:C==="success",isError:j,isInitialLoading:P,isLoading:P,data:w,dataUpdatedAt:y.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:k,isRefetching:k&&!R,isLoadingError:j&&!T,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:j&&T,isStale:vp(t,n),refetch:this.refetch,promise:F(this,us),isEnabled:nr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=L.data!==void 0,Z=L.status==="error"&&!M,W=oe=>{Z?oe.reject(L.error):M&&oe.resolve(L.data)},ee=()=>{const oe=ye(this,us,L.promise=Rh());W(oe)},se=F(this,us);switch(se.status){case"pending":t.queryHash===i.queryHash&&W(se);break;case"fulfilled":(Z||L.data!==se.value)&&ee();break;case"rejected":(!Z||L.error!==se.reason)&&ee();break}}return L}updateResult(){const t=F(this,mn),n=this.createResult(F(this,tt),this.options);if(ye(this,Ki,F(this,tt).state),ye(this,Zo,this.options),F(this,Ki).data!==void 0&&ye(this,Yo,F(this,tt)),hu(n,t))return;ye(this,mn,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!F(this,Xo).size)return!0;const u=new Set(l??F(this,Xo));return this.options.throwOnError&&u.add("error"),Object.keys(F(this,mn)).some(c=>{const h=c;return F(this,mn)[h]!==t[h]&&u.has(h)})};Qe(this,ht,u0).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Qe(this,ht,Ah).call(this)}},En=new WeakMap,tt=new WeakMap,Nl=new WeakMap,mn=new WeakMap,Ki=new WeakMap,Zo=new WeakMap,us=new WeakMap,ti=new WeakMap,Pl=new WeakMap,Go=new WeakMap,Yo=new WeakMap,Qi=new WeakMap,qi=new WeakMap,ni=new WeakMap,Xo=new WeakMap,ht=new WeakSet,ll=function(t){Qe(this,ht,Lh).call(this);let n=F(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(vn)),n},Ph=function(){Qe(this,ht,Ih).call(this);const t=ui(this.options.staleTime,F(this,tt));if(Xi||F(this,mn).isStale||!_h(t))return;const i=r0(F(this,mn).dataUpdatedAt,t)+1;ye(this,Qi,Fi.setTimeout(()=>{F(this,mn).isStale||this.updateResult()},i))},Th=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,tt)):this.options.refetchInterval)??!1},Oh=function(t){Qe(this,ht,Mh).call(this),ye(this,ni,t),!(Xi||nr(this.options.enabled,F(this,tt))===!1||!_h(F(this,ni))||F(this,ni)===0)&&ye(this,qi,Fi.setInterval(()=>{(this.options.refetchIntervalInBackground||gp.isFocused())&&Qe(this,ht,ll).call(this)},F(this,ni)))},Ah=function(){Qe(this,ht,Ph).call(this),Qe(this,ht,Oh).call(this,Qe(this,ht,Th).call(this))},Ih=function(){F(this,Qi)&&(Fi.clearTimeout(F(this,Qi)),ye(this,Qi,void 0))},Mh=function(){F(this,qi)&&(Fi.clearInterval(F(this,qi)),ye(this,qi,void 0))},Lh=function(){const t=F(this,En).getQueryCache().build(F(this,En),this.options);if(t===F(this,tt))return;const n=F(this,tt);ye(this,tt,t),ye(this,Nl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},u0=function(t){Qt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,mn))}),F(this,En).getQueryCache().notify({query:F(this,tt),type:"observerResultsUpdated"})})},Gx);function _C(e,t){return nr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Jv(e,t){return _C(e,t)||e.state.data!==void 0&&Fh(e,t,t.refetchOnMount)}function Fh(e,t,n){if(nr(t.enabled,e)!==!1&&ui(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&vp(e,t)}return!1}function ey(e,t,n,i){return(e!==t||nr(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&vp(e,n)}function vp(e,t){return nr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function jC(e,t){return!hu(e.getCurrentResult(),t)}function ty(e){return{onFetch:(t,n)=>{var g,y,x,w,_;const i=t.options,o=(x=(y=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:x.direction,l=((w=t.state.data)==null?void 0:w.pages)||[],u=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},h=0;const m=async()=>{let S=!1;const C=R=>{vC(R,()=>t.signal,()=>S=!0)},N=i0(t.options,t.fetchOptions),k=async(R,j,P)=>{if(S)return Promise.reject();if(j==null&&R.pages.length)return Promise.resolve(R);const O=(()=>{const Z={client:t.client,queryKey:t.queryKey,pageParam:j,direction:P?"backward":"forward",meta:t.options.meta};return C(Z),Z})(),L=await N(O),{maxPages:V}=t.options,M=P?gC:mC;return{pages:M(R.pages,L,V),pageParams:M(R.pageParams,j,V)}};if(o&&l.length){const R=o==="backward",j=R?EC:ny,P={pages:l,pageParams:u},T=j(i,P);c=await k(P,T,R)}else{const R=e??l.length;do{const j=h===0?u[0]??i.initialPageParam:ny(i,c);if(h>0&&j==null)break;c=await k(c,j),h++}while(h<R)}return c};t.options.persister?t.fetchFn=()=>{var S,C;return(C=(S=t.options).persister)==null?void 0:C.call(S,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function ny(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function EC(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var Tl,Lr,ln,Zi,Fr,Qs,Yx,RC=(Yx=class extends l0{constructor(t){super();Pe(this,Fr);Pe(this,Tl);Pe(this,Lr);Pe(this,ln);Pe(this,Zi);ye(this,Tl,t.client),this.mutationId=t.mutationId,ye(this,ln,t.mutationCache),ye(this,Lr,[]),this.state=t.state||d0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,Lr).includes(t)||(F(this,Lr).push(t),this.clearGcTimeout(),F(this,ln).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Lr,F(this,Lr).filter(n=>n!==t)),this.scheduleGc(),F(this,ln).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,Lr).length||(this.state.status==="pending"?this.scheduleGc():F(this,ln).remove(this))}continue(){var t;return((t=F(this,Zi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,h,m,g,y,x,w,_,S,C,N,k,R,j,P,T,O;const n=()=>{Qe(this,Fr,Qs).call(this,{type:"continue"})},i={client:F(this,Tl),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,Zi,a0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(L,V)=>{Qe(this,Fr,Qs).call(this,{type:"failed",failureCount:L,error:V})},onPause:()=>{Qe(this,Fr,Qs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ln).canRun(this)}));const o=this.state.status==="pending",l=!F(this,Zi).canStart();try{if(o)n();else{Qe(this,Fr,Qs).call(this,{type:"pending",variables:t,isPaused:l}),F(this,ln).config.onMutate&&await F(this,ln).config.onMutate(t,this,i);const V=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,i));V!==this.state.context&&Qe(this,Fr,Qs).call(this,{type:"pending",context:V,variables:t,isPaused:l})}const L=await F(this,Zi).start();return await((m=(h=F(this,ln).config).onSuccess)==null?void 0:m.call(h,L,t,this.state.context,this,i)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,L,t,this.state.context,i)),await((w=(x=F(this,ln).config).onSettled)==null?void 0:w.call(x,L,null,this.state.variables,this.state.context,this,i)),await((S=(_=this.options).onSettled)==null?void 0:S.call(_,L,null,t,this.state.context,i)),Qe(this,Fr,Qs).call(this,{type:"success",data:L}),L}catch(L){try{await((N=(C=F(this,ln).config).onError)==null?void 0:N.call(C,L,t,this.state.context,this,i))}catch(V){Promise.reject(V)}try{await((R=(k=this.options).onError)==null?void 0:R.call(k,L,t,this.state.context,i))}catch(V){Promise.reject(V)}try{await((P=(j=F(this,ln).config).onSettled)==null?void 0:P.call(j,void 0,L,this.state.variables,this.state.context,this,i))}catch(V){Promise.reject(V)}try{await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,L,t,this.state.context,i))}catch(V){Promise.reject(V)}throw Qe(this,Fr,Qs).call(this,{type:"error",error:L}),L}finally{F(this,ln).runNext(this)}}},Tl=new WeakMap,Lr=new WeakMap,ln=new WeakMap,Zi=new WeakMap,Fr=new WeakSet,Qs=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qt.batch(()=>{F(this,Lr).forEach(i=>{i.onMutationUpdate(t)}),F(this,ln).notify({mutation:this,type:"updated",action:t})})},Yx);function d0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ds,br,Ol,Xx,NC=(Xx=class extends da{constructor(t={}){super();Pe(this,ds);Pe(this,br);Pe(this,Ol);this.config=t,ye(this,ds,new Set),ye(this,br,new Map),ye(this,Ol,0)}build(t,n,i){const o=new RC({client:t,mutationCache:this,mutationId:++Kc(this,Ol)._,options:t.defaultMutationOptions(n),state:i});return this.add(o),o}add(t){F(this,ds).add(t);const n=qc(t);if(typeof n=="string"){const i=F(this,br).get(n);i?i.push(t):F(this,br).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,ds).delete(t)){const n=qc(t);if(typeof n=="string"){const i=F(this,br).get(n);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&F(this,br).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=qc(t);if(typeof n=="string"){const i=F(this,br).get(n),o=i==null?void 0:i.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i;const n=qc(t);if(typeof n=="string"){const o=(i=F(this,br).get(n))==null?void 0:i.find(l=>l!==t&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qt.batch(()=>{F(this,ds).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,ds).clear(),F(this,br).clear()})}getAll(){return Array.from(F(this,ds))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>qv(n,i))}findAll(t={}){return this.getAll().filter(n=>qv(t,n))}notify(t){Qt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qt.batch(()=>Promise.all(t.map(n=>n.continue().catch(vn))))}},ds=new WeakMap,br=new WeakMap,Ol=new WeakMap,Xx);function qc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var fs,ri,Rn,hs,vs,iu,Dh,Jx,PC=(Jx=class extends da{constructor(n,i){super();Pe(this,vs);Pe(this,fs);Pe(this,ri);Pe(this,Rn);Pe(this,hs);ye(this,fs,n),this.setOptions(i),this.bindMethods(),Qe(this,vs,iu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const i=this.options;this.options=F(this,fs).defaultMutationOptions(n),hu(this.options,i)||F(this,fs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,Rn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Ji(i.mutationKey)!==Ji(this.options.mutationKey)?this.reset():((o=F(this,Rn))==null?void 0:o.state.status)==="pending"&&F(this,Rn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,Rn))==null||n.removeObserver(this)}onMutationUpdate(n){Qe(this,vs,iu).call(this),Qe(this,vs,Dh).call(this,n)}getCurrentResult(){return F(this,ri)}reset(){var n;(n=F(this,Rn))==null||n.removeObserver(this),ye(this,Rn,void 0),Qe(this,vs,iu).call(this),Qe(this,vs,Dh).call(this)}mutate(n,i){var o;return ye(this,hs,i),(o=F(this,Rn))==null||o.removeObserver(this),ye(this,Rn,F(this,fs).getMutationCache().build(F(this,fs),this.options)),F(this,Rn).addObserver(this),F(this,Rn).execute(n)}},fs=new WeakMap,ri=new WeakMap,Rn=new WeakMap,hs=new WeakMap,vs=new WeakSet,iu=function(){var i;const n=((i=F(this,Rn))==null?void 0:i.state)??d0();ye(this,ri,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Dh=function(n){Qt.batch(()=>{var i,o,l,u,c,h,m,g;if(F(this,hs)&&this.hasListeners()){const y=F(this,ri).variables,x=F(this,ri).context,w={client:F(this,fs),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(i=F(this,hs)).onSuccess)==null||o.call(i,n.data,y,x,w)}catch(_){Promise.reject(_)}try{(u=(l=F(this,hs)).onSettled)==null||u.call(l,n.data,null,y,x,w)}catch(_){Promise.reject(_)}}else if((n==null?void 0:n.type)==="error"){try{(h=(c=F(this,hs)).onError)==null||h.call(c,n.error,y,x,w)}catch(_){Promise.reject(_)}try{(g=(m=F(this,hs)).onSettled)==null||g.call(m,void 0,n.error,y,x,w)}catch(_){Promise.reject(_)}}}this.listeners.forEach(y=>{y(F(this,ri))})})},Jx),Dr,e0,TC=(e0=class extends da{constructor(t={}){super();Pe(this,Dr);this.config=t,ye(this,Dr,new Map)}build(t,n,i){const o=n.queryKey,l=n.queryHash??hp(o,n);let u=this.get(l);return u||(u=new CC({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){F(this,Dr).has(t.queryHash)||(F(this,Dr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,Dr).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,Dr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,Dr).get(t)}getAll(){return[...F(this,Dr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Qv(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>Qv(t,i)):n}notify(t){Qt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dr=new WeakMap,e0),At,si,ii,Jo,ea,oi,ta,na,t0,OC=(t0=class{constructor(e={}){Pe(this,At);Pe(this,si);Pe(this,ii);Pe(this,Jo);Pe(this,ea);Pe(this,oi);Pe(this,ta);Pe(this,na);ye(this,At,e.queryCache||new TC),ye(this,si,e.mutationCache||new NC),ye(this,ii,e.defaultOptions||{}),ye(this,Jo,new Map),ye(this,ea,new Map),ye(this,oi,0)}mount(){Kc(this,oi)._++,F(this,oi)===1&&(ye(this,ta,gp.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,At).onFocus())})),ye(this,na,pu.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,At).onOnline())})))}unmount(){var e,t;Kc(this,oi)._--,F(this,oi)===0&&((e=F(this,ta))==null||e.call(this),ye(this,ta,void 0),(t=F(this,na))==null||t.call(this),ye(this,na,void 0))}isFetching(e){return F(this,At).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,si).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,At).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,At).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ui(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return F(this,At).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),o=F(this,At).get(i.queryHash),l=o==null?void 0:o.state.data,u=fC(t,l);if(u!==void 0)return F(this,At).build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Qt.batch(()=>F(this,At).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,At).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,At);Qt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,At);return Qt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Qt.batch(()=>F(this,At).findAll(e).map(o=>o.cancel(n)));return Promise.all(i).then(vn).catch(vn)}invalidateQueries(e,t={}){return Qt.batch(()=>(F(this,At).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Qt.batch(()=>F(this,At).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(vn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,At).build(this,t);return n.isStaleByTime(ui(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vn).catch(vn)}fetchInfiniteQuery(e){return e.behavior=ty(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vn).catch(vn)}ensureInfiniteQueryData(e){return e.behavior=ty(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pu.isOnline()?F(this,si).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,At)}getMutationCache(){return F(this,si)}getDefaultOptions(){return F(this,ii)}setDefaultOptions(e){ye(this,ii,e)}setQueryDefaults(e,t){F(this,Jo).set(Ji(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,Jo).values()],n={};return t.forEach(i=>{ml(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){F(this,ea).set(Ji(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,ea).values()],n={};return t.forEach(i=>{ml(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,ii).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,ii).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,At).clear(),F(this,si).clear()}},At=new WeakMap,si=new WeakMap,ii=new WeakMap,Jo=new WeakMap,ea=new WeakMap,oi=new WeakMap,ta=new WeakMap,na=new WeakMap,t0),f0=b.createContext(void 0),Kr=e=>{const t=b.useContext(f0);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},AC=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(f0.Provider,{value:e,children:t})),h0=b.createContext(!1),IC=()=>b.useContext(h0);h0.Provider;function MC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LC=b.createContext(MC()),FC=()=>b.useContext(LC),DC=(e,t,n)=>{const i=n!=null&&n.state.error&&typeof e.throwOnError=="function"?mp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},zC=e=>{b.useEffect(()=>{e.clearReset()},[e])},VC=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||mp(n,[e.error,i])),$C=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>n(i(...o)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},BC=(e,t)=>e.isLoading&&e.isFetching&&!t,UC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ry=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function WC(e,t,n){var x,w,_,S;const i=IC(),o=FC(),l=Kr(),u=l.defaultQueryOptions(e);(w=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||w.call(x,u);const c=l.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",$C(u),DC(u,o,c),zC(o);const h=!l.getQueryCache().get(u.queryHash),[m]=b.useState(()=>new t(l,u)),g=m.getOptimisticResult(u),y=!i&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(C=>{const N=y?m.subscribe(Qt.batchCalls(C)):vn;return m.updateResult(),N},[m,y]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),b.useEffect(()=>{m.setOptions(u)},[u,m]),UC(u,g))throw ry(u,m,o);if(VC({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw g.error;if((S=(_=l.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||S.call(_,u,g),u.experimental_prefetchInRender&&!Xi&&BC(g,i)){const C=h?ry(u,m,o):c==null?void 0:c.promise;C==null||C.catch(vn).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function Al(e,t){return WC(e,kC)}function _r(e,t){const n=Kr(),[i]=b.useState(()=>new PC(n,e));b.useEffect(()=>{i.setOptions(e)},[i,e]);const o=b.useSyncExternalStore(b.useCallback(u=>i.subscribe(Qt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=b.useCallback((u,c)=>{i.mutate(u,c).catch(vn)},[i]);if(o.error&&mp(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}var _t=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(_t||{});function p0({update:e,notify:t,unwatched:n}){return{link:i,unlink:o,propagate:l,checkDirty:u,shallowPropagate:c};function i(m,g,y){const x=g.depsTail;if(x!==void 0&&x.dep===m)return;const w=x!==void 0?x.nextDep:g.deps;if(w!==void 0&&w.dep===m){w.version=y,g.depsTail=w;return}const _=m.subsTail;if(_!==void 0&&_.version===y&&_.sub===g)return;const S=g.depsTail=m.subsTail={version:y,dep:m,sub:g,prevDep:x,nextDep:w,prevSub:_,nextSub:void 0};w!==void 0&&(w.prevDep=S),x!==void 0?x.nextDep=S:g.deps=S,_!==void 0?_.nextSub=S:m.subs=S}function o(m,g=m.sub){const y=m.dep,x=m.prevDep,w=m.nextDep,_=m.nextSub,S=m.prevSub;return w!==void 0?w.prevDep=x:g.depsTail=x,x!==void 0?x.nextDep=w:g.deps=w,_!==void 0?_.prevSub=S:y.subsTail=S,S!==void 0?S.nextSub=_:(y.subs=_)===void 0&&n(y),w}function l(m){let g=m.nextSub,y;e:do{const x=m.sub;let w=x.flags;if(w&60?w&12?w&4?!(w&48)&&h(m,x)?(x.flags=w|40,w&=1):w=0:x.flags=w&-9|32:w=0:x.flags=w|32,w&2&&t(x),w&1){const _=x.subs;if(_!==void 0){const S=(m=_).nextSub;S!==void 0&&(y={value:g,prev:y},g=S);continue}}if((m=g)!==void 0){g=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){g=m.nextSub;continue e}break}while(!0)}function u(m,g){let y,x=0,w=!1;e:do{const _=m.dep,S=_.flags;if(g.flags&16)w=!0;else if((S&17)===17){if(e(_)){const C=_.subs;C.nextSub!==void 0&&c(C),w=!0}}else if((S&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=_.deps,g=_,++x;continue}if(!w){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;x--;){const C=g.subs,N=C.nextSub!==void 0;if(N?(m=y.value,y=y.prev):m=C,w){if(e(g)){N&&c(C),g=m.sub;continue}w=!1}else g.flags&=-33;g=m.sub;const k=m.nextDep;if(k!==void 0){m=k;continue e}}return w}while(!0)}function c(m){do{const g=m.sub,y=g.flags;(y&48)===32&&(g.flags=y|16,(y&6)===2&&t(g))}while((m=m.nextSub)!==void 0)}function h(m,g){let y=g.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}let yp=0,Li=0,dl=0;const ps=[],{link:EO,unlink:m0,propagate:RO,checkDirty:HC,shallowPropagate:NO}=p0({update(e){return e.depsTail!==void 0?ZC(e):GC(e)},notify(e){var i;let t=dl,n=t;do if(ps[t++]=e,e.flags&=-3,e=(i=e.subs)==null?void 0:i.sub,e===void 0||!(e.flags&2))break;while(!0);for(dl=t;n<--t;){const o=ps[n];ps[n++]=ps[t],ps[t]=o}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Bu(e)):JC.call(e)}});function KC(){return yp}function QC(){++yp}function qC(){--yp||XC()}function ZC(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,Bu(e)}}function GC(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function YC(e){const t=e.flags;if(t&16||t&32&&HC(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Bu(e)}}else e.flags=2}function XC(){try{for(;Li<dl;){const e=ps[Li];ps[Li++]=void 0,YC(e)}}finally{for(;Li<dl;){const e=ps[Li];ps[Li++]=void 0,e.flags|=10}Li=0,dl=0}}function JC(){this.depsTail=void 0,this.flags=0,Bu(this);const e=this.subs;e!==void 0&&m0(e)}function Bu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=m0(n,e)}function g0(e,t,n){var l,u,c;const i=typeof e=="object",o=i?e:void 0;return{next:(l=i?e.next:e)==null?void 0:l.bind(o),error:(u=i?e.error:t)==null?void 0:u.bind(o),complete:(c=i?e.complete:n)==null?void 0:c.bind(o)}}const zh=[];let ou=0;const{link:sy,unlink:ek,propagate:tk,checkDirty:v0,shallowPropagate:iy}=p0({update(e){return e._update()},notify(e){zh[Vh++]=e,e.flags&=~_t.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=_t.Mutable|_t.Dirty,mu(e))}});let Zc=0,Vh=0,Ir;function mu(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=ek(n,e)}function y0(){if(!(KC()>0)){for(;Zc<Vh;){const e=zh[Zc];zh[Zc++]=void 0,e.notify()}Zc=0,Vh=0}}function nk(e,t){const n=typeof e=="function",i=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?_t.None:_t.Mutable,get(){return Ir!==void 0&&sy(o,Ir,ou),o._snapshot},subscribe(l){const u=g0(l),c={current:!1},h=rk(()=>{var m;o.get(),c.current?(m=u.next)==null||m.call(u,o._snapshot):c.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(l){const u=Ir,c=Object.is;Ir=o,++ou,o.depsTail=void 0,n&&(o.flags=_t.Mutable|_t.RecursedCheck);try{const h=o._snapshot,m=typeof l=="function"?l(h):l===void 0&&n?i(h):l;return h===void 0||!c(h,m)?(o._snapshot=m,!0):!1}finally{Ir=u,n&&(o.flags&=~_t.RecursedCheck),mu(o)}}};return n?(o.flags=_t.Mutable|_t.Dirty,o.get=function(){const l=o.flags;if(l&_t.Dirty||l&_t.Pending&&v0(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&iy(u)}}else l&_t.Pending&&(o.flags=l&~_t.Pending);return Ir!==void 0&&sy(o,Ir,ou),o._snapshot}):o.set=function(l){if(o._update(l)){const u=o.subs;u!==void 0&&(tk(u),iy(u),y0())}},o}function rk(e){const t=()=>{const i=Ir;Ir=n,++ou,n.depsTail=void 0,n.flags=_t.Watching|_t.RecursedCheck;try{return e()}finally{Ir=i,n.flags&=~_t.RecursedCheck,mu(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:_t.Watching|_t.RecursedCheck,notify(){const i=this.flags;i&_t.Dirty||i&_t.Pending&&v0(this.deps,this)?t():this.flags=_t.Watching},stop(){this.flags=_t.None,this.depsTail=void 0,mu(this)}};return t(),n}class sk{constructor(t){this.atom=nk(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(g0(t))}}function ik(e){try{QC(),e()}finally{qC(),y0()}}const di="__TSR_index",oy="popstate",ay="beforeunload";function ok(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:c,...h})=>{var x,w;if((c==null?void 0:c.ignoreBlocker)??!1){u();return}const g=((x=e.getBlockers)==null?void 0:x.call(e))??[],y=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const _ of g){const S=gu(h.path,h.state);if(await _.blockerFn({currentLocation:t,nextLocation:S,action:h.type})){(w=e.onBlocked)==null||w.call(e);return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,c,h)=>{const m=t.state[di];c=ly(m+1,c),l({task:()=>{e.pushState(u,c),i({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:u,state:c})},replace:(u,c,h)=>{const m=t.state[di];c=ly(m,c),l({task:()=>{e.replaceState(u,c),i({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:u,state:c})},go:(u,c)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:c,type:"GO"})},back:u=>{l({task:()=>{e.back((u==null?void 0:u.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward((u==null?void 0:u.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[di]!==0,createHref:u=>e.createHref(u),block:u=>{var h;if(!e.setBlockers)return()=>{};const c=((h=e.getBlockers)==null?void 0:h.call(e))??[];return e.setBlockers([...c,u]),()=>{var g,y;const m=((g=e.getBlockers)==null?void 0:g.call(e))??[];(y=e.setBlockers)==null||y.call(e,m.filter(x=>x!==u))}},flush:()=>{var u;return(u=e.flush)==null?void 0:u.call(e)},destroy:()=>{var u;return(u=e.destroy)==null?void 0:u.call(e)},notify:i}}function ly(e,t){t||(t={});const n=xp();return{...t,key:n,__TSR_key:n,[di]:e}}function ak(e){var L,V;const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let o=[];const l=()=>o,u=M=>o=M,c=(M=>M),h=(()=>gu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((L=t.history.state)!=null&&L.__TSR_key)&&!((V=t.history.state)!=null&&V.key)){const M=xp();t.history.replaceState({[di]:0,key:M,__TSR_key:M},"")}let m=h(),g,y=!1,x=!1,w=!1,_=!1;const S=()=>m;let C,N;const k=()=>{C&&(O._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),O._ignoreSubscribers=!1,C=void 0,N=void 0,g=void 0)},R=(M,Z,W)=>{const ee=c(Z);N||(g=m),m=gu(Z,W),C={href:ee,state:W,isPush:(C==null?void 0:C.isPush)||M==="push"},N||(N=Promise.resolve().then(()=>k()))},j=M=>{m=h(),O.notify({type:M})},P=async()=>{if(x){x=!1;return}const M=h(),Z=M.state[di]-m.state[di],W=Z===1,ee=Z===-1,se=!W&&!ee||y;y=!1;const oe=se?"GO":ee?"BACK":"FORWARD",X=se?{type:"GO",index:Z}:{type:ee?"BACK":"FORWARD"};if(w)w=!1;else{const ie=l();if(typeof document<"u"&&ie.length){for(const B of ie)if(await B.blockerFn({currentLocation:m,nextLocation:M,action:oe})){x=!0,t.history.go(1),O.notify(X);return}}}m=h(),O.notify(X)},T=M=>{if(_){_=!1;return}let Z=!1;const W=l();if(typeof document<"u"&&W.length)for(const ee of W){const se=ee.enableBeforeUnload??!0;if(se===!0){Z=!0;break}if(typeof se=="function"&&se()===!0){Z=!0;break}}if(Z)return M.preventDefault(),M.returnValue=""},O=ok({getLocation:S,getLength:()=>t.history.length,pushState:(M,Z)=>R("push",M,Z),replaceState:(M,Z)=>R("replace",M,Z),back:M=>(M&&(w=!0),_=!0,t.history.back()),forward:M=>{M&&(w=!0),_=!0,t.history.forward()},go:M=>{y=!0,t.history.go(M)},createHref:M=>c(M),flush:k,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(ay,T,{capture:!0}),t.removeEventListener(oy,P)},onBlocked:()=>{g&&m!==g&&(m=g)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(ay,T,{capture:!0}),t.addEventListener(oy,P),t.history.pushState=function(...M){const Z=n.apply(t.history,M);return O._ignoreSubscribers||j("PUSH"),Z},t.history.replaceState=function(...M){const Z=i.apply(t.history,M);return O._ignoreSubscribers||j("REPLACE"),Z},O}function lk(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function gu(e,t){const n=lk(e),i=n.indexOf("#"),o=n.indexOf("?"),l=xp();return{href:n,pathname:n.substring(0,i>0?o>0?Math.min(i,o):i:o>0?o:n.length),hash:i>-1?n.substring(i):"",search:o>-1?n.slice(o,i===-1?void 0:i):"",state:t||{[di]:0,key:l,__TSR_key:l}}}function xp(){return(Math.random()+1).toString(36).substring(7)}const ck=!1;function fl(e){let t;return ik(()=>{t=e()}),t}function gl(e){return e[e.length-1]}function uk(e){return typeof e=="function"}function ai(e,t){return uk(e)?e(t):e}const dk=Object.prototype.hasOwnProperty,cy=Object.prototype.propertyIsEnumerable;function zn(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=t,o=fy(e)&&fy(i);if(!o&&!(vu(e)&&vu(i)))return i;const l=o?e:uy(e);if(!l)return i;const u=o?i:uy(i);if(!u)return i;const c=l.length,h=u.length,m=o?new Array(h):{};let g=0;for(let y=0;y<h;y++){const x=o?y:u[y],w=e[x],_=i[x];if(w===_){m[x]=w,(o?y<c:dk.call(e,x))&&g++;continue}if(w===null||_===null||typeof w!="object"||typeof _!="object"){m[x]=_;continue}const S=zn(w,_,n+1);m[x]=S,S===w&&g++}return c===h&&g===c?e:m}function uy(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!cy.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const i=t;for(const o of n){if(!cy.call(e,o))return!1;i.push(o)}return i}function vu(e){if(!dy(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!dy(n)||!n.hasOwnProperty("isPrototypeOf"))}function dy(e){return Object.prototype.toString.call(e)==="[object Object]"}function fy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,o=e.length;i<o;i++)if(!Gi(e[i],t[i],n))return!1;return!0}if(vu(e)&&vu(t)){const i=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Gi(e[u],t[u],n))return!1;return!0}let o=0;if(!i)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>o||!Gi(e[u],t[u],n)))return!1;return o===l}return!1}function ra(e){let t,n;const i=new Promise((o,l)=>{t=o,n=l});return i.status="pending",i.resolve=o=>{i.status="resolved",i.value=o,t(o),e==null||e(o)},i.reject=o=>{i.status="rejected",n(o)},i}function Vo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function fk(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function hy(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return fk(t)}const hk=["http:","https:","mailto:","tel:"];function yu(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function el(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,i="",o;for(;(o=t.exec(e))!==null;)i+=hy(e.slice(n,o.index))+o[0],n=t.lastIndex;i=i+hy(n?e.slice(n):e);let l=!1;return i.startsWith("//")&&(l=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:l}}function pk(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var mk="Invariant failed";function ys(e,t){if(!e)throw new Error(mk)}function xu(e){const t=new Map;let n,i;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&n){const h=n;t.delete(h.key),h.next&&(n=h.next,h.next.prev=void 0),h===i&&(i=void 0)}const c=t.get(l);if(c)c.value=u,o(c);else{const h={key:l,value:u,prev:i};i&&(i.next=h),i=h,n||(n=h),t.set(l,h)}},clear(){t.clear(),n=void 0,i=void 0}}}const sa=0,eo=1,to=2,vl=3,Di=4,x0=5;function gk(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function wp(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),o=i===-1?e.length:i,l=e.substring(t,o);if(!l||!l.includes("$"))return n[0]=sa,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(l==="$"){const c=e.length;return n[0]=to,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(l.charCodeAt(0)===36)return n[0]=eo,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const u=gk(l);if(u){const[c,h]=u,m=l.charCodeAt(c+1);if(m===45){if(c+2<l.length&&l.charCodeAt(c+2)===36){const g=c+3,y=h;if(g<y)return n[0]=vl,n[1]=t+c,n[2]=t+g,n[3]=t+y,n[4]=t+h+1,n[5]=o,n}}else if(m===36){const g=c+1,y=c+2;return y===h?(n[0]=to,n[1]=t+c,n[2]=t+g,n[3]=t+y,n[4]=t+h+1,n[5]=e.length,n):(n[0]=eo,n[1]=t+c,n[2]=t+y,n[3]=t+h,n[4]=t+h+1,n[5]=o,n)}}return n[0]=sa,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Uu(e,t,n,i,o,l,u){var h,m,g,y,x,w,_,S,C,N,k,R,j;u==null||u(n);let c=i;{const P=n.fullPath??n.from,T=P.length,O=((h=n.options)==null?void 0:h.caseSensitive)??e,L=!!((g=(m=n.options)==null?void 0:m.params)!=null&&g.parse&&((x=(y=n.options)==null?void 0:y.skipRouteOnParseError)!=null&&x.params));for(;c<T;){const M=wp(P,c,t);let Z;const W=c,ee=M[5];switch(c=ee+1,l++,M[0]){case sa:{const oe=P.substring(M[2],M[3]);if(O){const X=(w=o.static)==null?void 0:w.get(oe);if(X)Z=X;else{o.static??(o.static=new Map);const ie=zi(n.fullPath??n.from);ie.parent=o,ie.depth=l,Z=ie,o.static.set(oe,ie)}}else{const X=oe.toLowerCase(),ie=(_=o.staticInsensitive)==null?void 0:_.get(X);if(ie)Z=ie;else{o.staticInsensitive??(o.staticInsensitive=new Map);const B=zi(n.fullPath??n.from);B.parent=o,B.depth=l,Z=B,o.staticInsensitive.set(X,B)}}break}case eo:{const oe=P.substring(W,M[1]),X=P.substring(M[4],ee),ie=O&&!!(oe||X),B=oe?ie?oe:oe.toLowerCase():void 0,U=X?ie?X:X.toLowerCase():void 0,Q=!L&&((S=o.dynamic)==null?void 0:S.find(I=>!I.skipOnParamError&&I.caseSensitive===ie&&I.prefix===B&&I.suffix===U));if(Q)Z=Q;else{const I=Xf(eo,n.fullPath??n.from,ie,B,U);Z=I,I.depth=l,I.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(I)}break}case vl:{const oe=P.substring(W,M[1]),X=P.substring(M[4],ee),ie=O&&!!(oe||X),B=oe?ie?oe:oe.toLowerCase():void 0,U=X?ie?X:X.toLowerCase():void 0,Q=!L&&((C=o.optional)==null?void 0:C.find(I=>!I.skipOnParamError&&I.caseSensitive===ie&&I.prefix===B&&I.suffix===U));if(Q)Z=Q;else{const I=Xf(vl,n.fullPath??n.from,ie,B,U);Z=I,I.parent=o,I.depth=l,o.optional??(o.optional=[]),o.optional.push(I)}break}case to:{const oe=P.substring(W,M[1]),X=P.substring(M[4],ee),ie=O&&!!(oe||X),B=oe?ie?oe:oe.toLowerCase():void 0,U=X?ie?X:X.toLowerCase():void 0,Q=Xf(to,n.fullPath??n.from,ie,B,U);Z=Q,Q.parent=o,Q.depth=l,o.wildcard??(o.wildcard=[]),o.wildcard.push(Q)}}o=Z}if(L&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const M=zi(n.fullPath??n.from);M.kind=x0,M.parent=o,l++,M.depth=l,o.pathless??(o.pathless=[]),o.pathless.push(M),o=M}const V=(n.path||!n.children)&&!n.isRoot;if(V&&P.endsWith("/")){const M=zi(n.fullPath??n.from);M.kind=Di,M.parent=o,l++,M.depth=l,o.index=M,o=M}o.parse=((k=(N=n.options)==null?void 0:N.params)==null?void 0:k.parse)??null,o.skipOnParamError=L,o.parsingPriority=((j=(R=n.options)==null?void 0:R.skipRouteOnParseError)==null?void 0:j.priority)??0,V&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const P of n.children)Uu(e,t,P,c,o,l,u)}function Yf(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Zs(e){var t,n,i;if(e.pathless)for(const o of e.pathless)Zs(o);if(e.static)for(const o of e.static.values())Zs(o);if(e.staticInsensitive)for(const o of e.staticInsensitive.values())Zs(o);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Yf);for(const o of e.dynamic)Zs(o)}if((n=e.optional)!=null&&n.length){e.optional.sort(Yf);for(const o of e.optional)Zs(o)}if((i=e.wildcard)!=null&&i.length){e.wildcard.sort(Yf);for(const o of e.wildcard)Zs(o)}}function zi(e){return{kind:sa,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Xf(e,t,n,i,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:i,suffix:o}}function vk(e,t){const n=zi("/"),i=new Uint16Array(6);for(const o of e)Uu(!1,i,o,1,n,0);Zs(n),t.masksTree=n,t.flatCache=xu(1e3)}function yk(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const i=Sp(e,t.masksTree);return t.flatCache.set(e,i),i}function xk(e,t,n,i,o){e||(e="/"),i||(i="/");const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);if(!u){u=zi("/");const c=new Uint16Array(6);Uu(t,c,{from:e},1,u,0),o.singleCache.set(l,u)}return Sp(i,u,n)}function wk(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,o=t.matchCache.get(i);if(o!==void 0)return o;e||(e="/");let l;try{l=Sp(e,t.segmentTree,n)}catch(u){if(u instanceof URIError)l=null;else throw u}return l&&(l.branch=Ck(l.route)),t.matchCache.set(i,l),l}function Sk(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function bk(e,t=!1,n){const i=zi(e.fullPath),o=new Uint16Array(6),l={},u={};let c=0;return Uu(t,o,e,1,i,0,m=>{if(n==null||n(m,c),ys(!(m.id in l),`Duplicate routes found with id: ${String(m.id)}`),l[m.id]=m,c!==0&&m.path){const g=Sk(m.fullPath);(!u[g]||m.fullPath.endsWith("/"))&&(u[g]=m)}c++}),Zs(i),{processedTree:{segmentTree:i,singleCache:xu(1e3),matchCache:xu(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Sp(e,t,n=!1){const i=e.split("/"),o=_k(e,i,t,n);if(!o)return null;const[l]=w0(e,i,o);return{route:o.node.route,rawParams:l,parsedParams:o.parsedParams}}function w0(e,t,n){var g,y,x,w,_,S,C,N,k,R;const i=kk(n.node);let o=null;const l={};let u=((g=n.extract)==null?void 0:g.part)??0,c=((y=n.extract)==null?void 0:y.node)??0,h=((x=n.extract)==null?void 0:x.path)??0,m=((w=n.extract)==null?void 0:w.segment)??0;for(;c<i.length;u++,c++,h++,m++){const j=i[c];if(j.kind===Di)break;if(j.kind===x0){m--,u--,h--;continue}const P=t[u],T=h;if(P&&(h+=P.length),j.kind===eo){o??(o=n.node.fullPath.split("/"));const O=o[m],L=((_=j.prefix)==null?void 0:_.length)??0;if(O.charCodeAt(L)===123){const M=((S=j.suffix)==null?void 0:S.length)??0,Z=O.substring(L+2,O.length-M-1),W=P.substring(L,P.length-M);l[Z]=decodeURIComponent(W)}else{const M=O.substring(1);l[M]=decodeURIComponent(P)}}else if(j.kind===vl){if(n.skipped&1<<c){u--,h=T-1;continue}o??(o=n.node.fullPath.split("/"));const O=o[m],L=((C=j.prefix)==null?void 0:C.length)??0,V=((N=j.suffix)==null?void 0:N.length)??0,M=O.substring(L+3,O.length-V-1),Z=j.suffix||j.prefix?P.substring(L,P.length-V):P;Z&&(l[M]=decodeURIComponent(Z))}else if(j.kind===to){const O=j,L=e.substring(T+(((k=O.prefix)==null?void 0:k.length)??0),e.length-(((R=O.suffix)==null?void 0:R.length)??0)),V=decodeURIComponent(L);l["*"]=V,l._splat=V;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:u,node:c,path:h,segment:m}]}function Ck(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function kk(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function _k(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!gl(t),l=o&&e!=="/",u=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let h=null,m=null,g=null;for(;c.length;){const y=c.pop(),{node:x,index:w,skipped:_,depth:S,statics:C,dynamics:N,optionals:k}=y;let{extract:R,rawParams:j,parsedParams:P}=y;if(x.skipOnParamError){if(!Jf(e,t,y))continue;j=y.rawParams,R=y.extract,P=y.parsedParams}i&&x.route&&x.kind!==Di&&tl(m,y)&&(m=y);const T=w===u;if(T&&(x.route&&!l&&tl(g,y)&&(g=y),!x.optional&&!x.wildcard&&!x.index&&!x.pathless))continue;const O=T?void 0:t[w];let L;if(T&&x.index){const V={node:x.index,index:w,skipped:_,depth:S+1,statics:C,dynamics:N,optionals:k,extract:R,rawParams:j,parsedParams:P};let M=!0;if(x.index.skipOnParamError&&(Jf(e,t,V)||(M=!1)),M){if(C===u&&!N&&!k&&!_)return V;tl(g,V)&&(g=V)}}if(x.wildcard&&tl(h,y))for(const V of x.wildcard){const{prefix:M,suffix:Z}=V;if(M&&(T||!(V.caseSensitive?O:L??(L=O.toLowerCase())).startsWith(M)))continue;if(Z){if(T)continue;const ee=t.slice(w).join("/").slice(-Z.length);if((V.caseSensitive?ee:ee.toLowerCase())!==Z)continue}const W={node:V,index:u,skipped:_,depth:S,statics:C,dynamics:N,optionals:k,extract:R,rawParams:j,parsedParams:P};if(!(V.skipOnParamError&&!Jf(e,t,W))){h=W;break}}if(x.optional){const V=_|1<<S,M=S+1;for(let Z=x.optional.length-1;Z>=0;Z--){const W=x.optional[Z];c.push({node:W,index:w,skipped:V,depth:M,statics:C,dynamics:N,optionals:k,extract:R,rawParams:j,parsedParams:P})}if(!T)for(let Z=x.optional.length-1;Z>=0;Z--){const W=x.optional[Z],{prefix:ee,suffix:se}=W;if(ee||se){const oe=W.caseSensitive?O:L??(L=O.toLowerCase());if(ee&&!oe.startsWith(ee)||se&&!oe.endsWith(se))continue}c.push({node:W,index:w+1,skipped:_,depth:M,statics:C,dynamics:N,optionals:k+1,extract:R,rawParams:j,parsedParams:P})}}if(!T&&x.dynamic&&O)for(let V=x.dynamic.length-1;V>=0;V--){const M=x.dynamic[V],{prefix:Z,suffix:W}=M;if(Z||W){const ee=M.caseSensitive?O:L??(L=O.toLowerCase());if(Z&&!ee.startsWith(Z)||W&&!ee.endsWith(W))continue}c.push({node:M,index:w+1,skipped:_,depth:S+1,statics:C,dynamics:N+1,optionals:k,extract:R,rawParams:j,parsedParams:P})}if(!T&&x.staticInsensitive){const V=x.staticInsensitive.get(L??(L=O.toLowerCase()));V&&c.push({node:V,index:w+1,skipped:_,depth:S+1,statics:C+1,dynamics:N,optionals:k,extract:R,rawParams:j,parsedParams:P})}if(!T&&x.static){const V=x.static.get(O);V&&c.push({node:V,index:w+1,skipped:_,depth:S+1,statics:C+1,dynamics:N,optionals:k,extract:R,rawParams:j,parsedParams:P})}if(x.pathless){const V=S+1;for(let M=x.pathless.length-1;M>=0;M--){const Z=x.pathless[M];c.push({node:Z,index:w,skipped:_,depth:V,statics:C,dynamics:N,optionals:k,extract:R,rawParams:j,parsedParams:P})}}}if(g&&h)return tl(h,g)?g:h;if(g)return g;if(h)return h;if(i&&m){let y=m.index;for(let w=0;w<m.index;w++)y+=t[w].length;const x=y===e.length?"/":e.slice(y);return m.rawParams??(m.rawParams={}),m.rawParams["**"]=decodeURIComponent(x),m}return null}function Jf(e,t,n){try{const[i,o]=w0(e,t,n);n.rawParams=i,n.extract=o;const l=n.node.parse(i);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function tl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Di)>(e.node.kind===Di)||t.node.kind===Di==(e.node.kind===Di)&&t.depth>e.depth))):!0}function au(e){return bp(e.filter(t=>t!==void 0).join("/"))}function bp(e){return e.replace(/\/{2,}/g,"/")}function S0(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ms(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function b0(e){return ms(S0(e))}function wu(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function jk(e,t,n){return wu(e,n)===wu(t,n)}function Ek({base:e,to:t,trailingSlash:n="never",cache:i}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(i){u=o?t:l?e:e+"\0"+t;const y=i.get(u);if(y)return y}let c;if(l)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&gl(c)==="";)c.pop();const y=t.split("/");for(let x=0,w=y.length;x<w;x++){const _=y[x];_===""?x?x===w-1&&c.push(_):c=[_]:_===".."?c.pop():_==="."||c.push(_)}}c.length>1&&(gl(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));let h,m="";for(let y=0;y<c.length;y++){y>0&&(m+="/");const x=c[y];if(!x)continue;h=wp(x,0,h);const w=h[0];if(w===sa){m+=x;continue}const _=h[5],S=x.substring(0,h[1]),C=x.substring(h[4],_),N=x.substring(h[2],h[3]);w===eo?m+=S||C?`${S}{$${N}}${C}`:`$${N}`:w===to?m+=S||C?`${S}{$}${C}`:"$":m+=`${S}{-$${N}}${C}`}m=bp(m);const g=m||"/";return u&&i&&i.set(u,g),g}function Rk(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(n,"g");return o=>o.replace(i,l=>t.get(l)??l)}function eh(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(o=>py(o,n)).join("/"):py(i,n)}function th({path:e,params:t,decoder:n,...i}){let o=!1;const l={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:o};const u=e.length;let c=0,h,m="";for(;c<u;){const y=c;h=wp(e,y,h);const x=h[5];if(c=x+1,y===x)continue;const w=h[0];if(w===sa){m+="/"+e.substring(y,x);continue}if(w===to){const _=t._splat;l._splat=_,l["*"]=_;const S=e.substring(y,h[1]),C=e.substring(h[4],x);if(!_){o=!0,(S||C)&&(m+="/"+S+C);continue}const N=eh("_splat",t,n);m+="/"+S+N+C;continue}if(w===eo){const _=e.substring(h[2],h[3]);!o&&!(_ in t)&&(o=!0),l[_]=t[_];const S=e.substring(y,h[1]),C=e.substring(h[4],x),N=eh(_,t,n)??"undefined";m+="/"+S+N+C;continue}if(w===vl){const _=e.substring(h[2],h[3]),S=t[_];if(S==null)continue;l[_]=S;const C=e.substring(y,h[1]),N=e.substring(h[4],x),k=eh(_,t,n)??"";m+="/"+C+k+N;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:l,interpolatedPath:m||"/",isMissingParams:o}}function py(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Bn(e){return!!(e!=null&&e.isNotFound)}function Nk(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const $h="tsr-scroll-restoration-v1_3",Pk=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function Tk(){const e=Nk();if(!e)return null;const t=e.getItem($h);let n=t?JSON.parse(t):{};return{state:n,set:i=>{n=ai(i,n)||n;try{e.setItem($h,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Gc=Tk(),Ok=e=>e.state.__TSR_key||e.href;function Ak(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Su=!1;function Ik({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:o,location:l}){var m,g;let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(y){console.error(y);return}const c=t||((m=window.history.state)==null?void 0:m.__TSR_key),h=u[c];Su=!0;e:{if(i&&h&&Object.keys(h).length>0){for(const w in h){const _=h[w];if(w==="window")window.scrollTo({top:_.scrollY,left:_.scrollX,behavior:n});else if(w){const S=document.querySelector(w);S&&(S.scrollLeft=_.scrollX,S.scrollTop=_.scrollY)}}break e}const y=(l??window.location).hash.split("#",2)[1];if(y){const w=((g=window.history.state)==null?void 0:g.__hashScrollIntoViewOptions)??!0;if(w){const _=document.getElementById(y);_&&_.scrollIntoView(w)}break e}const x={top:0,left:0,behavior:n};if(window.scrollTo(x),o)for(const w of o){if(w==="window")continue;const _=typeof w=="function"?w():document.querySelector(w);_&&_.scrollTo(x)}}Su=!1}function Mk(e,t){if(!Gc||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Gc))return;e.isScrollRestorationSetup=!0,Su=!1;const i=e.options.getScrollRestorationKey||Ok;window.history.scrollRestoration="manual";const o=l=>{if(Su||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const h=l.target.getAttribute("data-scroll-restoration-id");h?u=`[data-scroll-restoration-id="${h}"]`:u=Ak(l.target)}const c=i(e.state.location);Gc.set(h=>{const m=h[c]||(h[c]={}),g=m[u]||(m[u]={});if(u==="window")g.scrollX=window.scrollX||0,g.scrollY=window.scrollY||0;else if(u){const y=document.querySelector(u);y&&(g.scrollX=y.scrollLeft||0,g.scrollY=y.scrollTop||0)}return h})};typeof document<"u"&&document.addEventListener("scroll",Pk(o,100),!0),e.subscribe("onRendered",l=>{const u=i(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Ik({storageKey:$h,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Gc.set(c=>(c[u]||(c[u]={}),c)))})}function Lk(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Fk(e,t=String){const n=new URLSearchParams;for(const i in e){const o=e[i];o!==void 0&&n.set(i,t(o))}return n.toString()}function nh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Dk(e){const t=new URLSearchParams(e),n={};for(const[i,o]of t.entries()){const l=n[i];l==null?n[i]=nh(o):Array.isArray(l)?l.push(nh(o)):n[i]=[l,nh(o)]}return n}const zk=$k(JSON.parse),Vk=Bk(JSON.stringify,JSON.parse);function $k(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Dk(t);for(const i in n){const o=n[i];if(typeof o=="string")try{n[i]=e(o)}catch{}}return n}}function Bk(e,t){const n=typeof t=="function";function i(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=Fk(o,i);return l?`?${l}`:""}}const rr="__root__";function Uk(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function sr(e){return e instanceof Response&&!!e.options}const lu=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Wu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),$o=(e,t,n=!0)=>{const i={...e.router.options.context??{}},o=n?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const c=e.router.getMatch(u.id);c&&Object.assign(i,c.__routeContext,c.__beforeLoadContext)}return i},C0=(e,t,n)=>{var u;const i=e.router.routesById[t.routeId??""]??e.router.routeTree;!i.options.notFoundComponent&&((u=e.router.options)!=null&&u.defaultNotFoundComponent)&&(i.options.notFoundComponent=e.router.options.defaultNotFoundComponent);const o=n==="BEFORE_LOAD"&&i.parentRoute;o||ys(i.options.notFoundComponent);const l=e.matches.find(c=>c.routeId===i.id);ys(l,"Could not find match for route: "+i.id),e.updateMatch(l.id,c=>({...c,status:"notFound",error:t,isFetching:!1})),o&&(t.routeId=i.parentRoute.id,C0(e,t,n))},li=(e,t,n,i)=>{var o,l,u;if(!(!sr(n)&&!Bn(n))){if(sr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){(o=t._nonReactive.beforeLoadPromise)==null||o.resolve(),(l=t._nonReactive.loaderPromise)==null||l.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const c=sr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,h=>({...h,status:c,context:$o(e,t.index),isFetching:!1,error:n})),Bn(n)&&!n.routeId&&(n.routeId=t.routeId),(u=t._nonReactive.loadPromise)==null||u.resolve()}throw sr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(C0(e,n,i),n)}},k0=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,nl=(e,t,n,i)=>{var c,h;const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),li(e,e.router.getMatch(o),n,i);try{(h=(c=u.options).onError)==null||h.call(c,n)}catch(m){n=m,li(e,e.router.getMatch(o),n,i)}e.updateMatch(o,m=>{var g,y;return(g=m._nonReactive.beforeLoadPromise)==null||g.resolve(),m._nonReactive.beforeLoadPromise=void 0,(y=m._nonReactive.loadPromise)==null||y.resolve(),{...m,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},_0=(e,t,n,i)=>{var u;if(i._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Wu(e,t)&&(n.options.loader||n.options.beforeLoad||R0(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??((u=e.router.options)==null?void 0:u.defaultPendingComponent)))){const c=setTimeout(()=>{lu(e)},o);i._nonReactive.pendingTimeout=c}},Wk=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;_0(e,t,n,i);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&li(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(o):o()},Hk=(e,t,n,i)=>{const o=e.router.getMatch(t),l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=ra(()=>{l==null||l.resolve()});const{paramsError:u,searchError:c}=o;u&&nl(e,n,u,"PARSE_PARAMS"),c&&nl(e,n,c,"VALIDATE_SEARCH"),_0(e,t,i,o);const h=new AbortController;let m=!1;const g=()=>{m||(m=!0,e.updateMatch(t,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:h})))},y=()=>{var j;(j=o._nonReactive.beforeLoadPromise)==null||j.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,P=>({...P,isFetching:!1}))};if(!i.options.beforeLoad){fl(()=>{g(),y()});return}o._nonReactive.beforeLoadPromise=ra();const x={...$o(e,n,!1),...o.__routeContext},{search:w,params:_,cause:S}=o,C=Wu(e,t),N={search:w,abortController:h,params:_,preload:C,context:x,location:e.location,navigate:j=>e.router.navigate({...j,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":S,matches:e.matches,routeId:i.id,...e.router.options.additionalContext},k=j=>{if(j===void 0){fl(()=>{g(),y()});return}(sr(j)||Bn(j))&&(g(),nl(e,n,j,"BEFORE_LOAD")),fl(()=>{g(),e.updateMatch(t,P=>({...P,__beforeLoadContext:j})),y()})};let R;try{if(R=i.options.beforeLoad(N),Vo(R))return g(),R.catch(j=>{nl(e,n,j,"BEFORE_LOAD")}).then(k)}catch(j){g(),nl(e,n,j,"BEFORE_LOAD")}k(R)},Kk=(e,t)=>{const{id:n,routeId:i}=e.matches[t],o=e.router.looseRoutesById[i],l=()=>c(),u=()=>Hk(e,n,t,o),c=()=>{if(k0(e,n))return;const h=Wk(e,n,o);return Vo(h)?h.then(u):u()};return l()},Qk=(e,t,n)=>{var l,u,c,h,m,g;const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([(u=(l=n.options).head)==null?void 0:u.call(l,o),(h=(c=n.options).scripts)==null?void 0:h.call(c,o),(g=(m=n.options).headers)==null?void 0:g.call(m,o)]).then(([y,x,w])=>{const _=y==null?void 0:y.meta,S=y==null?void 0:y.links,C=y==null?void 0:y.scripts,N=y==null?void 0:y.styles;return{meta:_,links:S,headScripts:C,headers:w,scripts:x,styles:N}})},j0=(e,t,n,i)=>{const o=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:c,cause:h}=e.router.getMatch(t),m=$o(e,n),g=Wu(e,t);return{params:l,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:m,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:g?"preload":h,route:i,...e.router.options.additionalContext}},my=async(e,t,n,i)=>{var o,l,u,c,h,m,g;try{const y=e.router.getMatch(t);try{(!(ck??e.router.isServer)||y.ssr===!0)&&E0(i);const x=(l=(o=i.options).loader)==null?void 0:l.call(o,j0(e,t,n,i)),w=i.options.loader&&Vo(x);if(!!(w||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||y._nonReactive.minPendingPromise)&&e.updateMatch(t,C=>({...C,isFetching:"loader"})),i.options.loader){const C=w?await x:x;li(e,e.router.getMatch(t),C),C!==void 0&&e.updateMatch(t,N=>({...N,loaderData:C}))}i._lazyPromise&&await i._lazyPromise;const S=y._nonReactive.minPendingPromise;S&&await S,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,C=>({...C,error:void 0,context:$o(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(x){let w=x;if((w==null?void 0:w.name)==="AbortError"){if(y.abortController.signal.aborted){(u=y._nonReactive.loaderPromise)==null||u.resolve(),y._nonReactive.loaderPromise=void 0;return}e.updateMatch(t,S=>({...S,status:S.status==="pending"?"success":S.status,isFetching:!1,context:$o(e,n)}));return}const _=y._nonReactive.minPendingPromise;_&&await _,Bn(x)&&await((h=(c=i.options.notFoundComponent)==null?void 0:c.preload)==null?void 0:h.call(c)),li(e,e.router.getMatch(t),x);try{(g=(m=i.options).onError)==null||g.call(m,x)}catch(S){w=S,li(e,e.router.getMatch(t),S)}e.updateMatch(t,S=>({...S,error:w,context:$o(e,n),status:"error",isFetching:!1}))}}catch(y){const x=e.router.getMatch(t);x&&(x._nonReactive.loaderPromise=void 0),li(e,x,y)}},qk=async(e,t)=>{var g,y;async function n(x,w,_,S){const C=Date.now()-w.updatedAt,N=x?S.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:S.options.staleTime??e.router.options.defaultStaleTime??0,k=S.options.shouldReload,R=typeof k=="function"?k(j0(e,i,t,S)):k,{status:j,invalid:P}=_;l=j==="success"&&(P||(R??C>N)),x&&S.options.preload===!1||(l&&!e.sync?(u=!0,(async()=>{var T,O;try{await my(e,i,t,S);const L=e.router.getMatch(i);(T=L._nonReactive.loaderPromise)==null||T.resolve(),(O=L._nonReactive.loadPromise)==null||O.resolve(),L._nonReactive.loaderPromise=void 0}catch(L){sr(L)&&await e.router.navigate(L.options)}})()):(j!=="success"||l&&e.sync)&&await my(e,i,t,S))}const{id:i,routeId:o}=e.matches[t];let l=!1,u=!1;const c=e.router.looseRoutesById[o];if(!k0(e,i)){const x=e.router.getMatch(i),w=Wu(e,i);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload)return x;await x._nonReactive.loaderPromise;const _=e.router.getMatch(i),S=_._nonReactive.error||_.error;S&&li(e,_,S),_.status==="pending"&&await n(w,x,_,c)}else{const _=w&&!e.router.state.matches.some(C=>C.id===i),S=e.router.getMatch(i);S._nonReactive.loaderPromise=ra(),_!==S.preload&&e.updateMatch(i,C=>({...C,preload:_})),await n(w,x,S,c)}}const h=e.router.getMatch(i);u||((g=h._nonReactive.loaderPromise)==null||g.resolve(),(y=h._nonReactive.loadPromise)==null||y.resolve()),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,u||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const m=u?h.isFetching:!1;return m!==h.isFetching||h.invalid!==!1?(e.updateMatch(i,x=>({...x,isFetching:m,invalid:!1})),e.router.getMatch(i)):h};async function gy(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&lu(t);try{for(let c=0;c<t.matches.length;c++){const h=Kk(t,c);Vo(h)&&await h}const n=t.firstBadMatchIndex??t.matches.length;for(let c=0;c<n;c++)t.matchPromises.push(qk(t,c));const o=(await Promise.allSettled(t.matchPromises)).filter(c=>c.status==="rejected").map(c=>c.reason);let l;for(const c of o){if(sr(c))throw c;!l&&Bn(c)&&(l=c)}for(const c of t.matches){const{id:h,routeId:m}=c,g=t.router.looseRoutesById[m];try{const y=Qk(t,h,g);if(y){const x=await y;t.updateMatch(h,w=>({...w,...x}))}}catch(y){console.error(`Error executing head for route ${m}:`,y)}}if(l)throw l;const u=lu(t);Vo(u)&&await u}catch(n){if(Bn(n)&&!t.preload){const i=lu(t);throw Vo(i)&&await i,n}if(sr(n))throw n}return t.matches}async function E0(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...i}=t.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{var i;const n=[];for(const o of N0){const l=(i=e.options[o])==null?void 0:i.preload;l&&n.push(l())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function R0(e){var t;for(const n of N0)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const N0=["component","errorComponent","pendingComponent","notFoundComponent"];function Zk(e){return{input:({url:t})=>{for(const n of e)t=Bh(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=P0(e[n],t);return t}}}function Gk(e){const t=b0(e.basepath),n=`/${t}`,i=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const c=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return c===o?u.pathname="/":c.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=au(["/",t,u.pathname]),u)}}function Bh(e,t){var i;const n=(i=e==null?void 0:e.input)==null?void 0:i.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function P0(e,t){var i;const n=(i=e==null?void 0:e.output)==null?void 0:i.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Yi(e){const t=e.resolvedLocation,n=e.location,i=(t==null?void 0:t.pathname)!==n.pathname,o=(t==null?void 0:t.href)!==n.href,l=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:i,hrefChanged:o,hashChanged:l}}function Yk(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class Xk{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var x;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options,o=this.basepath??(i==null?void 0:i.basepath)??"/",l=this.basepath===void 0,u=i==null?void 0:i.rewrite;if(this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Rk(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=ak()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let w;this.resolvePathCache=xu(1e3),w=this.buildRouteTree(),this.setRoutes(w)}!this.__store&&this.latestLocation&&(this.__store=new sk(e_(this.latestLocation)),Mk(this));let c=!1;const h=this.options.basepath??"/",m=this.options.rewrite;if(l||o!==h||u!==m){this.basepath=h;const w=[],_=b0(h);_&&_!=="/"&&w.push(Gk({basepath:h})),m&&w.push(m),this.rewrite=w.length===0?void 0:w.length===1?w[0]:Zk(w),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&this.__store.setState(w=>({...w,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof((x=window.CSS)==null?void 0:x.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 n=bk(this.routeTree,this.options.caseSensitive,(i,o)=>{i.init({originalIndex:o})});return this.options.routeMasks&&vk(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,i)=>{const o={eventType:n,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const o=({pathname:h,search:m,hash:g,href:y,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const k=this.options.parseSearch(m),R=this.options.stringifySearch(k);return{href:h+R+g,publicHref:y,pathname:el(h).path,external:!1,searchStr:R,search:zn(i==null?void 0:i.search,k),hash:el(g.slice(1)).path,state:zn(i==null?void 0:i.state,x)}}const w=new URL(y,this.origin),_=Bh(this.rewrite,w),S=this.options.parseSearch(_.search),C=this.options.stringifySearch(S);return _.search=C,{href:_.href.replace(_.origin,""),publicHref:y,pathname:el(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:C,search:zn(i==null?void 0:i.search,S),hash:el(_.hash.slice(1)).path,state:zn(i==null?void 0:i.state,x)}},l=o(n),{__tempLocation:u,__tempKey:c}=l.state;if(u&&(!c||c===this.tempLocationKey)){const h=o(u);return h.state.key=l.state.key,h.state.__TSR_key=l.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:l}}return l},this.resolvePathWithBase=(n,i)=>Ek({base:n,to:bp(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},o):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>t_({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),i=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const i=(l={})=>{var ee,se;const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(u);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??c.fullPath,m=this.resolvePathWithBase(h,"."),g=c.search,y={...c.params},x=l.to?this.resolvePathWithBase(m,`${l.to}`):this.resolvePathWithBase(m,"."),w=l.params===!1||l.params===null?{}:(l.params??!0)===!0?y:Object.assign(y,ai(l.params,y)),_=th({path:x,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,S=this.getMatchedRoutes(_);let C=S.matchedRoutes;(S.foundRoute?S.foundRoute.path!=="/"&&S.routeParams["**"]:ms(_))&&this.options.notFoundRoute&&(C=[...C,this.options.notFoundRoute]);let k=!1;if(Object.keys(w).length>0)for(const oe of C){const X=((ee=oe.options.params)==null?void 0:ee.stringify)??oe.options.stringifyParams;X&&(k=!0,Object.assign(w,X(w)))}const R=n.leaveParams?x:el(k?th({path:x,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:_).path;let j=g;if(n._includeValidateSearch&&((se=this.options.search)!=null&&se.strict)){const oe={};C.forEach(X=>{if(X.options.validateSearch)try{Object.assign(oe,cu(X.options.validateSearch,{...oe,...j}))}catch{}}),j=oe}j=n_({search:j,dest:l,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),j=zn(g,j);const P=this.options.stringifySearch(j),T=l.hash===!0?u.hash:l.hash?ai(l.hash,u.hash):void 0,O=T?`#${T}`:"";let L=l.state===!0?u.state:l.state?ai(l.state,u.state):{};L=zn(u.state,L);const V=`${R}${P}${O}`;let M,Z,W=!1;if(this.rewrite){const oe=new URL(V,this.origin),X=P0(this.rewrite,oe);M=oe.href.replace(oe.origin,""),X.origin!==this.origin?(Z=X.href,W=!0):Z=X.pathname+X.search+X.hash}else M=pk(V),Z=M;return{publicHref:Z,href:M,pathname:R,search:j,searchStr:P,state:L,hash:T??"",external:W,unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const c=i(l);let h=u?i(u):void 0;if(!h){const m={};if(this.options.routeMasks){const g=yk(c.pathname,this.processedTree);if(g){Object.assign(m,g.rawParams);const{from:y,params:x,...w}=g.route,_=x===!1||x===null?{}:(x??!0)===!0?m:Object.assign(m,ai(x,m));u={from:n.from,...w,params:_},h=i(u)}}}return h&&(c.maskedLocation=h),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:i,...o})=>{const l=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(g=>{o.state[g]=this.latestLocation.state[g]});const m=Gi(o.state,this.latestLocation.state);return h.forEach(g=>{delete o.state[g]}),m},u=ms(this.latestLocation.href)===ms(o.href),c=this.commitLocationPromise;if(this.commitLocationPromise=ra(()=>{c==null||c.resolve()}),u&&l())this.load();else{let{maskedLocation:h,hashScrollIntoView:m,...g}=o;h&&(g={...h,state:{...h.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=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:i})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:c,...h}={})=>{if(c){const y=this.history.location.state.__TSR_index,x=gu(c,{__TSR_index:n?y:y+1}),w=new URL(x.pathname,this.origin),_=Bh(this.rewrite,w);h.to=_.pathname,h.search=this.options.parseSearch(x.search),h.hash=x.hash.slice(1)}const m=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const g=this.commitLocation({...m,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:n,reloadDocument:i,href:o,publicHref:l,...u})=>{var h;let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!i&&(i=!0),i){if(n!==void 0||!o){const g=this.buildLocation({to:n,...u});o=o??g.publicHref,l=l??g.publicHref}const m=!c&&l?l:o;if(yu(m,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const g=this.history,y=((h=g.getBlockers)==null?void 0:h.call(g))??[];for(const x of y)if(x!=null&&x.blockerFn&&await x.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(m):window.location.href=m,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(o=>!n.some(l=>l.id===o.id))}))},this.load=async n=>{let i,o,l;for(l=new Promise(c=>{this.startTransition(async()=>{var h;try{this.beforeLoad();const m=this.latestLocation,g=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Yi({resolvedLocation:g,location:m})}),this.emit({type:"onBeforeLoad",...Yi({resolvedLocation:g,location:m})}),await gy({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],x=[],w=[];fl(()=>{this.__store.setState(_=>{const S=_.matches,C=_.pendingMatches||_.matches;return y=S.filter(N=>!C.some(k=>k.id===N.id)),x=C.filter(N=>!S.some(k=>k.id===N.id)),w=C.filter(N=>S.some(k=>k.id===N.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:C,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...y.filter(N=>N.status!=="error"&&N.status!=="notFound"&&N.status!=="redirected")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[x,"onEnter"],[w,"onStay"]].forEach(([_,S])=>{_.forEach(C=>{var N,k;(k=(N=this.looseRoutesById[C.routeId].options)[S])==null||k.call(N,C)})})})})}})}catch(m){sr(m)?(i=m,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Bn(m)&&(o=m),this.__store.setState(g=>({...g,statusCode:i?i.status:o?404:g.matches.some(y=>y.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===l&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(c=>c.status==="error")&&(u=500),u!==void 0&&this.__store.setState(c=>({...c,statusCode:u}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,c=typeof i.types=="function"?i.types(Yi({resolvedLocation:u,location:l})):i.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{var l;const o=(l=this.state.pendingMatches)!=null&&l.some(u=>u.id===n)?"pendingMatches":this.state.matches.some(u=>u.id===n)?"matches":this.state.cachedMatches.some(u=>u.id===n)?"cachedMatches":"";o&&(o==="cachedMatches"?this.__store.setState(u=>({...u,cachedMatches:Yk(u.cachedMatches.map(c=>c.id===n?i(c):c))})):this.__store.setState(u=>{var c;return{...u,[o]:(c=u[o])==null?void 0:c.map(h=>h.id===n?i(h):h)}}))})},this.getMatch=n=>{var o;const i=l=>l.id===n;return this.state.cachedMatches.find(i)??((o=this.state.pendingMatches)==null?void 0:o.find(i))??this.state.matches.find(i)},this.invalidate=n=>{const i=o=>{var l;return((l=n==null?void 0:n.filter)==null?void 0:l.call(n,o))??!0?{...o,invalid:!0,...n!=null&&n.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.__store.setState(o=>{var l;return{...o,matches:o.matches.map(i),cachedMatches:o.cachedMatches.map(i),pendingMatches:(l=o.pendingMatches)==null?void 0:l.map(i)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const i=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),l=this.getParsedLocationHref(o);n.options.href=l,n.headers.set("Location",l)}else if(i)try{const o=new URL(i);if(this.origin&&o.origin===this.origin){const l=o.pathname+o.search+o.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}if(n.options.href&&!n.options._builtLocation&&yu(n.options.href,this.protocolAllowlist))throw new Error(`Redirect blocked: unsafe protocol in href "${n.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`);return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n==null?void 0:n.filter;i!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(l=>!i(l))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const l=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=E0,this.preloadRoute=async n=>{const i=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),u=new Set([...l,...this.state.cachedMatches.map(c=>c.id)]);fl(()=>{o.forEach(c=>{u.has(c.id)||this.__store.setState(h=>({...h,cachedMatches:[...h.cachedMatches,c]}))})});try{return o=await gy({router:this,matches:o,location:i,preload:!0,updateMatch:(c,h)=>{l.has(c)?o=o.map(m=>m.id===c?h(m):m):this.updateMatch(c,h)}}),o}catch(c){if(sr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:i});Bn(c)||console.error(c);return}},this.matchRoute=(n,i)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(o);if(i!=null&&i.pending&&this.state.status!=="pending")return!1;const c=((i==null?void 0:i.pending)===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,h=xk(l.pathname,(i==null?void 0:i.caseSensitive)??!1,(i==null?void 0:i.fuzzy)??!1,c.pathname,this.processedTree);return!h||n.params&&!Gi(h.rawParams,n.params,{partial:!0})?!1:(i==null?void 0:i.includeSearch)??!0?Gi(c.search,l.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Vk,parseSearch:t.parseSearch??zk,protocolAllowlist:t.protocolAllowlist??hk}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:i}){this.routesById=t,this.routesByPath=n,this.processedTree=i;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}get looseRoutesById(){return this.routesById}getParentContext(t){return(t==null?void 0:t.id)?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){var x,w;const i=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:l,parsedParams:u}=i;let{matchedRoutes:c}=i,h=!1;(o?o.path!=="/"&&l["**"]:ms(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:h=!0);const m=h?s_(this.options.notFoundMode,c):void 0,g=new Array(c.length),y=new Map(this.state.matches.map(_=>[_.routeId,_]));for(let _=0;_<c.length;_++){const S=c[_],C=g[_-1];let N,k,R;{const X=(C==null?void 0:C.search)??t.search,ie=(C==null?void 0:C._strictSearch)??void 0;try{const B=cu(S.options.validateSearch,{...X})??void 0;N={...X,...B},k={...ie,...B},R=void 0}catch(B){let U=B;if(B instanceof bu||(U=new bu(B.message,{cause:B})),n!=null&&n.throwOnError)throw U;N=X,k={},R=U}}const j=((w=(x=S.options).loaderDeps)==null?void 0:w.call(x,{search:N}))??"",P=j?JSON.stringify(j):"",{interpolatedPath:T,usedParams:O}=th({path:S.fullPath,params:l,decoder:this.pathParamsDecoder,server:this.isServer}),L=S.id+T+P,V=this.getMatch(L),M=y.get(S.id),Z=(V==null?void 0:V._strictParams)??O;let W;if(!V)try{vy(S,O,u,Z)}catch(X){if(Bn(X)||sr(X)?W=X:W=new Jk(X.message,{cause:X}),n!=null&&n.throwOnError)throw W}Object.assign(l,Z);const ee=M?"stay":"enter";let se;if(V)se={...V,cause:ee,params:(M==null?void 0:M.params)??l,_strictParams:Z,search:zn(M?M.search:V.search,N),_strictSearch:k};else{const X=S.options.loader||S.options.beforeLoad||S.lazyFn||R0(S)?"pending":"success";se={id:L,ssr:S.options.ssr,index:_,routeId:S.id,params:(M==null?void 0:M.params)??l,_strictParams:Z,pathname:T,updatedAt:Date.now(),search:M?zn(M.search,N):N,_strictSearch:k,searchError:void 0,status:X,isFetching:!1,error:void 0,paramsError:W,__routeContext:void 0,_nonReactive:{loadPromise:ra()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ee,loaderDeps:M?zn(M.loaderDeps,j):j,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:S.options.staticData||{},fullPath:S.fullPath}}n!=null&&n.preload||(se.globalNotFound=m===S.id),se.searchError=R;const oe=this.getParentContext(C);se.context={...oe,...se.__routeContext,...se.__beforeLoadContext},g[_]=se}for(let _=0;_<g.length;_++){const S=g[_],C=this.looseRoutesById[S.routeId],N=this.getMatch(S.id),k=y.get(S.routeId);if(S.params=k?zn(k.params,l):l,!N){const R=g[_-1],j=this.getParentContext(R);if(C.options.context){const P={deps:S.loaderDeps,params:S.params,context:j??{},location:t,navigate:T=>this.navigate({...T,_fromLocation:t}),buildLocation:this.buildLocation,cause:S.cause,abortController:S.abortController,preload:!!S.preload,matches:g,routeId:C.id};S.__routeContext=C.options.context(P)??void 0}S.context={...j,...S.__routeContext,...S.__beforeLoadContext}}}return g}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:i,parsedParams:o}=this.getMatchedRoutes(t.pathname),l=gl(n),u={...t.search};for(const g of n)try{Object.assign(u,cu(g.options.validateSearch,u))}catch{}const c=gl(this.state.matches),h=c&&c.routeId===l.id&&t.pathname===this.state.location.pathname;let m;if(h)m=c.params;else{const g={...i};for(const y of n)try{vy(y,i,o??{},g)}catch{}m=g}return{matchedRoutes:n,fullPath:l.fullPath,search:u,params:m}}}class bu extends Error{}class Jk extends Error{}function e_(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function cu(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new bu("Async validation not supported");if(n.issues)throw new bu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function t_({pathname:e,routesById:t,processedTree:n}){const i={},o=ms(e);let l,u;const c=wk(o,n,!0);return c&&(l=c.route,Object.assign(i,c.rawParams),u=Object.assign({},c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t[rr]],routeParams:i,foundRoute:l,parsedParams:u}}function n_({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){return r_(n)(e,t,i??!1)}function r_(e){var o;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)(o=l.options.search)!=null&&o.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const u=({search:c,next:h})=>{let m=c;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(m=l.options.preSearchFilters.reduce((y,x)=>x(y),c));const g=h(m);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,x)=>x(y),g):g};t.middlewares.push(u)}if(l.options.validateSearch){const u=({search:c,next:h})=>{const m=h(c);if(!t._includeValidateSearch)return m;try{return{...m,...cu(l.options.validateSearch,m)??void 0}}catch{return m}};t.middlewares.push(u)}}const n=({search:l})=>{const u=t.dest;return u.search?u.search===!0?l:ai(u.search,l):{}};t.middlewares.push(n);const i=(l,u,c)=>{if(l>=c.length)return u;const h=c[l];return h({search:u,next:g=>i(l+1,g,c)})};return function(u,c,h){return t.dest=c,t._includeValidateSearch=h,i(0,u,t.middlewares)}}function s_(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const i=t[n];if(i.children)return i.id}return rr}function vy(e,t,n,i){var l;const o=((l=e.options.params)==null?void 0:l.parse)??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const u in t)u in n&&(i[u]=n[u]);else{const u=o(i);Object.assign(i,u)}}const i_="Error preloading route! ☝️";class T0{constructor(t){if(this.init=n=>{var m,g;this.originalIndex=n.originalIndex;const i=this.options,o=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(g=(m=this.options).getParentRoute)==null?void 0:g.call(m),o?this._path=rr:this.parentRoute||ys(!1);let l=o?rr:i==null?void 0:i.path;l&&l!=="/"&&(l=S0(l));const u=(i==null?void 0:i.id)||l;let c=o?rr:au([this.parentRoute.id===rr?"":this.parentRoute.id,u]);l===rr&&(l="/"),c!==rr&&(c=au(["/",c]));const h=c===rr?"/":au([this.parentRoute.fullPath,l]);this._path=l,this._id=c,this._fullPath=h,this._to=ms(h)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>Uk({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class o_ extends T0{constructor(t){super(t)}}const Yc=typeof window<"u"?b.useLayoutEffect:b.useEffect;function rh(e){const t=b.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function a_(e,t,n={},i={}){b.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,i.disabled,e])}function l_(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}function Cp(e){const t=e.errorComponent??kp;return d.jsx(c_,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?b.createElement(t,{error:n,reset:i}):e.children})}class c_ extends b.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function kp({error:e}){const[t,n]=b.useState(!1);return d.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[d.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),d.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),d.jsx("div",{style:{height:".25rem"}}),t?d.jsx("div",{children:d.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?d.jsx("code",{children:e.message}):null})}):null]})}function u_({children:e,fallback:t=null}){return O0()?d.jsx(at.Fragment,{children:e}):d.jsx(at.Fragment,{children:t})}function O0(){return at.useSyncExternalStore(d_,()=>!0,()=>!1)}function d_(){return()=>{}}var sh={exports:{}},ih={},oh={exports:{}},ah={};/**
|
|
41
|
+
* @license React
|
|
42
|
+
* use-sync-external-store-shim.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var yy;function f_(){if(yy)return ah;yy=1;var e=ua();function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(y,x){var w=x(),_=i({inst:{value:w,getSnapshot:x}}),S=_[0].inst,C=_[1];return l(function(){S.value=w,S.getSnapshot=x,h(S)&&C({inst:S})},[y,w,x]),o(function(){return h(S)&&C({inst:S}),y(function(){h(S)&&C({inst:S})})},[y]),u(w),w}function h(y){var x=y.getSnapshot;y=y.value;try{var w=x();return!n(y,w)}catch{return!0}}function m(y,x){return x()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:c;return ah.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,ah}var xy;function h_(){return xy||(xy=1,oh.exports=f_()),oh.exports}/**
|
|
49
|
+
* @license React
|
|
50
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/var wy;function p_(){if(wy)return ih;wy=1;var e=ua(),t=h_();function n(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var i=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,c=e.useMemo,h=e.useDebugValue;return ih.useSyncExternalStoreWithSelector=function(m,g,y,x,w){var _=l(null);if(_.current===null){var S={hasValue:!1,value:null};_.current=S}else S=_.current;_=c(function(){function N(T){if(!k){if(k=!0,R=T,T=x(T),w!==void 0&&S.hasValue){var O=S.value;if(w(O,T))return j=O}return j=T}if(O=j,i(R,T))return O;var L=x(T);return w!==void 0&&w(O,L)?(R=T,O):(R=T,j=L)}var k=!1,R,j,P=y===void 0?null:y;return[function(){return N(g())},P===null?void 0:function(){return N(P())}]},[g,y,x,w]);var C=o(m,_[0],_[1]);return u(function(){S.hasValue=!0,S.value=C},[C]),h(C),C},ih}var Sy;function m_(){return Sy||(Sy=1,sh.exports=p_()),sh.exports}var g_=m_();function v_(e,t){return e===t}function y_(e,t,n=v_){const i=b.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(u);return c},[e]),o=b.useCallback(()=>e==null?void 0:e.get(),[e]);return g_.useSyncExternalStoreWithSelector(i,o,o,t,n)}const lh=b.createContext(null);function A0(){return typeof document>"u"?lh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=lh,lh)}function Hn(e){const t=b.useContext(A0());return e==null||e.warn,t}function ir(e){const t=Hn({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,i=b.useRef(void 0);return y_(n.__store,o=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=zn(i.current,e.select(o));return i.current=l,l}return e.select(o)}return o})}const Hu=b.createContext(void 0),x_=b.createContext(void 0);function Ur(e){const t=b.useContext(e.from?x_:Hu);return ir({select:i=>{const o=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(ys(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function _p(e){return Ur({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function jp(e){const{select:t,...n}=e;return Ur({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function Ku(e){return Ur({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Ep(e){return Ur({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Rp(e){const t=Hn();return b.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}var fa=n0();const w_=$u(fa);function S_(e,t){const n=Hn(),i=l_(t),{activeProps:o,inactiveProps:l,activeOptions:u,to:c,preload:h,preloadDelay:m,hashScrollIntoView:g,replace:y,startTransition:x,resetScroll:w,viewTransition:_,children:S,target:C,disabled:N,style:k,className:R,onClick:j,onFocus:P,onMouseEnter:T,onMouseLeave:O,onTouchStart:L,ignoreBlocker:V,params:M,search:Z,hash:W,state:ee,mask:se,reloadDocument:oe,unsafeRelative:X,from:ie,_fromLocation:B,...U}=e,Q=O0(),I=ir({select:ne=>{const me=ne.matches[ne.matches.length-1];return{search:me==null?void 0:me.search,hash:ne.location.hash,path:me==null?void 0:me.pathname}},structuralSharing:!0}),Y=e.from,je=b.useMemo(()=>({...e,from:Y}),[n,I,Y,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),fe=b.useMemo(()=>n.buildLocation({...je}),[n,je]),Ne=fe.maskedLocation?fe.maskedLocation.publicHref:fe.publicHref,te=fe.maskedLocation?fe.maskedLocation.external:fe.external,re=b.useMemo(()=>E_(Ne,te,n.history,N),[N,te,Ne,n.history]),ve=b.useMemo(()=>{if(re!=null&&re.external)return yu(re.href,n.protocolAllowlist)?void 0:re.href;if(!R_(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),yu(c,n.protocolAllowlist)?void 0:c}catch{}},[c,re,n.protocolAllowlist]),Oe=ir({select:ne=>{if(ve)return!1;if(u!=null&&u.exact){if(!jk(ne.location.pathname,fe.pathname,n.basepath))return!1}else{const me=wu(ne.location.pathname,n.basepath),Le=wu(fe.pathname,n.basepath);if(!(me.startsWith(Le)&&(me.length===Le.length||me[Le.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!Gi(ne.location.search,fe.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?Q&&ne.location.hash===fe.hash:!0}}),Te=Oe?ai(o,{})??b_:ch,Fe=Oe?ch:ai(l,{})??ch,We=[R,Te.className,Fe.className].filter(Boolean).join(" "),ft=(k||Te.style||Fe.style)&&{...k,...Te.style,...Fe.style},[Mt,tn]=b.useState(!1),Xt=b.useRef(!1),Dt=e.reloadDocument||ve?!1:h??n.options.defaultPreload,rt=m??n.options.defaultPreloadDelay??0,Pt=b.useCallback(()=>{n.preloadRoute({...je,_builtLocation:fe}).catch(ne=>{console.warn(ne),console.warn(i_)})},[n,je,fe]),On=b.useCallback(ne=>{ne!=null&&ne.isIntersecting&&Pt()},[Pt]);a_(i,On,j_,{disabled:!!N||Dt!=="viewport"}),b.useEffect(()=>{Xt.current||!N&&Dt==="render"&&(Pt(),Xt.current=!0)},[N,Pt,Dt]);const D=ne=>{const me=ne.currentTarget.getAttribute("target"),Le=C!==void 0?C:me;if(!N&&!N_(ne)&&!ne.defaultPrevented&&(!Le||Le==="_self")&&ne.button===0){ne.preventDefault(),fa.flushSync(()=>{tn(!0)});const Be=n.subscribe("onResolved",()=>{Be(),tn(!1)});n.navigate({...je,replace:y,resetScroll:w,hashScrollIntoView:g,startTransition:x,viewTransition:_,ignoreBlocker:V})}};if(ve)return{...U,ref:i,href:ve,...S&&{children:S},...C&&{target:C},...N&&{disabled:N},...k&&{style:k},...R&&{className:R},...j&&{onClick:j},...P&&{onFocus:P},...T&&{onMouseEnter:T},...O&&{onMouseLeave:O},...L&&{onTouchStart:L}};const K=ne=>{N||Dt&&Pt()},J=K,ge=ne=>{if(!(N||!Dt))if(!rt)Pt();else{const me=ne.target;if(rl.has(me))return;const Le=setTimeout(()=>{rl.delete(me),Pt()},rt);rl.set(me,Le)}},ue=ne=>{if(N||!Dt||!rt)return;const me=ne.target,Le=rl.get(me);Le&&(clearTimeout(Le),rl.delete(me))};return{...U,...Te,...Fe,href:re==null?void 0:re.href,ref:i,onClick:sl([j,D]),onFocus:sl([P,K]),onMouseEnter:sl([T,ge]),onMouseLeave:sl([O,ue]),onTouchStart:sl([L,J]),disabled:!!N,target:C,...ft&&{style:ft},...We&&{className:We},...N&&C_,...Oe&&k_,...Q&&Mt&&__}}const ch={},b_={className:"active"},C_={role:"link","aria-disabled":!0},k_={"data-status":"active","aria-current":"page"},__={"data-transitioning":"transitioning"},rl=new WeakMap,j_={rootMargin:"100px"},sl=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function E_(e,t,n,i){if(!i)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function R_(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const I0=b.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:o,...l}=S_(i,t),u=typeof i.children=="function"?i.children({isActive:l["data-status"]==="active"}):i.children;if(!n){const{disabled:c,...h}=l;return b.createElement("a",h,u)}return b.createElement(n,l,u)});function N_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class P_ extends T0{constructor(t){super(t),this.useMatch=n=>Ur({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Ur({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Ep({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Ku({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>jp({...n,from:this.id}),this.useLoaderData=n=>_p({...n,from:this.id}),this.useNavigate=()=>Rp({from:this.fullPath}),this.Link=at.forwardRef((n,i)=>d.jsx(I0,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function ar(e){return new P_(e)}class T_ extends o_{constructor(t){super(t),this.useMatch=n=>Ur({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Ur({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Ep({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>Ku({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>jp({...n,from:this.id}),this.useLoaderData=n=>_p({...n,from:this.id}),this.useNavigate=()=>Rp({from:this.fullPath}),this.Link=at.forwardRef((n,i)=>d.jsx(I0,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function O_(e){return new T_(e)}function by(e){return typeof e=="object"?new Cy(e,{silent:!0}).createRoute(e):new Cy(e,{silent:!0}).createRoute}class Cy{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const o=ar(i);return o.isRoot=!1,o},this.silent=n==null?void 0:n.silent}}class ky{constructor(t){this.useMatch=n=>Ur({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Ur({from:this.options.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Ep({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>Ku({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>jp({...n,from:this.options.id}),this.useLoaderData=n=>_p({...n,from:this.options.id}),this.useNavigate=()=>{const n=Hn();return Rp({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function _y(e){return typeof e=="object"?new ky(e):t=>new ky({id:e,...t})}function A_(){const e=Hn(),t=b.useRef({router:e,mounted:!1}),[n,i]=b.useState(!1),{hasPendingMatches:o,isLoading:l}=ir({select:y=>({isLoading:y.isLoading,hasPendingMatches:y.matches.some(x=>x.status==="pending")}),structuralSharing:!0}),u=rh(l),c=l||n||o,h=rh(c),m=l||o,g=rh(m);return e.startTransition=y=>{i(!0),b.startTransition(()=>{y(),i(!1)})},b.useEffect(()=>{const y=e.history.subscribe(e.load),x=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ms(e.latestLocation.publicHref)!==ms(x.publicHref)&&e.commitLocation({...x,replace:!0}),()=>{y()}},[e,e.history]),Yc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(x){console.error(x)}})()},[e]),Yc(()=>{u&&!l&&e.emit({type:"onLoad",...Yi(e.state)})},[u,e,l]),Yc(()=>{g&&!m&&e.emit({type:"onBeforeRouteMount",...Yi(e.state)})},[m,g,e]),Yc(()=>{if(h&&!c){const y=Yi(e.state);e.emit({type:"onResolved",...y}),e.__store.setState(x=>({...x,status:"idle",resolvedLocation:x.location})),y.hrefChanged&&Lk(e)}},[c,h,e]),null}function I_(e){const t=ir({select:n=>`not-found-${n.location.pathname}-${n.status}`});return d.jsx(Cp,{getResetKey:()=>t,onCatch:(n,i)=>{var o;if(Bn(n))(o=e.onCatch)==null||o.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Bn(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function M_(){return d.jsx("p",{children:"Not Found"})}function Fo(e){return d.jsx(d.Fragment,{children:e.children})}function M0(e,t,n){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...n}):d.jsx(M_,{})}function L_(){return Hn().isScrollRestoring,null}const L0=b.memo(function({matchId:t}){var S,C;const n=Hn(),i=ir({select:N=>{var j;const k=N.matches.findIndex(P=>P.id===t),R=N.matches[k];return ys(R),{routeId:R.routeId,ssr:R.ssr,_displayPending:R._displayPending,resetKey:N.loadedAt,parentRouteId:(j=N.matches[k-1])==null?void 0:j.routeId}},structuralSharing:!0}),o=n.routesById[i.routeId],l=o.options.pendingComponent??n.options.defaultPendingComponent,u=l?d.jsx(l,{}):null,c=o.options.errorComponent??n.options.defaultErrorComponent,h=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??((S=n.options.notFoundRoute)==null?void 0:S.options.component):o.options.notFoundComponent,g=i.ssr===!1||i.ssr==="data-only",y=(!o.isRoot||o.options.wrapInSuspense||g)&&(o.options.wrapInSuspense??l??(((C=o.options.errorComponent)==null?void 0:C.preload)||g))?b.Suspense:Fo,x=c?Cp:Fo,w=m?I_:Fo,_=o.isRoot?o.options.shellComponent??Fo:Fo;return d.jsxs(_,{children:[d.jsx(Hu.Provider,{value:t,children:d.jsx(y,{fallback:u,children:d.jsx(x,{getResetKey:()=>i.resetKey,errorComponent:c||kp,onCatch:(N,k)=>{if(Bn(N))throw N;h==null||h(N,k)},children:d.jsx(w,{fallback:N=>{if(!m||N.routeId&&N.routeId!==i.routeId||!N.routeId&&!o.isRoot)throw N;return b.createElement(m,N)},children:g||i._displayPending?d.jsx(u_,{fallback:u,children:d.jsx(jy,{matchId:t})}):d.jsx(jy,{matchId:t})})})})}),i.parentRouteId===rr&&n.options.scrollRestoration?d.jsxs(d.Fragment,{children:[d.jsx(F_,{}),d.jsx(L_,{})]}):null]})});function F_(){const e=Hn(),t=b.useRef(void 0);return d.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Yi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const jy=b.memo(function({matchId:t}){var h,m,g,y;const n=Hn(),{match:i,key:o,routeId:l}=ir({select:x=>{const w=x.matches.find(k=>k.id===t),_=w.routeId,S=n.routesById[_].options.remountDeps??n.options.defaultRemountDeps,C=S==null?void 0:S({routeId:_,loaderDeps:w.loaderDeps,params:w._strictParams,search:w._strictSearch});return{key:C?JSON.stringify(C):void 0,routeId:_,match:{id:w.id,status:w.status,error:w.error,invalid:w.invalid,_forcePending:w._forcePending,_displayPending:w._displayPending}}},structuralSharing:!0}),u=n.routesById[l],c=b.useMemo(()=>{const x=u.options.component??n.options.defaultComponent;return x?d.jsx(x,{},o):d.jsx(F0,{})},[o,u.options.component,n.options.defaultComponent]);if(i._displayPending)throw(h=n.getMatch(i.id))==null?void 0:h._nonReactive.displayPendingPromise;if(i._forcePending)throw(m=n.getMatch(i.id))==null?void 0:m._nonReactive.minPendingPromise;if(i.status==="pending"){const x=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(x){const w=n.getMatch(i.id);if(w&&!w._nonReactive.minPendingPromise){const _=ra();w._nonReactive.minPendingPromise=_,setTimeout(()=>{_.resolve(),w._nonReactive.minPendingPromise=void 0},x)}}throw(g=n.getMatch(i.id))==null?void 0:g._nonReactive.loadPromise}if(i.status==="notFound")return ys(Bn(i.error)),M0(n,u,i.error);if(i.status==="redirected")throw ys(sr(i.error)),(y=n.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise;if(i.status==="error")throw i.error;return c}),F0=b.memo(function(){const t=Hn(),n=b.useContext(Hu),i=ir({select:m=>{var g;return(g=m.matches.find(y=>y.id===n))==null?void 0:g.routeId}}),o=t.routesById[i],l=ir({select:m=>{const y=m.matches.find(x=>x.id===n);return ys(y),y.globalNotFound}}),u=ir({select:m=>{var x;const g=m.matches,y=g.findIndex(w=>w.id===n);return(x=g[y+1])==null?void 0:x.id}}),c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(l)return M0(t,o,void 0);if(!u)return null;const h=d.jsx(L0,{matchId:u});return i===rr?d.jsx(b.Suspense,{fallback:c,children:h}):h});function D_(){const e=Hn(),n=e.routesById[rr].options.pendingComponent??e.options.defaultPendingComponent,i=n?d.jsx(n,{}):null,o=typeof document<"u"&&e.ssr?Fo:b.Suspense,l=d.jsxs(o,{fallback:i,children:[d.jsx(A_,{}),d.jsx(z_,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:l}):l}function z_(){const e=Hn(),t=ir({select:o=>{var l;return(l=o.matches[0])==null?void 0:l.id}}),n=ir({select:o=>o.loadedAt}),i=t?d.jsx(L0,{matchId:t}):null;return d.jsx(Hu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:d.jsx(Cp,{getResetKey:()=>n,errorComponent:kp,onCatch:o=>{o.message||o.toString()},children:i})})}const V_=e=>new $_(e);class $_ extends Xk{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=by,globalThis.createLazyFileRoute=_y):typeof window<"u"&&(window.createFileRoute=by,window.createLazyFileRoute=_y);function B_({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=A0(),o=d.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:o}):o}function U_({router:e,...t}){return d.jsx(B_,{router:e,...t,children:d.jsx(D_,{})})}/**
|
|
57
|
+
* @license lucide-react v0.460.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const W_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D0=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
62
|
+
* @license lucide-react v0.460.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/var H_={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"};/**
|
|
67
|
+
* @license lucide-react v0.460.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const K_=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:u,...c},h)=>b.createElement("svg",{ref:h,...H_,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:D0("lucide",o),...c},[...u.map(([m,g])=>b.createElement(m,g)),...Array.isArray(l)?l:[l]]));/**
|
|
72
|
+
* @license lucide-react v0.460.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Ge=(e,t)=>{const n=b.forwardRef(({className:i,...o},l)=>b.createElement(K_,{ref:l,iconNode:t,className:D0(`lucide-${W_(e)}`,i),...o}));return n.displayName=`${e}`,n};/**
|
|
77
|
+
* @license lucide-react v0.460.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Q_=Ge("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
|
|
82
|
+
* @license lucide-react v0.460.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const q_=Ge("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
87
|
+
* @license lucide-react v0.460.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Qu=Ge("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
92
|
+
* @license lucide-react v0.460.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Z_=Ge("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
97
|
+
* @license lucide-react v0.460.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const G_=Ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
102
|
+
* @license lucide-react v0.460.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const z0=Ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
107
|
+
* @license lucide-react v0.460.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Y_=Ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
112
|
+
* @license lucide-react v0.460.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Np=Ge("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
117
|
+
* @license lucide-react v0.460.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Il=Ge("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
122
|
+
* @license lucide-react v0.460.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const X_=Ge("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
127
|
+
* @license lucide-react v0.460.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const V0=Ge("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
132
|
+
* @license lucide-react v0.460.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const ha=Ge("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
137
|
+
* @license lucide-react v0.460.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Cu=Ge("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
142
|
+
* @license lucide-react v0.460.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const J_=Ge("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
147
|
+
* @license lucide-react v0.460.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const ej=Ge("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
152
|
+
* @license lucide-react v0.460.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const $0=Ge("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
157
|
+
* @license lucide-react v0.460.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const B0=Ge("FileOutput",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]);/**
|
|
162
|
+
* @license lucide-react v0.460.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const U0=Ge("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
167
|
+
* @license lucide-react v0.460.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const tj=Ge("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
172
|
+
* @license lucide-react v0.460.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const or=Ge("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
177
|
+
* @license lucide-react v0.460.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const nj=Ge("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
182
|
+
* @license lucide-react v0.460.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Wr=Ge("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
187
|
+
* @license lucide-react v0.460.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Uh=Ge("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
192
|
+
* @license lucide-react v0.460.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const W0=Ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
197
|
+
* @license lucide-react v0.460.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const rj=Ge("RectangleEllipsis",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]);/**
|
|
202
|
+
* @license lucide-react v0.460.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const Ey=Ge("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
207
|
+
* @license lucide-react v0.460.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const sj=Ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
212
|
+
* @license lucide-react v0.460.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const H0=Ge("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
217
|
+
* @license lucide-react v0.460.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const K0=Ge("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
|
|
222
|
+
* @license lucide-react v0.460.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const ij=Ge("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
227
|
+
* @license lucide-react v0.460.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const Q0=Ge("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
232
|
+
* @license lucide-react v0.460.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const oj=Ge("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
237
|
+
* @license lucide-react v0.460.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const q0=Ge("Timer",[["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"}]]);/**
|
|
242
|
+
* @license lucide-react v0.460.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const pa=Ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
247
|
+
* @license lucide-react v0.460.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const aj=Ge("Unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);/**
|
|
252
|
+
* @license lucide-react v0.460.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const Z0=Ge("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
257
|
+
* @license lucide-react v0.460.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const lj=Ge("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
262
|
+
* @license lucide-react v0.460.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const cj=Ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function G0(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=G0(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Y0(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=G0(e))&&(i&&(i+=" "),i+=t);return i}const Pp="-",uj=e=>{const t=fj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{const c=u.split(Pp);return c[0]===""&&c.length!==1&&c.shift(),X0(c,t)||dj(u)},getConflictingClassGroupIds:(u,c)=>{const h=n[u]||[];return c&&i[u]?[...h,...i[u]]:h}}},X0=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),o=i?X0(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;const l=e.join(Pp);return(u=t.validators.find(({validator:c})=>c(l)))==null?void 0:u.classGroupId},Ry=/^\[(.+)\]$/,dj=e=>{if(Ry.test(e)){const t=Ry.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},fj=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return pj(Object.entries(e.classGroups),n).forEach(([l,u])=>{Wh(u,i,l,t)}),i},Wh=(e,t,n,i)=>{e.forEach(o=>{if(typeof o=="string"){const l=o===""?t:Ny(t,o);l.classGroupId=n;return}if(typeof o=="function"){if(hj(o)){Wh(o(i),t,n,i);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([l,u])=>{Wh(u,Ny(t,l),n,i)})})},Ny=(e,t)=>{let n=e;return t.split(Pp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},hj=e=>e.isThemeGetter,pj=(e,t)=>t?e.map(([n,i])=>{const o=i.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([u,c])=>[t+u,c])):l);return[n,o]}):e,mj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const o=(l,u)=>{n.set(l,u),t++,t>e&&(t=0,i=n,n=new Map)};return{get(l){let u=n.get(l);if(u!==void 0)return u;if((u=i.get(l))!==void 0)return o(l,u),u},set(l,u){n.has(l)?n.set(l,u):o(l,u)}}},J0="!",gj=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,o=t[0],l=t.length,u=c=>{const h=[];let m=0,g=0,y;for(let C=0;C<c.length;C++){let N=c[C];if(m===0){if(N===o&&(i||c.slice(C,C+l)===t)){h.push(c.slice(g,C)),g=C+l;continue}if(N==="/"){y=C;continue}}N==="["?m++:N==="]"&&m--}const x=h.length===0?c:c.substring(g),w=x.startsWith(J0),_=w?x.substring(1):x,S=y&&y>g?y-g:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:u}):u},vj=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},yj=e=>({cache:mj(e.cacheSize),parseClassName:gj(e),...uj(e)}),xj=/\s+/,wj=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o}=t,l=[],u=e.trim().split(xj);let c="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{modifiers:g,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:w}=n(m);let _=!!w,S=i(_?x.substring(0,w):x);if(!S){if(!_){c=m+(c.length>0?" "+c:c);continue}if(S=i(x),!S){c=m+(c.length>0?" "+c:c);continue}_=!1}const C=vj(g).join(":"),N=y?C+J0:C,k=N+S;if(l.includes(k))continue;l.push(k);const R=o(S,_);for(let j=0;j<R.length;++j){const P=R[j];l.push(N+P)}c=m+(c.length>0?" "+c:c)}return c};function Sj(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ew(t))&&(i&&(i+=" "),i+=n);return i}const ew=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=ew(e[i]))&&(n&&(n+=" "),n+=t);return n};function bj(e,...t){let n,i,o,l=u;function u(h){const m=t.reduce((g,y)=>y(g),e());return n=yj(m),i=n.cache.get,o=n.cache.set,l=c,c(h)}function c(h){const m=i(h);if(m)return m;const g=wj(h,n);return o(h,g),g}return function(){return l(Sj.apply(null,arguments))}}const Ct=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},tw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Cj=/^\d+\/\d+$/,kj=new Set(["px","full","screen"]),_j=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jj=/\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$/,Ej=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,is=e=>Bo(e)||kj.has(e)||Cj.test(e),Ws=e=>ma(e,"length",Fj),Bo=e=>!!e&&!Number.isNaN(Number(e)),uh=e=>ma(e,"number",Bo),il=e=>!!e&&Number.isInteger(Number(e)),Pj=e=>e.endsWith("%")&&Bo(e.slice(0,-1)),He=e=>tw.test(e),Hs=e=>_j.test(e),Tj=new Set(["length","size","percentage"]),Oj=e=>ma(e,Tj,nw),Aj=e=>ma(e,"position",nw),Ij=new Set(["image","url"]),Mj=e=>ma(e,Ij,zj),Lj=e=>ma(e,"",Dj),ol=()=>!0,ma=(e,t,n)=>{const i=tw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},Fj=e=>jj.test(e)&&!Ej.test(e),nw=()=>!1,Dj=e=>Rj.test(e),zj=e=>Nj.test(e),Vj=()=>{const e=Ct("colors"),t=Ct("spacing"),n=Ct("blur"),i=Ct("brightness"),o=Ct("borderColor"),l=Ct("borderRadius"),u=Ct("borderSpacing"),c=Ct("borderWidth"),h=Ct("contrast"),m=Ct("grayscale"),g=Ct("hueRotate"),y=Ct("invert"),x=Ct("gap"),w=Ct("gradientColorStops"),_=Ct("gradientColorStopPositions"),S=Ct("inset"),C=Ct("margin"),N=Ct("opacity"),k=Ct("padding"),R=Ct("saturate"),j=Ct("scale"),P=Ct("sepia"),T=Ct("skew"),O=Ct("space"),L=Ct("translate"),V=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",He,t],W=()=>[He,t],ee=()=>["",is,Ws],se=()=>["auto",Bo,He],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",He],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[Bo,He];return{cacheSize:500,separator:":",theme:{colors:[ol],spacing:[is,Ws],blur:["none","",Hs,He],brightness:I(),borderColor:[e],borderRadius:["none","","full",Hs,He],borderSpacing:W(),borderWidth:ee(),contrast:I(),grayscale:U(),hueRotate:I(),invert:U(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[Pj,Ws],inset:Z(),margin:Z(),opacity:I(),padding:W(),saturate:I(),scale:I(),sepia:U(),skew:I(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[Hs]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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"],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:[...oe(),He]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",il,He]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",il,He]}],"grid-cols":[{"grid-cols":[ol]}],"col-start-end":[{col:["auto",{span:["full",il,He]},He]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[ol]}],"row-start-end":[{row:["auto",{span:[il,He]},He]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",He,t]}],"min-w":[{"min-w":[He,t,"min","max","fit"]}],"max-w":[{"max-w":[He,t,"none","full","min","max","fit","prose",{screen:[Hs]},Hs]}],h:[{h:[He,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hs,Ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",uh]}],"font-family":[{font:[ol]}],"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:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",Bo,uh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",is,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",is,Ws]}],"underline-offset":[{"underline-offset":["auto",is,He]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),Aj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Oj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mj]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:X()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[is,He]}],"outline-w":[{outline:[is,Ws]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[is,Ws]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hs,Lj]}],"shadow-color":[{shadow:[ol]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Hs,He]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[y]}],saturate:[{saturate:[R]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[il,He]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[is,Ws,uh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},$j=bj(Vj);function pt(...e){return $j(Y0(e))}const Py=e=>{let t;const n=new Set,i=(m,g)=>{const y=typeof m=="function"?m(t):m;if(!Object.is(y,t)){const x=t;t=g??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(w=>w(t,x))}},o=()=>t,c={setState:i,getState:o,getInitialState:()=>h,subscribe:m=>(n.add(m),()=>n.delete(m))},h=t=e(i,o,c);return c},Bj=(e=>e?Py(e):Py),Uj=e=>e;function Wj(e,t=Uj){const n=at.useSyncExternalStore(e.subscribe,at.useCallback(()=>t(e.getState()),[e,t]),at.useCallback(()=>t(e.getInitialState()),[e,t]));return at.useDebugValue(n),n}const Ty=e=>{const t=Bj(e),n=i=>Wj(t,i);return Object.assign(n,t),n},Hj=(e=>e?Ty(e):Ty);function Oy(e){e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}const Hh=Hj(e=>({sidebarCollapsed:!1,darkMode:!1,toggleSidebar:()=>e(t=>({sidebarCollapsed:!t.sidebarCollapsed})),toggleDarkMode:()=>e(t=>{const n=!t.darkMode;return Oy(n),localStorage.setItem("mcpspec-theme",n?"dark":"light"),{darkMode:n}}),initTheme:()=>{const t=localStorage.getItem("mcpspec-theme");let n;t?n=t==="dark":n=window.matchMedia("(prefers-color-scheme: dark)").matches,Oy(n),e({darkMode:n})}})),Kj=[{href:"/",label:"Dashboard",icon:tj},{href:"/servers",label:"Servers",icon:H0},{href:"/collections",label:"Collections",icon:U0},{href:"/runs",label:"Runs",icon:Wr},{href:"/inspect",label:"Inspect",icon:sj},{href:"/recordings",label:"Recordings",icon:Z0},{href:"/audit",label:"Audit",icon:K0},{href:"/benchmark",label:"Benchmark",icon:q0},{href:"/docs",label:"Docs",icon:B0},{href:"/score",label:"Score",icon:Q0}];function Qj({currentPath:e,onNavigate:t}){const n=Hh(o=>o.darkMode),i=Hh(o=>o.toggleDarkMode);return d.jsxs("aside",{className:"flex h-full w-56 flex-col border-r bg-card",children:[d.jsx("div",{className:"flex h-14 items-center border-b px-4",children:d.jsx("h1",{className:"text-lg font-bold text-primary",children:"MCPSpec"})}),d.jsx("nav",{className:"flex-1 space-y-1 p-2",children:Kj.map(o=>{const l=e===o.href||o.href!=="/"&&e.startsWith(o.href);return d.jsxs("button",{onClick:()=>t(o.href),className:pt("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",l?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[d.jsx(o.icon,{className:"h-4 w-4"}),o.label]},o.href)})}),d.jsxs("div",{className:"border-t p-4",children:[d.jsxs("button",{onClick:i,className:"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",children:[n?d.jsx(oj,{className:"h-4 w-4"}):d.jsx(nj,{className:"h-4 w-4"}),n?"Light Mode":"Dark Mode"]}),d.jsx("div",{className:"mt-2 px-3 text-xs text-muted-foreground",children:"v1.1.0"})]})]})}function qj({children:e,currentPath:t,onNavigate:n}){return d.jsxs("div",{className:"flex h-screen",children:[d.jsx(Qj,{currentPath:t,onNavigate:n}),d.jsx("main",{className:"flex-1 overflow-auto p-6",children:e})]})}const Ye=b.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:pt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ye.displayName="Card";const xt=b.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:pt("flex flex-col space-y-1.5 p-6",e),...t}));xt.displayName="CardHeader";const wt=b.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:pt("text-2xl font-semibold leading-none tracking-tight",e),...t}));wt.displayName="CardTitle";const Zj=b.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));Zj.displayName="CardDescription";const Xe=b.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:pt("p-6 pt-0",e),...t}));Xe.displayName="CardContent";function Ay(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tp(...e){return t=>{let n=!1;const i=e.map(o=>{const l=Ay(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():Ay(e[o],null)}}}}function It(...e){return b.useCallback(Tp(...e),e)}var Gj=Symbol.for("react.lazy"),ku=fp[" use ".trim().toString()];function Yj(e){return typeof e=="object"&&e!==null&&"then"in e}function rw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Gj&&"_payload"in e&&Yj(e._payload)}function Xj(e){const t=eE(e),n=b.forwardRef((i,o)=>{let{children:l,...u}=i;rw(l)&&typeof ku=="function"&&(l=ku(l._payload));const c=b.Children.toArray(l),h=c.find(nE);if(h){const m=h.props.children,g=c.map(y=>y===h?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:y);return d.jsx(t,{...u,ref:o,children:b.isValidElement(m)?b.cloneElement(m,void 0,g):null})}return d.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}var Jj=Xj("Slot");function eE(e){const t=b.forwardRef((n,i)=>{let{children:o,...l}=n;if(rw(o)&&typeof ku=="function"&&(o=ku(o._payload)),b.isValidElement(o)){const u=sE(o),c=rE(l,o.props);return o.type!==b.Fragment&&(c.ref=i?Tp(i,u):u),b.cloneElement(o,c)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tE=Symbol("radix.slottable");function nE(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tE}function rE(e,t){const n={...t};for(const i in t){const o=e[i],l=t[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...c)=>{const h=l(...c);return o(...c),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function sE(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Iy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,My=Y0,sw=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return My(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(m=>{const g=n==null?void 0:n[m],y=l==null?void 0:l[m];if(g===null)return null;const x=Iy(g)||Iy(y);return o[m][x]}),c=n&&Object.entries(n).reduce((m,g)=>{let[y,x]=g;return x===void 0||(m[y]=x),m},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:y,className:x,...w}=g;return Object.entries(w).every(_=>{let[S,C]=_;return Array.isArray(C)?C.includes({...l,...c}[S]):{...l,...c}[S]===C})?[...m,y,x]:m},[]);return My(e,u,h,n==null?void 0:n.class,n==null?void 0:n.className)},iE=sw("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Me=b.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...o},l)=>{const u=i?Jj:"button";return d.jsx(u,{className:pt(iE({variant:t,size:n,className:e})),ref:l,...o})});Me.displayName="Button";const oE=sw("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-800",warning:"border-transparent bg-yellow-100 text-yellow-800"}},defaultVariants:{variant:"default"}});function dt({className:e,variant:t,...n}){return d.jsx("div",{className:pt(oE({variant:t}),e),...n})}const aE="/api";async function Ke(e,t){const n=await fetch(`${aE}${e}`,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!n.ok){const i=await n.json().catch(()=>({message:n.statusText}));throw new Error(i.message??`Request failed: ${n.status}`)}return n.json()}const Je={servers:{list:()=>Ke("/servers"),get:e=>Ke(`/servers/${e}`),create:e=>Ke("/servers",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>Ke(`/servers/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>Ke(`/servers/${e}`,{method:"DELETE"}),test:e=>Ke(`/servers/${e}/test`,{method:"POST"})},collections:{list:()=>Ke("/collections"),get:e=>Ke(`/collections/${e}`),create:e=>Ke("/collections",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>Ke(`/collections/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>Ke(`/collections/${e}`,{method:"DELETE"}),validate:e=>Ke(`/collections/${e}/validate`,{method:"POST"})},runs:{list:e=>Ke(`/runs${e?`?limit=${e}`:""}`),get:e=>Ke(`/runs/${e}`),trigger:e=>Ke("/runs",{method:"POST",body:JSON.stringify(e)}),delete:e=>Ke(`/runs/${e}`,{method:"DELETE"})},inspect:{connect:e=>Ke("/inspect/connect",{method:"POST",body:JSON.stringify(e)}),tools:e=>Ke("/inspect/tools",{method:"POST",body:JSON.stringify({sessionId:e})}),call:(e,t,n)=>Ke("/inspect/call",{method:"POST",body:JSON.stringify({sessionId:e,tool:t,input:n})}),resources:e=>Ke("/inspect/resources",{method:"POST",body:JSON.stringify({sessionId:e})}),messages:(e,t)=>Ke("/inspect/messages",{method:"POST",body:JSON.stringify({sessionId:e,after:t})}),disconnect:e=>Ke("/inspect/disconnect",{method:"POST",body:JSON.stringify({sessionId:e})}),saveRecording:(e,t,n)=>Ke("/inspect/save-recording",{method:"POST",body:JSON.stringify({sessionId:e,name:t,description:n})})},recordings:{list:()=>Ke("/recordings"),get:e=>Ke(`/recordings/${e}`),save:e=>Ke("/recordings",{method:"POST",body:JSON.stringify(e)}),delete:e=>Ke(`/recordings/${e}`,{method:"DELETE"}),replay:(e,t)=>Ke(`/recordings/${e}/replay`,{method:"POST",body:JSON.stringify(t)})},audit:{start:e=>Ke("/audit/start",{method:"POST",body:JSON.stringify(e)}),dryRun:e=>Ke("/audit/dry-run",{method:"POST",body:JSON.stringify(e)}),status:e=>Ke(`/audit/status/${e}`),result:e=>Ke(`/audit/result/${e}`),stop:e=>Ke(`/audit/stop/${e}`,{method:"POST"})},benchmark:{start:e=>Ke("/benchmark/start",{method:"POST",body:JSON.stringify(e)}),status:e=>Ke(`/benchmark/status/${e}`),result:e=>Ke(`/benchmark/result/${e}`),tools:e=>Ke(`/benchmark/tools/${e}`),stop:e=>Ke(`/benchmark/stop/${e}`,{method:"POST"})},docs:{generate:e=>Ke("/docs/generate",{method:"POST",body:JSON.stringify(e)})},score:{calculate:e=>Ke("/score/calculate",{method:"POST",body:JSON.stringify(e)}),badge:e=>Ke("/score/badge",{method:"POST",body:JSON.stringify({score:e})})}};function Ml(){return Al({queryKey:["servers"],queryFn:()=>Je.servers.list()})}function lE(){const e=Kr();return _r({mutationFn:t=>Je.servers.create(t),onSuccess:()=>e.invalidateQueries({queryKey:["servers"]})})}function cE(){const e=Kr();return _r({mutationFn:t=>Je.servers.delete(t),onSuccess:()=>e.invalidateQueries({queryKey:["servers"]})})}function uE(){return _r({mutationFn:e=>Je.servers.test(e)})}function Op(){return Al({queryKey:["collections"],queryFn:()=>Je.collections.list()})}function dE(){const e=Kr();return _r({mutationFn:t=>Je.collections.create(t),onSuccess:()=>e.invalidateQueries({queryKey:["collections"]})})}function fE(){const e=Kr();return _r({mutationFn:({id:t,data:n})=>Je.collections.update(t,n),onSuccess:()=>e.invalidateQueries({queryKey:["collections"]})})}function hE(){const e=Kr();return _r({mutationFn:t=>Je.collections.delete(t),onSuccess:()=>e.invalidateQueries({queryKey:["collections"]})})}function pE(){return _r({mutationFn:e=>Je.collections.validate(e)})}function iw(e){return Al({queryKey:["runs",e],queryFn:()=>Je.runs.list(e),refetchInterval:5e3})}function mE(e){return Al({queryKey:["runs",e],queryFn:()=>Je.runs.get(e),enabled:!!e,refetchInterval:t=>{var i,o;return((o=(i=t.state.data)==null?void 0:i.data)==null?void 0:o.status)==="running"?2e3:!1}})}function ow(){const e=Kr();return _r({mutationFn:t=>Je.runs.trigger(t),onSuccess:()=>e.invalidateQueries({queryKey:["runs"]})})}function gE(){const e=Kr();return _r({mutationFn:t=>Je.runs.delete(t),onSuccess:()=>e.invalidateQueries({queryKey:["runs"]})})}function vE({status:e}){switch(e){case"completed":return d.jsxs(dt,{variant:"success",children:[d.jsx(Il,{className:"mr-1 h-3 w-3"}),"Completed"]});case"failed":return d.jsxs(dt,{variant:"destructive",children:[d.jsx(ha,{className:"mr-1 h-3 w-3"}),"Failed"]});case"running":return d.jsxs(dt,{variant:"warning",children:[d.jsx(Np,{className:"mr-1 h-3 w-3"}),"Running"]});default:return d.jsx(dt,{variant:"secondary",children:e})}}function yE(){var i,o,l,u,c;const e=Ml(),t=Op(),n=iw(5);return d.jsxs("div",{className:"space-y-6",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[d.jsxs(Ye,{children:[d.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[d.jsx(wt,{className:"text-sm font-medium",children:"Servers"}),d.jsx(H0,{className:"h-4 w-4 text-muted-foreground"})]}),d.jsx(Xe,{children:d.jsx("div",{className:"text-2xl font-bold",children:((i=e.data)==null?void 0:i.total)??0})})]}),d.jsxs(Ye,{children:[d.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[d.jsx(wt,{className:"text-sm font-medium",children:"Collections"}),d.jsx(U0,{className:"h-4 w-4 text-muted-foreground"})]}),d.jsx(Xe,{children:d.jsx("div",{className:"text-2xl font-bold",children:((o=t.data)==null?void 0:o.total)??0})})]}),d.jsxs(Ye,{children:[d.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[d.jsx(wt,{className:"text-sm font-medium",children:"Test Runs"}),d.jsx(Wr,{className:"h-4 w-4 text-muted-foreground"})]}),d.jsx(Xe,{children:d.jsx("div",{className:"text-2xl font-bold",children:((l=n.data)==null?void 0:l.total)??0})})]})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{className:"text-lg",children:"Quick Actions"})}),d.jsxs(Xe,{className:"flex flex-wrap gap-2",children:[d.jsx(Me,{size:"sm",onClick:()=>gs.navigate({to:"/servers"}),children:"Add Server"}),d.jsx(Me,{size:"sm",variant:"outline",onClick:()=>gs.navigate({to:"/collections"}),children:"New Collection"}),d.jsx(Me,{size:"sm",variant:"outline",onClick:()=>gs.navigate({to:"/inspect"}),children:"Inspect Server"})]})]}),d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{className:"text-lg",children:"Recent Runs"})}),d.jsx(Xe,{children:((u=n.data)==null?void 0:u.data.length)===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No test runs yet"}):d.jsx("div",{className:"space-y-2",children:(c=n.data)==null?void 0:c.data.map(h=>d.jsxs("div",{className:"flex items-center justify-between rounded-md border p-2 cursor-pointer hover:bg-muted/50",onClick:()=>gs.navigate({to:"/runs/$runId",params:{runId:h.id}}),children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:h.collectionName}),d.jsx("p",{className:"text-xs text-muted-foreground",children:h.duration?`${h.duration}ms`:"In progress..."})]}),d.jsx(vE,{status:h.status})]},h.id))})})]})]})]})}const qu=b.forwardRef(({className:e,...t},n)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:n,className:pt("w-full caption-bottom text-sm",e),...t})}));qu.displayName="Table";const Zu=b.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:pt("[&_tr]:border-b",e),...t}));Zu.displayName="TableHeader";const Gu=b.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:pt("[&_tr:last-child]:border-0",e),...t}));Gu.displayName="TableBody";const no=b.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:pt("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));no.displayName="TableRow";const cn=b.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:pt("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));cn.displayName="TableHead";const un=b.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:pt("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));un.displayName="TableCell";function nt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xE(e,t){const n=b.createContext(t),i=l=>{const{children:u,...c}=l,h=b.useMemo(()=>c,Object.values(c));return d.jsx(n.Provider,{value:h,children:u})};i.displayName=e+"Provider";function o(l){const u=b.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,o]}function ga(e,t=[]){let n=[];function i(l,u){const c=b.createContext(u),h=n.length;n=[...n,u];const m=y=>{var N;const{scope:x,children:w,..._}=y,S=((N=x==null?void 0:x[e])==null?void 0:N[h])||c,C=b.useMemo(()=>_,Object.values(_));return d.jsx(S.Provider,{value:C,children:w})};m.displayName=l+"Provider";function g(y,x){var S;const w=((S=x==null?void 0:x[e])==null?void 0:S[h])||c,_=b.useContext(w);if(_)return _;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[m,g]}const o=()=>{const l=n.map(u=>b.createContext(u));return function(c){const h=(c==null?void 0:c[e])||l;return b.useMemo(()=>({[`__scope${e}`]:{...c,[e]:h}}),[c,h])}};return o.scopeName=e,[i,wE(o,...t)]}function wE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=i.reduce((c,{useScope:h,scopeName:m})=>{const y=h(l)[`__scope${m}`];return{...c,...y}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var dn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},SE=fp[" useId ".trim().toString()]||(()=>{}),bE=0;function fi(e){const[t,n]=b.useState(SE());return dn(()=>{n(i=>i??String(bE++))},[e]),t?`radix-${t}`:""}var CE=fp[" useInsertionEffect ".trim().toString()]||dn;function yl({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[o,l,u]=kE({defaultProp:t,onChange:n}),c=e!==void 0,h=c?e:o;{const g=b.useRef(e!==void 0);b.useEffect(()=>{const y=g.current;y!==c&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${c?"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.`),g.current=c},[c,i])}const m=b.useCallback(g=>{var y;if(c){const x=_E(g)?g(e):g;x!==e&&((y=u.current)==null||y.call(u,x))}else l(g)},[c,e,l,u]);return[h,m]}function kE({defaultProp:e,onChange:t}){const[n,i]=b.useState(e),o=b.useRef(n),l=b.useRef(t);return CE(()=>{l.current=t},[t]),b.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,i,l]}function _E(e){return typeof e=="function"}function xl(e){const t=jE(e),n=b.forwardRef((i,o)=>{const{children:l,...u}=i,c=b.Children.toArray(l),h=c.find(RE);if(h){const m=h.props.children,g=c.map(y=>y===h?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:y);return d.jsx(t,{...u,ref:o,children:b.isValidElement(m)?b.cloneElement(m,void 0,g):null})}return d.jsx(t,{...u,ref:o,children:l})});return n.displayName=`${e}.Slot`,n}function jE(e){const t=b.forwardRef((n,i)=>{const{children:o,...l}=n;if(b.isValidElement(o)){const u=PE(o),c=NE(l,o.props);return o.type!==b.Fragment&&(c.ref=i?Tp(i,u):u),b.cloneElement(o,c)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var EE=Symbol("radix.slottable");function RE(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===EE}function NE(e,t){const n={...t};for(const i in t){const o=e[i],l=t[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...c)=>{const h=l(...c);return o(...c),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}function PE(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var TE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ct=TE.reduce((e,t)=>{const n=xl(`Primitive.${t}`),i=b.forwardRef((o,l)=>{const{asChild:u,...c}=o,h=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(h,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function OE(e,t){e&&fa.flushSync(()=>e.dispatchEvent(t))}function pi(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function AE(e,t=globalThis==null?void 0:globalThis.document){const n=pi(e);b.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var IE="DismissableLayer",Kh="dismissableLayer.update",ME="dismissableLayer.pointerDownOutside",LE="dismissableLayer.focusOutside",Ly,aw=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ap=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:c,...h}=e,m=b.useContext(aw),[g,y]=b.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=b.useState({}),_=It(t,O=>y(O)),S=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=S.indexOf(C),k=g?S.indexOf(g):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,j=k>=N,P=zE(O=>{const L=O.target,V=[...m.branches].some(M=>M.contains(L));!j||V||(o==null||o(O),u==null||u(O),O.defaultPrevented||c==null||c())},x),T=VE(O=>{const L=O.target;[...m.branches].some(M=>M.contains(L))||(l==null||l(O),u==null||u(O),O.defaultPrevented||c==null||c())},x);return AE(O=>{k===m.layers.size-1&&(i==null||i(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},x),b.useEffect(()=>{if(g)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ly=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Fy(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Ly)}},[g,x,n,m]),b.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Fy())},[g,m]),b.useEffect(()=>{const O=()=>w({});return document.addEventListener(Kh,O),()=>document.removeEventListener(Kh,O)},[]),d.jsx(ct.div,{...h,ref:_,style:{pointerEvents:R?j?"auto":"none":void 0,...e.style},onFocusCapture:nt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:nt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:nt(e.onPointerDownCapture,P.onPointerDownCapture)})});Ap.displayName=IE;var FE="DismissableLayerBranch",DE=b.forwardRef((e,t)=>{const n=b.useContext(aw),i=b.useRef(null),o=It(t,i);return b.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),d.jsx(ct.div,{...e,ref:o})});DE.displayName=FE;function zE(e,t=globalThis==null?void 0:globalThis.document){const n=pi(e),i=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const l=c=>{if(c.target&&!i.current){let h=function(){lw(ME,n,m,{discrete:!0})};const m={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);i.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function VE(e,t=globalThis==null?void 0:globalThis.document){const n=pi(e),i=b.useRef(!1);return b.useEffect(()=>{const o=l=>{l.target&&!i.current&&lw(LE,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Fy(){const e=new CustomEvent(Kh);document.dispatchEvent(e)}function lw(e,t,n,{discrete:i}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?OE(o,l):o.dispatchEvent(l)}var dh="focusScope.autoFocusOnMount",fh="focusScope.autoFocusOnUnmount",Dy={bubbles:!1,cancelable:!0},$E="FocusScope",Ip=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=e,[c,h]=b.useState(null),m=pi(o),g=pi(l),y=b.useRef(null),x=It(t,S=>h(S)),w=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let S=function(R){if(w.paused||!c)return;const j=R.target;c.contains(j)?y.current=j:qs(y.current,{select:!0})},C=function(R){if(w.paused||!c)return;const j=R.relatedTarget;j!==null&&(c.contains(j)||qs(y.current,{select:!0}))},N=function(R){if(document.activeElement===document.body)for(const P of R)P.removedNodes.length>0&&qs(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const k=new MutationObserver(N);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),k.disconnect()}}},[i,c,w.paused]),b.useEffect(()=>{if(c){Vy.add(w);const S=document.activeElement;if(!c.contains(S)){const N=new CustomEvent(dh,Dy);c.addEventListener(dh,m),c.dispatchEvent(N),N.defaultPrevented||(BE(QE(cw(c)),{select:!0}),document.activeElement===S&&qs(c))}return()=>{c.removeEventListener(dh,m),setTimeout(()=>{const N=new CustomEvent(fh,Dy);c.addEventListener(fh,g),c.dispatchEvent(N),N.defaultPrevented||qs(S??document.body,{select:!0}),c.removeEventListener(fh,g),Vy.remove(w)},0)}}},[c,m,g,w]);const _=b.useCallback(S=>{if(!n&&!i||w.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,N=document.activeElement;if(C&&N){const k=S.currentTarget,[R,j]=UE(k);R&&j?!S.shiftKey&&N===j?(S.preventDefault(),n&&qs(R,{select:!0})):S.shiftKey&&N===R&&(S.preventDefault(),n&&qs(j,{select:!0})):N===k&&S.preventDefault()}},[n,i,w.paused]);return d.jsx(ct.div,{tabIndex:-1,...u,ref:x,onKeyDown:_})});Ip.displayName=$E;function BE(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(qs(i,{select:t}),document.activeElement!==n)return}function UE(e){const t=cw(e),n=zy(t,e),i=zy(t.reverse(),e);return[n,i]}function cw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zy(e,t){for(const n of e)if(!WE(n,{upTo:t}))return n}function WE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HE(e){return e instanceof HTMLInputElement&&"select"in e}function qs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&HE(e)&&t&&e.select()}}var Vy=KE();function KE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=$y(e,t),e.unshift(t)},remove(t){var n;e=$y(e,t),(n=e[0])==null||n.resume()}}}function $y(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function QE(e){return e.filter(t=>t.tagName!=="A")}var qE="Portal",Mp=b.forwardRef((e,t)=>{var c;const{container:n,...i}=e,[o,l]=b.useState(!1);dn(()=>l(!0),[]);const u=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?w_.createPortal(d.jsx(ct.div,{...i,ref:t}),u):null});Mp.displayName=qE;function ZE(e,t){return b.useReducer((n,i)=>t[n][i]??n,e)}var Ll=e=>{const{present:t,children:n}=e,i=GE(t),o=typeof n=="function"?n({present:i.isPresent}):b.Children.only(n),l=It(i.ref,YE(o));return typeof n=="function"||i.isPresent?b.cloneElement(o,{ref:l}):null};Ll.displayName="Presence";function GE(e){const[t,n]=b.useState(),i=b.useRef(null),o=b.useRef(e),l=b.useRef("none"),u=e?"mounted":"unmounted",[c,h]=ZE(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const m=Xc(i.current);l.current=c==="mounted"?m:"none"},[c]),dn(()=>{const m=i.current,g=o.current;if(g!==e){const x=l.current,w=Xc(m);e?h("MOUNT"):w==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(g&&x!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),dn(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,y=w=>{const S=Xc(i.current).includes(CSS.escape(w.animationName));if(w.target===t&&S&&(h("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},x=w=>{w.target===t&&(l.current=Xc(i.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(m=>{i.current=m?getComputedStyle(m):null,n(m)},[])}}function Xc(e){return(e==null?void 0:e.animationName)||"none"}function YE(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hh=0;function uw(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??By()),document.body.insertAdjacentElement("beforeend",e[1]??By()),hh++,()=>{hh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hh--}},[])}function By(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zr=function(){return zr=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},zr.apply(this,arguments)};function dw(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function XE(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,l;i<o;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var uu="right-scroll-bar-position",du="width-before-scroll-bar",JE="with-scroll-bars-hidden",eR="--removed-body-scroll-bar-size";function ph(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tR(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=t,n.facade}var nR=typeof window<"u"?b.useLayoutEffect:b.useEffect,Uy=new WeakMap;function rR(e,t){var n=tR(null,function(i){return e.forEach(function(o){return ph(o,i)})});return nR(function(){var i=Uy.get(n);if(i){var o=new Set(i),l=new Set(e),u=n.current;o.forEach(function(c){l.has(c)||ph(c,null)}),l.forEach(function(c){o.has(c)||ph(c,u)})}Uy.set(n,e)},[e]),n}function sR(e){return e}function iR(e,t){t===void 0&&(t=sR);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var u=t(l,i);return n.push(u),function(){n=n.filter(function(c){return c!==u})}},assignSyncMedium:function(l){for(i=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var u=[];if(n.length){var c=n;n=[],c.forEach(l),u=n}var h=function(){var g=u;u=[],g.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(g){u.push(g),m()},filter:function(g){return u=u.filter(g),n}}}};return o}function oR(e){e===void 0&&(e={});var t=iR(null);return t.options=zr({async:!0,ssr:!1},e),t}var fw=function(e){var t=e.sideCar,n=dw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,zr({},n))};fw.isSideCarExport=!0;function aR(e,t){return e.useMedium(t),fw}var hw=oR(),mh=function(){},Yu=b.forwardRef(function(e,t){var n=b.useRef(null),i=b.useState({onScrollCapture:mh,onWheelCapture:mh,onTouchMoveCapture:mh}),o=i[0],l=i[1],u=e.forwardProps,c=e.children,h=e.className,m=e.removeScrollBar,g=e.enabled,y=e.shards,x=e.sideCar,w=e.noRelative,_=e.noIsolation,S=e.inert,C=e.allowPinchZoom,N=e.as,k=N===void 0?"div":N,R=e.gapMode,j=dw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=x,T=rR([n,t]),O=zr(zr({},j),o);return b.createElement(b.Fragment,null,g&&b.createElement(P,{sideCar:hw,removeScrollBar:m,shards:y,noRelative:w,noIsolation:_,inert:S,setCallbacks:l,allowPinchZoom:!!C,lockRef:n,gapMode:R}),u?b.cloneElement(b.Children.only(c),zr(zr({},O),{ref:T})):b.createElement(k,zr({},O,{className:h,ref:T}),c))});Yu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yu.classNames={fullWidth:du,zeroRight:uu};var lR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=lR();return t&&e.setAttribute("nonce",t),e}function uR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cR())&&(uR(t,n),dR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hR=function(){var e=fR();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},pw=function(){var e=hR(),t=function(n){var i=n.styles,o=n.dynamic;return e(i,o),null};return t},pR={left:0,top:0,right:0,gap:0},gh=function(e){return parseInt(e||"",10)||0},mR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[gh(n),gh(i),gh(o)]},gR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pR;var t=mR(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},vR=pw(),Uo="data-scroll-locked",yR=function(e,t,n,i){var o=e.left,l=e.top,u=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
267
|
+
.`.concat(JE,` {
|
|
268
|
+
overflow: hidden `).concat(i,`;
|
|
269
|
+
padding-right: `).concat(c,"px ").concat(i,`;
|
|
270
|
+
}
|
|
271
|
+
body[`).concat(Uo,`] {
|
|
272
|
+
overflow: hidden `).concat(i,`;
|
|
273
|
+
overscroll-behavior: contain;
|
|
274
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
275
|
+
padding-left: `.concat(o,`px;
|
|
276
|
+
padding-top: `).concat(l,`px;
|
|
277
|
+
padding-right: `).concat(u,`px;
|
|
278
|
+
margin-left:0;
|
|
279
|
+
margin-top:0;
|
|
280
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
281
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.`).concat(uu,` {
|
|
285
|
+
right: `).concat(c,"px ").concat(i,`;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.`).concat(du,` {
|
|
289
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.`).concat(uu," .").concat(uu,` {
|
|
293
|
+
right: 0 `).concat(i,`;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.`).concat(du," .").concat(du,` {
|
|
297
|
+
margin-right: 0 `).concat(i,`;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
body[`).concat(Uo,`] {
|
|
301
|
+
`).concat(eR,": ").concat(c,`px;
|
|
302
|
+
}
|
|
303
|
+
`)},Wy=function(){var e=parseInt(document.body.getAttribute(Uo)||"0",10);return isFinite(e)?e:0},xR=function(){b.useEffect(function(){return document.body.setAttribute(Uo,(Wy()+1).toString()),function(){var e=Wy()-1;e<=0?document.body.removeAttribute(Uo):document.body.setAttribute(Uo,e.toString())}},[])},wR=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,o=i===void 0?"margin":i;xR();var l=b.useMemo(function(){return gR(o)},[o]);return b.createElement(vR,{styles:yR(l,!t,o,n?"":"!important")})},Qh=!1;if(typeof window<"u")try{var Jc=Object.defineProperty({},"passive",{get:function(){return Qh=!0,!0}});window.addEventListener("test",Jc,Jc),window.removeEventListener("test",Jc,Jc)}catch{Qh=!1}var Ao=Qh?{passive:!1}:!1,SR=function(e){return e.tagName==="TEXTAREA"},mw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!SR(e)&&n[t]==="visible")},bR=function(e){return mw(e,"overflowY")},CR=function(e){return mw(e,"overflowX")},Hy=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=gw(e,i);if(o){var l=vw(e,i),u=l[1],c=l[2];if(u>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},kR=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},_R=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},gw=function(e,t){return e==="v"?bR(t):CR(t)},vw=function(e,t){return e==="v"?kR(t):_R(t)},jR=function(e,t){return e==="h"&&t==="rtl"?-1:1},ER=function(e,t,n,i,o){var l=jR(e,window.getComputedStyle(t).direction),u=l*i,c=n.target,h=t.contains(c),m=!1,g=u>0,y=0,x=0;do{if(!c)break;var w=vw(e,c),_=w[0],S=w[1],C=w[2],N=S-C-l*_;(_||N)&&gw(e,c)&&(y+=N,x+=_);var k=c.parentNode;c=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!h&&c!==document.body||h&&(t.contains(c)||t===c));return(g&&Math.abs(y)<1||!g&&Math.abs(x)<1)&&(m=!0),m},eu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ky=function(e){return[e.deltaX,e.deltaY]},Qy=function(e){return e&&"current"in e?e.current:e},RR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},NR=function(e){return`
|
|
304
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
305
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
306
|
+
`)},PR=0,Io=[];function TR(e){var t=b.useRef([]),n=b.useRef([0,0]),i=b.useRef(),o=b.useState(PR++)[0],l=b.useState(pw)[0],u=b.useRef(e);b.useEffect(function(){u.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var S=XE([e.lockRef.current],(e.shards||[]).map(Qy),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=b.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!u.current.allowPinchZoom;var N=eu(S),k=n.current,R="deltaX"in S?S.deltaX:k[0]-N[0],j="deltaY"in S?S.deltaY:k[1]-N[1],P,T=S.target,O=Math.abs(R)>Math.abs(j)?"h":"v";if("touches"in S&&O==="h"&&T.type==="range")return!1;var L=window.getSelection(),V=L&&L.anchorNode,M=V?V===T||V.contains(T):!1;if(M)return!1;var Z=Hy(O,T);if(!Z)return!0;if(Z?P=O:(P=O==="v"?"h":"v",Z=Hy(O,T)),!Z)return!1;if(!i.current&&"changedTouches"in S&&(R||j)&&(i.current=P),!P)return!0;var W=i.current||P;return ER(W,C,S,W==="h"?R:j)},[]),h=b.useCallback(function(S){var C=S;if(!(!Io.length||Io[Io.length-1]!==l)){var N="deltaY"in C?Ky(C):eu(C),k=t.current.filter(function(P){return P.name===C.type&&(P.target===C.target||C.target===P.shadowParent)&&RR(P.delta,N)})[0];if(k&&k.should){C.cancelable&&C.preventDefault();return}if(!k){var R=(u.current.shards||[]).map(Qy).filter(Boolean).filter(function(P){return P.contains(C.target)}),j=R.length>0?c(C,R[0]):!u.current.noIsolation;j&&C.cancelable&&C.preventDefault()}}},[]),m=b.useCallback(function(S,C,N,k){var R={name:S,delta:C,target:N,should:k,shadowParent:OR(N)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(j){return j!==R})},1)},[]),g=b.useCallback(function(S){n.current=eu(S),i.current=void 0},[]),y=b.useCallback(function(S){m(S.type,Ky(S),S.target,c(S,e.lockRef.current))},[]),x=b.useCallback(function(S){m(S.type,eu(S),S.target,c(S,e.lockRef.current))},[]);b.useEffect(function(){return Io.push(l),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener("wheel",h,Ao),document.addEventListener("touchmove",h,Ao),document.addEventListener("touchstart",g,Ao),function(){Io=Io.filter(function(S){return S!==l}),document.removeEventListener("wheel",h,Ao),document.removeEventListener("touchmove",h,Ao),document.removeEventListener("touchstart",g,Ao)}},[]);var w=e.removeScrollBar,_=e.inert;return b.createElement(b.Fragment,null,_?b.createElement(l,{styles:NR(o)}):null,w?b.createElement(wR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function OR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const AR=aR(hw,TR);var Lp=b.forwardRef(function(e,t){return b.createElement(Yu,zr({},e,{ref:t,sideCar:AR}))});Lp.classNames=Yu.classNames;var IR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mo=new WeakMap,tu=new WeakMap,nu={},vh=0,yw=function(e){return e&&(e.host||yw(e.parentNode))},MR=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=yw(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},LR=function(e,t,n,i){var o=MR(t,Array.isArray(e)?e:[e]);nu[n]||(nu[n]=new WeakMap);var l=nu[n],u=[],c=new Set,h=new Set(o),m=function(y){!y||c.has(y)||(c.add(y),m(y.parentNode))};o.forEach(m);var g=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(x){if(c.has(x))g(x);else try{var w=x.getAttribute(i),_=w!==null&&w!=="false",S=(Mo.get(x)||0)+1,C=(l.get(x)||0)+1;Mo.set(x,S),l.set(x,C),u.push(x),S===1&&_&&tu.set(x,!0),C===1&&x.setAttribute(n,"true"),_||x.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return g(t),c.clear(),vh++,function(){u.forEach(function(y){var x=Mo.get(y)-1,w=l.get(y)-1;Mo.set(y,x),l.set(y,w),x||(tu.has(y)||y.removeAttribute(i),tu.delete(y)),w||y.removeAttribute(n)}),vh--,vh||(Mo=new WeakMap,Mo=new WeakMap,tu=new WeakMap,nu={})}},xw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=IR(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),LR(i,o,n,"aria-hidden")):function(){return null}},Xu="Dialog",[ww]=ga(Xu),[FR,Rr]=ww(Xu),Sw=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,c=b.useRef(null),h=b.useRef(null),[m,g]=yl({prop:i,defaultProp:o??!1,onChange:l,caller:Xu});return d.jsx(FR,{scope:t,triggerRef:c,contentRef:h,contentId:fi(),titleId:fi(),descriptionId:fi(),open:m,onOpenChange:g,onOpenToggle:b.useCallback(()=>g(y=>!y),[g]),modal:u,children:n})};Sw.displayName=Xu;var bw="DialogTrigger",Cw=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=Rr(bw,n),l=It(t,o.triggerRef);return d.jsx(ct.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":zp(o.open),...i,ref:l,onClick:nt(e.onClick,o.onOpenToggle)})});Cw.displayName=bw;var Fp="DialogPortal",[DR,kw]=ww(Fp,{forceMount:void 0}),_w=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:o}=e,l=Rr(Fp,t);return d.jsx(DR,{scope:t,forceMount:n,children:b.Children.map(i,u=>d.jsx(Ll,{present:n||l.open,children:d.jsx(Mp,{asChild:!0,container:o,children:u})}))})};_w.displayName=Fp;var _u="DialogOverlay",jw=b.forwardRef((e,t)=>{const n=kw(_u,e.__scopeDialog),{forceMount:i=n.forceMount,...o}=e,l=Rr(_u,e.__scopeDialog);return l.modal?d.jsx(Ll,{present:i||l.open,children:d.jsx(VR,{...o,ref:t})}):null});jw.displayName=_u;var zR=xl("DialogOverlay.RemoveScroll"),VR=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=Rr(_u,n);return d.jsx(Lp,{as:zR,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ct.div,{"data-state":zp(o.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),ro="DialogContent",Ew=b.forwardRef((e,t)=>{const n=kw(ro,e.__scopeDialog),{forceMount:i=n.forceMount,...o}=e,l=Rr(ro,e.__scopeDialog);return d.jsx(Ll,{present:i||l.open,children:l.modal?d.jsx($R,{...o,ref:t}):d.jsx(BR,{...o,ref:t})})});Ew.displayName=ro;var $R=b.forwardRef((e,t)=>{const n=Rr(ro,e.__scopeDialog),i=b.useRef(null),o=It(t,n.contentRef,i);return b.useEffect(()=>{const l=i.current;if(l)return xw(l)},[]),d.jsx(Rw,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nt(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:nt(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&l.preventDefault()}),onFocusOutside:nt(e.onFocusOutside,l=>l.preventDefault())})}),BR=b.forwardRef((e,t)=>{const n=Rr(ro,e.__scopeDialog),i=b.useRef(!1),o=b.useRef(!1);return d.jsx(Rw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,l),l.defaultPrevented||(i.current||(c=n.triggerRef.current)==null||c.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var h,m;(h=e.onInteractOutside)==null||h.call(e,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;((m=n.triggerRef.current)==null?void 0:m.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),Rw=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=e,c=Rr(ro,n),h=b.useRef(null),m=It(t,h);return uw(),d.jsxs(d.Fragment,{children:[d.jsx(Ip,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:d.jsx(Ap,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":zp(c.open),...u,ref:m,onDismiss:()=>c.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(UR,{titleId:c.titleId}),d.jsx(HR,{contentRef:h,descriptionId:c.descriptionId})]})]})}),Dp="DialogTitle",Nw=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=Rr(Dp,n);return d.jsx(ct.h2,{id:o.titleId,...i,ref:t})});Nw.displayName=Dp;var Pw="DialogDescription",Tw=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=Rr(Pw,n);return d.jsx(ct.p,{id:o.descriptionId,...i,ref:t})});Tw.displayName=Pw;var Ow="DialogClose",Aw=b.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,o=Rr(Ow,n);return d.jsx(ct.button,{type:"button",...i,ref:t,onClick:nt(e.onClick,()=>o.onOpenChange(!1))})});Aw.displayName=Ow;function zp(e){return e?"open":"closed"}var Iw="DialogTitleWarning",[PO,Mw]=xE(Iw,{contentName:ro,titleName:Dp,docsSlug:"dialog"}),UR=({titleId:e})=>{const t=Mw(Iw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
307
|
+
|
|
308
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
309
|
+
|
|
310
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},WR="DialogDescriptionWarning",HR=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mw(WR).contentName}}.`;return b.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},KR=Sw,QR=Cw,qR=_w,ZR=jw,GR=Ew,YR=Nw,XR=Tw,JR=Aw;const ju=KR,Vp=QR,eN=qR,Lw=b.forwardRef(({className:e,...t},n)=>d.jsx(ZR,{ref:n,className:pt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Lw.displayName="DialogOverlay";const wl=b.forwardRef(({className:e,children:t,...n},i)=>d.jsxs(eN,{children:[d.jsx(Lw,{}),d.jsxs(GR,{ref:i,className:pt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(JR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(cj,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wl.displayName="DialogContent";const Eu=({className:e,...t})=>d.jsx("div",{className:pt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),Sl=b.forwardRef(({className:e,...t},n)=>d.jsx(YR,{ref:n,className:pt("text-lg font-semibold leading-none tracking-tight",e),...t}));Sl.displayName="DialogTitle";const tN=b.forwardRef(({className:e,...t},n)=>d.jsx(XR,{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));tN.displayName="DialogDescription";var Fl=e=>e.type==="checkbox",Vi=e=>e instanceof Date,Nn=e=>e==null;const Fw=e=>typeof e=="object";var Ut=e=>!Nn(e)&&!Array.isArray(e)&&Fw(e)&&!Vi(e),nN=e=>Ut(e)&&e.target?Fl(e.target)?e.target.checked:e.target.value:e,rN=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,sN=(e,t)=>e.has(rN(t)),iN=e=>{const t=e.constructor&&e.constructor.prototype;return Ut(t)&&t.hasOwnProperty("isPrototypeOf")},$p=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Kt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if($p&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Ut(e)&&iN(e)))return e;const i=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=Kt(e[o]));return i}var Ju=e=>/^\w*$/.test(e),Nt=e=>e===void 0,Bp=e=>Array.isArray(e)?e.filter(Boolean):[],Up=e=>Bp(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,t,n)=>{if(!t||!Ut(e))return n;const i=(Ju(t)?[t]:Up(t)).reduce((o,l)=>Nn(o)?o:o[l],e);return Nt(i)||i===e?Nt(e[t])?n:e[t]:i},Mr=e=>typeof e=="boolean",Cr=e=>typeof e=="function",gt=(e,t,n)=>{let i=-1;const o=Ju(t)?[t]:Up(t),l=o.length,u=l-1;for(;++i<l;){const c=o[i];let h=n;if(i!==u){const m=e[c];h=Ut(m)||Array.isArray(m)?m:isNaN(+o[i+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=h,e=e[c]}};const qy={BLUR:"blur",FOCUS_OUT:"focusout"},kr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},os={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},oN=at.createContext(null);oN.displayName="HookFormControlContext";var aN=(e,t,n,i=!0)=>{const o={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(o,l,{get:()=>{const u=l;return t._proxyFormState[u]!==kr.all&&(t._proxyFormState[u]=!i||kr.all),e[u]}});return o};const lN=typeof window<"u"?at.useLayoutEffect:at.useEffect;var $n=e=>typeof e=="string",cN=(e,t,n,i,o)=>$n(e)?(i&&t.watch.add(e),Ce(n,e,o)):Array.isArray(e)?e.map(l=>(i&&t.watch.add(l),Ce(n,l))):(i&&(t.watchAll=!0),n),qh=e=>Nn(e)||!Fw(e);function Ys(e,t,n=new WeakSet){if(qh(e)||qh(t))return Object.is(e,t);if(Vi(e)&&Vi(t))return Object.is(e.getTime(),t.getTime());const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const l of i){const u=e[l];if(!o.includes(l))return!1;if(l!=="ref"){const c=t[l];if(Vi(u)&&Vi(c)||Ut(u)&&Ut(c)||Array.isArray(u)&&Array.isArray(c)?!Ys(u,c,n):!Object.is(u,c))return!1}}return!0}const uN=at.createContext(null);uN.displayName="HookFormContext";var Dw=(e,t,n,i,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:o||!0}}:{},hl=e=>Array.isArray(e)?e:[e],Zy=()=>{let e=[];return{get observers(){return e},next:o=>{for(const l of e)l.next&&l.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(l=>l!==o)}}),unsubscribe:()=>{e=[]}}};function zw(e,t){const n={};for(const i in e)if(e.hasOwnProperty(i)){const o=e[i],l=t[i];if(o&&Ut(o)&&l){const u=zw(o,l);Ut(u)&&(n[i]=u)}else e[i]&&(n[i]=l)}return n}var gn=e=>Ut(e)&&!Object.keys(e).length,Wp=e=>e.type==="file",Ru=e=>{if(!$p)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Vw=e=>e.type==="select-multiple",Hp=e=>e.type==="radio",dN=e=>Hp(e)||Fl(e),yh=e=>Ru(e)&&e.isConnected;function fN(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=Nt(e)?i++:e[t[i++]];return e}function hN(e){for(const t in e)if(e.hasOwnProperty(t)&&!Nt(e[t]))return!1;return!0}function Vt(e,t){const n=Array.isArray(t)?t:Ju(t)?[t]:Up(t),i=n.length===1?e:fN(e,n),o=n.length-1,l=n[o];return i&&delete i[l],o!==0&&(Ut(i)&&gn(i)||Array.isArray(i)&&hN(i))&&Vt(e,n.slice(0,-1)),e}var pN=e=>{for(const t in e)if(Cr(e[t]))return!0;return!1};function $w(e){return Array.isArray(e)||Ut(e)&&!pN(e)}function Zh(e,t={}){for(const n in e){const i=e[n];$w(i)?(t[n]=Array.isArray(i)?[]:{},Zh(i,t[n])):Nt(i)||(t[n]=!0)}return t}function Do(e,t,n){n||(n=Zh(t));for(const i in e){const o=e[i];if($w(o))Nt(t)||qh(n[i])?n[i]=Zh(o,Array.isArray(o)?[]:{}):Do(o,Nn(t)?{}:t[i],n[i]);else{const l=t[i];n[i]=!Ys(o,l)}}return n}const Gy={value:!1,isValid:!1},Yy={value:!0,isValid:!0};var Bw=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Nt(e[0].attributes.value)?Nt(e[0].value)||e[0].value===""?Yy:{value:e[0].value,isValid:!0}:Yy:Gy}return Gy},Uw=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>Nt(e)?e:t?e===""?NaN:e&&+e:n&&$n(e)?new Date(e):i?i(e):e;const Xy={isValid:!1,value:null};var Ww=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Xy):Xy;function Jy(e){const t=e.ref;return Wp(t)?t.files:Hp(t)?Ww(e.refs).value:Vw(t)?[...t.selectedOptions].map(({value:n})=>n):Fl(t)?Bw(e.refs).value:Uw(Nt(t.value)?e.ref.value:t.value,e)}var mN=(e,t,n,i)=>{const o={};for(const l of e){const u=Ce(t,l);u&>(o,l,u._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:i}},Nu=e=>e instanceof RegExp,al=e=>Nt(e)?e:Nu(e)?e.source:Ut(e)?Nu(e.value)?e.value.source:e.value:e,ex=e=>({isOnSubmit:!e||e===kr.onSubmit,isOnBlur:e===kr.onBlur,isOnChange:e===kr.onChange,isOnAll:e===kr.all,isOnTouch:e===kr.onTouched});const tx="AsyncFunction";var gN=e=>!!e&&!!e.validate&&!!(Cr(e.validate)&&e.validate.constructor.name===tx||Ut(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===tx)),vN=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),nx=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const pl=(e,t,n,i)=>{for(const o of n||Object.keys(e)){const l=Ce(e,o);if(l){const{_f:u,...c}=l;if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],o)&&!i)return!0;if(u.ref&&t(u.ref,u.name)&&!i)return!0;if(pl(c,t))break}else if(Ut(c)&&pl(c,t))break}}};function rx(e,t,n){const i=Ce(e,n);if(i||Ju(n))return{error:i,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),u=Ce(t,l),c=Ce(e,l);if(u&&!Array.isArray(u)&&n!==l)return{name:n};if(c&&c.type)return{name:l,error:c};if(c&&c.root&&c.root.type)return{name:`${l}.root`,error:c.root};o.pop()}return{name:n}}var yN=(e,t,n,i)=>{n(e);const{name:o,...l}=e;return gn(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(u=>t[u]===(!i||kr.all))},xN=(e,t,n)=>!e||!t||e===t||hl(e).some(i=>i&&(n?i===t:i.startsWith(t)||t.startsWith(i))),wN=(e,t,n,i,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?i.isOnBlur:o.isOnBlur)?!e:(n?i.isOnChange:o.isOnChange)?e:!0,SN=(e,t)=>!Bp(Ce(e,t)).length&&Vt(e,t),bN=(e,t,n)=>{const i=hl(Ce(e,n));return gt(i,"root",t[n]),gt(e,n,i),e};function sx(e,t,n="validate"){if($n(e)||Array.isArray(e)&&e.every($n)||Mr(e)&&!e)return{type:n,message:$n(e)?e:"",ref:t}}var Lo=e=>Ut(e)&&!Nu(e)?e:{value:e,message:""},ix=async(e,t,n,i,o,l)=>{const{ref:u,refs:c,required:h,maxLength:m,minLength:g,min:y,max:x,pattern:w,validate:_,name:S,valueAsNumber:C,mount:N}=e._f,k=Ce(n,S);if(!N||t.has(S))return{};const R=c?c[0]:u,j=W=>{o&&R.reportValidity&&(R.setCustomValidity(Mr(W)?"":W||""),R.reportValidity())},P={},T=Hp(u),O=Fl(u),L=T||O,V=(C||Wp(u))&&Nt(u.value)&&Nt(k)||Ru(u)&&u.value===""||k===""||Array.isArray(k)&&!k.length,M=Dw.bind(null,S,i,P),Z=(W,ee,se,oe=os.maxLength,X=os.minLength)=>{const ie=W?ee:se;P[S]={type:W?oe:X,message:ie,ref:u,...M(W?oe:X,ie)}};if(l?!Array.isArray(k)||!k.length:h&&(!L&&(V||Nn(k))||Mr(k)&&!k||O&&!Bw(c).isValid||T&&!Ww(c).isValid)){const{value:W,message:ee}=$n(h)?{value:!!h,message:h}:Lo(h);if(W&&(P[S]={type:os.required,message:ee,ref:R,...M(os.required,ee)},!i))return j(ee),P}if(!V&&(!Nn(y)||!Nn(x))){let W,ee;const se=Lo(x),oe=Lo(y);if(!Nn(k)&&!isNaN(k)){const X=u.valueAsNumber||k&&+k;Nn(se.value)||(W=X>se.value),Nn(oe.value)||(ee=X<oe.value)}else{const X=u.valueAsDate||new Date(k),ie=Q=>new Date(new Date().toDateString()+" "+Q),B=u.type=="time",U=u.type=="week";$n(se.value)&&k&&(W=B?ie(k)>ie(se.value):U?k>se.value:X>new Date(se.value)),$n(oe.value)&&k&&(ee=B?ie(k)<ie(oe.value):U?k<oe.value:X<new Date(oe.value))}if((W||ee)&&(Z(!!W,se.message,oe.message,os.max,os.min),!i))return j(P[S].message),P}if((m||g)&&!V&&($n(k)||l&&Array.isArray(k))){const W=Lo(m),ee=Lo(g),se=!Nn(W.value)&&k.length>+W.value,oe=!Nn(ee.value)&&k.length<+ee.value;if((se||oe)&&(Z(se,W.message,ee.message),!i))return j(P[S].message),P}if(w&&!V&&$n(k)){const{value:W,message:ee}=Lo(w);if(Nu(W)&&!k.match(W)&&(P[S]={type:os.pattern,message:ee,ref:u,...M(os.pattern,ee)},!i))return j(ee),P}if(_){if(Cr(_)){const W=await _(k,n),ee=sx(W,R);if(ee&&(P[S]={...ee,...M(os.validate,ee.message)},!i))return j(ee.message),P}else if(Ut(_)){let W={};for(const ee in _){if(!gn(W)&&!i)break;const se=sx(await _[ee](k,n),R,ee);se&&(W={...se,...M(ee,se.message)},j(se.message),i&&(P[S]=W))}if(!gn(W)&&(P[S]={ref:R,...W},!i))return P}}return j(!0),P};const CN={mode:kr.onSubmit,reValidateMode:kr.onChange,shouldFocusError:!0};function kN(e={}){let t={...CN,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Cr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},o=Ut(t.defaultValues)||Ut(t.values)?Kt(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:Kt(o),u={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},h,m=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},y={...g};let x={...y};const w={array:Zy(),state:Zy()},_=t.criteriaMode===kr.all,S=D=>K=>{clearTimeout(m),m=setTimeout(D,K)},C=async D=>{if(!u.keepIsValid&&!t.disabled&&(y.isValid||x.isValid||D)){let K;t.resolver?(K=gn((await L()).errors),N()):K=await M(i,!0),K!==n.isValid&&w.state.next({isValid:K})}},N=(D,K)=>{!t.disabled&&(y.isValidating||y.validatingFields||x.isValidating||x.validatingFields)&&((D||Array.from(c.mount)).forEach(J=>{J&&(K?gt(n.validatingFields,J,K):Vt(n.validatingFields,J))}),w.state.next({validatingFields:n.validatingFields,isValidating:!gn(n.validatingFields)}))},k=(D,K=[],J,ge,ue=!0,ne=!0)=>{if(ge&&J&&!t.disabled){if(u.action=!0,ne&&Array.isArray(Ce(i,D))){const me=J(Ce(i,D),ge.argA,ge.argB);ue&>(i,D,me)}if(ne&&Array.isArray(Ce(n.errors,D))){const me=J(Ce(n.errors,D),ge.argA,ge.argB);ue&>(n.errors,D,me),SN(n.errors,D)}if((y.touchedFields||x.touchedFields)&&ne&&Array.isArray(Ce(n.touchedFields,D))){const me=J(Ce(n.touchedFields,D),ge.argA,ge.argB);ue&>(n.touchedFields,D,me)}(y.dirtyFields||x.dirtyFields)&&(n.dirtyFields=Do(o,l)),w.state.next({name:D,isDirty:W(D,K),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else gt(l,D,K)},R=(D,K)=>{gt(n.errors,D,K),w.state.next({errors:n.errors})},j=D=>{n.errors=D,w.state.next({errors:n.errors,isValid:!1})},P=(D,K,J,ge)=>{const ue=Ce(i,D);if(ue){const ne=Ce(l,D,Nt(J)?Ce(o,D):J);Nt(ne)||ge&&ge.defaultChecked||K?gt(l,D,K?ne:Jy(ue._f)):oe(D,ne),u.mount&&!u.action&&C()}},T=(D,K,J,ge,ue)=>{let ne=!1,me=!1;const Le={name:D};if(!t.disabled){if(!J||ge){(y.isDirty||x.isDirty)&&(me=n.isDirty,n.isDirty=Le.isDirty=W(),ne=me!==Le.isDirty);const Be=Ys(Ce(o,D),K);me=!!Ce(n.dirtyFields,D),Be?Vt(n.dirtyFields,D):gt(n.dirtyFields,D,!0),Le.dirtyFields=n.dirtyFields,ne=ne||(y.dirtyFields||x.dirtyFields)&&me!==!Be}if(J){const Be=Ce(n.touchedFields,D);Be||(gt(n.touchedFields,D,J),Le.touchedFields=n.touchedFields,ne=ne||(y.touchedFields||x.touchedFields)&&Be!==J)}ne&&ue&&w.state.next(Le)}return ne?Le:{}},O=(D,K,J,ge)=>{const ue=Ce(n.errors,D),ne=(y.isValid||x.isValid)&&Mr(K)&&n.isValid!==K;if(t.delayError&&J?(h=S(()=>R(D,J)),h(t.delayError)):(clearTimeout(m),h=null,J?gt(n.errors,D,J):Vt(n.errors,D)),(J?!Ys(ue,J):ue)||!gn(ge)||ne){const me={...ge,...ne&&Mr(K)?{isValid:K}:{},errors:n.errors,name:D};n={...n,...me},w.state.next(me)}},L=async D=>(N(D,!0),await t.resolver(l,t.context,mN(D||c.mount,i,t.criteriaMode,t.shouldUseNativeValidation))),V=async D=>{const{errors:K}=await L(D);if(N(D),D)for(const J of D){const ge=Ce(K,J);ge?gt(n.errors,J,ge):Vt(n.errors,J)}else n.errors=K;return K},M=async(D,K,J={valid:!0})=>{for(const ge in D){const ue=D[ge];if(ue){const{_f:ne,...me}=ue;if(ne){const Le=c.array.has(ne.name),Be=ue._f&&gN(ue._f);Be&&y.validatingFields&&N([ne.name],!0);const jt=await ix(ue,c.disabled,l,_,t.shouldUseNativeValidation&&!K,Le);if(Be&&y.validatingFields&&N([ne.name]),jt[ne.name]&&(J.valid=!1,K||e.shouldUseNativeValidation))break;!K&&(Ce(jt,ne.name)?Le?bN(n.errors,jt,ne.name):gt(n.errors,ne.name,jt[ne.name]):Vt(n.errors,ne.name))}!gn(me)&&await M(me,K,J)}}return J.valid},Z=()=>{for(const D of c.unMount){const K=Ce(i,D);K&&(K._f.refs?K._f.refs.every(J=>!yh(J)):!yh(K._f.ref))&&ve(D)}c.unMount=new Set},W=(D,K)=>!t.disabled&&(D&&K&>(l,D,K),!Ys(I(),o)),ee=(D,K,J)=>cN(D,c,{...u.mount?l:Nt(K)?o:$n(D)?{[D]:K}:K},J,K),se=D=>Bp(Ce(u.mount?l:o,D,t.shouldUnregister?Ce(o,D,[]):[])),oe=(D,K,J={})=>{const ge=Ce(i,D);let ue=K;if(ge){const ne=ge._f;ne&&(!ne.disabled&>(l,D,Uw(K,ne)),ue=Ru(ne.ref)&&Nn(K)?"":K,Vw(ne.ref)?[...ne.ref.options].forEach(me=>me.selected=ue.includes(me.value)):ne.refs?Fl(ne.ref)?ne.refs.forEach(me=>{(!me.defaultChecked||!me.disabled)&&(Array.isArray(ue)?me.checked=!!ue.find(Le=>Le===me.value):me.checked=ue===me.value||!!ue)}):ne.refs.forEach(me=>me.checked=me.value===ue):Wp(ne.ref)?ne.ref.value="":(ne.ref.value=ue,ne.ref.type||w.state.next({name:D,values:Kt(l)})))}(J.shouldDirty||J.shouldTouch)&&T(D,ue,J.shouldTouch,J.shouldDirty,!0),J.shouldValidate&&Q(D)},X=(D,K,J)=>{for(const ge in K){if(!K.hasOwnProperty(ge))return;const ue=K[ge],ne=D+"."+ge,me=Ce(i,ne);(c.array.has(D)||Ut(ue)||me&&!me._f)&&!Vi(ue)?X(ne,ue,J):oe(ne,ue,J)}},ie=(D,K,J={})=>{const ge=Ce(i,D),ue=c.array.has(D),ne=Kt(K);gt(l,D,ne),ue?(w.array.next({name:D,values:Kt(l)}),(y.isDirty||y.dirtyFields||x.isDirty||x.dirtyFields)&&J.shouldDirty&&w.state.next({name:D,dirtyFields:Do(o,l),isDirty:W(D,ne)})):ge&&!ge._f&&!Nn(ne)?X(D,ne,J):oe(D,ne,J),nx(D,c)?w.state.next({...n,name:D,values:Kt(l)}):w.state.next({name:u.mount?D:void 0,values:Kt(l)})},B=async D=>{u.mount=!0;const K=D.target;let J=K.name,ge=!0;const ue=Ce(i,J),ne=Be=>{ge=Number.isNaN(Be)||Vi(Be)&&isNaN(Be.getTime())||Ys(Be,Ce(l,J,Be))},me=ex(t.mode),Le=ex(t.reValidateMode);if(ue){let Be,jt;const fn=K.type?Jy(ue._f):nN(D),Kn=D.type===qy.BLUR||D.type===qy.FOCUS_OUT,lo=!vN(ue._f)&&!t.resolver&&!Ce(n.errors,J)&&!ue._f.deps||wN(Kn,Ce(n.touchedFields,J),n.isSubmitted,Le,me),pe=nx(J,c,Kn);gt(l,J,fn),Kn?(!K||!K.readOnly)&&(ue._f.onBlur&&ue._f.onBlur(D),h&&h(0)):ue._f.onChange&&ue._f.onChange(D);const et=T(J,fn,Kn),$e=!gn(et)||pe;if(!Kn&&w.state.next({name:J,type:D.type,values:Kt(l)}),lo)return(y.isValid||x.isValid)&&(t.mode==="onBlur"?Kn&&C():Kn||C()),$e&&w.state.next({name:J,...pe?{}:et});if(!Kn&&pe&&w.state.next({...n}),t.resolver){const{errors:Ue}=await L([J]);if(N([J]),ne(fn),ge){const vt=rx(n.errors,i,J),Tt=rx(Ue,i,vt.name||J);Be=Tt.error,J=Tt.name,jt=gn(Ue)}}else N([J],!0),Be=(await ix(ue,c.disabled,l,_,t.shouldUseNativeValidation))[J],N([J]),ne(fn),ge&&(Be?jt=!1:(y.isValid||x.isValid)&&(jt=await M(i,!0)));ge&&(ue._f.deps&&(!Array.isArray(ue._f.deps)||ue._f.deps.length>0)&&Q(ue._f.deps),O(J,jt,Be,et))}},U=(D,K)=>{if(Ce(n.errors,K)&&D.focus)return D.focus(),1},Q=async(D,K={})=>{let J,ge;const ue=hl(D);if(t.resolver){const ne=await V(Nt(D)?D:ue);J=gn(ne),ge=D?!ue.some(me=>Ce(ne,me)):J}else D?(ge=(await Promise.all(ue.map(async ne=>{const me=Ce(i,ne);return await M(me&&me._f?{[ne]:me}:me)}))).every(Boolean),!(!ge&&!n.isValid)&&C()):ge=J=await M(i);return w.state.next({...!$n(D)||(y.isValid||x.isValid)&&J!==n.isValid?{}:{name:D},...t.resolver||!D?{isValid:J}:{},errors:n.errors}),K.shouldFocus&&!ge&&pl(i,U,D?ue:c.mount),ge},I=(D,K)=>{let J={...u.mount?l:o};return K&&(J=zw(K.dirtyFields?n.dirtyFields:n.touchedFields,J)),Nt(D)?J:$n(D)?Ce(J,D):D.map(ge=>Ce(J,ge))},Y=(D,K)=>({invalid:!!Ce((K||n).errors,D),isDirty:!!Ce((K||n).dirtyFields,D),error:Ce((K||n).errors,D),isValidating:!!Ce(n.validatingFields,D),isTouched:!!Ce((K||n).touchedFields,D)}),je=D=>{D&&hl(D).forEach(K=>Vt(n.errors,K)),w.state.next({errors:D?n.errors:{}})},fe=(D,K,J)=>{const ge=(Ce(i,D,{_f:{}})._f||{}).ref,ue=Ce(n.errors,D)||{},{ref:ne,message:me,type:Le,...Be}=ue;gt(n.errors,D,{...Be,...K,ref:ge}),w.state.next({name:D,errors:n.errors,isValid:!1}),J&&J.shouldFocus&&ge&&ge.focus&&ge.focus()},Ne=(D,K)=>Cr(D)?w.state.subscribe({next:J=>"values"in J&&D(ee(void 0,K),J)}):ee(D,K,!0),te=D=>w.state.subscribe({next:K=>{xN(D.name,K.name,D.exact)&&yN(K,D.formState||y,rt,D.reRenderRoot)&&D.callback({values:{...l},...n,...K,defaultValues:o})}}).unsubscribe,re=D=>(u.mount=!0,x={...x,...D.formState},te({...D,formState:{...g,...D.formState}})),ve=(D,K={})=>{for(const J of D?hl(D):c.mount)c.mount.delete(J),c.array.delete(J),K.keepValue||(Vt(i,J),Vt(l,J)),!K.keepError&&Vt(n.errors,J),!K.keepDirty&&Vt(n.dirtyFields,J),!K.keepTouched&&Vt(n.touchedFields,J),!K.keepIsValidating&&Vt(n.validatingFields,J),!t.shouldUnregister&&!K.keepDefaultValue&&Vt(o,J);w.state.next({values:Kt(l)}),w.state.next({...n,...K.keepDirty?{isDirty:W()}:{}}),!K.keepIsValid&&C()},Oe=({disabled:D,name:K})=>{if(Mr(D)&&u.mount||D||c.disabled.has(K)){const ue=c.disabled.has(K)!==!!D;D?c.disabled.add(K):c.disabled.delete(K),ue&&u.mount&&!u.action&&C()}},Te=(D,K={})=>{let J=Ce(i,D);const ge=Mr(K.disabled)||Mr(t.disabled);return gt(i,D,{...J||{},_f:{...J&&J._f?J._f:{ref:{name:D}},name:D,mount:!0,...K}}),c.mount.add(D),J?Oe({disabled:Mr(K.disabled)?K.disabled:t.disabled,name:D}):P(D,!0,K.value),{...ge?{disabled:K.disabled||t.disabled}:{},...t.progressive?{required:!!K.required,min:al(K.min),max:al(K.max),minLength:al(K.minLength),maxLength:al(K.maxLength),pattern:al(K.pattern)}:{},name:D,onChange:B,onBlur:B,ref:ue=>{if(ue){Te(D,K),J=Ce(i,D);const ne=Nt(ue.value)&&ue.querySelectorAll&&ue.querySelectorAll("input,select,textarea")[0]||ue,me=dN(ne),Le=J._f.refs||[];if(me?Le.find(Be=>Be===ne):ne===J._f.ref)return;gt(i,D,{_f:{...J._f,...me?{refs:[...Le.filter(yh),ne,...Array.isArray(Ce(o,D))?[{}]:[]],ref:{type:ne.type,name:D}}:{ref:ne}}}),P(D,!1,void 0,ne)}else J=Ce(i,D,{}),J._f&&(J._f.mount=!1),(t.shouldUnregister||K.shouldUnregister)&&!(sN(c.array,D)&&u.action)&&c.unMount.add(D)}}},Fe=()=>t.shouldFocusError&&pl(i,U,c.mount),We=D=>{Mr(D)&&(w.state.next({disabled:D}),pl(i,(K,J)=>{const ge=Ce(i,J);ge&&(K.disabled=ge._f.disabled||D,Array.isArray(ge._f.refs)&&ge._f.refs.forEach(ue=>{ue.disabled=ge._f.disabled||D}))},0,!1))},ft=(D,K)=>async J=>{let ge;J&&(J.preventDefault&&J.preventDefault(),J.persist&&J.persist());let ue=Kt(l);if(w.state.next({isSubmitting:!0}),t.resolver){const{errors:ne,values:me}=await L();N(),n.errors=ne,ue=Kt(me)}else await M(i);if(c.disabled.size)for(const ne of c.disabled)Vt(ue,ne);if(Vt(n.errors,"root"),gn(n.errors)){w.state.next({errors:{}});try{await D(ue,J)}catch(ne){ge=ne}}else K&&await K({...n.errors},J),Fe(),setTimeout(Fe);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:gn(n.errors)&&!ge,submitCount:n.submitCount+1,errors:n.errors}),ge)throw ge},Mt=(D,K={})=>{Ce(i,D)&&(Nt(K.defaultValue)?ie(D,Kt(Ce(o,D))):(ie(D,K.defaultValue),gt(o,D,Kt(K.defaultValue))),K.keepTouched||Vt(n.touchedFields,D),K.keepDirty||(Vt(n.dirtyFields,D),n.isDirty=K.defaultValue?W(D,Kt(Ce(o,D))):W()),K.keepError||(Vt(n.errors,D),y.isValid&&C()),w.state.next({...n}))},tn=(D,K={})=>{const J=D?Kt(D):o,ge=Kt(J),ue=gn(D),ne=ue?o:ge;if(K.keepDefaultValues||(o=J),!K.keepValues){if(K.keepDirtyValues){const me=new Set([...c.mount,...Object.keys(Do(o,l))]);for(const Le of Array.from(me)){const Be=Ce(n.dirtyFields,Le),jt=Ce(l,Le),fn=Ce(ne,Le);Be&&!Nt(jt)?gt(ne,Le,jt):!Be&&!Nt(fn)&&ie(Le,fn)}}else{if($p&&Nt(D))for(const me of c.mount){const Le=Ce(i,me);if(Le&&Le._f){const Be=Array.isArray(Le._f.refs)?Le._f.refs[0]:Le._f.ref;if(Ru(Be)){const jt=Be.closest("form");if(jt){jt.reset();break}}}}if(K.keepFieldsRef)for(const me of c.mount)ie(me,Ce(ne,me));else i={}}l=t.shouldUnregister?K.keepDefaultValues?Kt(o):{}:Kt(ne),w.array.next({values:{...ne}}),w.state.next({values:{...ne}})}c={mount:K.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!y.isValid||!!K.keepIsValid||!!K.keepDirtyValues||!t.shouldUnregister&&!gn(ne),u.watch=!!t.shouldUnregister,u.keepIsValid=!!K.keepIsValid,u.action=!1,K.keepErrors||(n.errors={}),w.state.next({submitCount:K.keepSubmitCount?n.submitCount:0,isDirty:ue?!1:K.keepDirty?n.isDirty:!!(K.keepDefaultValues&&!Ys(D,o)),isSubmitted:K.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ue?{}:K.keepDirtyValues?K.keepDefaultValues&&l?Do(o,l):n.dirtyFields:K.keepDefaultValues&&D?Do(o,D):K.keepDirty?n.dirtyFields:{},touchedFields:K.keepTouched?n.touchedFields:{},errors:K.keepErrors?n.errors:{},isSubmitSuccessful:K.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Xt=(D,K)=>tn(Cr(D)?D(l):D,{...t.resetOptions,...K}),Dt=(D,K={})=>{const J=Ce(i,D),ge=J&&J._f;if(ge){const ue=ge.refs?ge.refs[0]:ge.ref;ue.focus&&setTimeout(()=>{ue.focus(),K.shouldSelect&&Cr(ue.select)&&ue.select()})}},rt=D=>{n={...n,...D}},On={control:{register:Te,unregister:ve,getFieldState:Y,handleSubmit:ft,setError:fe,_subscribe:te,_runSchema:L,_updateIsValidating:N,_focusError:Fe,_getWatch:ee,_getDirty:W,_setValid:C,_setFieldArray:k,_setDisabledField:Oe,_setErrors:j,_getFieldArray:se,_reset:tn,_resetDefaultValues:()=>Cr(t.defaultValues)&&t.defaultValues().then(D=>{Xt(D,t.resetOptions),w.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:We,_subjects:w,_proxyFormState:y,get _fields(){return i},get _formValues(){return l},get _state(){return u},set _state(D){u=D},get _defaultValues(){return o},get _names(){return c},set _names(D){c=D},get _formState(){return n},get _options(){return t},set _options(D){t={...t,...D}}},subscribe:re,trigger:Q,register:Te,handleSubmit:ft,watch:Ne,setValue:ie,getValues:I,reset:Xt,resetField:Mt,clearErrors:je,unregister:ve,setError:fe,setFocus:Dt,getFieldState:Y};return{...On,formControl:On}}function _N(e={}){const t=at.useRef(void 0),n=at.useRef(void 0),[i,o]=at.useState({isDirty:!1,isValidating:!1,isLoading:Cr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Cr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!Cr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...c}=kN(e);t.current={...c,formState:i}}const l=t.current.control;return l._options=e,lN(()=>{const u=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(c=>({...c,isReady:!0})),l._formState.isReady=!0,u},[l]),at.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),at.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),at.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),at.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),at.useEffect(()=>{if(l._proxyFormState.isDirty){const u=l._getDirty();u!==i.isDirty&&l._subjects.state.next({isDirty:u})}},[l,i.isDirty]),at.useEffect(()=>{var u;e.values&&!Ys(e.values,n.current)?(l._reset(e.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((u=l._options.resetOptions)===null||u===void 0)&&u.keepIsValid||l._setValid(),n.current=e.values,o(c=>({...c}))):l._resetDefaultValues()},[l,e.values]),at.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),t.current.formState=at.useMemo(()=>aN(i,l),[l,i]),t.current}const ox=(e,t,n)=>{if(e&&"reportValidity"in e){const i=Ce(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},Hw=(e,t)=>{for(const n in t.fields){const i=t.fields[n];i&&i.ref&&"reportValidity"in i.ref?ox(i.ref,n,e):i.refs&&i.refs.forEach(o=>ox(o,n,e))}},jN=(e,t)=>{t.shouldUseNativeValidation&&Hw(e,t);const n={};for(const i in e){const o=Ce(t.fields,i),l=Object.assign(e[i]||{},{ref:o&&o.ref});if(EN(t.names||Object.keys(e),i)){const u=Object.assign({},Ce(n,i));gt(u,"root",l),gt(n,i,u)}else gt(n,i,l)}return n},EN=(e,t)=>e.some(n=>n.startsWith(t+"."));var RN=function(e,t){for(var n={};e.length;){var i=e[0],o=i.code,l=i.message,u=i.path.join(".");if(!n[u])if("unionErrors"in i){var c=i.unionErrors[0].errors[0];n[u]={message:c.message,type:c.code}}else n[u]={message:l,type:o};if("unionErrors"in i&&i.unionErrors.forEach(function(g){return g.errors.forEach(function(y){return e.push(y)})}),t){var h=n[u].types,m=h&&h[i.code];n[u]=Dw(u,t,n,o,m?[].concat(m,i.message):i.message)}e.shift()}return n},NN=function(e,t,n){return n===void 0&&(n={}),function(i,o,l){try{return Promise.resolve((function(u,c){try{var h=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(m){return l.shouldUseNativeValidation&&Hw({},l),{errors:{},values:n.raw?i:m}})}catch(m){return c(m)}return h&&h.then?h.then(void 0,c):h})(0,function(u){if((function(c){return Array.isArray(c==null?void 0:c.errors)})(u))return{values:{},errors:jN(RN(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}}},lt;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const l={};for(const u of o)l[u]=u;return l},e.getValidEnumValues=o=>{const l=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),u={};for(const c of l)u[c]=o[c];return e.objectValues(u)},e.objectValues=o=>e.objectKeys(o).map(function(l){return o[l]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&l.push(u);return l},e.find=(o,l)=>{for(const u of o)if(l(u))return u},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function i(o,l=" | "){return o.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}e.joinValues=i,e.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(lt||(lt={}));var ax;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ax||(ax={}));const _e=lt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gs=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return Number.isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},he=lt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class xs extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(l){return l.message},i={_errors:[]},o=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(o);else if(u.code==="invalid_return_type")o(u.returnTypeError);else if(u.code==="invalid_arguments")o(u.argumentsError);else if(u.path.length===0)i._errors.push(n(u));else{let c=i,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(n(u))):c[m]=c[m]||{_errors:[]},c=c[m],h++}}};return o(this),i}static assert(t){if(!(t instanceof xs))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,lt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},i=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(t(o))}else i.push(t(o));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}xs.create=e=>new xs(e);const Gh=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===_e.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,lt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${lt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${lt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${lt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:lt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,lt.assertNever(e)}return{message:n}};let PN=Gh;function TN(){return PN}const ON=e=>{const{data:t,path:n,errorMaps:i,issueData:o}=e,l=[...n,...o.path||[]],u={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let c="";const h=i.filter(m=>!!m).slice().reverse();for(const m of h)c=m(u,{data:t,defaultError:c}).message;return{...o,path:l,message:c}};function we(e,t){const n=TN(),i=ON({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Gh?void 0:Gh].filter(o=>!!o)});e.common.issues.push(i)}class Wn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const i=[];for(const o of n){if(o.status==="aborted")return ze;o.status==="dirty"&&t.dirty(),i.push(o.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,n){const i=[];for(const o of n){const l=await o.key,u=await o.value;i.push({key:l,value:u})}return Wn.mergeObjectSync(t,i)}static mergeObjectSync(t,n){const i={};for(const o of n){const{key:l,value:u}=o;if(l.status==="aborted"||u.status==="aborted")return ze;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||o.alwaysSet)&&(i[l.value]=u.value)}return{status:t.value,value:i}}}const ze=Object.freeze({status:"aborted"}),cl=e=>({status:"dirty",value:e}),lr=e=>({status:"valid",value:e}),lx=e=>e.status==="aborted",cx=e=>e.status==="dirty",ia=e=>e.status==="valid",Pu=e=>typeof Promise<"u"&&e instanceof Promise;var Re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Re||(Re={}));class mi{constructor(t,n,i,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=i,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ux=(e,t)=>{if(ia(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new xs(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:o}=e;if(t&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(u,c)=>{const{message:h}=e;return u.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:h??i??c.defaultError}:u.code!=="invalid_type"?{message:c.defaultError}:{message:h??n??c.defaultError}},description:o}}class it{get description(){return this._def.description}_getType(t){return Gs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Wn,ctx:{common:t.parent.common,data:t.data,parsedType:Gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Pu(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const i=this.safeParse(t,n);if(i.success)return i.data;throw i.error}safeParse(t,n){const i={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gs(t)},o=this._parseSync({data:t,path:i.path,parent:i});return ux(i,o)}"~validate"(t){var i,o;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gs(t)};if(!this["~standard"].async)try{const l=this._parseSync({data:t,path:[],parent:n});return ia(l)?{value:l.value}:{issues:n.common.issues}}catch(l){(o=(i=l==null?void 0:l.message)==null?void 0:i.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(l=>ia(l)?{value:l.value}:{issues:n.common.issues})}async parseAsync(t,n){const i=await this.safeParseAsync(t,n);if(i.success)return i.data;throw i.error}async safeParseAsync(t,n){const i={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gs(t)},o=this._parse({data:t,path:i.path,parent:i}),l=await(Pu(o)?o:Promise.resolve(o));return ux(i,l)}refine(t,n){const i=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const u=t(o),c=()=>l.addIssue({code:he.custom,...i(o)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(c(),!1)):u?!0:(c(),!1)})}refinement(t,n){return this._refinement((i,o)=>t(i)?!0:(o.addIssue(typeof n=="function"?n(i,o):n),!1))}_refinement(t){return new aa({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return hi.create(this,this._def)}nullable(){return la.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $r.create(this)}promise(){return Iu.create(this,this._def)}or(t){return Ou.create([this,t],this._def)}and(t){return Au.create(this,t,this._def)}transform(t){return new aa({...Ze(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Xh({...Ze(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new tP({typeName:Ve.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Jh({...Ze(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Kp.create(this,t)}readonly(){return ep.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const AN=/^c[^\s-]{8,}$/i,IN=/^[0-9a-z]+$/,MN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,LN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FN=/^[a-z0-9_-]{21}$/i,DN=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,zN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,VN=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$N="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xh;const BN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,UN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,WN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,HN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,KN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,QN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kw="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qN=new RegExp(`^${Kw}$`);function Qw(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ZN(e){return new RegExp(`^${Qw(e)}$`)}function GN(e){let t=`${Kw}T${Qw(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function YN(e,t){return!!((t==="v4"||!t)&&BN.test(e)||(t==="v6"||!t)&&WN.test(e))}function XN(e,t){if(!DN.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(i));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function JN(e,t){return!!((t==="v4"||!t)&&UN.test(e)||(t==="v6"||!t)&&HN.test(e))}class ci extends it{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){const l=this._getOrReturnCtx(t);return we(l,{code:he.invalid_type,expected:_e.string,received:l.parsedType}),ze}const i=new Wn;let o;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:he.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="max")t.data.length>l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:he.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,c=t.data.length<l.value;(u||c)&&(o=this._getOrReturnCtx(t,o),u?we(o,{code:he.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):c&&we(o,{code:he.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),i.dirty())}else if(l.kind==="email")VN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"email",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="emoji")xh||(xh=new RegExp($N,"u")),xh.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"emoji",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="uuid")LN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"uuid",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="nanoid")FN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"nanoid",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid")AN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cuid",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid2")IN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cuid2",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="ulid")MN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"ulid",code:he.invalid_string,message:l.message}),i.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),we(o,{validation:"url",code:he.invalid_string,message:l.message}),i.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"regex",code:he.invalid_string,message:l.message}),i.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(t,o),we(o,{code:he.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),i.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(o=this._getOrReturnCtx(t,o),we(o,{code:he.invalid_string,validation:{startsWith:l.value},message:l.message}),i.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(o=this._getOrReturnCtx(t,o),we(o,{code:he.invalid_string,validation:{endsWith:l.value},message:l.message}),i.dirty()):l.kind==="datetime"?GN(l).test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:he.invalid_string,validation:"datetime",message:l.message}),i.dirty()):l.kind==="date"?qN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:he.invalid_string,validation:"date",message:l.message}),i.dirty()):l.kind==="time"?ZN(l).test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{code:he.invalid_string,validation:"time",message:l.message}),i.dirty()):l.kind==="duration"?zN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"duration",code:he.invalid_string,message:l.message}),i.dirty()):l.kind==="ip"?YN(t.data,l.version)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"ip",code:he.invalid_string,message:l.message}),i.dirty()):l.kind==="jwt"?XN(t.data,l.alg)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"jwt",code:he.invalid_string,message:l.message}),i.dirty()):l.kind==="cidr"?JN(t.data,l.version)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"cidr",code:he.invalid_string,message:l.message}),i.dirty()):l.kind==="base64"?KN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"base64",code:he.invalid_string,message:l.message}),i.dirty()):l.kind==="base64url"?QN.test(t.data)||(o=this._getOrReturnCtx(t,o),we(o,{validation:"base64url",code:he.invalid_string,message:l.message}),i.dirty()):lt.assertNever(l);return{status:i.value,value:t.data}}_regex(t,n,i){return this.refinement(o=>t.test(o),{validation:n,code:he.invalid_string,...Re.errToObj(i)})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Re.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Re.errToObj(n)})}nonempty(t){return this.min(1,Re.errToObj(t))}trim(){return new ci({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ci({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ci({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ci.create=e=>new ci({checks:[],typeName:Ve.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});function eP(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,o=n>i?n:i,l=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return l%u/10**o}class bl extends it{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_e.number){const l=this._getOrReturnCtx(t);return we(l,{code:he.invalid_type,expected:_e.number,received:l.parsedType}),ze}let i;const o=new Wn;for(const l of this._def.checks)l.kind==="int"?lt.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:he.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:he.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:he.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?eP(t.data,l.value)!==0&&(i=this._getOrReturnCtx(t,i),we(i,{code:he.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:he.not_finite,message:l.message}),o.dirty()):lt.assertNever(l);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,i,o){return new bl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:Re.toString(o)}]})}_addCheck(t){return new bl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&<.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(n)&&Number.isFinite(t)}}bl.create=e=>new bl({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Cl extends it{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_e.bigint)return this._getInvalidInput(t);let i;const o=new Wn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:he.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:he.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),we(i,{code:he.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):lt.assertNever(l);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return we(n,{code:he.invalid_type,expected:_e.bigint,received:n.parsedType}),ze}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,i,o){return new Cl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:i,message:Re.toString(o)}]})}_addCheck(t){return new Cl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Cl.create=e=>new Cl({checks:[],typeName:Ve.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});class dx extends it{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){const i=this._getOrReturnCtx(t);return we(i,{code:he.invalid_type,expected:_e.boolean,received:i.parsedType}),ze}return lr(t.data)}}dx.create=e=>new dx({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Tu extends it{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){const l=this._getOrReturnCtx(t);return we(l,{code:he.invalid_type,expected:_e.date,received:l.parsedType}),ze}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return we(l,{code:he.invalid_date}),ze}const i=new Wn;let o;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:he.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),i.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(o=this._getOrReturnCtx(t,o),we(o,{code:he.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),i.dirty()):lt.assertNever(l);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Tu({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Tu.create=e=>new Tu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ze(e)});class fx extends it{_parse(t){if(this._getType(t)!==_e.symbol){const i=this._getOrReturnCtx(t);return we(i,{code:he.invalid_type,expected:_e.symbol,received:i.parsedType}),ze}return lr(t.data)}}fx.create=e=>new fx({typeName:Ve.ZodSymbol,...Ze(e)});class hx extends it{_parse(t){if(this._getType(t)!==_e.undefined){const i=this._getOrReturnCtx(t);return we(i,{code:he.invalid_type,expected:_e.undefined,received:i.parsedType}),ze}return lr(t.data)}}hx.create=e=>new hx({typeName:Ve.ZodUndefined,...Ze(e)});class px extends it{_parse(t){if(this._getType(t)!==_e.null){const i=this._getOrReturnCtx(t);return we(i,{code:he.invalid_type,expected:_e.null,received:i.parsedType}),ze}return lr(t.data)}}px.create=e=>new px({typeName:Ve.ZodNull,...Ze(e)});class mx extends it{constructor(){super(...arguments),this._any=!0}_parse(t){return lr(t.data)}}mx.create=e=>new mx({typeName:Ve.ZodAny,...Ze(e)});class gx extends it{constructor(){super(...arguments),this._unknown=!0}_parse(t){return lr(t.data)}}gx.create=e=>new gx({typeName:Ve.ZodUnknown,...Ze(e)});class gi extends it{_parse(t){const n=this._getOrReturnCtx(t);return we(n,{code:he.invalid_type,expected:_e.never,received:n.parsedType}),ze}}gi.create=e=>new gi({typeName:Ve.ZodNever,...Ze(e)});class vx extends it{_parse(t){if(this._getType(t)!==_e.undefined){const i=this._getOrReturnCtx(t);return we(i,{code:he.invalid_type,expected:_e.void,received:i.parsedType}),ze}return lr(t.data)}}vx.create=e=>new vx({typeName:Ve.ZodVoid,...Ze(e)});class $r extends it{_parse(t){const{ctx:n,status:i}=this._processInputParams(t),o=this._def;if(n.parsedType!==_e.array)return we(n,{code:he.invalid_type,expected:_e.array,received:n.parsedType}),ze;if(o.exactLength!==null){const u=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(u||c)&&(we(n,{code:u?he.too_big:he.too_small,minimum:c?o.exactLength.value:void 0,maximum:u?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(we(n,{code:he.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(we(n,{code:he.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((u,c)=>o.type._parseAsync(new mi(n,u,n.path,c)))).then(u=>Wn.mergeArray(i,u));const l=[...n.data].map((u,c)=>o.type._parseSync(new mi(n,u,n.path,c)));return Wn.mergeArray(i,l)}get element(){return this._def.type}min(t,n){return new $r({...this._def,minLength:{value:t,message:Re.toString(n)}})}max(t,n){return new $r({...this._def,maxLength:{value:t,message:Re.toString(n)}})}length(t,n){return new $r({...this._def,exactLength:{value:t,message:Re.toString(n)}})}nonempty(t){return this.min(1,t)}}$r.create=(e,t)=>new $r({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ze(t)});function zo(e){if(e instanceof $t){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=hi.create(zo(i))}return new $t({...e._def,shape:()=>t})}else return e instanceof $r?new $r({...e._def,type:zo(e.element)}):e instanceof hi?hi.create(zo(e.unwrap())):e instanceof la?la.create(zo(e.unwrap())):e instanceof so?so.create(e.items.map(t=>zo(t))):e}class $t extends it{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=lt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_e.object){const m=this._getOrReturnCtx(t);return we(m,{code:he.invalid_type,expected:_e.object,received:m.parsedType}),ze}const{status:i,ctx:o}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),c=[];if(!(this._def.catchall instanceof gi&&this._def.unknownKeys==="strip"))for(const m in o.data)u.includes(m)||c.push(m);const h=[];for(const m of u){const g=l[m],y=o.data[m];h.push({key:{status:"valid",value:m},value:g._parse(new mi(o,y,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof gi){const m=this._def.unknownKeys;if(m==="passthrough")for(const g of c)h.push({key:{status:"valid",value:g},value:{status:"valid",value:o.data[g]}});else if(m==="strict")c.length>0&&(we(o,{code:he.unrecognized_keys,keys:c}),i.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const g of c){const y=o.data[g];h.push({key:{status:"valid",value:g},value:m._parse(new mi(o,y,o.path,g)),alwaysSet:g in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const m=[];for(const g of h){const y=await g.key,x=await g.value;m.push({key:y,value:x,alwaysSet:g.alwaysSet})}return m}).then(m=>Wn.mergeObjectSync(i,m)):Wn.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(t){return Re.errToObj,new $t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,i)=>{var l,u;const o=((u=(l=this._def).errorMap)==null?void 0:u.call(l,n,i).message)??i.defaultError;return n.code==="unrecognized_keys"?{message:Re.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new $t({...this._def,unknownKeys:"strip"})}passthrough(){return new $t({...this._def,unknownKeys:"passthrough"})}extend(t){return new $t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new $t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new $t({...this._def,catchall:t})}pick(t){const n={};for(const i of lt.objectKeys(t))t[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new $t({...this._def,shape:()=>n})}omit(t){const n={};for(const i of lt.objectKeys(this.shape))t[i]||(n[i]=this.shape[i]);return new $t({...this._def,shape:()=>n})}deepPartial(){return zo(this)}partial(t){const n={};for(const i of lt.objectKeys(this.shape)){const o=this.shape[i];t&&!t[i]?n[i]=o:n[i]=o.optional()}return new $t({...this._def,shape:()=>n})}required(t){const n={};for(const i of lt.objectKeys(this.shape))if(t&&!t[i])n[i]=this.shape[i];else{let l=this.shape[i];for(;l instanceof hi;)l=l._def.innerType;n[i]=l}return new $t({...this._def,shape:()=>n})}keyof(){return qw(lt.objectKeys(this.shape))}}$t.create=(e,t)=>new $t({shape:()=>e,unknownKeys:"strip",catchall:gi.create(),typeName:Ve.ZodObject,...Ze(t)});$t.strictCreate=(e,t)=>new $t({shape:()=>e,unknownKeys:"strict",catchall:gi.create(),typeName:Ve.ZodObject,...Ze(t)});$t.lazycreate=(e,t)=>new $t({shape:e,unknownKeys:"strip",catchall:gi.create(),typeName:Ve.ZodObject,...Ze(t)});class Ou extends it{_parse(t){const{ctx:n}=this._processInputParams(t),i=this._def.options;function o(l){for(const c of l)if(c.result.status==="valid")return c.result;for(const c of l)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const u=l.map(c=>new xs(c.ctx.common.issues));return we(n,{code:he.invalid_union,unionErrors:u}),ze}if(n.common.async)return Promise.all(i.map(async l=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(o);{let l;const u=[];for(const h of i){const m={...n,common:{...n.common,issues:[]},parent:null},g=h._parseSync({data:n.data,path:n.path,parent:m});if(g.status==="valid")return g;g.status==="dirty"&&!l&&(l={result:g,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const c=u.map(h=>new xs(h));return we(n,{code:he.invalid_union,unionErrors:c}),ze}}get options(){return this._def.options}}Ou.create=(e,t)=>new Ou({options:e,typeName:Ve.ZodUnion,...Ze(t)});function Yh(e,t){const n=Gs(e),i=Gs(t);if(e===t)return{valid:!0,data:e};if(n===_e.object&&i===_e.object){const o=lt.objectKeys(t),l=lt.objectKeys(e).filter(c=>o.indexOf(c)!==-1),u={...e,...t};for(const c of l){const h=Yh(e[c],t[c]);if(!h.valid)return{valid:!1};u[c]=h.data}return{valid:!0,data:u}}else if(n===_e.array&&i===_e.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let l=0;l<e.length;l++){const u=e[l],c=t[l],h=Yh(u,c);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return n===_e.date&&i===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Au extends it{_parse(t){const{status:n,ctx:i}=this._processInputParams(t),o=(l,u)=>{if(lx(l)||lx(u))return ze;const c=Yh(l.value,u.value);return c.valid?((cx(l)||cx(u))&&n.dirty(),{status:n.value,value:c.data}):(we(i,{code:he.invalid_intersection_types}),ze)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,u])=>o(l,u)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Au.create=(e,t,n)=>new Au({left:e,right:t,typeName:Ve.ZodIntersection,...Ze(n)});class so extends it{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==_e.array)return we(i,{code:he.invalid_type,expected:_e.array,received:i.parsedType}),ze;if(i.data.length<this._def.items.length)return we(i,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ze;!this._def.rest&&i.data.length>this._def.items.length&&(we(i,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...i.data].map((u,c)=>{const h=this._def.items[c]||this._def.rest;return h?h._parse(new mi(i,u,i.path,c)):null}).filter(u=>!!u);return i.common.async?Promise.all(l).then(u=>Wn.mergeArray(n,u)):Wn.mergeArray(n,l)}get items(){return this._def.items}rest(t){return new so({...this._def,rest:t})}}so.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new so({items:e,typeName:Ve.ZodTuple,rest:null,...Ze(t)})};class yx extends it{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==_e.map)return we(i,{code:he.invalid_type,expected:_e.map,received:i.parsedType}),ze;const o=this._def.keyType,l=this._def.valueType,u=[...i.data.entries()].map(([c,h],m)=>({key:o._parse(new mi(i,c,i.path,[m,"key"])),value:l._parse(new mi(i,h,i.path,[m,"value"]))}));if(i.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,g=await h.value;if(m.status==="aborted"||g.status==="aborted")return ze;(m.status==="dirty"||g.status==="dirty")&&n.dirty(),c.set(m.value,g.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const h of u){const m=h.key,g=h.value;if(m.status==="aborted"||g.status==="aborted")return ze;(m.status==="dirty"||g.status==="dirty")&&n.dirty(),c.set(m.value,g.value)}return{status:n.value,value:c}}}}yx.create=(e,t,n)=>new yx({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ze(n)});class kl extends it{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.parsedType!==_e.set)return we(i,{code:he.invalid_type,expected:_e.set,received:i.parsedType}),ze;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(we(i,{code:he.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(we(i,{code:he.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function u(h){const m=new Set;for(const g of h){if(g.status==="aborted")return ze;g.status==="dirty"&&n.dirty(),m.add(g.value)}return{status:n.value,value:m}}const c=[...i.data.values()].map((h,m)=>l._parse(new mi(i,h,i.path,m)));return i.common.async?Promise.all(c).then(h=>u(h)):u(c)}min(t,n){return new kl({...this._def,minSize:{value:t,message:Re.toString(n)}})}max(t,n){return new kl({...this._def,maxSize:{value:t,message:Re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}kl.create=(e,t)=>new kl({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ze(t)});class xx extends it{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xx.create=(e,t)=>new xx({getter:e,typeName:Ve.ZodLazy,...Ze(t)});class wx extends it{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return we(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),ze}return{status:"valid",value:t.data}}get value(){return this._def.value}}wx.create=(e,t)=>new wx({value:e,typeName:Ve.ZodLiteral,...Ze(t)});function qw(e,t){return new oa({values:e,typeName:Ve.ZodEnum,...Ze(t)})}class oa extends it{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),i=this._def.values;return we(n,{expected:lt.joinValues(i),received:n.parsedType,code:he.invalid_type}),ze}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),i=this._def.values;return we(n,{received:n.data,code:he.invalid_enum_value,options:i}),ze}return lr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return oa.create(t,{...this._def,...n})}exclude(t,n=this._def){return oa.create(this.options.filter(i=>!t.includes(i)),{...this._def,...n})}}oa.create=qw;class Sx extends it{_parse(t){const n=lt.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==_e.string&&i.parsedType!==_e.number){const o=lt.objectValues(n);return we(i,{expected:lt.joinValues(o),received:i.parsedType,code:he.invalid_type}),ze}if(this._cache||(this._cache=new Set(lt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=lt.objectValues(n);return we(i,{received:i.data,code:he.invalid_enum_value,options:o}),ze}return lr(t.data)}get enum(){return this._def.values}}Sx.create=(e,t)=>new Sx({values:e,typeName:Ve.ZodNativeEnum,...Ze(t)});class Iu extends it{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.promise&&n.common.async===!1)return we(n,{code:he.invalid_type,expected:_e.promise,received:n.parsedType}),ze;const i=n.parsedType===_e.promise?n.data:Promise.resolve(n.data);return lr(i.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Iu.create=(e,t)=>new Iu({type:e,typeName:Ve.ZodPromise,...Ze(t)});class aa extends it{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:i}=this._processInputParams(t),o=this._def.effect||null,l={addIssue:u=>{we(i,u),u.fatal?n.abort():n.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const u=o.transform(i.data,l);if(i.common.async)return Promise.resolve(u).then(async c=>{if(n.value==="aborted")return ze;const h=await this._def.schema._parseAsync({data:c,path:i.path,parent:i});return h.status==="aborted"?ze:h.status==="dirty"||n.value==="dirty"?cl(h.value):h});{if(n.value==="aborted")return ze;const c=this._def.schema._parseSync({data:u,path:i.path,parent:i});return c.status==="aborted"?ze:c.status==="dirty"||n.value==="dirty"?cl(c.value):c}}if(o.type==="refinement"){const u=c=>{const h=o.refinement(c,l);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(i.common.async===!1){const c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return c.status==="aborted"?ze:(c.status==="dirty"&&n.dirty(),u(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>c.status==="aborted"?ze:(c.status==="dirty"&&n.dirty(),u(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ia(u))return ze;const c=o.transform(u.value,l);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>ia(u)?Promise.resolve(o.transform(u.value,l)).then(c=>({status:n.value,value:c})):ze);lt.assertNever(o)}}aa.create=(e,t,n)=>new aa({schema:e,typeName:Ve.ZodEffects,effect:t,...Ze(n)});aa.createWithPreprocess=(e,t,n)=>new aa({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ze(n)});class hi extends it{_parse(t){return this._getType(t)===_e.undefined?lr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}hi.create=(e,t)=>new hi({innerType:e,typeName:Ve.ZodOptional,...Ze(t)});class la extends it{_parse(t){return this._getType(t)===_e.null?lr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}la.create=(e,t)=>new la({innerType:e,typeName:Ve.ZodNullable,...Ze(t)});class Xh extends it{_parse(t){const{ctx:n}=this._processInputParams(t);let i=n.data;return n.parsedType===_e.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Xh.create=(e,t)=>new Xh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Jh extends it{_parse(t){const{ctx:n}=this._processInputParams(t),i={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Pu(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new xs(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xs(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Jh.create=(e,t)=>new Jh({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class bx extends it{_parse(t){if(this._getType(t)!==_e.nan){const i=this._getOrReturnCtx(t);return we(i,{code:he.invalid_type,expected:_e.nan,received:i.parsedType}),ze}return{status:"valid",value:t.data}}}bx.create=e=>new bx({typeName:Ve.ZodNaN,...Ze(e)});class tP extends it{_parse(t){const{ctx:n}=this._processInputParams(t),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Kp extends it{_parse(t){const{status:n,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?ze:l.status==="dirty"?(n.dirty(),cl(l.value)):this._def.out._parseAsync({data:l.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?ze:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(t,n){return new Kp({in:t,out:n,typeName:Ve.ZodPipeline})}}class ep extends it{_parse(t){const n=this._def.innerType._parse(t),i=o=>(ia(o)&&(o.value=Object.freeze(o.value)),o);return Pu(n)?n.then(o=>i(o)):i(n)}unwrap(){return this._def.innerType}}ep.create=(e,t)=>new ep({innerType:e,typeName:Ve.ZodReadonly,...Ze(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const ru=ci.create;gi.create;$r.create;const nP=$t.create;Ou.create;Au.create;so.create;const rP=oa.create;Iu.create;hi.create;la.create;const Bt=b.forwardRef(({className:e,type:t,...n},i)=>d.jsx("input",{type:t,className:pt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...n}));Bt.displayName="Input";function Cx(e,[t,n]){return Math.min(n,Math.max(t,e))}function Zw(e){const t=e+"CollectionProvider",[n,i]=ga(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=S=>{const{scope:C,children:N}=S,k=at.useRef(null),R=at.useRef(new Map).current;return d.jsx(o,{scope:C,itemMap:R,collectionRef:k,children:N})};u.displayName=t;const c=e+"CollectionSlot",h=xl(c),m=at.forwardRef((S,C)=>{const{scope:N,children:k}=S,R=l(c,N),j=It(C,R.collectionRef);return d.jsx(h,{ref:j,children:k})});m.displayName=c;const g=e+"CollectionItemSlot",y="data-radix-collection-item",x=xl(g),w=at.forwardRef((S,C)=>{const{scope:N,children:k,...R}=S,j=at.useRef(null),P=It(C,j),T=l(g,N);return at.useEffect(()=>(T.itemMap.set(j,{ref:j,...R}),()=>void T.itemMap.delete(j))),d.jsx(x,{[y]:"",ref:P,children:k})});w.displayName=g;function _(S){const C=l(e+"CollectionConsumer",S);return at.useCallback(()=>{const k=C.collectionRef.current;if(!k)return[];const R=Array.from(k.querySelectorAll(`[${y}]`));return Array.from(C.itemMap.values()).sort((T,O)=>R.indexOf(T.ref.current)-R.indexOf(O.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:u,Slot:m,ItemSlot:w},_,i]}var sP=b.createContext(void 0);function Qp(e){const t=b.useContext(sP);return e||t||"ltr"}const iP=["top","right","bottom","left"],vi=Math.min,Vn=Math.max,Mu=Math.round,su=Math.floor,Br=e=>({x:e,y:e}),oP={left:"right",right:"left",bottom:"top",top:"bottom"},aP={start:"end",end:"start"};function tp(e,t,n){return Vn(e,vi(t,n))}function ws(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function va(e){return e.split("-")[1]}function qp(e){return e==="x"?"y":"x"}function Zp(e){return e==="y"?"height":"width"}const lP=new Set(["top","bottom"]);function Vr(e){return lP.has(Ss(e))?"y":"x"}function Gp(e){return qp(Vr(e))}function cP(e,t,n){n===void 0&&(n=!1);const i=va(e),o=Gp(e),l=Zp(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Lu(u)),[u,Lu(u)]}function uP(e){const t=Lu(e);return[np(e),t,np(t)]}function np(e){return e.replace(/start|end/g,t=>aP[t])}const kx=["left","right"],_x=["right","left"],dP=["top","bottom"],fP=["bottom","top"];function hP(e,t,n){switch(e){case"top":case"bottom":return n?t?_x:kx:t?kx:_x;case"left":case"right":return t?dP:fP;default:return[]}}function pP(e,t,n,i){const o=va(e);let l=hP(Ss(e),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(np)))),l}function Lu(e){return e.replace(/left|right|bottom|top/g,t=>oP[t])}function mP(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gw(e){return typeof e!="number"?mP(e):{top:e,right:e,bottom:e,left:e}}function Fu(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function jx(e,t,n){let{reference:i,floating:o}=e;const l=Vr(t),u=Gp(t),c=Zp(u),h=Ss(t),m=l==="y",g=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,x=i[c]/2-o[c]/2;let w;switch(h){case"top":w={x:g,y:i.y-o.height};break;case"bottom":w={x:g,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y};break;case"left":w={x:i.x-o.width,y};break;default:w={x:i.x,y:i.y}}switch(va(t)){case"start":w[u]-=x*(n&&m?-1:1);break;case"end":w[u]+=x*(n&&m?-1:1);break}return w}async function gP(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:l,rects:u,elements:c,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:y="floating",altBoundary:x=!1,padding:w=0}=ws(t,e),_=Gw(w),C=c[x?y==="floating"?"reference":"floating":y],N=Fu(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(C)))==null||n?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:m,rootBoundary:g,strategy:h})),k=y==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),j=await(l.isElement==null?void 0:l.isElement(R))?await(l.getScale==null?void 0:l.getScale(R))||{x:1,y:1}:{x:1,y:1},P=Fu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:R,strategy:h}):k);return{top:(N.top-P.top+_.top)/j.y,bottom:(P.bottom-N.bottom+_.bottom)/j.y,left:(N.left-P.left+_.left)/j.x,right:(P.right-N.right+_.right)/j.x}}const vP=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,c=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y}=jx(m,i,h),x=i,w={},_=0;for(let C=0;C<c.length;C++){var S;const{name:N,fn:k}=c[C],{x:R,y:j,data:P,reset:T}=await k({x:g,y,initialPlacement:i,placement:x,strategy:o,middlewareData:w,rects:m,platform:{...u,detectOverflow:(S=u.detectOverflow)!=null?S:gP},elements:{reference:e,floating:t}});g=R??g,y=j??y,w={...w,[N]:{...w[N],...P}},T&&_<=50&&(_++,typeof T=="object"&&(T.placement&&(x=T.placement),T.rects&&(m=T.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:g,y}=jx(m,x,h)),C=-1)}return{x:g,y,placement:x,strategy:o,middlewareData:w}},yP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:u,elements:c,middlewareData:h}=t,{element:m,padding:g=0}=ws(e,t)||{};if(m==null)return{};const y=Gw(g),x={x:n,y:i},w=Gp(o),_=Zp(w),S=await u.getDimensions(m),C=w==="y",N=C?"top":"left",k=C?"bottom":"right",R=C?"clientHeight":"clientWidth",j=l.reference[_]+l.reference[w]-x[w]-l.floating[_],P=x[w]-l.reference[w],T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let O=T?T[R]:0;(!O||!await(u.isElement==null?void 0:u.isElement(T)))&&(O=c.floating[R]||l.floating[_]);const L=j/2-P/2,V=O/2-S[_]/2-1,M=vi(y[N],V),Z=vi(y[k],V),W=M,ee=O-S[_]-Z,se=O/2-S[_]/2+L,oe=tp(W,se,ee),X=!h.arrow&&va(o)!=null&&se!==oe&&l.reference[_]/2-(se<W?M:Z)-S[_]/2<0,ie=X?se<W?se-W:se-ee:0;return{[w]:x[w]+ie,data:{[w]:oe,centerOffset:se-oe-ie,...X&&{alignmentOffset:ie}},reset:X}}}),xP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:c,platform:h,elements:m}=t,{mainAxis:g=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...C}=ws(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const N=Ss(o),k=Vr(c),R=Ss(c)===c,j=await(h.isRTL==null?void 0:h.isRTL(m.floating)),P=x||(R||!S?[Lu(c)]:uP(c)),T=_!=="none";!x&&T&&P.push(...pP(c,S,_,j));const O=[c,...P],L=await h.detectOverflow(t,C),V=[];let M=((i=l.flip)==null?void 0:i.overflows)||[];if(g&&V.push(L[N]),y){const se=cP(o,u,j);V.push(L[se[0]],L[se[1]])}if(M=[...M,{placement:o,overflows:V}],!V.every(se=>se<=0)){var Z,W;const se=(((Z=l.flip)==null?void 0:Z.index)||0)+1,oe=O[se];if(oe&&(!(y==="alignment"?k!==Vr(oe):!1)||M.every(B=>Vr(B.placement)===k?B.overflows[0]>0:!0)))return{data:{index:se,overflows:M},reset:{placement:oe}};let X=(W=M.filter(ie=>ie.overflows[0]<=0).sort((ie,B)=>ie.overflows[1]-B.overflows[1])[0])==null?void 0:W.placement;if(!X)switch(w){case"bestFit":{var ee;const ie=(ee=M.filter(B=>{if(T){const U=Vr(B.placement);return U===k||U==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(U=>U>0).reduce((U,Q)=>U+Q,0)]).sort((B,U)=>B[1]-U[1])[0])==null?void 0:ee[0];ie&&(X=ie);break}case"initialPlacement":X=c;break}if(o!==X)return{reset:{placement:X}}}return{}}}};function Ex(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rx(e){return iP.some(t=>e[t]>=0)}const wP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:o="referenceHidden",...l}=ws(e,t);switch(o){case"referenceHidden":{const u=await i.detectOverflow(t,{...l,elementContext:"reference"}),c=Ex(u,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Rx(c)}}}case"escaped":{const u=await i.detectOverflow(t,{...l,altBoundary:!0}),c=Ex(u,n.floating);return{data:{escapedOffsets:c,escaped:Rx(c)}}}default:return{}}}}},Yw=new Set(["left","top"]);async function SP(e,t){const{placement:n,platform:i,elements:o}=e,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=Ss(n),c=va(n),h=Vr(n)==="y",m=Yw.has(u)?-1:1,g=l&&h?-1:1,y=ws(t,e);let{mainAxis:x,crossAxis:w,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return c&&typeof _=="number"&&(w=c==="end"?_*-1:_),h?{x:w*g,y:x*m}:{x:x*m,y:w*g}}const bP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:l,placement:u,middlewareData:c}=t,h=await SP(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:o+h.x,y:l+h.y,data:{...h,placement:u}}}}},CP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o,platform:l}=t,{mainAxis:u=!0,crossAxis:c=!1,limiter:h={fn:N=>{let{x:k,y:R}=N;return{x:k,y:R}}},...m}=ws(e,t),g={x:n,y:i},y=await l.detectOverflow(t,m),x=Vr(Ss(o)),w=qp(x);let _=g[w],S=g[x];if(u){const N=w==="y"?"top":"left",k=w==="y"?"bottom":"right",R=_+y[N],j=_-y[k];_=tp(R,_,j)}if(c){const N=x==="y"?"top":"left",k=x==="y"?"bottom":"right",R=S+y[N],j=S-y[k];S=tp(R,S,j)}const C=h.fn({...t,[w]:_,[x]:S});return{...C,data:{x:C.x-n,y:C.y-i,enabled:{[w]:u,[x]:c}}}}}},kP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:l,middlewareData:u}=t,{offset:c=0,mainAxis:h=!0,crossAxis:m=!0}=ws(e,t),g={x:n,y:i},y=Vr(o),x=qp(y);let w=g[x],_=g[y];const S=ws(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const R=x==="y"?"height":"width",j=l.reference[x]-l.floating[R]+C.mainAxis,P=l.reference[x]+l.reference[R]-C.mainAxis;w<j?w=j:w>P&&(w=P)}if(m){var N,k;const R=x==="y"?"width":"height",j=Yw.has(Ss(o)),P=l.reference[y]-l.floating[R]+(j&&((N=u.offset)==null?void 0:N[y])||0)+(j?0:C.crossAxis),T=l.reference[y]+l.reference[R]+(j?0:((k=u.offset)==null?void 0:k[y])||0)-(j?C.crossAxis:0);_<P?_=P:_>T&&(_=T)}return{[x]:w,[y]:_}}}},_P=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:l,platform:u,elements:c}=t,{apply:h=()=>{},...m}=ws(e,t),g=await u.detectOverflow(t,m),y=Ss(o),x=va(o),w=Vr(o)==="y",{width:_,height:S}=l.floating;let C,N;y==="top"||y==="bottom"?(C=y,N=x===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(N=y,C=x==="end"?"top":"bottom");const k=S-g.top-g.bottom,R=_-g.left-g.right,j=vi(S-g[C],k),P=vi(_-g[N],R),T=!t.middlewareData.shift;let O=j,L=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=R),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(O=k),T&&!x){const M=Vn(g.left,0),Z=Vn(g.right,0),W=Vn(g.top,0),ee=Vn(g.bottom,0);w?L=_-2*(M!==0||Z!==0?M+Z:Vn(g.left,g.right)):O=S-2*(W!==0||ee!==0?W+ee:Vn(g.top,g.bottom))}await h({...t,availableWidth:L,availableHeight:O});const V=await u.getDimensions(c.floating);return _!==V.width||S!==V.height?{reset:{rects:!0}}:{}}}};function ed(){return typeof window<"u"}function ya(e){return Xw(e)?(e.nodeName||"").toLowerCase():"#document"}function Un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(Xw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xw(e){return ed()?e instanceof Node||e instanceof Un(e).Node:!1}function jr(e){return ed()?e instanceof Element||e instanceof Un(e).Element:!1}function Hr(e){return ed()?e instanceof HTMLElement||e instanceof Un(e).HTMLElement:!1}function Nx(e){return!ed()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Un(e).ShadowRoot}const jP=new Set(["inline","contents"]);function Dl(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!jP.has(o)}const EP=new Set(["table","td","th"]);function RP(e){return EP.has(ya(e))}const NP=[":popover-open",":modal"];function td(e){return NP.some(t=>{try{return e.matches(t)}catch{return!1}})}const PP=["transform","translate","scale","rotate","perspective"],TP=["transform","translate","scale","rotate","perspective","filter"],OP=["paint","layout","strict","content"];function Yp(e){const t=Xp(),n=jr(e)?Er(e):e;return PP.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||TP.some(i=>(n.willChange||"").includes(i))||OP.some(i=>(n.contain||"").includes(i))}function AP(e){let t=yi(e);for(;Hr(t)&&!ca(t);){if(Yp(t))return t;if(td(t))return null;t=yi(t)}return null}function Xp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const IP=new Set(["html","body","#document"]);function ca(e){return IP.has(ya(e))}function Er(e){return Un(e).getComputedStyle(e)}function nd(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yi(e){if(ya(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nx(e)&&e.host||Qr(e);return Nx(t)?t.host:t}function Jw(e){const t=yi(e);return ca(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Dl(t)?t:Jw(t)}function _l(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jw(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),u=Un(o);if(l){const c=rp(u);return t.concat(u,u.visualViewport||[],Dl(o)?o:[],c&&n?_l(c):[])}return t.concat(o,_l(o,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eS(e){const t=Er(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Hr(e),l=o?e.offsetWidth:n,u=o?e.offsetHeight:i,c=Mu(n)!==l||Mu(i)!==u;return c&&(n=l,i=u),{width:n,height:i,$:c}}function Jp(e){return jr(e)?e:e.contextElement}function Wo(e){const t=Jp(e);if(!Hr(t))return Br(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:l}=eS(t);let u=(l?Mu(n.width):n.width)/i,c=(l?Mu(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const MP=Br(0);function tS(e){const t=Un(e);return!Xp()||!t.visualViewport?MP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Un(e)?!1:t}function io(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Jp(e);let u=Br(1);t&&(i?jr(i)&&(u=Wo(i)):u=Wo(e));const c=LP(l,n,i)?tS(l):Br(0);let h=(o.left+c.x)/u.x,m=(o.top+c.y)/u.y,g=o.width/u.x,y=o.height/u.y;if(l){const x=Un(l),w=i&&jr(i)?Un(i):i;let _=x,S=rp(_);for(;S&&i&&w!==_;){const C=Wo(S),N=S.getBoundingClientRect(),k=Er(S),R=N.left+(S.clientLeft+parseFloat(k.paddingLeft))*C.x,j=N.top+(S.clientTop+parseFloat(k.paddingTop))*C.y;h*=C.x,m*=C.y,g*=C.x,y*=C.y,h+=R,m+=j,_=Un(S),S=rp(_)}}return Fu({width:g,height:y,x:h,y:m})}function rd(e,t){const n=nd(e).scrollLeft;return t?t.left+n:io(Qr(e)).left+n}function nS(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-rd(e,n),o=n.top+t.scrollTop;return{x:i,y:o}}function FP(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const l=o==="fixed",u=Qr(i),c=t?td(t.floating):!1;if(i===u||c&&l)return n;let h={scrollLeft:0,scrollTop:0},m=Br(1);const g=Br(0),y=Hr(i);if((y||!y&&!l)&&((ya(i)!=="body"||Dl(u))&&(h=nd(i)),Hr(i))){const w=io(i);m=Wo(i),g.x=w.x+i.clientLeft,g.y=w.y+i.clientTop}const x=u&&!y&&!l?nS(u,h):Br(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+g.x+x.x,y:n.y*m.y-h.scrollTop*m.y+g.y+x.y}}function DP(e){return Array.from(e.getClientRects())}function zP(e){const t=Qr(e),n=nd(e),i=e.ownerDocument.body,o=Vn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Vn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+rd(e);const c=-n.scrollTop;return Er(i).direction==="rtl"&&(u+=Vn(t.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:c}}const Px=25;function VP(e,t){const n=Un(e),i=Qr(e),o=n.visualViewport;let l=i.clientWidth,u=i.clientHeight,c=0,h=0;if(o){l=o.width,u=o.height;const g=Xp();(!g||g&&t==="fixed")&&(c=o.offsetLeft,h=o.offsetTop)}const m=rd(i);if(m<=0){const g=i.ownerDocument,y=g.body,x=getComputedStyle(y),w=g.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,_=Math.abs(i.clientWidth-y.clientWidth-w);_<=Px&&(l-=_)}else m<=Px&&(l+=m);return{width:l,height:u,x:c,y:h}}const $P=new Set(["absolute","fixed"]);function BP(e,t){const n=io(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,l=Hr(e)?Wo(e):Br(1),u=e.clientWidth*l.x,c=e.clientHeight*l.y,h=o*l.x,m=i*l.y;return{width:u,height:c,x:h,y:m}}function Tx(e,t,n){let i;if(t==="viewport")i=VP(e,n);else if(t==="document")i=zP(Qr(e));else if(jr(t))i=BP(t,n);else{const o=tS(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fu(i)}function rS(e,t){const n=yi(e);return n===t||!jr(n)||ca(n)?!1:Er(n).position==="fixed"||rS(n,t)}function UP(e,t){const n=t.get(e);if(n)return n;let i=_l(e,[],!1).filter(c=>jr(c)&&ya(c)!=="body"),o=null;const l=Er(e).position==="fixed";let u=l?yi(e):e;for(;jr(u)&&!ca(u);){const c=Er(u),h=Yp(u);!h&&c.position==="fixed"&&(o=null),(l?!h&&!o:!h&&c.position==="static"&&!!o&&$P.has(o.position)||Dl(u)&&!h&&rS(e,u))?i=i.filter(g=>g!==u):o=c,u=yi(u)}return t.set(e,i),i}function WP(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const u=[...n==="clippingAncestors"?td(t)?[]:UP(t,this._c):[].concat(n),i],c=u[0],h=u.reduce((m,g)=>{const y=Tx(t,g,o);return m.top=Vn(y.top,m.top),m.right=vi(y.right,m.right),m.bottom=vi(y.bottom,m.bottom),m.left=Vn(y.left,m.left),m},Tx(t,c,o));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function HP(e){const{width:t,height:n}=eS(e);return{width:t,height:n}}function KP(e,t,n){const i=Hr(t),o=Qr(t),l=n==="fixed",u=io(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const h=Br(0);function m(){h.x=rd(o)}if(i||!i&&!l)if((ya(t)!=="body"||Dl(o))&&(c=nd(t)),i){const w=io(t,!0,l,t);h.x=w.x+t.clientLeft,h.y=w.y+t.clientTop}else o&&m();l&&!i&&o&&m();const g=o&&!i&&!l?nS(o,c):Br(0),y=u.left+c.scrollLeft-h.x-g.x,x=u.top+c.scrollTop-h.y-g.y;return{x:y,y:x,width:u.width,height:u.height}}function wh(e){return Er(e).position==="static"}function Ox(e,t){if(!Hr(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function sS(e,t){const n=Un(e);if(td(e))return n;if(!Hr(e)){let o=yi(e);for(;o&&!ca(o);){if(jr(o)&&!wh(o))return o;o=yi(o)}return n}let i=Ox(e,t);for(;i&&RP(i)&&wh(i);)i=Ox(i,t);return i&&ca(i)&&wh(i)&&!Yp(i)?n:i||AP(e)||n}const QP=async function(e){const t=this.getOffsetParent||sS,n=this.getDimensions,i=await n(e.floating);return{reference:KP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function qP(e){return Er(e).direction==="rtl"}const ZP={convertOffsetParentRelativeRectToViewportRelativeRect:FP,getDocumentElement:Qr,getClippingRect:WP,getOffsetParent:sS,getElementRects:QP,getClientRects:DP,getDimensions:HP,getScale:Wo,isElement:jr,isRTL:qP};function iS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function GP(e,t){let n=null,i;const o=Qr(e);function l(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function u(c,h){c===void 0&&(c=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:g,top:y,width:x,height:w}=m;if(c||t(),!x||!w)return;const _=su(y),S=su(o.clientWidth-(g+x)),C=su(o.clientHeight-(y+w)),N=su(g),R={rootMargin:-_+"px "+-S+"px "+-C+"px "+-N+"px",threshold:Vn(0,vi(1,h))||1};let j=!0;function P(T){const O=T[0].intersectionRatio;if(O!==h){if(!j)return u();O?u(!1,O):i=setTimeout(()=>{u(!1,1e-7)},1e3)}O===1&&!iS(m,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(P,{...R,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,R)}n.observe(e)}return u(!0),l}function YP(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,m=Jp(e),g=o||l?[...m?_l(m):[],..._l(t)]:[];g.forEach(N=>{o&&N.addEventListener("scroll",n,{passive:!0}),l&&N.addEventListener("resize",n)});const y=m&&c?GP(m,n):null;let x=-1,w=null;u&&(w=new ResizeObserver(N=>{let[k]=N;k&&k.target===m&&w&&(w.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var R;(R=w)==null||R.observe(t)})),n()}),m&&!h&&w.observe(m),w.observe(t));let _,S=h?io(e):null;h&&C();function C(){const N=io(e);S&&!iS(S,N)&&n(),S=N,_=requestAnimationFrame(C)}return n(),()=>{var N;g.forEach(k=>{o&&k.removeEventListener("scroll",n),l&&k.removeEventListener("resize",n)}),y==null||y(),(N=w)==null||N.disconnect(),w=null,h&&cancelAnimationFrame(_)}}const XP=bP,JP=CP,eT=xP,tT=_P,nT=wP,Ax=yP,rT=kP,sT=(e,t,n)=>{const i=new Map,o={platform:ZP,...n},l={...o.platform,_c:i};return vP(e,t,{...o,platform:l})};var iT=typeof document<"u",oT=function(){},fu=iT?b.useLayoutEffect:oT;function Du(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Du(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&e.$$typeof)&&!Du(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function oS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ix(e,t){const n=oS(e);return Math.round(t*n)/n}function Sh(e){const t=b.useRef(e);return fu(()=>{t.current=e}),t}function aT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:c=!0,whileElementsMounted:h,open:m}=e,[g,y]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,w]=b.useState(i);Du(x,i)||w(i);const[_,S]=b.useState(null),[C,N]=b.useState(null),k=b.useCallback(B=>{B!==T.current&&(T.current=B,S(B))},[]),R=b.useCallback(B=>{B!==O.current&&(O.current=B,N(B))},[]),j=l||_,P=u||C,T=b.useRef(null),O=b.useRef(null),L=b.useRef(g),V=h!=null,M=Sh(h),Z=Sh(o),W=Sh(m),ee=b.useCallback(()=>{if(!T.current||!O.current)return;const B={placement:t,strategy:n,middleware:x};Z.current&&(B.platform=Z.current),sT(T.current,O.current,B).then(U=>{const Q={...U,isPositioned:W.current!==!1};se.current&&!Du(L.current,Q)&&(L.current=Q,fa.flushSync(()=>{y(Q)}))})},[x,t,n,Z,W]);fu(()=>{m===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,y(B=>({...B,isPositioned:!1})))},[m]);const se=b.useRef(!1);fu(()=>(se.current=!0,()=>{se.current=!1}),[]),fu(()=>{if(j&&(T.current=j),P&&(O.current=P),j&&P){if(M.current)return M.current(j,P,ee);ee()}},[j,P,ee,M,V]);const oe=b.useMemo(()=>({reference:T,floating:O,setReference:k,setFloating:R}),[k,R]),X=b.useMemo(()=>({reference:j,floating:P}),[j,P]),ie=b.useMemo(()=>{const B={position:n,left:0,top:0};if(!X.floating)return B;const U=Ix(X.floating,g.x),Q=Ix(X.floating,g.y);return c?{...B,transform:"translate("+U+"px, "+Q+"px)",...oS(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:Q}},[n,c,X.floating,g.x,g.y]);return b.useMemo(()=>({...g,update:ee,refs:oe,elements:X,floatingStyles:ie}),[g,ee,oe,X,ie])}const lT=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?Ax({element:i.current,padding:o}).fn(n):{}:i?Ax({element:i,padding:o}).fn(n):{}}}},cT=(e,t)=>({...XP(e),options:[e,t]}),uT=(e,t)=>({...JP(e),options:[e,t]}),dT=(e,t)=>({...rT(e),options:[e,t]}),fT=(e,t)=>({...eT(e),options:[e,t]}),hT=(e,t)=>({...tT(e),options:[e,t]}),pT=(e,t)=>({...nT(e),options:[e,t]}),mT=(e,t)=>({...lT(e),options:[e,t]});var gT="Arrow",aS=b.forwardRef((e,t)=>{const{children:n,width:i=10,height:o=5,...l}=e;return d.jsx(ct.svg,{...l,ref:t,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});aS.displayName=gT;var vT=aS;function yT(e){const[t,n]=b.useState(void 0);return dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,c;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,c=m.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var em="Popper",[lS,cS]=ga(em),[xT,uS]=lS(em),dS=e=>{const{__scopePopper:t,children:n}=e,[i,o]=b.useState(null);return d.jsx(xT,{scope:t,anchor:i,onAnchorChange:o,children:n})};dS.displayName=em;var fS="PopperAnchor",hS=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...o}=e,l=uS(fS,n),u=b.useRef(null),c=It(t,u),h=b.useRef(null);return b.useEffect(()=>{const m=h.current;h.current=(i==null?void 0:i.current)||u.current,m!==h.current&&l.onAnchorChange(h.current)}),i?null:d.jsx(ct.div,{...o,ref:c})});hS.displayName=fS;var tm="PopperContent",[wT,ST]=lS(tm),pS=b.forwardRef((e,t)=>{var re,ve,Oe,Te,Fe,We;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:x=!1,updatePositionStrategy:w="optimized",onPlaced:_,...S}=e,C=uS(tm,n),[N,k]=b.useState(null),R=It(t,ft=>k(ft)),[j,P]=b.useState(null),T=yT(j),O=(T==null?void 0:T.width)??0,L=(T==null?void 0:T.height)??0,V=i+(l!=="center"?"-"+l:""),M=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Z=Array.isArray(m)?m:[m],W=Z.length>0,ee={padding:M,boundary:Z.filter(CT),altBoundary:W},{refs:se,floatingStyles:oe,placement:X,isPositioned:ie,middlewareData:B}=aT({strategy:"fixed",placement:V,whileElementsMounted:(...ft)=>YP(...ft,{animationFrame:w==="always"}),elements:{reference:C.anchor},middleware:[cT({mainAxis:o+L,alignmentAxis:u}),h&&uT({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?dT():void 0,...ee}),h&&fT({...ee}),hT({...ee,apply:({elements:ft,rects:Mt,availableWidth:tn,availableHeight:Xt})=>{const{width:Dt,height:rt}=Mt.reference,Pt=ft.floating.style;Pt.setProperty("--radix-popper-available-width",`${tn}px`),Pt.setProperty("--radix-popper-available-height",`${Xt}px`),Pt.setProperty("--radix-popper-anchor-width",`${Dt}px`),Pt.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),j&&mT({element:j,padding:c}),kT({arrowWidth:O,arrowHeight:L}),x&&pT({strategy:"referenceHidden",...ee})]}),[U,Q]=vS(X),I=pi(_);dn(()=>{ie&&(I==null||I())},[ie,I]);const Y=(re=B.arrow)==null?void 0:re.x,je=(ve=B.arrow)==null?void 0:ve.y,fe=((Oe=B.arrow)==null?void 0:Oe.centerOffset)!==0,[Ne,te]=b.useState();return dn(()=>{N&&te(window.getComputedStyle(N).zIndex)},[N]),d.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:ie?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(Te=B.transformOrigin)==null?void 0:Te.x,(Fe=B.transformOrigin)==null?void 0:Fe.y].join(" "),...((We=B.hide)==null?void 0:We.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(wT,{scope:n,placedSide:U,onArrowChange:P,arrowX:Y,arrowY:je,shouldHideArrow:fe,children:d.jsx(ct.div,{"data-side":U,"data-align":Q,...S,ref:R,style:{...S.style,animation:ie?void 0:"none"}})})})});pS.displayName=tm;var mS="PopperArrow",bT={top:"bottom",right:"left",bottom:"top",left:"right"},gS=b.forwardRef(function(t,n){const{__scopePopper:i,...o}=t,l=ST(mS,i),u=bT[l.placedSide];return d.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:d.jsx(vT,{...o,ref:n,style:{...o.style,display:"block"}})})});gS.displayName=mS;function CT(e){return e!==null}var kT=e=>({name:"transformOrigin",options:e,fn(t){var C,N,k;const{placement:n,rects:i,middlewareData:o}=t,u=((C=o.arrow)==null?void 0:C.centerOffset)!==0,c=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=vS(n),y={start:"0%",center:"50%",end:"100%"}[g],x=(((N=o.arrow)==null?void 0:N.x)??0)+c/2,w=(((k=o.arrow)==null?void 0:k.y)??0)+h/2;let _="",S="";return m==="bottom"?(_=u?y:`${x}px`,S=`${-h}px`):m==="top"?(_=u?y:`${x}px`,S=`${i.floating.height+h}px`):m==="right"?(_=`${-h}px`,S=u?y:`${w}px`):m==="left"&&(_=`${i.floating.width+h}px`,S=u?y:`${w}px`),{data:{x:_,y:S}}}});function vS(e){const[t,n="center"]=e.split("-");return[t,n]}var _T=dS,jT=hS,ET=pS,RT=gS;function NT(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var yS=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"}),PT="VisuallyHidden",TT=b.forwardRef((e,t)=>d.jsx(ct.span,{...e,ref:t,style:{...yS,...e.style}}));TT.displayName=PT;var OT=[" ","Enter","ArrowUp","ArrowDown"],AT=[" ","Enter"],oo="Select",[sd,id,IT]=Zw(oo),[xa]=ga(oo,[IT,cS]),od=cS(),[MT,xi]=xa(oo),[LT,FT]=xa(oo),xS=e=>{const{__scopeSelect:t,children:n,open:i,defaultOpen:o,onOpenChange:l,value:u,defaultValue:c,onValueChange:h,dir:m,name:g,autoComplete:y,disabled:x,required:w,form:_}=e,S=od(t),[C,N]=b.useState(null),[k,R]=b.useState(null),[j,P]=b.useState(!1),T=Qp(m),[O,L]=yl({prop:i,defaultProp:o??!1,onChange:l,caller:oo}),[V,M]=yl({prop:u,defaultProp:c,onChange:h,caller:oo}),Z=b.useRef(null),W=C?_||!!C.closest("form"):!0,[ee,se]=b.useState(new Set),oe=Array.from(ee).map(X=>X.props.value).join(";");return d.jsx(_T,{...S,children:d.jsxs(MT,{required:w,scope:t,trigger:C,onTriggerChange:N,valueNode:k,onValueNodeChange:R,valueNodeHasChildren:j,onValueNodeHasChildrenChange:P,contentId:fi(),value:V,onValueChange:M,open:O,onOpenChange:L,dir:T,triggerPointerDownPosRef:Z,disabled:x,children:[d.jsx(sd.Provider,{scope:t,children:d.jsx(LT,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(X=>{se(ie=>new Set(ie).add(X))},[]),onNativeOptionRemove:b.useCallback(X=>{se(ie=>{const B=new Set(ie);return B.delete(X),B})},[]),children:n})}),W?d.jsxs(zS,{"aria-hidden":!0,required:w,tabIndex:-1,name:g,autoComplete:y,value:V,onChange:X=>M(X.target.value),disabled:x,form:_,children:[V===void 0?d.jsx("option",{value:""}):null,Array.from(ee)]},oe):null]})})};xS.displayName=oo;var wS="SelectTrigger",SS=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...o}=e,l=od(n),u=xi(wS,n),c=u.disabled||i,h=It(t,u.onTriggerChange),m=id(n),g=b.useRef("touch"),[y,x,w]=$S(S=>{const C=m().filter(R=>!R.disabled),N=C.find(R=>R.value===u.value),k=BS(C,S,N);k!==void 0&&u.onValueChange(k.value)}),_=S=>{c||(u.onOpenChange(!0),w()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return d.jsx(jT,{asChild:!0,...l,children:d.jsx(ct.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":VS(u.value)?"":void 0,...o,ref:h,onClick:nt(o.onClick,S=>{S.currentTarget.focus(),g.current!=="mouse"&&_(S)}),onPointerDown:nt(o.onPointerDown,S=>{g.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(_(S),S.preventDefault())}),onKeyDown:nt(o.onKeyDown,S=>{const C=y.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(C&&S.key===" ")&&OT.includes(S.key)&&(_(),S.preventDefault())})})})});SS.displayName=wS;var bS="SelectValue",CS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:u="",...c}=e,h=xi(bS,n),{onValueNodeHasChildrenChange:m}=h,g=l!==void 0,y=It(t,h.onValueNodeChange);return dn(()=>{m(g)},[m,g]),d.jsx(ct.span,{...c,ref:y,style:{pointerEvents:"none"},children:VS(h.value)?d.jsx(d.Fragment,{children:u}):l})});CS.displayName=bS;var DT="SelectIcon",kS=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...o}=e;return d.jsx(ct.span,{"aria-hidden":!0,...o,ref:t,children:i||"▼"})});kS.displayName=DT;var zT="SelectPortal",_S=e=>d.jsx(Mp,{asChild:!0,...e});_S.displayName=zT;var ao="SelectContent",jS=b.forwardRef((e,t)=>{const n=xi(ao,e.__scopeSelect),[i,o]=b.useState();if(dn(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?fa.createPortal(d.jsx(ES,{scope:e.__scopeSelect,children:d.jsx(sd.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),l):null}return d.jsx(RS,{...e,ref:t})});jS.displayName=ao;var wr=10,[ES,wi]=xa(ao),VT="SelectContentImpl",$T=xl("SelectContent.RemoveScroll"),RS=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:u,side:c,sideOffset:h,align:m,alignOffset:g,arrowPadding:y,collisionBoundary:x,collisionPadding:w,sticky:_,hideWhenDetached:S,avoidCollisions:C,...N}=e,k=xi(ao,n),[R,j]=b.useState(null),[P,T]=b.useState(null),O=It(t,re=>j(re)),[L,V]=b.useState(null),[M,Z]=b.useState(null),W=id(n),[ee,se]=b.useState(!1),oe=b.useRef(!1);b.useEffect(()=>{if(R)return xw(R)},[R]),uw();const X=b.useCallback(re=>{const[ve,...Oe]=W().map(We=>We.ref.current),[Te]=Oe.slice(-1),Fe=document.activeElement;for(const We of re)if(We===Fe||(We==null||We.scrollIntoView({block:"nearest"}),We===ve&&P&&(P.scrollTop=0),We===Te&&P&&(P.scrollTop=P.scrollHeight),We==null||We.focus(),document.activeElement!==Fe))return},[W,P]),ie=b.useCallback(()=>X([L,R]),[X,L,R]);b.useEffect(()=>{ee&&ie()},[ee,ie]);const{onOpenChange:B,triggerPointerDownPosRef:U}=k;b.useEffect(()=>{if(R){let re={x:0,y:0};const ve=Te=>{var Fe,We;re={x:Math.abs(Math.round(Te.pageX)-(((Fe=U.current)==null?void 0:Fe.x)??0)),y:Math.abs(Math.round(Te.pageY)-(((We=U.current)==null?void 0:We.y)??0))}},Oe=Te=>{re.x<=10&&re.y<=10?Te.preventDefault():R.contains(Te.target)||B(!1),document.removeEventListener("pointermove",ve),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[R,B,U]),b.useEffect(()=>{const re=()=>B(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[B]);const[Q,I]=$S(re=>{const ve=W().filter(Fe=>!Fe.disabled),Oe=ve.find(Fe=>Fe.ref.current===document.activeElement),Te=BS(ve,re,Oe);Te&&setTimeout(()=>Te.ref.current.focus())}),Y=b.useCallback((re,ve,Oe)=>{const Te=!oe.current&&!Oe;(k.value!==void 0&&k.value===ve||Te)&&(V(re),Te&&(oe.current=!0))},[k.value]),je=b.useCallback(()=>R==null?void 0:R.focus(),[R]),fe=b.useCallback((re,ve,Oe)=>{const Te=!oe.current&&!Oe;(k.value!==void 0&&k.value===ve||Te)&&Z(re)},[k.value]),Ne=i==="popper"?sp:NS,te=Ne===sp?{side:c,sideOffset:h,align:m,alignOffset:g,arrowPadding:y,collisionBoundary:x,collisionPadding:w,sticky:_,hideWhenDetached:S,avoidCollisions:C}:{};return d.jsx(ES,{scope:n,content:R,viewport:P,onViewportChange:T,itemRefCallback:Y,selectedItem:L,onItemLeave:je,itemTextRefCallback:fe,focusSelectedItem:ie,selectedItemText:M,position:i,isPositioned:ee,searchRef:Q,children:d.jsx(Lp,{as:$T,allowPinchZoom:!0,children:d.jsx(Ip,{asChild:!0,trapped:k.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:nt(o,re=>{var ve;(ve=k.trigger)==null||ve.focus({preventScroll:!0}),re.preventDefault()}),children:d.jsx(Ap,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:d.jsx(Ne,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:re=>re.preventDefault(),...N,...te,onPlaced:()=>se(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:nt(N.onKeyDown,re=>{const ve=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!ve&&re.key.length===1&&I(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let Te=W().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);if(["ArrowUp","End"].includes(re.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const Fe=re.target,We=Te.indexOf(Fe);Te=Te.slice(We+1)}setTimeout(()=>X(Te)),re.preventDefault()}})})})})})})});RS.displayName=VT;var BT="SelectItemAlignedPosition",NS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...o}=e,l=xi(ao,n),u=wi(ao,n),[c,h]=b.useState(null),[m,g]=b.useState(null),y=It(t,O=>g(O)),x=id(n),w=b.useRef(!1),_=b.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:N,focusSelectedItem:k}=u,R=b.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&m&&S&&C&&N){const O=l.trigger.getBoundingClientRect(),L=m.getBoundingClientRect(),V=l.valueNode.getBoundingClientRect(),M=N.getBoundingClientRect();if(l.dir!=="rtl"){const Fe=M.left-L.left,We=V.left-Fe,ft=O.left-We,Mt=O.width+ft,tn=Math.max(Mt,L.width),Xt=window.innerWidth-wr,Dt=Cx(We,[wr,Math.max(wr,Xt-tn)]);c.style.minWidth=Mt+"px",c.style.left=Dt+"px"}else{const Fe=L.right-M.right,We=window.innerWidth-V.right-Fe,ft=window.innerWidth-O.right-We,Mt=O.width+ft,tn=Math.max(Mt,L.width),Xt=window.innerWidth-wr,Dt=Cx(We,[wr,Math.max(wr,Xt-tn)]);c.style.minWidth=Mt+"px",c.style.right=Dt+"px"}const Z=x(),W=window.innerHeight-wr*2,ee=S.scrollHeight,se=window.getComputedStyle(m),oe=parseInt(se.borderTopWidth,10),X=parseInt(se.paddingTop,10),ie=parseInt(se.borderBottomWidth,10),B=parseInt(se.paddingBottom,10),U=oe+X+ee+B+ie,Q=Math.min(C.offsetHeight*5,U),I=window.getComputedStyle(S),Y=parseInt(I.paddingTop,10),je=parseInt(I.paddingBottom,10),fe=O.top+O.height/2-wr,Ne=W-fe,te=C.offsetHeight/2,re=C.offsetTop+te,ve=oe+X+re,Oe=U-ve;if(ve<=fe){const Fe=Z.length>0&&C===Z[Z.length-1].ref.current;c.style.bottom="0px";const We=m.clientHeight-S.offsetTop-S.offsetHeight,ft=Math.max(Ne,te+(Fe?je:0)+We+ie),Mt=ve+ft;c.style.height=Mt+"px"}else{const Fe=Z.length>0&&C===Z[0].ref.current;c.style.top="0px";const ft=Math.max(fe,oe+S.offsetTop+(Fe?Y:0)+te)+Oe;c.style.height=ft+"px",S.scrollTop=ve-fe+S.offsetTop}c.style.margin=`${wr}px 0`,c.style.minHeight=Q+"px",c.style.maxHeight=W+"px",i==null||i(),requestAnimationFrame(()=>w.current=!0)}},[x,l.trigger,l.valueNode,c,m,S,C,N,l.dir,i]);dn(()=>R(),[R]);const[j,P]=b.useState();dn(()=>{m&&P(window.getComputedStyle(m).zIndex)},[m]);const T=b.useCallback(O=>{O&&_.current===!0&&(R(),k==null||k(),_.current=!1)},[R,k]);return d.jsx(WT,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:w,onScrollButtonChange:T,children:d.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:d.jsx(ct.div,{...o,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});NS.displayName=BT;var UT="SelectPopperPosition",sp=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=wr,...l}=e,u=od(n);return d.jsx(ET,{...u,...l,ref:t,align:i,collisionPadding:o,style:{boxSizing:"border-box",...l.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)"}})});sp.displayName=UT;var[WT,nm]=xa(ao,{}),ip="SelectViewport",PS=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...o}=e,l=wi(ip,n),u=nm(ip,n),c=It(t,l.onViewportChange),h=b.useRef(0);return d.jsxs(d.Fragment,{children:[d.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}),d.jsx(sd.Slot,{scope:n,children:d.jsx(ct.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:nt(o.onScroll,m=>{const g=m.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:x}=u;if(x!=null&&x.current&&y){const w=Math.abs(h.current-g.scrollTop);if(w>0){const _=window.innerHeight-wr*2,S=parseFloat(y.style.minHeight),C=parseFloat(y.style.height),N=Math.max(S,C);if(N<_){const k=N+w,R=Math.min(_,k),j=k-R;y.style.height=R+"px",y.style.bottom==="0px"&&(g.scrollTop=j>0?j:0,y.style.justifyContent="flex-end")}}}h.current=g.scrollTop})})})]})});PS.displayName=ip;var TS="SelectGroup",[HT,KT]=xa(TS),QT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,o=fi();return d.jsx(HT,{scope:n,id:o,children:d.jsx(ct.div,{role:"group","aria-labelledby":o,...i,ref:t})})});QT.displayName=TS;var OS="SelectLabel",qT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,o=KT(OS,n);return d.jsx(ct.div,{id:o.id,...i,ref:t})});qT.displayName=OS;var zu="SelectItem",[ZT,AS]=xa(zu),IS=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...u}=e,c=xi(zu,n),h=wi(zu,n),m=c.value===i,[g,y]=b.useState(l??""),[x,w]=b.useState(!1),_=It(t,k=>{var R;return(R=h.itemRefCallback)==null?void 0:R.call(h,k,i,o)}),S=fi(),C=b.useRef("touch"),N=()=>{o||(c.onValueChange(i),c.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 d.jsx(ZT,{scope:n,value:i,disabled:o,textId:S,isSelected:m,onItemTextChange:b.useCallback(k=>{y(R=>R||((k==null?void 0:k.textContent)??"").trim())},[]),children:d.jsx(sd.ItemSlot,{scope:n,value:i,disabled:o,textValue:g,children:d.jsx(ct.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:_,onFocus:nt(u.onFocus,()=>w(!0)),onBlur:nt(u.onBlur,()=>w(!1)),onClick:nt(u.onClick,()=>{C.current!=="mouse"&&N()}),onPointerUp:nt(u.onPointerUp,()=>{C.current==="mouse"&&N()}),onPointerDown:nt(u.onPointerDown,k=>{C.current=k.pointerType}),onPointerMove:nt(u.onPointerMove,k=>{var R;C.current=k.pointerType,o?(R=h.onItemLeave)==null||R.call(h):C.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:nt(u.onPointerLeave,k=>{var R;k.currentTarget===document.activeElement&&((R=h.onItemLeave)==null||R.call(h))}),onKeyDown:nt(u.onKeyDown,k=>{var j;((j=h.searchRef)==null?void 0:j.current)!==""&&k.key===" "||(AT.includes(k.key)&&N(),k.key===" "&&k.preventDefault())})})})})});IS.displayName=zu;var ul="SelectItemText",MS=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:o,...l}=e,u=xi(ul,n),c=wi(ul,n),h=AS(ul,n),m=FT(ul,n),[g,y]=b.useState(null),x=It(t,N=>y(N),h.onItemTextChange,N=>{var k;return(k=c.itemTextRefCallback)==null?void 0:k.call(c,N,h.value,h.disabled)}),w=g==null?void 0:g.textContent,_=b.useMemo(()=>d.jsx("option",{value:h.value,disabled:h.disabled,children:w},h.value),[h.disabled,h.value,w]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=m;return dn(()=>(S(_),()=>C(_)),[S,C,_]),d.jsxs(d.Fragment,{children:[d.jsx(ct.span,{id:h.textId,...l,ref:x}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?fa.createPortal(l.children,u.valueNode):null]})});MS.displayName=ul;var LS="SelectItemIndicator",FS=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return AS(LS,n).isSelected?d.jsx(ct.span,{"aria-hidden":!0,...i,ref:t}):null});FS.displayName=LS;var op="SelectScrollUpButton",GT=b.forwardRef((e,t)=>{const n=wi(op,e.__scopeSelect),i=nm(op,e.__scopeSelect),[o,l]=b.useState(!1),u=It(t,i.onScrollButtonChange);return dn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const m=h.scrollTop>0;l(m)};const h=n.viewport;return c(),h.addEventListener("scroll",c),()=>h.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?d.jsx(DS,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:h}=n;c&&h&&(c.scrollTop=c.scrollTop-h.offsetHeight)}}):null});GT.displayName=op;var ap="SelectScrollDownButton",YT=b.forwardRef((e,t)=>{const n=wi(ap,e.__scopeSelect),i=nm(ap,e.__scopeSelect),[o,l]=b.useState(!1),u=It(t,i.onScrollButtonChange);return dn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const m=h.scrollHeight-h.clientHeight,g=Math.ceil(h.scrollTop)<m;l(g)};const h=n.viewport;return c(),h.addEventListener("scroll",c),()=>h.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?d.jsx(DS,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:h}=n;c&&h&&(c.scrollTop=c.scrollTop+h.offsetHeight)}}):null});YT.displayName=ap;var DS=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=e,l=wi("SelectScrollButton",n),u=b.useRef(null),c=id(n),h=b.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return b.useEffect(()=>()=>h(),[h]),dn(()=>{var g;const m=c().find(y=>y.ref.current===document.activeElement);(g=m==null?void 0:m.ref.current)==null||g.scrollIntoView({block:"nearest"})},[c]),d.jsx(ct.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:nt(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:nt(o.onPointerMove,()=>{var m;(m=l.onItemLeave)==null||m.call(l),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:nt(o.onPointerLeave,()=>{h()})})}),XT="SelectSeparator",JT=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return d.jsx(ct.div,{"aria-hidden":!0,...i,ref:t})});JT.displayName=XT;var lp="SelectArrow",e2=b.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,o=od(n),l=xi(lp,n),u=wi(lp,n);return l.open&&u.position==="popper"?d.jsx(RT,{...o,...i,ref:t}):null});e2.displayName=lp;var t2="SelectBubbleInput",zS=b.forwardRef(({__scopeSelect:e,value:t,...n},i)=>{const o=b.useRef(null),l=It(i,o),u=NT(t);return b.useEffect(()=>{const c=o.current;if(!c)return;const h=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&g){const y=new Event("change",{bubbles:!0});g.call(c,t),c.dispatchEvent(y)}},[u,t]),d.jsx(ct.select,{...n,style:{...yS,...n.style},ref:l,defaultValue:t})});zS.displayName=t2;function VS(e){return e===""||e===void 0}function $S(e){const t=pi(e),n=b.useRef(""),i=b.useRef(0),o=b.useCallback(u=>{const c=n.current+u;t(c),(function h(m){n.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(c)},[t]),l=b.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function BS(e,t,n){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=n2(e,Math.max(l,0));o.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.textValue.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}function n2(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var r2=xS,s2=SS,i2=CS,o2=kS,a2=_S,l2=jS,c2=PS,u2=IS,d2=MS,f2=FS;const Pn=r2,Tn=i2,yn=b.forwardRef(({className:e,children:t,...n},i)=>d.jsxs(s2,{ref:i,className:pt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(o2,{asChild:!0,children:d.jsx(z0,{className:"h-4 w-4 opacity-50"})})]}));yn.displayName="SelectTrigger";const xn=b.forwardRef(({className:e,children:t,position:n="popper",...i},o)=>d.jsx(a2,{children:d.jsx(l2,{ref:o,className:pt("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-background text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:d.jsx(c2,{className:pt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));xn.displayName="SelectContent";const ut=b.forwardRef(({className:e,children:t,...n},i)=>d.jsxs(u2,{ref:i,className:pt("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",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(f2,{children:d.jsx(G_,{className:"h-4 w-4"})})}),d.jsx(d2,{children:t})]}));ut.displayName="SelectItem";const h2=nP({name:ru().min(1,"Name is required"),transport:rP(["stdio","sse","streamable-http"]),command:ru().optional(),args:ru().optional(),url:ru().optional()});function p2({defaultValues:e,onSubmit:t,loading:n}){const i=_N({resolver:NN(h2),defaultValues:{name:"",transport:"stdio",...e}}),o=i.watch("transport");function l(u){t({name:u.name,transport:u.transport,command:u.command||void 0,args:u.args?u.args.split(",").map(c=>c.trim()).filter(Boolean):void 0,url:u.url||void 0})}return d.jsxs("form",{onSubmit:i.handleSubmit(l),className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Name"}),d.jsx(Bt,{...i.register("name"),placeholder:"My MCP Server"}),i.formState.errors.name&&d.jsx("p",{className:"text-sm text-destructive mt-1",children:i.formState.errors.name.message})]}),d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Transport"}),d.jsxs(Pn,{value:o,onValueChange:u=>i.setValue("transport",u),children:[d.jsx(yn,{children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"stdio",children:"stdio"}),d.jsx(ut,{value:"sse",children:"SSE"}),d.jsx(ut,{value:"streamable-http",children:"Streamable HTTP"})]})]})]}),o==="stdio"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Command"}),d.jsx(Bt,{...i.register("command"),placeholder:"npx"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Arguments (comma-separated)"}),d.jsx(Bt,{...i.register("args"),placeholder:"@modelcontextprotocol/server-filesystem, /tmp"})]})]}):d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"URL"}),d.jsx(Bt,{...i.register("url"),placeholder:"http://localhost:3000/sse"})]}),d.jsx(Me,{type:"submit",disabled:n,className:"w-full",children:n?"Saving...":"Save Server"})]})}function m2(){var y,x;const[e,t]=b.useState(!1),[n,i]=b.useState(null),[o,l]=b.useState({}),u=Ml(),c=lE(),h=cE(),m=uE();async function g(w){i(w);try{const _=await m.mutateAsync(w);l(S=>({...S,[w]:_.data}))}catch{l(_=>({..._,[w]:{connected:!1,error:"Request failed"}}))}i(null)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Servers"}),d.jsxs(ju,{open:e,onOpenChange:t,children:[d.jsx(Vp,{asChild:!0,children:d.jsxs(Me,{children:[d.jsx(W0,{className:"mr-2 h-4 w-4"}),"Add Server"]})}),d.jsxs(wl,{children:[d.jsx(Eu,{children:d.jsx(Sl,{children:"Add Server Connection"})}),d.jsx(p2,{loading:c.isPending,onSubmit:async w=>{await c.mutateAsync(w),t(!1)}})]})]})]}),d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Saved Connections"})}),d.jsx(Xe,{children:((y=u.data)==null?void 0:y.data.length)===0?d.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No servers configured yet"}):d.jsxs(qu,{children:[d.jsx(Zu,{children:d.jsxs(no,{children:[d.jsx(cn,{children:"Name"}),d.jsx(cn,{children:"Transport"}),d.jsx(cn,{children:"Endpoint"}),d.jsx(cn,{children:"Status"}),d.jsx(cn,{className:"text-right",children:"Actions"})]})}),d.jsx(Gu,{children:(x=u.data)==null?void 0:x.data.map(w=>{var _;return d.jsxs(no,{children:[d.jsx(un,{className:"font-medium",children:w.name}),d.jsx(un,{children:d.jsx(dt,{variant:"outline",children:w.transport})}),d.jsx(un,{className:"text-sm text-muted-foreground",children:w.command?`${w.command} ${((_=w.args)==null?void 0:_.join(" "))??""}`:w.url??"-"}),d.jsx(un,{children:o[w.id]?o[w.id].connected?d.jsxs(dt,{variant:"success",children:["Connected (",o[w.id].toolCount," tools)"]}):d.jsx(dt,{variant:"destructive",children:o[w.id].error??"Failed"}):null}),d.jsxs(un,{className:"text-right space-x-2",children:[d.jsx(Me,{size:"sm",variant:"outline",onClick:()=>g(w.id),disabled:n===w.id,children:n===w.id?d.jsx(or,{className:"h-4 w-4 animate-spin"}):d.jsx(lj,{className:"h-4 w-4"})}),d.jsx(Me,{size:"sm",variant:"ghost",onClick:()=>h.mutate(w.id),children:d.jsx(pa,{className:"h-4 w-4 text-destructive"})})]})]},w.id)})})]})})]})]})}var jn={},Mx;function g2(){if(Mx)return jn;Mx=1;var e=jn&&jn.__assign||function(){return e=Object.assign||function(P){for(var T,O=1,L=arguments.length;O<L;O++){T=arguments[O];for(var V in T)Object.prototype.hasOwnProperty.call(T,V)&&(P[V]=T[V])}return P},e.apply(this,arguments)},t=jn&&jn.__createBinding||(Object.create?(function(P,T,O,L){L===void 0&&(L=O);var V=Object.getOwnPropertyDescriptor(T,O);(!V||("get"in V?!T.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return T[O]}}),Object.defineProperty(P,L,V)}):(function(P,T,O,L){L===void 0&&(L=O),P[L]=T[O]})),n=jn&&jn.__setModuleDefault||(Object.create?(function(P,T){Object.defineProperty(P,"default",{enumerable:!0,value:T})}):function(P,T){P.default=T}),i=jn&&jn.__importStar||function(P){if(P&&P.__esModule)return P;var T={};if(P!=null)for(var O in P)O!=="default"&&Object.prototype.hasOwnProperty.call(P,O)&&t(T,P,O);return n(T,P),T},o=jn&&jn.__rest||function(P,T){var O={};for(var L in P)Object.prototype.hasOwnProperty.call(P,L)&&T.indexOf(L)<0&&(O[L]=P[L]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var V=0,L=Object.getOwnPropertySymbols(P);V<L.length;V++)T.indexOf(L[V])<0&&Object.prototype.propertyIsEnumerable.call(P,L[V])&&(O[L[V]]=P[L[V]]);return O};Object.defineProperty(jn,"__esModule",{value:!0});var l=i(ua()),u=89,c=90,h=77,m=57,g=219,y=222,x=192,w=100,_=3e3,S=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),C=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),N="npm__react-simple-code-editor__textarea",k=`
|
|
311
|
+
/**
|
|
312
|
+
* Reset the text fill color so that placeholder is visible
|
|
313
|
+
*/
|
|
314
|
+
.`.concat(N,`:empty {
|
|
315
|
+
-webkit-text-fill-color: inherit !important;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Hack to apply on some CSS on IE10 and IE11
|
|
320
|
+
*/
|
|
321
|
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
322
|
+
/**
|
|
323
|
+
* IE doesn't support '-webkit-text-fill-color'
|
|
324
|
+
* So we use 'color: transparent' to make the text transparent on IE
|
|
325
|
+
* Unlike other browsers, it doesn't affect caret color in IE
|
|
326
|
+
*/
|
|
327
|
+
.`).concat(N,` {
|
|
328
|
+
color: transparent !important;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.`).concat(N,`::selection {
|
|
332
|
+
background-color: #accef7 !important;
|
|
333
|
+
color: transparent !important;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
`),R=l.forwardRef(function(T,O){var L=T.autoFocus,V=T.disabled,M=T.form,Z=T.highlight,W=T.ignoreTabKey,ee=W===void 0?!1:W,se=T.insertSpaces,oe=se===void 0?!0:se,X=T.maxLength,ie=T.minLength,B=T.name,U=T.onBlur,Q=T.onClick,I=T.onFocus,Y=T.onKeyDown,je=T.onKeyUp,fe=T.onValueChange,Ne=T.padding,te=Ne===void 0?0:Ne,re=T.placeholder,ve=T.preClassName,Oe=T.readOnly,Te=T.required,Fe=T.style,We=T.tabSize,ft=We===void 0?2:We,Mt=T.textareaClassName,tn=T.textareaId,Xt=T.value,Dt=o(T,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),rt=l.useRef({stack:[],offset:-1}),Pt=l.useRef(null),On=l.useState(!0),D=On[0],K=On[1],J={paddingTop:typeof te=="object"?te.top:te,paddingRight:typeof te=="object"?te.right:te,paddingBottom:typeof te=="object"?te.bottom:te,paddingLeft:typeof te=="object"?te.left:te},ge=Z(Xt),ue=function(pe,et){return pe.substring(0,et).split(`
|
|
337
|
+
`)},ne=l.useCallback(function(pe,et){var $e,Ue,vt;et===void 0&&(et=!1);var Tt=rt.current,An=Tt.stack,Qn=Tt.offset;if(An.length&&Qn>-1){rt.current.stack=An.slice(0,Qn+1);var qn=rt.current.stack.length;if(qn>w){var qr=qn-w;rt.current.stack=An.slice(qr,qn),rt.current.offset=Math.max(rt.current.offset-qr,0)}}var In=Date.now();if(et){var ur=rt.current.stack[rt.current.offset];if(ur&&In-ur.timestamp<_){var bs=/[^a-z0-9]([a-z0-9]+)$/i,nn=($e=ue(ur.value,ur.selectionStart).pop())===null||$e===void 0?void 0:$e.match(bs),Zr=(Ue=ue(pe.value,pe.selectionStart).pop())===null||Ue===void 0?void 0:Ue.match(bs);if(nn!=null&&nn[1]&&(!((vt=Zr==null?void 0:Zr[1])===null||vt===void 0)&&vt.startsWith(nn[1]))){rt.current.stack[rt.current.offset]=e(e({},pe),{timestamp:In});return}}}rt.current.stack.push(e(e({},pe),{timestamp:In})),rt.current.offset++},[]),me=l.useCallback(function(){var pe=Pt.current;if(pe){var et=pe.value,$e=pe.selectionStart,Ue=pe.selectionEnd;ne({value:et,selectionStart:$e,selectionEnd:Ue})}},[ne]),Le=function(pe){var et=Pt.current;et&&(et.value=pe.value,et.selectionStart=pe.selectionStart,et.selectionEnd=pe.selectionEnd,fe==null||fe(pe.value))},Be=function(pe){var et=Pt.current,$e=rt.current.stack[rt.current.offset];$e&&et&&(rt.current.stack[rt.current.offset]=e(e({},$e),{selectionStart:et.selectionStart,selectionEnd:et.selectionEnd})),ne(pe),Le(pe)},jt=function(){var pe=rt.current,et=pe.stack,$e=pe.offset,Ue=et[$e-1];Ue&&(Le(Ue),rt.current.offset=Math.max($e-1,0))},fn=function(){var pe=rt.current,et=pe.stack,$e=pe.offset,Ue=et[$e+1];Ue&&(Le(Ue),rt.current.offset=Math.min($e+1,et.length-1))},Kn=function(pe){if(!(Y&&(Y(pe),pe.defaultPrevented))){pe.key==="Escape"&&pe.currentTarget.blur();var et=pe.currentTarget,$e=et.value,Ue=et.selectionStart,vt=et.selectionEnd,Tt=(oe?" ":" ").repeat(ft);if(pe.key==="Tab"&&!ee&&D)if(pe.preventDefault(),pe.shiftKey){var An=ue($e,Ue),Qn=An.length-1,qn=ue($e,vt).length-1,qr=$e.split(`
|
|
338
|
+
`).map(function(fr,Si){return Si>=Qn&&Si<=qn&&fr.startsWith(Tt)?fr.substring(Tt.length):fr}).join(`
|
|
339
|
+
`);if($e!==qr){var In=An[Qn];Be({value:qr,selectionStart:In!=null&&In.startsWith(Tt)?Ue-Tt.length:Ue,selectionEnd:vt-($e.length-qr.length)})}}else if(Ue!==vt){var An=ue($e,Ue),ur=An.length-1,bs=ue($e,vt).length-1,In=An[ur];Be({value:$e.split(`
|
|
340
|
+
`).map(function(bi,co){return co>=ur&&co<=bs?Tt+bi:bi}).join(`
|
|
341
|
+
`),selectionStart:In&&/\S/.test(In)?Ue+Tt.length:Ue,selectionEnd:vt+Tt.length*(bs-ur+1)})}else{var nn=Ue+Tt.length;Be({value:$e.substring(0,Ue)+Tt+$e.substring(vt),selectionStart:nn,selectionEnd:nn})}else if(pe.key==="Backspace"){var Zr=Ue!==vt,Vl=$e.substring(0,Ue);if(Vl.endsWith(Tt)&&!Zr){pe.preventDefault();var nn=Ue-Tt.length;Be({value:$e.substring(0,Ue-Tt.length)+$e.substring(vt),selectionStart:nn,selectionEnd:nn})}}else if(pe.key==="Enter"){if(Ue===vt){var Gr=ue($e,Ue).pop(),Cs=Gr==null?void 0:Gr.match(/^\s+/);if(Cs!=null&&Cs[0]){pe.preventDefault();var ks=`
|
|
342
|
+
`+Cs[0],nn=Ue+ks.length;Be({value:$e.substring(0,Ue)+ks+$e.substring(vt),selectionStart:nn,selectionEnd:nn})}}}else if(pe.keyCode===m||pe.keyCode===g||pe.keyCode===y||pe.keyCode===x){var dr=void 0;pe.keyCode===m&&pe.shiftKey?dr=["(",")"]:pe.keyCode===g?pe.shiftKey?dr=["{","}"]:dr=["[","]"]:pe.keyCode===y?pe.shiftKey?dr=['"','"']:dr=["'","'"]:pe.keyCode===x&&!pe.shiftKey&&(dr=["`","`"]),Ue!==vt&&dr&&(pe.preventDefault(),Be({value:$e.substring(0,Ue)+dr[0]+$e.substring(Ue,vt)+dr[1]+$e.substring(vt),selectionStart:Ue,selectionEnd:vt+2}))}else(C?pe.metaKey&&pe.keyCode===c:pe.ctrlKey&&pe.keyCode===c)&&!pe.shiftKey&&!pe.altKey?(pe.preventDefault(),jt()):(C?pe.metaKey&&pe.keyCode===c&&pe.shiftKey:S?pe.ctrlKey&&pe.keyCode===u:pe.ctrlKey&&pe.keyCode===c&&pe.shiftKey)&&!pe.altKey?(pe.preventDefault(),fn()):pe.keyCode===h&&pe.ctrlKey&&(!C||pe.shiftKey)&&(pe.preventDefault(),K(function(fr){return!fr}))}},lo=function(pe){var et=pe.currentTarget,$e=et.value,Ue=et.selectionStart,vt=et.selectionEnd;ne({value:$e,selectionStart:Ue,selectionEnd:vt},!0),fe($e)};return l.useEffect(function(){me()},[me]),l.useImperativeHandle(O,function(){return{get session(){return{history:rt.current}},set session(pe){rt.current=pe.history}}},[]),l.createElement("div",e({},Dt,{style:e(e({},j.container),Fe)}),l.createElement("pre",e({className:ve,"aria-hidden":"true",style:e(e(e({},j.editor),j.highlight),J)},typeof ge=="string"?{dangerouslySetInnerHTML:{__html:ge+"<br />"}}:{children:ge})),l.createElement("textarea",{ref:function(pe){return Pt.current=pe},style:e(e(e({},j.editor),j.textarea),J),className:N+(Mt?" ".concat(Mt):""),id:tn,value:Xt,onChange:lo,onKeyDown:Kn,onClick:Q,onKeyUp:je,onFocus:I,onBlur:U,disabled:V,form:M,maxLength:X,minLength:ie,name:B,placeholder:re,readOnly:Oe,required:Te,autoFocus:L,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:k}}))}),j={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};return jn.default=R,jn}var v2=g2();const y2=$u(v2);var bh={exports:{}},Lx;function x2(){return Lx||(Lx=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
343
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
344
|
+
*
|
|
345
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
346
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
347
|
+
* @namespace
|
|
348
|
+
* @public
|
|
349
|
+
*/var n=(function(i){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,u={},c={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function k(R){return R instanceof h?new h(R.type,k(R.content),R.alias):Array.isArray(R)?R.map(k):R.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++l}),k.__id},clone:function k(R,j){j=j||{};var P,T;switch(c.util.type(R)){case"Object":if(T=c.util.objId(R),j[T])return j[T];P={},j[T]=P;for(var O in R)R.hasOwnProperty(O)&&(P[O]=k(R[O],j));return P;case"Array":return T=c.util.objId(R),j[T]?j[T]:(P=[],j[T]=P,R.forEach(function(L,V){P[V]=k(L,j)}),P);default:return R}},getLanguage:function(k){for(;k;){var R=o.exec(k.className);if(R)return R[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,R){k.className=k.className.replace(RegExp(o,"gi"),""),k.classList.add("language-"+R)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(P){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(P.stack)||[])[1];if(k){var R=document.getElementsByTagName("script");for(var j in R)if(R[j].src==k)return R[j]}return null}},isActive:function(k,R,j){for(var P="no-"+R;k;){var T=k.classList;if(T.contains(R))return!0;if(T.contains(P))return!1;k=k.parentElement}return!!j}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(k,R){var j=c.util.clone(c.languages[k]);for(var P in R)j[P]=R[P];return j},insertBefore:function(k,R,j,P){P=P||c.languages;var T=P[k],O={};for(var L in T)if(T.hasOwnProperty(L)){if(L==R)for(var V in j)j.hasOwnProperty(V)&&(O[V]=j[V]);j.hasOwnProperty(L)||(O[L]=T[L])}var M=P[k];return P[k]=O,c.languages.DFS(c.languages,function(Z,W){W===M&&Z!=k&&(this[Z]=O)}),O},DFS:function k(R,j,P,T){T=T||{};var O=c.util.objId;for(var L in R)if(R.hasOwnProperty(L)){j.call(R,L,R[L],P||L);var V=R[L],M=c.util.type(V);M==="Object"&&!T[O(V)]?(T[O(V)]=!0,k(V,j,null,T)):M==="Array"&&!T[O(V)]&&(T[O(V)]=!0,k(V,j,L,T))}}},plugins:{},highlightAll:function(k,R){c.highlightAllUnder(document,k,R)},highlightAllUnder:function(k,R,j){var P={callback:j,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",P),P.elements=Array.prototype.slice.apply(P.container.querySelectorAll(P.selector)),c.hooks.run("before-all-elements-highlight",P);for(var T=0,O;O=P.elements[T++];)c.highlightElement(O,R===!0,P.callback)},highlightElement:function(k,R,j){var P=c.util.getLanguage(k),T=c.languages[P];c.util.setLanguage(k,P);var O=k.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(O,P);var L=k.textContent,V={element:k,language:P,grammar:T,code:L};function M(W){V.highlightedCode=W,c.hooks.run("before-insert",V),V.element.innerHTML=V.highlightedCode,c.hooks.run("after-highlight",V),c.hooks.run("complete",V),j&&j.call(V.element)}if(c.hooks.run("before-sanity-check",V),O=V.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!V.code){c.hooks.run("complete",V),j&&j.call(V.element);return}if(c.hooks.run("before-highlight",V),!V.grammar){M(c.util.encode(V.code));return}if(R&&i.Worker){var Z=new Worker(c.filename);Z.onmessage=function(W){M(W.data)},Z.postMessage(JSON.stringify({language:V.language,code:V.code,immediateClose:!0}))}else M(c.highlight(V.code,V.grammar,V.language))},highlight:function(k,R,j){var P={code:k,grammar:R,language:j};if(c.hooks.run("before-tokenize",P),!P.grammar)throw new Error('The language "'+P.language+'" has no grammar.');return P.tokens=c.tokenize(P.code,P.grammar),c.hooks.run("after-tokenize",P),h.stringify(c.util.encode(P.tokens),P.language)},tokenize:function(k,R){var j=R.rest;if(j){for(var P in j)R[P]=j[P];delete R.rest}var T=new y;return x(T,T.head,k),g(k,T,R,T.head,0),_(T)},hooks:{all:{},add:function(k,R){var j=c.hooks.all;j[k]=j[k]||[],j[k].push(R)},run:function(k,R){var j=c.hooks.all[k];if(!(!j||!j.length))for(var P=0,T;T=j[P++];)T(R)}},Token:h};i.Prism=c;function h(k,R,j,P){this.type=k,this.content=R,this.alias=j,this.length=(P||"").length|0}h.stringify=function k(R,j){if(typeof R=="string")return R;if(Array.isArray(R)){var P="";return R.forEach(function(M){P+=k(M,j)}),P}var T={type:R.type,content:k(R.content,j),tag:"span",classes:["token",R.type],attributes:{},language:j},O=R.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(T.classes,O):T.classes.push(O)),c.hooks.run("wrap",T);var L="";for(var V in T.attributes)L+=" "+V+'="'+(T.attributes[V]||"").replace(/"/g,""")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+L+">"+T.content+"</"+T.tag+">"};function m(k,R,j,P){k.lastIndex=R;var T=k.exec(j);if(T&&P&&T[1]){var O=T[1].length;T.index+=O,T[0]=T[0].slice(O)}return T}function g(k,R,j,P,T,O){for(var L in j)if(!(!j.hasOwnProperty(L)||!j[L])){var V=j[L];V=Array.isArray(V)?V:[V];for(var M=0;M<V.length;++M){if(O&&O.cause==L+","+M)return;var Z=V[M],W=Z.inside,ee=!!Z.lookbehind,se=!!Z.greedy,oe=Z.alias;if(se&&!Z.pattern.global){var X=Z.pattern.toString().match(/[imsuy]*$/)[0];Z.pattern=RegExp(Z.pattern.source,X+"g")}for(var ie=Z.pattern||Z,B=P.next,U=T;B!==R.tail&&!(O&&U>=O.reach);U+=B.value.length,B=B.next){var Q=B.value;if(R.length>k.length)return;if(!(Q instanceof h)){var I=1,Y;if(se){if(Y=m(ie,U,k,ee),!Y||Y.index>=k.length)break;var te=Y.index,je=Y.index+Y[0].length,fe=U;for(fe+=B.value.length;te>=fe;)B=B.next,fe+=B.value.length;if(fe-=B.value.length,U=fe,B.value instanceof h)continue;for(var Ne=B;Ne!==R.tail&&(fe<je||typeof Ne.value=="string");Ne=Ne.next)I++,fe+=Ne.value.length;I--,Q=k.slice(U,fe),Y.index-=U}else if(Y=m(ie,0,Q,ee),!Y)continue;var te=Y.index,re=Y[0],ve=Q.slice(0,te),Oe=Q.slice(te+re.length),Te=U+Q.length;O&&Te>O.reach&&(O.reach=Te);var Fe=B.prev;ve&&(Fe=x(R,Fe,ve),U+=ve.length),w(R,Fe,I);var We=new h(L,W?c.tokenize(re,W):re,oe,re);if(B=x(R,Fe,We),Oe&&x(R,B,Oe),I>1){var ft={cause:L+","+M,reach:Te};g(k,R,j,B.prev,U,ft),O&&ft.reach>O.reach&&(O.reach=ft.reach)}}}}}}function y(){var k={value:null,prev:null,next:null},R={value:null,prev:k,next:null};k.next=R,this.head=k,this.tail=R,this.length=0}function x(k,R,j){var P=R.next,T={value:j,prev:R,next:P};return R.next=T,P.prev=T,k.length++,T}function w(k,R,j){for(var P=R.next,T=0;T<j&&P!==k.tail;T++)P=P.next;R.next=P,P.prev=R,k.length-=T}function _(k){for(var R=[],j=k.head.next;j!==k.tail;)R.push(j.value),j=j.next;return R}if(!i.document)return i.addEventListener&&(c.disableWorkerMessageHandler||i.addEventListener("message",function(k){var R=JSON.parse(k.data),j=R.language,P=R.code,T=R.immediateClose;i.postMessage(c.highlight(P,c.languages[j],j)),T&&i.close()},!1)),c;var S=c.util.currentScript();S&&(c.filename=S.src,S.hasAttribute("data-manual")&&(c.manual=!0));function C(){c.manual||c.highlightAll()}if(!c.manual){var N=document.readyState;N==="loading"||N==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",C):window.requestAnimationFrame?window.requestAnimationFrame(C):window.setTimeout(C,16)}return c})(t);e.exports&&(e.exports=n),typeof Fv<"u"&&(Fv.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,l){var u={};u["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[l]},u.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:u}};c["language-"+l]={pattern:/[\s\S]+/,inside:n.languages[l]};var h={};h[o]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:c},n.languages.insertBefore("markup","cdata",h)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(i,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(i){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",o=function(S,C){return"✖ Error "+S+" while fetching file: "+C},l="✖ Error: File does not exist or is empty",u={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",h="loading",m="loaded",g="failed",y="pre[data-src]:not(["+c+'="'+m+'"]):not(['+c+'="'+h+'"])';function x(S,C,N){var k=new XMLHttpRequest;k.open("GET",S,!0),k.onreadystatechange=function(){k.readyState==4&&(k.status<400&&k.responseText?C(k.responseText):k.status>=400?N(o(k.status,k.statusText)):N(l))},k.send(null)}function w(S){var C=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S||"");if(C){var N=Number(C[1]),k=C[2],R=C[3];return k?R?[N,Number(R)]:[N,void 0]:[N,N]}}n.hooks.add("before-highlightall",function(S){S.selector+=", "+y}),n.hooks.add("before-sanity-check",function(S){var C=S.element;if(C.matches(y)){S.code="",C.setAttribute(c,h);var N=C.appendChild(document.createElement("CODE"));N.textContent=i;var k=C.getAttribute("data-src"),R=S.language;if(R==="none"){var j=(/\.(\w+)$/.exec(k)||[,"none"])[1];R=u[j]||j}n.util.setLanguage(N,R),n.util.setLanguage(C,R);var P=n.plugins.autoloader;P&&P.loadLanguages(R),x(k,function(T){C.setAttribute(c,m);var O=w(C.getAttribute("data-range"));if(O){var L=T.split(/\r\n?|\n/g),V=O[0],M=O[1]==null?L.length:O[1];V<0&&(V+=L.length),V=Math.max(0,Math.min(V-1,L.length)),M<0&&(M+=L.length),M=Math.max(0,Math.min(M,L.length)),T=L.slice(V,M).join(`
|
|
350
|
+
`),C.hasAttribute("data-start")||C.setAttribute("data-start",String(V+1))}N.textContent=T,n.highlightElement(N)},function(T){C.setAttribute(c,g),N.textContent=T})}}),n.plugins.fileHighlight={highlight:function(C){for(var N=(C||document).querySelectorAll(y),k=0,R;R=N[k++];)n.highlightElement(R)}};var _=!1;n.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(bh)),bh.exports}var w2=x2();const Fx=$u(w2);(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(c,h){h=(h||"").replace(/m/g,"")+"m";var m=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return c});return RegExp(m,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:u(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:u(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:u(l),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);function Dx({value:e,onChange:t,onValidate:n,onSave:i,onRun:o,validating:l,saving:u}){return d.jsxs("div",{className:"space-y-2",children:[d.jsx("div",{className:"rounded-md border bg-background",children:d.jsx(y2,{value:e,onValueChange:t,highlight:c=>Fx.highlight(c,Fx.languages.yaml,"yaml"),padding:16,style:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',fontSize:13,minHeight:300}})}),d.jsxs("div",{className:"flex gap-2",children:[n&&d.jsx(Me,{size:"sm",variant:"outline",onClick:n,disabled:l,children:l?"Validating...":"Validate"}),i&&d.jsx(Me,{size:"sm",onClick:i,disabled:u,children:u?"Saving...":"Save"}),o&&d.jsx(Me,{size:"sm",variant:"secondary",onClick:o,children:"Run"})]})]})}const zx=`name: My Tests
|
|
351
|
+
server: npx @modelcontextprotocol/server-filesystem /tmp
|
|
352
|
+
|
|
353
|
+
tests:
|
|
354
|
+
- name: List tools
|
|
355
|
+
call: list_directory
|
|
356
|
+
with:
|
|
357
|
+
path: /tmp
|
|
358
|
+
expect:
|
|
359
|
+
- exists: $.content
|
|
360
|
+
`;function S2(){var P,T;const[e,t]=b.useState(!1),[n,i]=b.useState(null),[o,l]=b.useState(""),[u,c]=b.useState(zx),[h,m]=b.useState(""),[g,y]=b.useState(null),x=Op(),w=dE(),_=fE(),S=hE(),C=pE(),N=ow();async function k(){await w.mutateAsync({name:o,yaml:u}),t(!1),l(""),c(zx)}async function R(O){const L=await C.mutateAsync(O);y(L.data)}async function j(O){const L=await N.mutateAsync({collectionId:O});gs.navigate({to:"/runs/$runId",params:{runId:L.data.id}})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Collections"}),d.jsxs(ju,{open:e,onOpenChange:t,children:[d.jsx(Vp,{asChild:!0,children:d.jsxs(Me,{children:[d.jsx(W0,{className:"mr-2 h-4 w-4"}),"New Collection"]})}),d.jsxs(wl,{className:"max-w-2xl",children:[d.jsx(Eu,{children:d.jsx(Sl,{children:"Create Collection"})}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Name"}),d.jsx(Bt,{value:o,onChange:O=>l(O.target.value),placeholder:"Collection name"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"YAML"}),d.jsx(Dx,{value:u,onChange:c})]}),d.jsx(Me,{onClick:k,disabled:!o||w.isPending,className:"w-full",children:w.isPending?"Creating...":"Create Collection"})]})]})]})]}),d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Saved Collections"})}),d.jsx(Xe,{children:((P=x.data)==null?void 0:P.data.length)===0?d.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No collections yet"}):d.jsxs(qu,{children:[d.jsx(Zu,{children:d.jsxs(no,{children:[d.jsx(cn,{children:"Name"}),d.jsx(cn,{children:"Description"}),d.jsx(cn,{children:"Updated"}),d.jsx(cn,{className:"text-right",children:"Actions"})]})}),d.jsx(Gu,{children:(T=x.data)==null?void 0:T.data.map(O=>d.jsxs(no,{children:[d.jsx(un,{className:"font-medium",children:O.name}),d.jsx(un,{className:"text-sm text-muted-foreground",children:O.description??"-"}),d.jsx(un,{className:"text-sm text-muted-foreground",children:new Date(O.updatedAt).toLocaleDateString()}),d.jsxs(un,{className:"text-right space-x-2",children:[d.jsx(Me,{size:"sm",variant:"outline",onClick:()=>{i(O.id),m(O.yaml)},children:d.jsx(ij,{className:"h-4 w-4"})}),d.jsx(Me,{size:"sm",variant:"secondary",onClick:()=>j(O.id),children:d.jsx(Wr,{className:"h-4 w-4"})}),d.jsx(Me,{size:"sm",variant:"ghost",onClick:()=>S.mutate(O.id),children:d.jsx(pa,{className:"h-4 w-4 text-destructive"})})]})]},O.id))})]})})]}),d.jsx(ju,{open:!!n,onOpenChange:O=>{O||i(null)},children:d.jsxs(wl,{className:"max-w-2xl",children:[d.jsx(Eu,{children:d.jsx(Sl,{children:"Edit Collection"})}),d.jsx(Dx,{value:h,onChange:m,onValidate:()=>n&&R(n),validating:C.isPending,onSave:async()=>{n&&(await _.mutateAsync({id:n,data:{yaml:h}}),i(null))},saving:_.isPending,onRun:()=>n&&j(n)}),g&&d.jsx("div",{className:"flex items-center gap-2 mt-2",children:g.valid?d.jsxs(dt,{variant:"success",children:[d.jsx(Il,{className:"mr-1 h-3 w-3"}),"Valid"]}):d.jsxs(dt,{variant:"destructive",children:[d.jsx(ha,{className:"mr-1 h-3 w-3"}),"Invalid"]})})]})})]})}function b2({status:e}){switch(e){case"completed":return d.jsxs(dt,{variant:"success",children:[d.jsx(Il,{className:"mr-1 h-3 w-3"}),"Completed"]});case"failed":return d.jsxs(dt,{variant:"destructive",children:[d.jsx(ha,{className:"mr-1 h-3 w-3"}),"Failed"]});case"running":return d.jsxs(dt,{variant:"warning",children:[d.jsx(Cu,{className:"mr-1 h-3 w-3 animate-spin"}),"Running"]});case"cancelled":return d.jsxs(dt,{variant:"secondary",children:[d.jsx(Np,{className:"mr-1 h-3 w-3"}),"Cancelled"]});default:return d.jsx(dt,{variant:"secondary",children:e})}}function C2(){var m,g,y;const[e,t]=b.useState(!1),[n,i]=b.useState(""),o=iw(),l=Op(),u=ow(),c=gE();async function h(){if(!n)return;const x=await u.mutateAsync({collectionId:n});t(!1),gs.navigate({to:"/runs/$runId",params:{runId:x.data.id}})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Test Runs"}),d.jsxs(ju,{open:e,onOpenChange:t,children:[d.jsx(Vp,{asChild:!0,children:d.jsxs(Me,{children:[d.jsx(Wr,{className:"mr-2 h-4 w-4"}),"Run Collection"]})}),d.jsxs(wl,{children:[d.jsx(Eu,{children:d.jsx(Sl,{children:"Run Collection"})}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Collection"}),d.jsxs(Pn,{value:n,onValueChange:i,children:[d.jsx(yn,{children:d.jsx(Tn,{placeholder:"Select a collection"})}),d.jsx(xn,{children:(m=l.data)==null?void 0:m.data.map(x=>d.jsx(ut,{value:x.id,children:x.name},x.id))})]})]}),d.jsx(Me,{onClick:h,disabled:!n||u.isPending,className:"w-full",children:u.isPending?"Starting...":"Start Run"})]})]})]})]}),d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Run History"})}),d.jsx(Xe,{children:((g=o.data)==null?void 0:g.data.length)===0?d.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No runs yet"}):d.jsxs(qu,{children:[d.jsx(Zu,{children:d.jsxs(no,{children:[d.jsx(cn,{children:"Collection"}),d.jsx(cn,{children:"Status"}),d.jsx(cn,{children:"Tests"}),d.jsx(cn,{children:"Duration"}),d.jsx(cn,{children:"Started"}),d.jsx(cn,{className:"text-right",children:"Actions"})]})}),d.jsx(Gu,{children:(y=o.data)==null?void 0:y.data.map(x=>d.jsxs(no,{className:"cursor-pointer",onClick:()=>gs.navigate({to:"/runs/$runId",params:{runId:x.id}}),children:[d.jsx(un,{className:"font-medium",children:x.collectionName}),d.jsx(un,{children:d.jsx(b2,{status:x.status})}),d.jsx(un,{children:x.summary?d.jsxs("span",{className:"text-sm",children:[d.jsx("span",{className:"text-green-600",children:x.summary.passed})," / ",d.jsx("span",{children:x.summary.total}),x.summary.failed>0&&d.jsxs("span",{className:"text-red-600",children:[" (",x.summary.failed," failed)"]})]}):"-"}),d.jsx(un,{children:x.duration?`${x.duration}ms`:"-"}),d.jsx(un,{className:"text-sm text-muted-foreground",children:new Date(x.startedAt).toLocaleString()}),d.jsx(un,{className:"text-right",onClick:w=>w.stopPropagation(),children:d.jsx(Me,{size:"sm",variant:"ghost",onClick:()=>c.mutate(x.id),children:d.jsx(pa,{className:"h-4 w-4 text-destructive"})})})]},x.id))})]})})]})]})}function k2({status:e}){switch(e){case"passed":return d.jsx(Il,{className:"h-4 w-4 text-green-600"});case"failed":return d.jsx(ha,{className:"h-4 w-4 text-red-600"});case"error":return d.jsx(Np,{className:"h-4 w-4 text-red-600"});case"skipped":return d.jsx(Cu,{className:"h-4 w-4 text-yellow-600"});default:return null}}function _2({result:e}){const[t,n]=b.useState(!1);return d.jsxs("div",{className:"rounded-md border p-3 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>n(!t),children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(k2,{status:e.status}),d.jsx("span",{className:"text-sm font-medium",children:e.testName})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.duration,"ms"]}),d.jsx(dt,{variant:e.status==="passed"?"success":e.status==="failed"?"destructive":"secondary",children:e.status})]})]}),t&&d.jsxs("div",{className:"mt-3 space-y-2 text-sm",children:[e.error&&d.jsx("div",{className:"rounded bg-red-50 p-2 text-red-700 font-mono text-xs",children:e.error}),e.assertions.length>0&&d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"font-medium text-xs text-muted-foreground",children:"Assertions:"}),e.assertions.map((i,o)=>d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.passed?d.jsx(Il,{className:"h-3 w-3 text-green-600"}):d.jsx(ha,{className:"h-3 w-3 text-red-600"}),d.jsx("span",{children:i.message})]},o))]})]})]})}function j2(){const{runId:e}=Ku({from:"/runs/$runId"}),{data:t,isLoading:n}=mE(e),i=t==null?void 0:t.data;return n?d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx(Cu,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):i?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs(Me,{variant:"ghost",size:"sm",onClick:()=>gs.navigate({to:"/runs"}),children:[d.jsx(Qu,{className:"h-4 w-4 mr-1"}),"Back"]}),d.jsx("h2",{className:"text-2xl font-bold",children:i.collectionName}),d.jsx(dt,{variant:i.status==="completed"?"success":i.status==="failed"?"destructive":"warning",children:i.status})]}),i.summary&&d.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-5",children:[d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4 text-center",children:[d.jsx("p",{className:"text-2xl font-bold",children:i.summary.total}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Total"})]})}),d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4 text-center",children:[d.jsx("p",{className:"text-2xl font-bold text-green-600",children:i.summary.passed}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Passed"})]})}),d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4 text-center",children:[d.jsx("p",{className:"text-2xl font-bold text-red-600",children:i.summary.failed}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Failed"})]})}),d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4 text-center",children:[d.jsx("p",{className:"text-2xl font-bold text-yellow-600",children:i.summary.skipped}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Skipped"})]})}),d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4 text-center",children:[d.jsxs("p",{className:"text-2xl font-bold",children:[i.summary.duration,"ms"]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Duration"})]})})]}),d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Test Results"})}),d.jsx(Xe,{className:"space-y-2",children:i.results&&i.results.length>0?i.results.map((o,l)=>d.jsx(_2,{result:o},l)):i.status==="running"?d.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-4 justify-center",children:[d.jsx(Cu,{className:"h-4 w-4 animate-spin"}),"Running tests..."]}):d.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No results"})})]})]}):d.jsx("p",{className:"text-muted-foreground",children:"Run not found"})}var Ch="rovingFocusGroup.onEntryFocus",E2={bubbles:!1,cancelable:!0},zl="RovingFocusGroup",[cp,US,R2]=Zw(zl),[N2,WS]=ga(zl,[R2]),[P2,T2]=N2(zl),HS=b.forwardRef((e,t)=>d.jsx(cp.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(cp.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(O2,{...e,ref:t})})}));HS.displayName=zl;var O2=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...y}=e,x=b.useRef(null),w=It(t,x),_=Qp(l),[S,C]=yl({prop:u,defaultProp:c??null,onChange:h,caller:zl}),[N,k]=b.useState(!1),R=pi(m),j=US(n),P=b.useRef(!1),[T,O]=b.useState(0);return b.useEffect(()=>{const L=x.current;if(L)return L.addEventListener(Ch,R),()=>L.removeEventListener(Ch,R)},[R]),d.jsx(P2,{scope:n,orientation:i,dir:_,loop:o,currentTabStopId:S,onItemFocus:b.useCallback(L=>C(L),[C]),onItemShiftTab:b.useCallback(()=>k(!0),[]),onFocusableItemAdd:b.useCallback(()=>O(L=>L+1),[]),onFocusableItemRemove:b.useCallback(()=>O(L=>L-1),[]),children:d.jsx(ct.div,{tabIndex:N||T===0?-1:0,"data-orientation":i,...y,ref:w,style:{outline:"none",...e.style},onMouseDown:nt(e.onMouseDown,()=>{P.current=!0}),onFocus:nt(e.onFocus,L=>{const V=!P.current;if(L.target===L.currentTarget&&V&&!N){const M=new CustomEvent(Ch,E2);if(L.currentTarget.dispatchEvent(M),!M.defaultPrevented){const Z=j().filter(X=>X.focusable),W=Z.find(X=>X.active),ee=Z.find(X=>X.id===S),oe=[W,ee,...Z].filter(Boolean).map(X=>X.ref.current);qS(oe,g)}}P.current=!1}),onBlur:nt(e.onBlur,()=>k(!1))})})}),KS="RovingFocusGroupItem",QS=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:u,...c}=e,h=fi(),m=l||h,g=T2(KS,n),y=g.currentTabStopId===m,x=US(n),{onFocusableItemAdd:w,onFocusableItemRemove:_,currentTabStopId:S}=g;return b.useEffect(()=>{if(i)return w(),()=>_()},[i,w,_]),d.jsx(cp.ItemSlot,{scope:n,id:m,focusable:i,active:o,children:d.jsx(ct.span,{tabIndex:y?0:-1,"data-orientation":g.orientation,...c,ref:t,onMouseDown:nt(e.onMouseDown,C=>{i?g.onItemFocus(m):C.preventDefault()}),onFocus:nt(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:nt(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const N=M2(C,g.orientation,g.dir);if(N!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let R=x().filter(j=>j.focusable).map(j=>j.ref.current);if(N==="last")R.reverse();else if(N==="prev"||N==="next"){N==="prev"&&R.reverse();const j=R.indexOf(C.currentTarget);R=g.loop?L2(R,j+1):R.slice(j+1)}setTimeout(()=>qS(R))}}),children:typeof u=="function"?u({isCurrentTabStop:y,hasTabStop:S!=null}):u})})});QS.displayName=KS;var A2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function M2(e,t,n){const i=I2(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return A2[i]}function qS(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function L2(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var F2=HS,D2=QS,ad="Tabs",[z2]=ga(ad,[WS]),ZS=WS(),[V2,rm]=z2(ad),GS=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:o,defaultValue:l,orientation:u="horizontal",dir:c,activationMode:h="automatic",...m}=e,g=Qp(c),[y,x]=yl({prop:i,onChange:o,defaultProp:l??"",caller:ad});return d.jsx(V2,{scope:n,baseId:fi(),value:y,onValueChange:x,orientation:u,dir:g,activationMode:h,children:d.jsx(ct.div,{dir:g,"data-orientation":u,...m,ref:t})})});GS.displayName=ad;var YS="TabsList",XS=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:i=!0,...o}=e,l=rm(YS,n),u=ZS(n);return d.jsx(F2,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:d.jsx(ct.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:t})})});XS.displayName=YS;var JS="TabsTrigger",eb=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=e,u=rm(JS,n),c=ZS(n),h=rb(u.baseId,i),m=sb(u.baseId,i),g=i===u.value;return d.jsx(D2,{asChild:!0,...c,focusable:!o,active:g,children:d.jsx(ct.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...l,ref:t,onMouseDown:nt(e.onMouseDown,y=>{!o&&y.button===0&&y.ctrlKey===!1?u.onValueChange(i):y.preventDefault()}),onKeyDown:nt(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&u.onValueChange(i)}),onFocus:nt(e.onFocus,()=>{const y=u.activationMode!=="manual";!g&&!o&&y&&u.onValueChange(i)})})})});eb.displayName=JS;var tb="TabsContent",nb=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...u}=e,c=rm(tb,n),h=rb(c.baseId,i),m=sb(c.baseId,i),g=i===c.value,y=b.useRef(g);return b.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),d.jsx(Ll,{present:o||g,children:({present:x})=>d.jsx(ct.div,{"data-state":g?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":h,hidden:!x,id:m,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:y.current?"0s":void 0},children:x&&l})})});nb.displayName=tb;function rb(e,t){return`${e}-trigger-${t}`}function sb(e,t){return`${e}-content-${t}`}var $2=GS,B2=XS,U2=eb,W2=nb;const up=$2,Vu=b.forwardRef(({className:e,...t},n)=>d.jsx(B2,{ref:n,className:pt("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Vu.displayName="TabsList";const ls=b.forwardRef(({className:e,...t},n)=>d.jsx(U2,{ref:n,className:pt("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));ls.displayName="TabsTrigger";const cs=b.forwardRef(({className:e,...t},n)=>d.jsx(W2,{ref:n,className:pt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));cs.displayName="TabsContent";const jl=b.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:pt("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));jl.displayName="Textarea";const ib=b.forwardRef(({className:e,...t},n)=>d.jsx("input",{type:"checkbox",className:pt("h-4 w-4 shrink-0 rounded border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));ib.displayName="Checkbox";const El=b.forwardRef(({className:e,...t},n)=>d.jsx("label",{className:pt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),ref:n,...t}));El.displayName="Label";function H2(e,t){return e.default!==void 0?e.default:e.type==="boolean"?!1:e.type==="number"||e.type==="integer"?t?0:"":(e.type==="object"||e.type==="array","")}function K2(e,t){const n={};for(const[i,o]of Object.entries(e))n[i]=H2(o,t.includes(i));return n}function Vx(e,t){if(t.type==="number"||t.type==="integer"){const i=String(e);if(i==="")return;const o=Number(i);return isNaN(o)?void 0:o}if(t.type==="boolean")return!!e;if(t.type==="object"||t.type==="array"){const i=String(e).trim();if(!i)return;try{return JSON.parse(i)}catch{return}}const n=String(e);return n===""?void 0:n}function Q2(e){return!!(e.maxLength&&e.maxLength>200||e.format==="textarea")}function q2(e){return e.format==="uri"||e.format==="url"?"url":e.format==="email"?"email":e.format==="date"?"date":e.format==="date-time"?"datetime-local":"text"}function Z2({name:e,prop:t,required:n,value:i,onChange:o}){const l=`field-${e}`,u=d.jsxs(El,{htmlFor:l,children:[e,n&&d.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),c=t.description?d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t.description}):null;return t.enum&&t.enum.length>0?d.jsxs("div",{className:"space-y-1.5",children:[u,d.jsxs(Pn,{value:String(i??""),onValueChange:h=>o(e,h),children:[d.jsx(yn,{id:l,children:d.jsx(Tn,{placeholder:`Select ${e}`})}),d.jsx(xn,{children:t.enum.map(h=>d.jsx(ut,{value:h,children:h},h))})]}),c]}):t.type==="boolean"?d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ib,{id:l,checked:!!i,onChange:h=>o(e,h.target.checked)}),d.jsxs(El,{htmlFor:l,children:[e,n&&d.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]})]}),c]}):t.type==="number"||t.type==="integer"?d.jsxs("div",{className:"space-y-1.5",children:[u,d.jsx(Bt,{id:l,type:"number",value:i===void 0?"":String(i),onChange:h=>o(e,h.target.value),min:t.minimum,max:t.maximum,step:t.type==="integer"?1:void 0,required:n}),c]}):t.type==="object"||t.type==="array"||t.type&&!["string","number","integer","boolean"].includes(t.type)?d.jsxs("div",{className:"space-y-1.5",children:[u,d.jsx(jl,{id:l,value:String(i??""),onChange:h=>o(e,h.target.value),className:"font-mono text-xs",rows:3,placeholder:t.type==="array"?'["item1", "item2"]':'{"key": "value"}',required:n}),c]}):Q2(t)?d.jsxs("div",{className:"space-y-1.5",children:[u,d.jsx(jl,{id:l,value:String(i??""),onChange:h=>o(e,h.target.value),rows:3,minLength:t.minLength,maxLength:t.maxLength,required:n}),c]}):d.jsxs("div",{className:"space-y-1.5",children:[u,d.jsx(Bt,{id:l,type:q2(t),value:String(i??""),onChange:h=>o(e,h.target.value),minLength:t.minLength,maxLength:t.maxLength,required:n}),c]})}function G2({schema:e,onSubmit:t,loading:n}){const i=e.properties??{},o=e.required??[],l=Object.keys(i),[u,c]=b.useState(()=>K2(i,o)),[h,m]=b.useState(!1),[g,y]=b.useState("{}"),x=b.useCallback((C,N)=>{c(k=>({...k,[C]:N}))},[]);function w(C){if(C.preventDefault(),h){try{t(JSON.parse(g))}catch{}return}const N={};for(const[k,R]of Object.entries(i)){const j=Vx(u[k],R);j!==void 0&&(N[k]=j)}t(N)}function _(){const C={};for(const[N,k]of Object.entries(i)){const R=Vx(u[N],k);R!==void 0&&(C[N]=R)}y(JSON.stringify(C,null,2)),m(!0)}function S(){try{const C=JSON.parse(g);typeof C=="object"&&C!==null&&c(N=>({...N,...C}))}catch{}m(!1)}return l.length===0?d.jsxs("form",{onSubmit:w,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(El,{children:"Input (JSON)"}),d.jsx(jl,{value:g,onChange:C=>y(C.target.value),className:"font-mono text-xs",rows:4})]}),d.jsxs(Me,{type:"submit",disabled:n,children:[n?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Wr,{className:"mr-2 h-4 w-4"}),"Call Tool"]})]}):d.jsxs("form",{onSubmit:w,className:"space-y-4",children:[h?d.jsxs("div",{className:"space-y-1.5",children:[d.jsx(El,{children:"Input (JSON)"}),d.jsx(jl,{value:g,onChange:C=>y(C.target.value),className:"font-mono text-xs",rows:8})]}):d.jsx("div",{className:"space-y-3",children:l.map(C=>d.jsx(Z2,{name:C,prop:i[C],required:o.includes(C),value:u[C],onChange:x},C))}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(Me,{type:"submit",disabled:n,children:[n?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Wr,{className:"mr-2 h-4 w-4"}),"Call Tool"]}),d.jsx("button",{type:"button",onClick:h?S:_,className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:h?d.jsxs(d.Fragment,{children:[d.jsx(rj,{className:"h-3.5 w-3.5"}),"Form view"]}):d.jsxs(d.Fragment,{children:[d.jsx(J_,{className:"h-3.5 w-3.5"}),"Raw JSON"]})})]})]})}function sm({data:e}){return d.jsx("pre",{className:"rounded-md border bg-muted/50 p-4 text-xs font-mono overflow-auto max-h-96",children:JSON.stringify(e,null,2)})}function Y2({sessionId:e,tools:t}){const[n,i]=b.useState(""),[o,l]=b.useState(null),[u,c]=b.useState(null),[h,m]=b.useState(!1),g=t.find(w=>w.name===n);async function y(w){if(n){m(!0),c(null),l(null);try{const _=await Je.inspect.call(e,n,w);l(_.data)}catch(_){c(_ instanceof Error?_.message:"Call failed")}m(!1)}}const x=(g==null?void 0:g.inputSchema)??{type:"object",properties:{}};return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Tool"}),d.jsxs(Pn,{value:n,onValueChange:w=>{i(w),l(null),c(null)},children:[d.jsx(yn,{children:d.jsx(Tn,{placeholder:"Select a tool"})}),d.jsx(xn,{children:t.map(w=>d.jsx(ut,{value:w.name,children:w.name},w.name))})]}),(g==null?void 0:g.description)&&d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:g.description})]}),g&&d.jsx(G2,{schema:x,onSubmit:y,loading:h},g.name),u!=null&&d.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:u}),o!=null&&d.jsxs("div",{children:[d.jsx("label",{className:"text-sm font-medium",children:"Result"}),d.jsx(sm,{data:o})]})]})}function X2({entries:e}){const[t,n]=b.useState(null),[i,o]=b.useState("all"),[l,u]=b.useState(""),[c,h]=b.useState(!0),[m,g]=b.useState(0),y=b.useRef(null),x=m?e.filter(_=>_.timestamp>m):e;b.useEffect(()=>{c&&y.current&&(y.current.scrollTop=y.current.scrollHeight)},[x,c]);const w=x.filter(_=>!(i!=="all"&&_.direction!==i||l&&!(_.method??"").toLowerCase().includes(l.toLowerCase())));return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsxs(Pn,{value:i,onValueChange:_=>o(_),children:[d.jsx(yn,{className:"w-[130px]",children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"all",children:"All"}),d.jsx(ut,{value:"outgoing",children:"Outgoing"}),d.jsx(ut,{value:"incoming",children:"Incoming"})]})]}),d.jsx(Bt,{className:"w-[200px]",placeholder:"Filter by method...",value:l,onChange:_=>u(_.target.value)}),d.jsx("div",{className:"flex-1"}),d.jsx(Me,{size:"sm",variant:c?"default":"outline",onClick:()=>h(!c),title:"Auto-scroll",children:d.jsx(Q_,{className:"h-4 w-4"})}),d.jsx(Me,{size:"sm",variant:"outline",onClick:()=>g(Date.now()),title:"Clear log",children:d.jsx(pa,{className:"h-4 w-4"})}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[w.length," / ",x.length," messages"]})]}),d.jsx("div",{ref:y,className:"rounded-md border overflow-auto max-h-[600px]",children:d.jsx(ob,{entries:w,expandedId:t,onToggle:_=>n(t===_?null:_)})})]})}function ob({entries:e,expandedId:t,onToggle:n}){return d.jsxs("table",{className:"w-full text-xs",children:[d.jsx("thead",{className:"sticky top-0 bg-muted/80 backdrop-blur",children:d.jsxs("tr",{className:"border-b",children:[d.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Time"}),d.jsx("th",{className:"text-left px-3 py-2 font-medium w-10",children:"Dir"}),d.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Method"}),d.jsx("th",{className:"text-left px-3 py-2 font-medium w-16",children:"ID"}),d.jsx("th",{className:"text-right px-3 py-2 font-medium w-16",children:"RTT"}),d.jsx("th",{className:"text-right px-3 py-2 font-medium w-16",children:"Size"})]})}),d.jsx("tbody",{children:e.length===0?d.jsx("tr",{children:d.jsx("td",{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"No protocol messages yet."})}):e.map(i=>d.jsx("tr",{className:"group",children:d.jsxs("td",{colSpan:6,className:"p-0",children:[d.jsx("button",{onClick:()=>n==null?void 0:n(i.id),className:"w-full text-left hover:bg-muted/50 transition-colors",children:d.jsxs("div",{className:"grid grid-cols-[auto_40px_1fr_64px_64px_64px] items-center px-3 py-1.5",children:[d.jsx("span",{className:"font-mono text-muted-foreground pr-3",children:J2(i.timestamp)}),d.jsx("span",{children:i.direction==="outgoing"?d.jsx(Z_,{className:"h-3 w-3 text-blue-500"}):d.jsx(q_,{className:`h-3 w-3 ${i.isError?"text-red-500":"text-green-500"}`})}),d.jsx("span",{className:"truncate",children:i.method?d.jsx("span",{className:"font-medium",children:i.method}):i.isError?d.jsx(dt,{variant:"destructive",className:"text-[10px] px-1 py-0",children:"error"}):d.jsx("span",{className:"text-muted-foreground",children:"response"})}),d.jsx("span",{className:"text-right font-mono text-muted-foreground",children:i.jsonrpcId!=null?String(i.jsonrpcId):""}),d.jsx("span",{className:"text-right font-mono text-muted-foreground",children:i.roundTripMs!=null?`${i.roundTripMs}ms`:""}),d.jsx("span",{className:"text-right font-mono text-muted-foreground",children:tO(eO(i.message))})]})}),t===i.id&&d.jsx("div",{className:"px-3 pb-3",children:d.jsx(sm,{data:i.message})})]})},i.id))})]})}function J2(e){return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function eO(e){try{return new Blob([JSON.stringify(e)]).size}catch{return 0}}function tO(e){return e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}const $x=20;function nO({entries:e}){const[t,n]=b.useState(null),[i,o]=b.useState(0),l=b.useRef(null),c=(i?e.filter(h=>h.timestamp>i):e).slice(-$x);return b.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:["Protocol Log (last ",$x,")"]}),d.jsx(Me,{size:"sm",variant:"ghost",onClick:()=>o(Date.now()),title:"Clear log",className:"h-6 px-2",children:d.jsx(pa,{className:"h-3 w-3"})})]}),d.jsx("div",{ref:l,className:"rounded-md border overflow-auto max-h-[250px]",children:d.jsx(ob,{entries:c,expandedId:t,onToggle:h=>n(t===h?null:h)})})]})}function ld({url:e,onMessage:t,enabled:n=!0}){const i=b.useRef(null),o=b.useRef(0),l=b.useRef(),[u,c]=b.useState(!1),h=e??`ws://${window.location.host}/ws`,m=b.useCallback(()=>{var w;if(((w=i.current)==null?void 0:w.readyState)===WebSocket.OPEN)return;const x=new WebSocket(h);x.onopen=()=>{c(!0),o.current=0},x.onmessage=_=>{try{const S=JSON.parse(_.data);t==null||t(S)}catch{}},x.onclose=()=>{c(!1);const _=Math.min(1e3*2**o.current,3e4);o.current++,o.current<10&&(l.current=setTimeout(m,_))},x.onerror=()=>{x.close()},i.current=x},[h,t]);b.useEffect(()=>(n&&m(),()=>{var x;clearTimeout(l.current),(x=i.current)==null||x.close()}),[n,m]);const g=b.useCallback(x=>{const w=i.current;(w==null?void 0:w.readyState)===WebSocket.OPEN&&w.send(JSON.stringify({type:"subscribe",channel:x}))},[]),y=b.useCallback(x=>{const w=i.current;(w==null?void 0:w.readyState)===WebSocket.OPEN&&w.send(JSON.stringify({type:"unsubscribe",channel:x}))},[]);return{connected:u,subscribe:g,unsubscribe:y}}const Bx=1e4;function rO(e){const[t,n]=b.useState([]);b.useEffect(()=>{if(!e){n([]);return}Je.inspect.messages(e).then(h=>{n(h.data)}).catch(()=>{})},[e]);const i=b.useCallback(h=>{if(e&&h.type==="event"&&h.event==="protocol-message"&&h.channel===`inspect:${e}`){const m=h.data;n(g=>{const y=[...g,m];return y.length>Bx?y.slice(y.length-Bx):y})}},[e]),{subscribe:o,unsubscribe:l,connected:u}=ld({onMessage:i,enabled:!!e});b.useEffect(()=>(u&&e&&o(`inspect:${e}`),()=>{e&&l(`inspect:${e}`)}),[u,e,o,l]);const c=b.useCallback(()=>n([]),[]);return{entries:t,clear:c}}function sO(){var B;const[e,t]=b.useState("saved"),[n,i]=b.useState(""),[o,l]=b.useState(""),[u,c]=b.useState(""),[h,m]=b.useState("stdio"),[g,y]=b.useState(null),[x,w]=b.useState(!1),[_,S]=b.useState([]),[C,N]=b.useState([]),[k,R]=b.useState(null),[j,P]=b.useState(!1),[T,O]=b.useState(""),[L,V]=b.useState(""),[M,Z]=b.useState(!1),W=Ml(),{entries:ee}=rO(g);async function se(){var U;w(!0),R(null);try{let Q;if(e==="saved"){const fe=(U=W.data)==null?void 0:U.data.find(Ne=>Ne.id===n);if(!fe)throw new Error("Server not found");Q={transport:fe.transport,command:fe.command,args:fe.args,url:fe.url,env:fe.env}}else if(h==="stdio"){const fe=o.split(/\s+/);Q={transport:"stdio",command:fe[0],args:fe.slice(1)}}else Q={transport:h,url:u};const I=await Je.inspect.connect(Q);y(I.data.sessionId);const[Y,je]=await Promise.all([Je.inspect.tools(I.data.sessionId),Je.inspect.resources(I.data.sessionId).catch(()=>({data:[]}))]);S(Y.data),N(je.data)}catch(Q){R(Q instanceof Error?Q.message:"Connection failed")}w(!1)}async function oe(){g&&(await Je.inspect.disconnect(g).catch(()=>{}),y(null),S([]),N([]))}async function X(){if(!(!g||!T.trim())){Z(!0);try{await Je.inspect.saveRecording(g,T.trim(),L.trim()||void 0),P(!1),O(""),V("")}catch(U){R(U instanceof Error?U.message:"Failed to save recording")}Z(!1)}}const ie=ee.some(U=>U.direction==="outgoing"&&U.method==="tools/call");return d.jsxs("div",{className:"space-y-6",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Inspector"}),g?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(dt,{variant:"success",children:"Connected"}),d.jsxs("span",{className:"text-sm text-muted-foreground",children:[_.length," tools, ",C.length," resources"]}),ie&&d.jsxs(Me,{size:"sm",variant:"outline",onClick:()=>P(!0),children:[d.jsx(Ey,{className:"mr-2 h-4 w-4"}),"Save Recording"]}),d.jsxs(Me,{size:"sm",variant:"outline",onClick:oe,children:[d.jsx(aj,{className:"mr-2 h-4 w-4"}),"Disconnect"]})]}),j&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Save Recording"})}),d.jsxs(Xe,{className:"space-y-3",children:[d.jsx(Bt,{value:T,onChange:U=>O(U.target.value),placeholder:"Recording name"}),d.jsx(Bt,{value:L,onChange:U=>V(U.target.value),placeholder:"Description (optional)"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Me,{onClick:X,disabled:M||!T.trim(),children:[M?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Ey,{className:"mr-2 h-4 w-4"}),"Save"]}),d.jsx(Me,{variant:"outline",onClick:()=>P(!1),children:"Cancel"})]})]})]}),d.jsxs(up,{defaultValue:"tools",children:[d.jsxs(Vu,{children:[d.jsxs(ls,{value:"tools",children:["Tools (",_.length,")"]}),d.jsxs(ls,{value:"resources",children:["Resources (",C.length,")"]}),d.jsx(ls,{value:"call",children:"Call Tool"}),d.jsx(ls,{value:"protocol",children:"Protocol Log"})]}),d.jsx(cs,{value:"tools",className:"mt-4 space-y-3",children:_.map(U=>d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4",children:[d.jsx("p",{className:"font-medium text-sm",children:U.name}),U.description&&d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:U.description}),U.inputSchema&&d.jsxs("details",{className:"mt-2",children:[d.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer",children:"Input Schema"}),d.jsx(sm,{data:U.inputSchema})]})]})},U.name))}),d.jsx(cs,{value:"resources",className:"mt-4 space-y-3",children:C.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No resources exposed"}):C.map(U=>d.jsx(Ye,{children:d.jsxs(Xe,{className:"pt-4",children:[d.jsx("p",{className:"font-medium text-sm",children:U.name??U.uri}),d.jsx("p",{className:"text-xs text-muted-foreground",children:U.uri}),U.description&&d.jsx("p",{className:"text-xs mt-1",children:U.description})]})},U.uri))}),d.jsxs(cs,{value:"call",className:"mt-4 space-y-4",children:[d.jsx(Ye,{children:d.jsx(Xe,{className:"pt-4",children:d.jsx(Y2,{sessionId:g,tools:_})})}),d.jsx(nO,{entries:ee})]}),d.jsx(cs,{value:"protocol",className:"mt-4",children:d.jsx(Ye,{children:d.jsx(Xe,{className:"pt-4",children:d.jsx(X2,{entries:ee})})})})]})]}):d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Connect to Server"})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs(up,{value:e,onValueChange:U=>t(U),children:[d.jsxs(Vu,{children:[d.jsx(ls,{value:"saved",children:"Saved Server"}),d.jsx(ls,{value:"custom",children:"Custom"})]}),d.jsx(cs,{value:"saved",className:"space-y-3 mt-3",children:d.jsxs(Pn,{value:n,onValueChange:i,children:[d.jsx(yn,{children:d.jsx(Tn,{placeholder:"Select a server"})}),d.jsx(xn,{children:(B=W.data)==null?void 0:B.data.map(U=>d.jsxs(ut,{value:U.id,children:[U.name," (",U.transport,")"]},U.id))})]})}),d.jsxs(cs,{value:"custom",className:"space-y-3 mt-3",children:[d.jsxs(Pn,{value:h,onValueChange:U=>m(U),children:[d.jsx(yn,{children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"stdio",children:"stdio"}),d.jsx(ut,{value:"sse",children:"SSE"}),d.jsx(ut,{value:"streamable-http",children:"Streamable HTTP"})]})]}),h==="stdio"?d.jsx(Bt,{value:o,onChange:U=>l(U.target.value),placeholder:"npx @modelcontextprotocol/server-filesystem /tmp"}):d.jsx(Bt,{value:u,onChange:U=>c(U.target.value),placeholder:"http://localhost:3000/sse"})]})]}),k&&d.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:k}),d.jsxs(Me,{onClick:se,disabled:x,className:"w-full",children:[x?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Uh,{className:"mr-2 h-4 w-4"}),"Connect"]})]})]})]})}function cd({title:e="Connect to Server",buttonLabel:t,onConnect:n,connecting:i,error:o,children:l,secondaryAction:u}){var T;const[c,h]=b.useState("saved"),[m,g]=b.useState(""),[y,x]=b.useState(""),[w,_]=b.useState(""),[S,C]=b.useState("stdio"),N=Ml();function k(){var O;if(c==="saved"){const L=(O=N.data)==null?void 0:O.data.find(V=>V.id===m);return L?{transport:L.transport,command:L.command,args:L.args,url:L.url,env:L.env}:null}else if(S==="stdio"){const L=y.split(/\s+/);return{transport:"stdio",command:L[0],args:L.slice(1)}}else return{transport:S,url:w}}async function R(){const O=k();O&&await n(O)}async function j(){if(!u)return;const O=k();O&&await u.onClick(O)}const P=c==="saved"?!!m:S==="stdio"?!!y:!!w;return d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:e})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs(up,{value:c,onValueChange:O=>h(O),children:[d.jsxs(Vu,{children:[d.jsx(ls,{value:"saved",children:"Saved Server"}),d.jsx(ls,{value:"custom",children:"Custom"})]}),d.jsx(cs,{value:"saved",className:"space-y-3 mt-3",children:d.jsxs(Pn,{value:m,onValueChange:g,children:[d.jsx(yn,{children:d.jsx(Tn,{placeholder:"Select a server"})}),d.jsx(xn,{children:(T=N.data)==null?void 0:T.data.map(O=>d.jsxs(ut,{value:O.id,children:[O.name," (",O.transport,")"]},O.id))})]})}),d.jsxs(cs,{value:"custom",className:"space-y-3 mt-3",children:[d.jsxs(Pn,{value:S,onValueChange:O=>C(O),children:[d.jsx(yn,{children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"stdio",children:"stdio"}),d.jsx(ut,{value:"sse",children:"SSE"}),d.jsx(ut,{value:"streamable-http",children:"Streamable HTTP"})]})]}),S==="stdio"?d.jsx(Bt,{value:y,onChange:O=>x(O.target.value),placeholder:"npx @modelcontextprotocol/server-filesystem /tmp"}):d.jsx(Bt,{value:w,onChange:O=>_(O.target.value),placeholder:"http://localhost:3000/sse"})]})]}),l,o&&d.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:o}),d.jsxs("div",{className:u?"flex gap-2":"",children:[u&&d.jsxs(Me,{variant:"outline",onClick:j,disabled:u.loading||i||!P,className:"flex-1",children:[u.loading?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Uh,{className:"mr-2 h-4 w-4"}),u.label]}),d.jsxs(Me,{onClick:R,disabled:i||!P,className:u?"flex-1":"w-full",children:[i?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Uh,{className:"mr-2 h-4 w-4"}),t??"Connect & Start"]})]})]})]})}const kh={critical:"bg-red-600 text-white",high:"bg-red-500 text-white",medium:"bg-orange-500 text-white",low:"bg-yellow-500 text-black",info:"bg-blue-500 text-white"};function iO(){const[e,t]=b.useState("setup"),[n,i]=b.useState("passive"),[o,l]=b.useState(""),[u,c]=b.useState(!1),[h,m]=b.useState(null),[g,y]=b.useState(null),[x,w]=b.useState(!1),[_,S]=b.useState(null),[C,N]=b.useState(null),[k,R]=b.useState(null),[j,P]=b.useState(0),[T,O]=b.useState(0),[L,V]=b.useState([]),[M,Z]=b.useState(null),[W,ee]=b.useState("all"),[se,oe]=b.useState(null),X=b.useCallback(te=>{if(!(te.type!=="event"||!g||te.channel!==`scan:${g}`))switch(te.event){case"rule-start":{const re=te.data;R(re.ruleName);break}case"rule-complete":{P(re=>re+1);break}case"finding":{const re=te.data;V(ve=>[...ve,re.finding]);break}case"completed":{g&&Je.audit.result(g).then(re=>{Z(re.data),t("results")}).catch(()=>{t("results")});break}case"error":{const re=te.data;m(re.message),t("setup");break}}},[g]),{subscribe:ie,connected:B}=ld({onMessage:X,enabled:!!g});b.useEffect(()=>{B&&g&&ie(`scan:${g}`)},[B,g,ie]);function U(){const te=o.trim();if(te)return te.split(",").map(re=>re.trim()).filter(Boolean)}async function Q(te){w(!0),m(null);try{const re=await Je.audit.dryRun({...te,mode:n,excludeTools:U()});S(re.data),N(te),t("preview")}catch(re){m(re instanceof Error?re.message:"Failed to run dry-run preview")}w(!1)}async function I(te){c(!0),m(null),V([]),P(0),R(null);try{const re=await Je.audit.start({...te,mode:n,excludeTools:U()});y(re.data.sessionId);const ve=await Je.audit.status(re.data.sessionId);ve.data.progress&&O(ve.data.progress.totalRules),t("scanning")}catch(re){m(re instanceof Error?re.message:"Failed to start audit")}c(!1)}async function Y(){C&&await I(C)}async function je(){g&&(await Je.audit.stop(g).catch(()=>{}),y(null),t("setup"))}function fe(){y(null),Z(null),V([]),P(0),R(null),m(null),S(null),N(null),t("setup")}const Ne=(M==null?void 0:M.findings.filter(te=>W==="all"||te.severity===W))??[];return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(K0,{className:"h-8 w-8 text-primary"}),d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Security Audit"})]}),e==="setup"&&d.jsxs(cd,{title:"Start Security Audit",buttonLabel:"Start Scan",onConnect:I,connecting:u,error:h,secondaryAction:{label:"Preview Scan",loading:x,onClick:Q},children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Scan Mode"}),d.jsxs(Pn,{value:n,onValueChange:te=>i(te),children:[d.jsx(yn,{children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"passive",children:"Passive (safe, read-only probes)"}),d.jsx(ut,{value:"active",children:"Active (sends test payloads)"}),d.jsx(ut,{value:"aggressive",children:"Aggressive (extensive probing)"})]})]}),n!=="passive"&&d.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-300",children:[d.jsx("strong",{children:"Warning:"})," ",n==="active"?"Active":"Aggressive"," mode sends potentially harmful payloads. Only use against test environments."]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Exclude Tools"}),d.jsx(Bt,{value:o,onChange:te=>l(te.target.value),placeholder:"tool1, tool2, ... (comma-separated)"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Tools to skip during scanning. Destructive-sounding tools are auto-skipped in active/aggressive mode."})]})]}),e==="preview"&&_&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(wt,{children:"Scan Preview"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Me,{variant:"outline",size:"sm",onClick:()=>t("setup"),children:[d.jsx(Qu,{className:"mr-2 h-4 w-4"}),"Back"]}),d.jsxs(Me,{size:"sm",onClick:Y,disabled:u,children:[u?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Wr,{className:"mr-2 h-4 w-4"}),"Run Scan"]})]})]})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs(dt,{variant:"outline",children:[_.mode," mode"]}),d.jsxs("span",{className:"text-sm text-muted-foreground",children:[_.tools.filter(te=>te.included).length," of ",_.tools.length," tools will be scanned"]}),d.jsxs("span",{className:"text-sm text-muted-foreground",children:[_.rules.length," rule",_.rules.length!==1?"s":""]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-sm font-medium",children:"Rules"}),d.jsx("div",{className:"flex gap-2 flex-wrap",children:_.rules.map(te=>d.jsx(dt,{variant:"secondary",children:te},te))})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-sm font-medium",children:"Tools"}),d.jsxs("div",{className:"rounded-md border divide-y",children:[_.tools.map(te=>d.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[te.included?d.jsx(X_,{className:"h-4 w-4 text-green-600 flex-shrink-0"}):d.jsx(ha,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),d.jsx("span",{className:te.included?"text-sm":"text-sm text-muted-foreground line-through",children:te.name}),te.reason&&d.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:te.reason})]},te.name)),_.tools.length===0&&d.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No tools found on server"})]})]})]})]}),e==="scanning"&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(wt,{className:"flex items-center gap-2",children:[d.jsx(or,{className:"h-5 w-5 animate-spin"}),"Scanning..."]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:je,children:[d.jsx(V0,{className:"mr-2 h-4 w-4"}),"Stop"]})]})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[d.jsx("span",{children:k?`Running: ${k}`:"Starting..."}),d.jsxs("span",{children:[j," / ",T," rules"]})]}),d.jsx("div",{className:"h-2 w-full rounded-full bg-muted",children:d.jsx("div",{className:"h-2 rounded-full bg-primary transition-all",style:{width:T>0?`${j/T*100}%`:"0%"}})})]}),d.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["critical","high","medium","low","info"].map(te=>{const re=L.filter(ve=>ve.severity===te).length;return re===0?null:d.jsxs(dt,{className:kh[te],children:[te,": ",re]},te)}),L.length===0&&d.jsx("span",{className:"text-sm text-muted-foreground",children:"No findings yet"})]})]})]}),e==="results"&&M&&d.jsxs(d.Fragment,{children:[d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(wt,{children:["Scan Results - ",M.serverName]}),d.jsx(Me,{variant:"outline",size:"sm",onClick:fe,children:"New Scan"})]})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium",children:"Mode:"}),d.jsx(dt,{variant:"outline",children:M.mode}),d.jsx("span",{className:"text-sm font-medium ml-4",children:"Total Findings:"}),d.jsx(dt,{variant:"secondary",children:M.summary.totalFindings})]}),d.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["critical","high","medium","low","info"].map(te=>{const re=M.summary.bySeverity[te];return re===0?null:d.jsxs(dt,{className:kh[te],children:[te,": ",re]},te)}),M.summary.totalFindings===0&&d.jsx("span",{className:"text-sm text-green-600 font-medium",children:"No vulnerabilities found"})]})]})]}),M.findings.length>0&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(wt,{children:"Findings"}),d.jsxs(Pn,{value:W,onValueChange:ee,children:[d.jsx(yn,{className:"w-40",children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"all",children:"All Severities"}),d.jsx(ut,{value:"critical",children:"Critical"}),d.jsx(ut,{value:"high",children:"High"}),d.jsx(ut,{value:"medium",children:"Medium"}),d.jsx(ut,{value:"low",children:"Low"}),d.jsx(ut,{value:"info",children:"Info"})]})]})]})}),d.jsx(Xe,{children:d.jsx("div",{className:"space-y-2",children:Ne.map(te=>d.jsxs("div",{className:"rounded-md border",children:[d.jsxs("button",{className:"flex w-full items-center gap-3 p-3 text-left hover:bg-muted/50 transition-colors",onClick:()=>oe(se===te.id?null:te.id),children:[se===te.id?d.jsx(z0,{className:"h-4 w-4 flex-shrink-0"}):d.jsx(Y_,{className:"h-4 w-4 flex-shrink-0"}),d.jsx(dt,{className:`${kh[te.severity]} flex-shrink-0`,children:te.severity}),d.jsx("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:te.rule}),d.jsx("span",{className:"text-sm font-medium truncate",children:te.title})]}),se===te.id&&d.jsxs("div",{className:"border-t px-3 py-3 space-y-2 bg-muted/20",children:[d.jsx("p",{className:"text-sm",children:te.description}),te.evidence&&d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Evidence"}),d.jsx("pre",{className:"rounded bg-muted p-2 text-xs overflow-x-auto",children:te.evidence})]}),te.remediation&&d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Remediation"}),d.jsx("p",{className:"text-sm",children:te.remediation})]})]})]},te.id))})})]})]})]})}function oO(){const[e,t]=b.useState("connect"),[n,i]=b.useState(!1),[o,l]=b.useState(null),[u,c]=b.useState(null),[h,m]=b.useState([]),[g,y]=b.useState(""),[x,w]=b.useState("{}"),[_,S]=b.useState("100"),[C,N]=b.useState("5"),[k,R]=b.useState(null),[j,P]=b.useState("warmup"),[T,O]=b.useState(0),[L,V]=b.useState(0),[M,Z]=b.useState(null),W=b.useCallback(Q=>{if(!(Q.type!=="event"||!k||Q.channel!==`benchmark:${k}`))switch(Q.event){case"warmup-start":{P("warmup");break}case"iteration":{const I=Q.data;P("measuring"),O(I.iteration);break}case"completed":{const I=Q.data;Z(I.result),t("results");break}case"error":{const I=Q.data;l(I.message),t("connect");break}}},[k]),{subscribe:ee,connected:se}=ld({onMessage:W,enabled:!!k});b.useEffect(()=>{se&&k&&ee(`benchmark:${k}`)},[se,k,ee]);async function oe(Q){i(!0),l(null);try{const I=await Je.inspect.connect({transport:Q.transport,command:Q.command,args:Q.args,url:Q.url,env:Q.env}),Y=await Je.inspect.tools(I.data.sessionId);m(Y.data),c(Q),await Je.inspect.disconnect(I.data.sessionId).catch(()=>{}),Y.data.length>0&&y(Y.data[0].name),t("setup")}catch(I){l(I instanceof Error?I.message:"Failed to connect")}i(!1)}async function X(){if(!(!u||!g)){l(null),O(0),V(parseInt(_,10)),P("warmup");try{let Q={};try{Q=JSON.parse(x)}catch{l("Invalid JSON in tool arguments");return}const I=await Je.benchmark.start({...u,tool:g,toolArgs:Q,iterations:parseInt(_,10),warmup:parseInt(C,10)});R(I.data.sessionId),t("running")}catch(Q){l(Q instanceof Error?Q.message:"Failed to start benchmark")}}}async function ie(){k&&(await Je.benchmark.stop(k).catch(()=>{}),R(null),t("setup"))}function B(){R(null),Z(null),O(0),l(null),t("connect"),c(null),m([]),y("")}function U(Q){return Q.toFixed(2)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(q0,{className:"h-8 w-8 text-primary"}),d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Performance Benchmark"})]}),e==="connect"&&d.jsx(cd,{title:"Connect to Server",onConnect:oe,connecting:n,error:o}),e==="setup"&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(wt,{children:"Configure Benchmark"}),d.jsxs(dt,{variant:"success",children:[h.length," tools available"]})]})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Tool"}),d.jsxs(Pn,{value:g,onValueChange:y,children:[d.jsx(yn,{children:d.jsx(Tn,{placeholder:"Select a tool"})}),d.jsx(xn,{children:h.map(Q=>d.jsxs(ut,{value:Q.name,children:[Q.name,Q.description?` - ${Q.description}`:""]},Q.name))})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Tool Arguments (JSON)"}),d.jsx(Bt,{value:x,onChange:Q=>w(Q.target.value),placeholder:'{"path": "/tmp"}',className:"font-mono text-sm"})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Iterations"}),d.jsx(Bt,{type:"number",value:_,onChange:Q=>S(Q.target.value),min:"1"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Warmup Iterations"}),d.jsx(Bt,{type:"number",value:C,onChange:Q=>N(Q.target.value),min:"0"})]})]}),o&&d.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:o}),d.jsxs(Me,{onClick:X,disabled:!g,className:"w-full",children:[d.jsx(Wr,{className:"mr-2 h-4 w-4"}),"Run Benchmark"]})]})]}),e==="running"&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(wt,{className:"flex items-center gap-2",children:[d.jsx(or,{className:"h-5 w-5 animate-spin"}),"Running Benchmark"]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:ie,children:[d.jsx(V0,{className:"mr-2 h-4 w-4"}),"Stop"]})]})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium",children:"Tool:"}),d.jsx(dt,{variant:"outline",children:g}),d.jsx("span",{className:"text-sm font-medium ml-4",children:"Phase:"}),d.jsx(dt,{variant:j==="warmup"?"secondary":"default",children:j==="warmup"?"Warmup":"Measuring"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[d.jsx("span",{children:j==="warmup"?"Warming up...":`Iteration ${T} / ${L}`}),L>0&&j==="measuring"&&d.jsxs("span",{children:[(T/L*100).toFixed(0),"%"]})]}),d.jsx("div",{className:"h-2 w-full rounded-full bg-muted",children:d.jsx("div",{className:"h-2 rounded-full bg-primary transition-all",style:{width:j==="warmup"?"0%":L>0?`${T/L*100}%`:"0%"}})})]})]})]}),e==="results"&&M&&d.jsx(d.Fragment,{children:d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(wt,{children:["Benchmark Results - ",M.toolName]}),d.jsx(Me,{variant:"outline",size:"sm",onClick:B,children:"New Benchmark"})]})}),d.jsxs(Xe,{className:"space-y-6",children:[d.jsxs("div",{className:"flex gap-3 flex-wrap",children:[d.jsxs(dt,{variant:"outline",children:[M.iterations," iterations"]}),d.jsxs(dt,{variant:"outline",children:[M.errors," errors"]}),M.iterations>0&&d.jsxs(dt,{variant:"outline",children:[(M.errors/M.iterations*100).toFixed(1),"% error rate"]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(Ks,{label:"Min",value:`${U(M.stats.min)} ms`}),d.jsx(Ks,{label:"Max",value:`${U(M.stats.max)} ms`}),d.jsx(Ks,{label:"Mean",value:`${U(M.stats.mean)} ms`}),d.jsx(Ks,{label:"Median",value:`${U(M.stats.median)} ms`}),d.jsx(Ks,{label:"P95",value:`${U(M.stats.p95)} ms`}),d.jsx(Ks,{label:"P99",value:`${U(M.stats.p99)} ms`}),d.jsx(Ks,{label:"Std Dev",value:`${U(M.stats.stddev)} ms`}),d.jsx(Ks,{label:"Throughput",value:(()=>{const Q=new Date(M.startedAt).getTime(),Y=(new Date(M.completedAt).getTime()-Q)/1e3;return Y>0?`${(M.iterations/Y).toFixed(1)} calls/sec`:"N/A"})()})]})]})]})})]})}function Ks({label:e,value:t}){return d.jsxs("div",{className:"rounded-md border p-3",children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:e}),d.jsx("p",{className:"text-lg font-semibold",children:t})]})}function aO(){const[e,t]=b.useState("setup"),[n,i]=b.useState("markdown"),[o,l]=b.useState(!1),[u,c]=b.useState(null),[h,m]=b.useState(""),[g,y]=b.useState(!1);async function x(C){l(!0),c(null);try{const N=await Je.docs.generate({...C,format:n});m(N.data.content),t("results")}catch(N){c(N instanceof Error?N.message:"Failed to generate documentation")}l(!1)}function w(){navigator.clipboard.writeText(h),y(!0),setTimeout(()=>y(!1),2e3)}function _(){const C=n==="html"?"index.html":"README.md",N=n==="html"?"text/html":"text/markdown",k=new Blob([h],{type:N}),R=URL.createObjectURL(k),j=document.createElement("a");j.href=R,j.download=C,j.click(),URL.revokeObjectURL(R)}function S(){t("setup"),m(""),c(null)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(B0,{className:"h-8 w-8 text-primary"}),d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Documentation"})]}),e==="setup"&&d.jsx(cd,{title:"Generate Documentation",onConnect:x,connecting:o,error:u,children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium",children:"Output Format"}),d.jsxs(Pn,{value:n,onValueChange:C=>i(C),children:[d.jsx(yn,{children:d.jsx(Tn,{})}),d.jsxs(xn,{children:[d.jsx(ut,{value:"markdown",children:"Markdown"}),d.jsx(ut,{value:"html",children:"HTML"})]})]})]})}),e==="results"&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(wt,{children:["Generated Documentation (",n.toUpperCase(),")"]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Me,{variant:"outline",size:"sm",onClick:w,children:[d.jsx(ej,{className:"mr-2 h-4 w-4"}),g?"Copied!":"Copy"]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:_,children:[d.jsx($0,{className:"mr-2 h-4 w-4"}),"Download"]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:S,children:[d.jsx(Qu,{className:"mr-2 h-4 w-4"}),"Back"]})]})]})}),d.jsx(Xe,{children:d.jsx("pre",{className:"max-h-[600px] overflow-auto rounded-md bg-muted p-4 text-sm",children:d.jsx("code",{children:h})})})]})]})}function lO(e){return e>=80?"bg-green-500":e>=60?"bg-yellow-500":"bg-red-500"}function Ux(e){return e>=80?"text-green-600":e>=60?"text-yellow-600":"text-red-600"}const Wx={documentation:"Documentation",schemaQuality:"Schema Quality",errorHandling:"Error Handling",responsiveness:"Responsiveness",security:"Security"};function cO(){const[e,t]=b.useState("setup"),[n,i]=b.useState(!1),[o,l]=b.useState(null),[u,c]=b.useState(null),[h,m]=b.useState(null),[g,y]=b.useState(null),x=b.useCallback(k=>{if(!(k.type!=="event"||!h||!k.channel.startsWith(`score:${h}`)))switch(k.event){case"category-start":{const R=k.data;c(R.category);break}}},[h]),{subscribe:w,connected:_}=ld({onMessage:x,enabled:!!h&&e==="calculating"});b.useEffect(()=>{_&&h&&w(`score:${h}`)},[_,h,w]);async function S(k){i(!0),l(null),c(null),t("calculating");try{const R=await Je.score.calculate(k);m(R.data.sessionId),y(R.data.score),t("results")}catch(R){l(R instanceof Error?R.message:"Failed to calculate score"),t("setup")}i(!1)}async function C(){if(g)try{const k=await Je.score.badge(g),R=new Blob([k.data.svg],{type:"image/svg+xml"}),j=URL.createObjectURL(R),P=document.createElement("a");P.href=j,P.download="mcp-score-badge.svg",P.click(),URL.revokeObjectURL(j)}catch{}}function N(){t("setup"),y(null),m(null),l(null),c(null)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Q0,{className:"h-8 w-8 text-primary"}),d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"MCP Score"})]}),e==="setup"&&d.jsx(cd,{title:"Calculate MCP Score",onConnect:S,connecting:n,error:o}),e==="calculating"&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs(wt,{className:"flex items-center gap-2",children:[d.jsx(or,{className:"h-5 w-5 animate-spin"}),"Calculating Score..."]})}),d.jsx(Xe,{children:d.jsx("p",{className:"text-sm text-muted-foreground",children:u?`Evaluating ${Wx[u]??u}...`:"Connecting to server..."})})]}),e==="results"&&g&&d.jsxs(d.Fragment,{children:[d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(wt,{children:"Overall Score"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Me,{variant:"outline",size:"sm",onClick:C,children:[d.jsx($0,{className:"mr-2 h-4 w-4"}),"Download Badge"]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:N,children:[d.jsx(Qu,{className:"mr-2 h-4 w-4"}),"Back"]})]})]})}),d.jsx(Xe,{children:d.jsx("div",{className:"flex items-center justify-center py-4",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:`text-6xl font-bold ${Ux(g.overall)}`,children:g.overall}),d.jsx("div",{className:"text-lg text-muted-foreground mt-1",children:"out of 100"})]})})})]}),d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Category Breakdown"})}),d.jsx(Xe,{className:"space-y-4",children:Object.entries(g.categories).map(([k,R])=>d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsx("span",{className:"font-medium",children:Wx[k]??k}),d.jsxs("span",{className:Ux(R),children:[R,"/100"]})]}),d.jsx("div",{className:"h-3 w-full rounded-full bg-muted",children:d.jsx("div",{className:`h-3 rounded-full transition-all ${lO(R)}`,style:{width:`${R}%`}})})]},k))})]})]})]})}function uO({type:e}){const n={matched:{className:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",label:"Matched"},changed:{className:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",label:"Changed"},added:{className:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",label:"Added"},removed:{className:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",label:"Removed"}}[e]??{className:"bg-gray-100 text-gray-800",label:e};return d.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n.className}`,children:n.label})}function dO(){var k,R;const e=Kr(),t=Ml(),[n,i]=b.useState(null),[o,l]=b.useState(""),[u,c]=b.useState(""),[h,m]=b.useState("saved"),[g,y]=b.useState(null),x=Al({queryKey:["recordings"],queryFn:()=>Je.recordings.list()}),w=_r({mutationFn:j=>Je.recordings.delete(j),onSuccess:()=>e.invalidateQueries({queryKey:["recordings"]})}),_=_r({mutationFn:async({id:j,connectData:P})=>(await Je.recordings.replay(j,P)).data,onSuccess:j=>{y(j),i(null)}});function S(j){try{return JSON.parse(j.data)}catch{return null}}function C(){var P;if(!n)return;let j;if(h==="saved"){const T=(P=t.data)==null?void 0:P.data.find(O=>O.id===o);if(!T)return;j={transport:T.transport,command:T.command,args:T.args,url:T.url,env:T.env}}else{const T=u.split(/\s+/);j={transport:"stdio",command:T[0],args:T.slice(1)}}_.mutate({id:n,connectData:j})}const N=((k=x.data)==null?void 0:k.data)??[];return d.jsxs("div",{className:"space-y-6",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Recordings"}),n&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsx(wt,{children:"Replay Recording"})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Me,{size:"sm",variant:h==="saved"?"default":"outline",onClick:()=>m("saved"),children:"Saved Server"}),d.jsx(Me,{size:"sm",variant:h==="custom"?"default":"outline",onClick:()=>m("custom"),children:"Custom"})]}),h==="saved"?d.jsxs(Pn,{value:o,onValueChange:l,children:[d.jsx(yn,{children:d.jsx(Tn,{placeholder:"Select a server"})}),d.jsx(xn,{children:(R=t.data)==null?void 0:R.data.map(j=>d.jsxs(ut,{value:j.id,children:[j.name," (",j.transport,")"]},j.id))})]}):d.jsx(Bt,{value:u,onChange:j=>c(j.target.value),placeholder:"npx @modelcontextprotocol/server-filesystem /tmp"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Me,{onClick:C,disabled:_.isPending,children:[_.isPending?d.jsx(or,{className:"mr-2 h-4 w-4 animate-spin"}):d.jsx(Wr,{className:"mr-2 h-4 w-4"}),"Replay"]}),d.jsx(Me,{variant:"outline",onClick:()=>i(null),children:"Cancel"})]}),_.error&&d.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-200",children:_.error.message})]})]}),g&&d.jsxs(Ye,{children:[d.jsx(xt,{children:d.jsxs(wt,{children:["Replay Results: ",g.recordingName]})}),d.jsxs(Xe,{className:"space-y-4",children:[d.jsxs("div",{className:"flex gap-4 text-sm",children:[d.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["Matched: ",g.summary.matched]}),d.jsxs("span",{className:"text-yellow-600 dark:text-yellow-400",children:["Changed: ",g.summary.changed]}),d.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:["Added: ",g.summary.added]}),d.jsxs("span",{className:"text-red-600 dark:text-red-400",children:["Removed: ",g.summary.removed]})]}),d.jsx("div",{className:"space-y-2",children:g.steps.map(j=>d.jsxs("div",{className:"flex items-center gap-3 rounded-md border p-3 text-sm",children:[d.jsx("span",{className:"font-mono text-muted-foreground w-6",children:j.index+1}),d.jsx("span",{className:"font-medium",children:j.tool}),d.jsx(uO,{type:j.type}),j.outputDiff&&d.jsx("span",{className:"text-xs text-muted-foreground",children:j.outputDiff})]},j.index))}),d.jsx(Me,{variant:"outline",size:"sm",onClick:()=>y(null),children:"Close"})]})]}),N.length===0?d.jsx(Ye,{children:d.jsx(Xe,{className:"pt-6",children:d.jsxs("div",{className:"flex flex-col items-center gap-2 py-8 text-center text-muted-foreground",children:[d.jsx(Z0,{className:"h-12 w-12 opacity-50"}),d.jsx("p",{children:"No recordings yet."}),d.jsx("p",{className:"text-sm",children:"Use the Inspector to connect to a server, make tool calls, then save a recording."})]})})}):d.jsx("div",{className:"space-y-3",children:N.map(j=>{const P=S(j);return d.jsx(Ye,{children:d.jsxs(Xe,{className:"flex items-center justify-between pt-4",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:j.name}),d.jsxs("div",{className:"flex gap-2 mt-1 text-xs text-muted-foreground",children:[j.serverName&&d.jsxs("span",{children:["Server: ",j.serverName]}),P&&d.jsxs("span",{children:[P.steps.length," steps"]}),d.jsx("span",{children:new Date(j.createdAt).toLocaleString()})]}),j.description&&d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:j.description})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Me,{size:"sm",variant:"outline",onClick:()=>{i(j.id),y(null)},children:[d.jsx(Wr,{className:"mr-1 h-3 w-3"}),"Replay"]}),d.jsx(Me,{size:"sm",variant:"ghost",onClick:()=>w.mutate(j.id),disabled:w.isPending,children:d.jsx(pa,{className:"h-4 w-4 text-red-500"})})]})]})},j.id)})})]})}const cr=O_({component:function(){const t=Hn(),n=t.state.location.pathname;return d.jsx(qj,{currentPath:n,onNavigate:i=>t.navigate({to:i}),children:d.jsx(F0,{})})}}),fO=ar({getParentRoute:()=>cr,path:"/",component:yE}),hO=ar({getParentRoute:()=>cr,path:"/servers",component:m2}),pO=ar({getParentRoute:()=>cr,path:"/collections",component:S2}),mO=ar({getParentRoute:()=>cr,path:"/runs",component:C2}),gO=ar({getParentRoute:()=>cr,path:"/runs/$runId",component:j2}),vO=ar({getParentRoute:()=>cr,path:"/inspect",component:sO}),yO=ar({getParentRoute:()=>cr,path:"/audit",component:iO}),xO=ar({getParentRoute:()=>cr,path:"/benchmark",component:oO}),wO=ar({getParentRoute:()=>cr,path:"/docs",component:aO}),SO=ar({getParentRoute:()=>cr,path:"/score",component:cO}),bO=ar({getParentRoute:()=>cr,path:"/recordings",component:dO}),CO=cr.addChildren([fO,hO,pO,mO,gO,vO,yO,xO,wO,SO,bO]),gs=V_({routeTree:CO});Hh.getState().initTheme();const kO=new OC({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1}}});lC.createRoot(document.getElementById("root")).render(d.jsx(b.StrictMode,{children:d.jsx(AC,{client:kO,children:d.jsx(U_,{router:gs})})}));
|
|
361
|
+
//# sourceMappingURL=index-CMNP6jgH.js.map
|