@agent-team-foundation/first-tree-hub 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bootstrap-CPdLNPme.mjs → bootstrap-uyPaaI05.mjs} +24 -14
- package/dist/cli/index.mjs +39 -34
- package/dist/{core-CZjUVAU-.mjs → core-CMeOAZmx.mjs} +504 -812
- package/dist/drizzle/0007_decouple_context_tree.sql +2 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/index.mjs +3 -3
- package/dist/web/assets/index-C4J9gHaF.js +280 -0
- package/dist/web/assets/index-vo2Sa6IQ.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BHn3RVzY.js +0 -272
- package/dist/web/assets/index-BURu6jt9.css +0 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
var ub=e=>{throw TypeError(e)};var lh=(e,n,i)=>n.has(e)||ub("Cannot "+i);var O=(e,n,i)=>(lh(e,n,"read from private field"),i?i.call(e):n.get(e)),xe=(e,n,i)=>n.has(e)?ub("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i),ce=(e,n,i,a)=>(lh(e,n,"write to private field"),a?a.call(e,i):n.set(e,i),i),De=(e,n,i)=>(lh(e,n,"access private method"),i);var Gu=(e,n,i,a)=>({set _(o){ce(e,n,o,i)},get _(){return O(e,n,a)}});function J_(e,n){for(var i=0;i<n.length;i++){const a=n[i];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(a,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();function Oc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oh={exports:{}},Jo={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var cb;function W_(){if(cb)return Jo;cb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(a,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:u}}return Jo.Fragment=n,Jo.jsx=i,Jo.jsxs=i,Jo}var fb;function eC(){return fb||(fb=1,oh.exports=W_()),oh.exports}var y=eC(),sh={exports:{}},je={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var db;function tC(){if(db)return je;db=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,T={};function A(D,Q,k){this.props=D,this.context=Q,this.refs=T,this.updater=k||N}A.prototype.isReactComponent={},A.prototype.setState=function(D,Q){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,Q,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function q(){}q.prototype=A.prototype;function U(D,Q,k){this.props=D,this.context=Q,this.refs=T,this.updater=k||N}var P=U.prototype=new q;P.constructor=U,_(P,A.prototype),P.isPureReactComponent=!0;var L=Array.isArray;function j(){}var Y={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function re(D,Q,k){var oe=k.ref;return{$$typeof:e,type:D,key:Q,ref:oe!==void 0?oe:null,props:k}}function de(D,Q){return re(D.type,Q,D.props)}function le(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function ae(D){var Q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(k){return Q[k]})}var Ae=/\/+/g;function se(D,Q){return typeof D=="object"&&D!==null&&D.key!=null?ae(""+D.key):Q.toString(36)}function ee(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(j,j):(D.status="pending",D.then(function(Q){D.status==="pending"&&(D.status="fulfilled",D.value=Q)},function(Q){D.status==="pending"&&(D.status="rejected",D.reason=Q)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function I(D,Q,k,oe,fe){var ue=typeof D;(ue==="undefined"||ue==="boolean")&&(D=null);var ke=!1;if(D===null)ke=!0;else switch(ue){case"bigint":case"string":case"number":ke=!0;break;case"object":switch(D.$$typeof){case e:case n:ke=!0;break;case g:return ke=D._init,I(ke(D._payload),Q,k,oe,fe)}}if(ke)return fe=fe(D),ke=oe===""?"."+se(D,0):oe,L(fe)?(k="",ke!=null&&(k=ke.replace(Ae,"$&/")+"/"),I(fe,Q,k,"",function(Ct){return Ct})):fe!=null&&(le(fe)&&(fe=de(fe,k+(fe.key==null||D&&D.key===fe.key?"":(""+fe.key).replace(Ae,"$&/")+"/")+ke)),Q.push(fe)),1;ke=0;var we=oe===""?".":oe+":";if(L(D))for(var be=0;be<D.length;be++)oe=D[be],ue=we+se(oe,be),ke+=I(oe,Q,k,ue,fe);else if(be=S(D),typeof be=="function")for(D=be.call(D),be=0;!(oe=D.next()).done;)oe=oe.value,ue=we+se(oe,be++),ke+=I(oe,Q,k,ue,fe);else if(ue==="object"){if(typeof D.then=="function")return I(ee(D),Q,k,oe,fe);throw Q=String(D),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ke}function te(D,Q,k){if(D==null)return D;var oe=[],fe=0;return I(D,oe,"","",function(ue){return Q.call(k,ue,fe++)}),oe}function he(D){if(D._status===-1){var Q=D._result;Q=Q(),Q.then(function(k){(D._status===0||D._status===-1)&&(D._status=1,D._result=k)},function(k){(D._status===0||D._status===-1)&&(D._status=2,D._result=k)}),D._status===-1&&(D._status=0,D._result=Q)}if(D._status===1)return D._result.default;throw D._result}var ze=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},C={map:te,forEach:function(D,Q,k){te(D,function(){Q.apply(this,arguments)},k)},count:function(D){var Q=0;return te(D,function(){Q++}),Q},toArray:function(D){return te(D,function(Q){return Q})||[]},only:function(D){if(!le(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return je.Activity=v,je.Children=C,je.Component=A,je.Fragment=i,je.Profiler=o,je.PureComponent=U,je.StrictMode=a,je.Suspense=p,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,je.__COMPILER_RUNTIME={__proto__:null,c:function(D){return Y.H.useMemoCache(D)}},je.cache=function(D){return function(){return D.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(D,Q,k){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var oe=_({},D.props),fe=D.key;if(Q!=null)for(ue in Q.key!==void 0&&(fe=""+Q.key),Q)!$.call(Q,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&Q.ref===void 0||(oe[ue]=Q[ue]);var ue=arguments.length-2;if(ue===1)oe.children=k;else if(1<ue){for(var ke=Array(ue),we=0;we<ue;we++)ke[we]=arguments[we+2];oe.children=ke}return re(D.type,fe,oe)},je.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},je.createElement=function(D,Q,k){var oe,fe={},ue=null;if(Q!=null)for(oe in Q.key!==void 0&&(ue=""+Q.key),Q)$.call(Q,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(fe[oe]=Q[oe]);var ke=arguments.length-2;if(ke===1)fe.children=k;else if(1<ke){for(var we=Array(ke),be=0;be<ke;be++)we[be]=arguments[be+2];fe.children=we}if(D&&D.defaultProps)for(oe in ke=D.defaultProps,ke)fe[oe]===void 0&&(fe[oe]=ke[oe]);return re(D,ue,fe)},je.createRef=function(){return{current:null}},je.forwardRef=function(D){return{$$typeof:d,render:D}},je.isValidElement=le,je.lazy=function(D){return{$$typeof:g,_payload:{_status:-1,_result:D},_init:he}},je.memo=function(D,Q){return{$$typeof:m,type:D,compare:Q===void 0?null:Q}},je.startTransition=function(D){var Q=Y.T,k={};Y.T=k;try{var oe=D(),fe=Y.S;fe!==null&&fe(k,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(j,ze)}catch(ue){ze(ue)}finally{Q!==null&&k.types!==null&&(Q.types=k.types),Y.T=Q}},je.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},je.use=function(D){return Y.H.use(D)},je.useActionState=function(D,Q,k){return Y.H.useActionState(D,Q,k)},je.useCallback=function(D,Q){return Y.H.useCallback(D,Q)},je.useContext=function(D){return Y.H.useContext(D)},je.useDebugValue=function(){},je.useDeferredValue=function(D,Q){return Y.H.useDeferredValue(D,Q)},je.useEffect=function(D,Q){return Y.H.useEffect(D,Q)},je.useEffectEvent=function(D){return Y.H.useEffectEvent(D)},je.useId=function(){return Y.H.useId()},je.useImperativeHandle=function(D,Q,k){return Y.H.useImperativeHandle(D,Q,k)},je.useInsertionEffect=function(D,Q){return Y.H.useInsertionEffect(D,Q)},je.useLayoutEffect=function(D,Q){return Y.H.useLayoutEffect(D,Q)},je.useMemo=function(D,Q){return Y.H.useMemo(D,Q)},je.useOptimistic=function(D,Q){return Y.H.useOptimistic(D,Q)},je.useReducer=function(D,Q,k){return Y.H.useReducer(D,Q,k)},je.useRef=function(D){return Y.H.useRef(D)},je.useState=function(D){return Y.H.useState(D)},je.useSyncExternalStore=function(D,Q,k){return Y.H.useSyncExternalStore(D,Q,k)},je.useTransition=function(){return Y.H.useTransition()},je.version="19.2.4",je}var hb;function xm(){return hb||(hb=1,sh.exports=tC()),sh.exports}var w=xm();const nC=Oc(w),Sm=J_({__proto__:null,default:nC},[w]);var uh={exports:{}},Wo={},ch={exports:{}},fh={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var mb;function rC(){return mb||(mb=1,(function(e){function n(I,te){var he=I.length;I.push(te);e:for(;0<he;){var ze=he-1>>>1,C=I[ze];if(0<o(C,te))I[ze]=te,I[he]=C,he=ze;else break e}}function i(I){return I.length===0?null:I[0]}function a(I){if(I.length===0)return null;var te=I[0],he=I.pop();if(he!==te){I[0]=he;e:for(var ze=0,C=I.length,D=C>>>1;ze<D;){var Q=2*(ze+1)-1,k=I[Q],oe=Q+1,fe=I[oe];if(0>o(k,he))oe<C&&0>o(fe,k)?(I[ze]=fe,I[oe]=he,ze=oe):(I[ze]=k,I[Q]=he,ze=Q);else if(oe<C&&0>o(fe,he))I[ze]=fe,I[oe]=he,ze=oe;else break e}}return te}function o(I,te){var he=I.sortIndex-te.sortIndex;return he!==0?he:I.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],m=[],g=1,v=null,x=3,S=!1,N=!1,_=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function P(I){for(var te=i(m);te!==null;){if(te.callback===null)a(m);else if(te.startTime<=I)a(m),te.sortIndex=te.expirationTime,n(p,te);else break;te=i(m)}}function L(I){if(_=!1,P(I),!N)if(i(p)!==null)N=!0,j||(j=!0,ae());else{var te=i(m);te!==null&&ee(L,te.startTime-I)}}var j=!1,Y=-1,$=5,re=-1;function de(){return T?!0:!(e.unstable_now()-re<$)}function le(){if(T=!1,j){var I=e.unstable_now();re=I;var te=!0;try{e:{N=!1,_&&(_=!1,q(Y),Y=-1),S=!0;var he=x;try{t:{for(P(I),v=i(p);v!==null&&!(v.expirationTime>I&&de());){var ze=v.callback;if(typeof ze=="function"){v.callback=null,x=v.priorityLevel;var C=ze(v.expirationTime<=I);if(I=e.unstable_now(),typeof C=="function"){v.callback=C,P(I),te=!0;break t}v===i(p)&&a(p),P(I)}else a(p);v=i(p)}if(v!==null)te=!0;else{var D=i(m);D!==null&&ee(L,D.startTime-I),te=!1}}break e}finally{v=null,x=he,S=!1}te=void 0}}finally{te?ae():j=!1}}}var ae;if(typeof U=="function")ae=function(){U(le)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,se=Ae.port2;Ae.port1.onmessage=le,ae=function(){se.postMessage(null)}}else ae=function(){A(le,0)};function ee(I,te){Y=A(function(){I(e.unstable_now())},te)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var te=3;break;default:te=x}var he=x;x=te;try{return I()}finally{x=he}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(I,te){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var he=x;x=I;try{return te()}finally{x=he}},e.unstable_scheduleCallback=function(I,te,he){var ze=e.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?ze+he:ze):he=ze,I){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=he+C,I={id:g++,callback:te,priorityLevel:I,startTime:he,expirationTime:C,sortIndex:-1},he>ze?(I.sortIndex=he,n(m,I),i(p)===null&&I===i(m)&&(_?(q(Y),Y=-1):_=!0,ee(L,he-ze))):(I.sortIndex=C,n(p,I),N||S||(N=!0,j||(j=!0,ae()))),I},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(I){var te=x;return function(){var he=x;x=te;try{return I.apply(this,arguments)}finally{x=he}}}})(fh)),fh}var pb;function iC(){return pb||(pb=1,ch.exports=rC()),ch.exports}var dh={exports:{}},Jt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var gb;function aC(){if(gb)return Jt;gb=1;var e=xm();function n(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,m,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:m,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Jt.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(n(299));return u(p,m,null,g)},Jt.flushSync=function(p){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=m,a.p=g,a.d.f()}},Jt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},Jt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Jt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,v=d(g,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):g==="script"&&a.d.X(p,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Jt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=d(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},Jt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,v=d(g,m.crossOrigin);a.d.L(p,g,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Jt.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=d(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},Jt.requestFormReset=function(p){a.d.r(p)},Jt.unstable_batchedUpdates=function(p,m){return p(m)},Jt.useFormState=function(p,m,g){return c.H.useFormState(p,m,g)},Jt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Jt.version="19.2.4",Jt}var yb;function k0(){if(yb)return dh.exports;yb=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(n){console.error(n)}}return e(),dh.exports=aC(),dh.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var vb;function lC(){if(vb)return Wo;vb=1;var e=iC(),n=xm(),i=k0();function a(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var r=t,l=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(l=r.return),t=r.return;while(t)}return r.tag===3?l:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(a(188))}function m(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(a(188));return r!==t?null:t}for(var l=t,s=r;;){var f=l.return;if(f===null)break;var h=f.alternate;if(h===null){if(s=f.return,s!==null){l=s;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===l)return p(f),t;if(h===s)return p(f),r;h=h.sibling}throw Error(a(188))}if(l.return!==s.return)l=f,s=h;else{for(var b=!1,E=f.child;E;){if(E===l){b=!0,l=f,s=h;break}if(E===s){b=!0,s=f,l=h;break}E=E.sibling}if(!b){for(E=h.child;E;){if(E===l){b=!0,l=h,s=f;break}if(E===s){b=!0,s=h,l=f;break}E=E.sibling}if(!b)throw Error(a(189))}}if(l.alternate!==s)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?t:r}function g(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=g(t),r!==null)return r;t=t.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),U=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),de=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function ae(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var Ae=Symbol.for("react.client.reference");function se(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ae?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case A:return"Profiler";case T:return"StrictMode";case L:return"Suspense";case j:return"SuspenseList";case re:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case N:return"Portal";case U:return t.displayName||"Context";case q:return(t._context.displayName||"Context")+".Consumer";case P:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Y:return r=t.displayName||null,r!==null?r:se(t.type)||"Memo";case $:r=t._payload,t=t._init;try{return se(t(r))}catch{}}return null}var ee=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ze=[],C=-1;function D(t){return{current:t}}function Q(t){0>C||(t.current=ze[C],ze[C]=null,C--)}function k(t,r){C++,ze[C]=t.current,t.current=r}var oe=D(null),fe=D(null),ue=D(null),ke=D(null);function we(t,r){switch(k(ue,r),k(fe,t),k(oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Ov(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Ov(r),t=Rv(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Q(oe),k(oe,t)}function be(){Q(oe),Q(fe),Q(ue)}function Ct(t){t.memoizedState!==null&&k(ke,t);var r=oe.current,l=Rv(r,t.type);r!==l&&(k(fe,t),k(oe,l))}function Xt(t){fe.current===t&&(Q(oe),Q(fe)),ke.current===t&&(Q(ke),Yo._currentValue=he)}var Bn,dr;function Kt(t){if(Bn===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Bn=r&&r[1]||"",dr=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Bn+t+dr}var kr=!1;function Tr(t,r){if(!t||kr)return"";kr=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(r){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(V){var F=V}Reflect.construct(t,[],W)}else{try{W.call()}catch(V){F=V}t.call(W.prototype)}}else{try{throw Error()}catch(V){F=V}(W=t())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(V){if(V&&F&&typeof V.stack=="string")return[V.stack,F.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),b=h[0],E=h[1];if(b&&E){var z=b.split(`
|
|
44
|
+
`),Z=E.split(`
|
|
45
|
+
`);for(f=s=0;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;for(;f<Z.length&&!Z[f].includes("DetermineComponentFrameRoot");)f++;if(s===z.length||f===Z.length)for(s=z.length-1,f=Z.length-1;1<=s&&0<=f&&z[s]!==Z[f];)f--;for(;1<=s&&0<=f;s--,f--)if(z[s]!==Z[f]){if(s!==1||f!==1)do if(s--,f--,0>f||z[s]!==Z[f]){var G=`
|
|
46
|
+
`+z[s].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=s&&0<=f);break}}}finally{kr=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Kt(l):""}function si(t,r){switch(t.tag){case 26:case 27:case 5:return Kt(t.type);case 16:return Kt("Lazy");case 13:return t.child!==r&&r!==null?Kt("Suspense Fallback"):Kt("Suspense");case 19:return Kt("SuspenseList");case 0:case 15:return Tr(t.type,!1);case 11:return Tr(t.type.render,!1);case 1:return Tr(t.type,!0);case 31:return Kt("Activity");default:return""}}function rr(t){try{var r="",l=null;do r+=si(t,l),l=t,t=t.return;while(t);return r}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Ar=Object.prototype.hasOwnProperty,hr=e.unstable_scheduleCallback,ui=e.unstable_cancelCallback,Ba=e.unstable_shouldYield,Ia=e.unstable_requestPaint,Lt=e.unstable_now,qa=e.unstable_getCurrentPriorityLevel,R=e.unstable_ImmediatePriority,ne=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Ue=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,wn=e.log,Nr=e.unstable_setDisableYieldValue,nn=null,Ot=null;function sn(t){if(typeof wn=="function"&&Nr(t),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(nn,t)}catch{}}var lt=Math.clz32?Math.clz32:Bw,ci=Math.log,ir=Math.LN2;function Bw(t){return t>>>=0,t===0?32:31-(ci(t)/ir|0)|0}var Rs=256,Ds=262144,Ms=4194304;function ra(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Us(t,r,l){var s=t.pendingLanes;if(s===0)return 0;var f=0,h=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var E=s&134217727;return E!==0?(s=E&~h,s!==0?f=ra(s):(b&=E,b!==0?f=ra(b):l||(l=E&~t,l!==0&&(f=ra(l))))):(E=s&~h,E!==0?f=ra(E):b!==0?f=ra(b):l||(l=s&~t,l!==0&&(f=ra(l)))),f===0?0:r!==0&&r!==f&&(r&h)===0&&(h=f&-f,l=r&-r,h>=l||h===32&&(l&4194048)!==0)?r:f}function lo(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function Iw(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hp(){var t=Ms;return Ms<<=1,(Ms&62914560)===0&&(Ms=4194304),t}function Qc(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function oo(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function qw(t,r,l,s,f,h){var b=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var E=t.entanglements,z=t.expirationTimes,Z=t.hiddenUpdates;for(l=b&~l;0<l;){var G=31-lt(l),W=1<<G;E[G]=0,z[G]=-1;var F=Z[G];if(F!==null)for(Z[G]=null,G=0;G<F.length;G++){var V=F[G];V!==null&&(V.lane&=-536870913)}l&=~W}s!==0&&mp(t,s,0),h!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=h&~(b&~r))}function mp(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var s=31-lt(r);t.entangledLanes|=r,t.entanglements[s]=t.entanglements[s]|1073741824|l&261930}function pp(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var s=31-lt(l),f=1<<s;f&r|t[s]&r&&(t[s]|=r),l&=~f}}function gp(t,r){var l=r&-r;return l=(l&42)!==0?1:Yc(l),(l&(t.suspendedLanes|r))!==0?0:l}function Yc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Gc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function yp(){var t=te.p;return t!==0?t:(t=window.event,t===void 0?32:nb(t.type))}function vp(t,r){var l=te.p;try{return te.p=t,r()}finally{te.p=l}}var fi=Math.random().toString(36).slice(2),Pt="__reactFiber$"+fi,un="__reactProps$"+fi,Ha="__reactContainer$"+fi,Xc="__reactEvents$"+fi,Hw="__reactListeners$"+fi,Zw="__reactHandles$"+fi,bp="__reactResources$"+fi,so="__reactMarker$"+fi;function Kc(t){delete t[Pt],delete t[un],delete t[Xc],delete t[Hw],delete t[Zw]}function Za(t){var r=t[Pt];if(r)return r;for(var l=t.parentNode;l;){if(r=l[Ha]||l[Pt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=qv(t);t!==null;){if(l=t[Pt])return l;t=qv(t)}return r}t=l,l=t.parentNode}return null}function Pa(t){if(t=t[Pt]||t[Ha]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function uo(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(a(33))}function Fa(t){var r=t[bp];return r||(r=t[bp]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Bt(t){t[so]=!0}var xp=new Set,Sp={};function ia(t,r){$a(t,r),$a(t+"Capture",r)}function $a(t,r){for(Sp[t]=r,t=0;t<r.length;t++)xp.add(r[t])}var Pw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wp={},Ep={};function Fw(t){return Ar.call(Ep,t)?!0:Ar.call(wp,t)?!1:Pw.test(t)?Ep[t]=!0:(wp[t]=!0,!1)}function Ls(t,r,l){if(Fw(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var s=r.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function Bs(t,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+l)}}function zr(t,r,l,s){if(s===null)t.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+s)}}function In(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _p(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function $w(t,r,l){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,h=s.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(b){l=""+b,h.call(this,b)}}),Object.defineProperty(t,r,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Jc(t){if(!t._valueTracker){var r=_p(t)?"checked":"value";t._valueTracker=$w(t,r,""+t[r])}}function Cp(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),s="";return t&&(s=_p(t)?t.checked?"true":"false":t.value),t=s,t!==l?(r.setValue(t),!0):!1}function Is(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Vw=/[\n"\\]/g;function qn(t){return t.replace(Vw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Wc(t,r,l,s,f,h,b,E){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),r!=null?b==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+In(r)):t.value!==""+In(r)&&(t.value=""+In(r)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),r!=null?ef(t,b,In(r)):l!=null?ef(t,b,In(l)):s!=null&&t.removeAttribute("value"),f==null&&h!=null&&(t.defaultChecked=!!h),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+In(E):t.removeAttribute("name")}function kp(t,r,l,s,f,h,b,E){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.type=h),r!=null||l!=null){if(!(h!=="submit"&&h!=="reset"||r!=null)){Jc(t);return}l=l!=null?""+In(l):"",r=r!=null?""+In(r):l,E||r===t.value||(t.value=r),t.defaultValue=r}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=E?t.checked:!!s,t.defaultChecked=!!s,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Jc(t)}function ef(t,r,l){r==="number"&&Is(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Va(t,r,l,s){if(t=t.options,r){r={};for(var f=0;f<l.length;f++)r["$"+l[f]]=!0;for(l=0;l<t.length;l++)f=r.hasOwnProperty("$"+t[l].value),t[l].selected!==f&&(t[l].selected=f),f&&s&&(t[l].defaultSelected=!0)}else{for(l=""+In(l),r=null,f=0;f<t.length;f++){if(t[f].value===l){t[f].selected=!0,s&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function Tp(t,r,l){if(r!=null&&(r=""+In(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+In(l):""}function Ap(t,r,l,s){if(r==null){if(s!=null){if(l!=null)throw Error(a(92));if(ee(s)){if(1<s.length)throw Error(a(93));s=s[0]}l=s}l==null&&(l=""),r=l}l=In(r),t.defaultValue=l,s=t.textContent,s===l&&s!==""&&s!==null&&(t.value=s),Jc(t)}function Qa(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var Qw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Np(t,r,l){var s=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":s?t.setProperty(r,l):typeof l!="number"||l===0||Qw.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function zp(t,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(t=t.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||r!=null&&r.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var f in r)s=r[f],r.hasOwnProperty(f)&&l[f]!==s&&Np(t,f,s)}else for(var h in r)r.hasOwnProperty(h)&&Np(t,h,r[h])}function tf(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Yw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Gw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qs(t){return Gw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function jr(){}var nf=null;function rf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ya=null,Ga=null;function jp(t){var r=Pa(t);if(r&&(t=r.stateNode)){var l=t[un]||null;e:switch(t=r.stateNode,r.type){case"input":if(Wc(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+qn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var s=l[r];if(s!==t&&s.form===t.form){var f=s[un]||null;if(!f)throw Error(a(90));Wc(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<l.length;r++)s=l[r],s.form===t.form&&Cp(s)}break e;case"textarea":Tp(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Va(t,!!l.multiple,r,!1)}}}var af=!1;function Op(t,r,l){if(af)return t(r,l);af=!0;try{var s=t(r);return s}finally{if(af=!1,(Ya!==null||Ga!==null)&&(Tu(),Ya&&(r=Ya,t=Ga,Ga=Ya=null,jp(r),t)))for(r=0;r<t.length;r++)jp(t[r])}}function co(t,r){var l=t.stateNode;if(l===null)return null;var s=l[un]||null;if(s===null)return null;l=s[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var Or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lf=!1;if(Or)try{var fo={};Object.defineProperty(fo,"passive",{get:function(){lf=!0}}),window.addEventListener("test",fo,fo),window.removeEventListener("test",fo,fo)}catch{lf=!1}var di=null,of=null,Hs=null;function Rp(){if(Hs)return Hs;var t,r=of,l=r.length,s,f="value"in di?di.value:di.textContent,h=f.length;for(t=0;t<l&&r[t]===f[t];t++);var b=l-t;for(s=1;s<=b&&r[l-s]===f[h-s];s++);return Hs=f.slice(t,1<s?1-s:void 0)}function Zs(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Ps(){return!0}function Dp(){return!1}function cn(t){function r(l,s,f,h,b){this._reactName=l,this._targetInst=f,this.type=s,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(l=t[E],this[E]=l?l(h):h[E]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Ps:Dp,this.isPropagationStopped=Dp,this}return v(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ps)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ps)},persist:function(){},isPersistent:Ps}),r}var aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fs=cn(aa),ho=v({},aa,{view:0,detail:0}),Xw=cn(ho),sf,uf,mo,$s=v({},ho,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ff,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==mo&&(mo&&t.type==="mousemove"?(sf=t.screenX-mo.screenX,uf=t.screenY-mo.screenY):uf=sf=0,mo=t),sf)},movementY:function(t){return"movementY"in t?t.movementY:uf}}),Mp=cn($s),Kw=v({},$s,{dataTransfer:0}),Jw=cn(Kw),Ww=v({},ho,{relatedTarget:0}),cf=cn(Ww),eE=v({},aa,{animationName:0,elapsedTime:0,pseudoElement:0}),tE=cn(eE),nE=v({},aa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),rE=cn(nE),iE=v({},aa,{data:0}),Up=cn(iE),aE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lE={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"},oE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sE(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=oE[t])?!!r[t]:!1}function ff(){return sE}var uE=v({},ho,{key:function(t){if(t.key){var r=aE[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Zs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?lE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ff,charCode:function(t){return t.type==="keypress"?Zs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Zs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),cE=cn(uE),fE=v({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lp=cn(fE),dE=v({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ff}),hE=cn(dE),mE=v({},aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),pE=cn(mE),gE=v({},$s,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),yE=cn(gE),vE=v({},aa,{newState:0,oldState:0}),bE=cn(vE),xE=[9,13,27,32],df=Or&&"CompositionEvent"in window,po=null;Or&&"documentMode"in document&&(po=document.documentMode);var SE=Or&&"TextEvent"in window&&!po,Bp=Or&&(!df||po&&8<po&&11>=po),Ip=" ",qp=!1;function Hp(t,r){switch(t){case"keyup":return xE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xa=!1;function wE(t,r){switch(t){case"compositionend":return Zp(r);case"keypress":return r.which!==32?null:(qp=!0,Ip);case"textInput":return t=r.data,t===Ip&&qp?null:t;default:return null}}function EE(t,r){if(Xa)return t==="compositionend"||!df&&Hp(t,r)?(t=Rp(),Hs=of=di=null,Xa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Bp&&r.locale!=="ko"?null:r.data;default:return null}}var _E={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 Pp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!_E[t.type]:r==="textarea"}function Fp(t,r,l,s){Ya?Ga?Ga.push(s):Ga=[s]:Ya=s,r=Du(r,"onChange"),0<r.length&&(l=new Fs("onChange","change",null,l,s),t.push({event:l,listeners:r}))}var go=null,yo=null;function CE(t){kv(t,0)}function Vs(t){var r=uo(t);if(Cp(r))return t}function $p(t,r){if(t==="change")return r}var Vp=!1;if(Or){var hf;if(Or){var mf="oninput"in document;if(!mf){var Qp=document.createElement("div");Qp.setAttribute("oninput","return;"),mf=typeof Qp.oninput=="function"}hf=mf}else hf=!1;Vp=hf&&(!document.documentMode||9<document.documentMode)}function Yp(){go&&(go.detachEvent("onpropertychange",Gp),yo=go=null)}function Gp(t){if(t.propertyName==="value"&&Vs(yo)){var r=[];Fp(r,yo,t,rf(t)),Op(CE,r)}}function kE(t,r,l){t==="focusin"?(Yp(),go=r,yo=l,go.attachEvent("onpropertychange",Gp)):t==="focusout"&&Yp()}function TE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Vs(yo)}function AE(t,r){if(t==="click")return Vs(r)}function NE(t,r){if(t==="input"||t==="change")return Vs(r)}function zE(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var En=typeof Object.is=="function"?Object.is:zE;function vo(t,r){if(En(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),s=Object.keys(r);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var f=l[s];if(!Ar.call(r,f)||!En(t[f],r[f]))return!1}return!0}function Xp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Kp(t,r){var l=Xp(t);t=0;for(var s;l;){if(l.nodeType===3){if(s=t+l.textContent.length,t<=r&&s>=r)return{node:l,offset:r-t};t=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Xp(l)}}function Jp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Jp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Wp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Is(t.document);r instanceof t.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)t=r.contentWindow;else break;r=Is(t.document)}return r}function pf(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var jE=Or&&"documentMode"in document&&11>=document.documentMode,Ka=null,gf=null,bo=null,yf=!1;function eg(t,r,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yf||Ka==null||Ka!==Is(s)||(s=Ka,"selectionStart"in s&&pf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),bo&&vo(bo,s)||(bo=s,s=Du(gf,"onSelect"),0<s.length&&(r=new Fs("onSelect","select",null,r,l),t.push({event:r,listeners:s}),r.target=Ka)))}function la(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var Ja={animationend:la("Animation","AnimationEnd"),animationiteration:la("Animation","AnimationIteration"),animationstart:la("Animation","AnimationStart"),transitionrun:la("Transition","TransitionRun"),transitionstart:la("Transition","TransitionStart"),transitioncancel:la("Transition","TransitionCancel"),transitionend:la("Transition","TransitionEnd")},vf={},tg={};Or&&(tg=document.createElement("div").style,"AnimationEvent"in window||(delete Ja.animationend.animation,delete Ja.animationiteration.animation,delete Ja.animationstart.animation),"TransitionEvent"in window||delete Ja.transitionend.transition);function oa(t){if(vf[t])return vf[t];if(!Ja[t])return t;var r=Ja[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in tg)return vf[t]=r[l];return t}var ng=oa("animationend"),rg=oa("animationiteration"),ig=oa("animationstart"),OE=oa("transitionrun"),RE=oa("transitionstart"),DE=oa("transitioncancel"),ag=oa("transitionend"),lg=new Map,bf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");bf.push("scrollEnd");function ar(t,r){lg.set(t,r),ia(r,[t])}var Qs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Hn=[],Wa=0,xf=0;function Ys(){for(var t=Wa,r=xf=Wa=0;r<t;){var l=Hn[r];Hn[r++]=null;var s=Hn[r];Hn[r++]=null;var f=Hn[r];Hn[r++]=null;var h=Hn[r];if(Hn[r++]=null,s!==null&&f!==null){var b=s.pending;b===null?f.next=f:(f.next=b.next,b.next=f),s.pending=f}h!==0&&og(l,f,h)}}function Gs(t,r,l,s){Hn[Wa++]=t,Hn[Wa++]=r,Hn[Wa++]=l,Hn[Wa++]=s,xf|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Sf(t,r,l,s){return Gs(t,r,l,s),Xs(t)}function sa(t,r){return Gs(t,null,null,r),Xs(t)}function og(t,r,l){t.lanes|=l;var s=t.alternate;s!==null&&(s.lanes|=l);for(var f=!1,h=t.return;h!==null;)h.childLanes|=l,s=h.alternate,s!==null&&(s.childLanes|=l),h.tag===22&&(t=h.stateNode,t===null||t._visibility&1||(f=!0)),t=h,h=h.return;return t.tag===3?(h=t.stateNode,f&&r!==null&&(f=31-lt(l),t=h.hiddenUpdates,s=t[f],s===null?t[f]=[r]:s.push(r),r.lane=l|536870912),h):null}function Xs(t){if(50<Ho)throw Ho=0,zd=null,Error(a(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var el={};function ME(t,r,l,s){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(t,r,l,s){return new ME(t,r,l,s)}function wf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Rr(t,r){var l=t.alternate;return l===null?(l=_n(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function sg(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Ks(t,r,l,s,f,h){var b=0;if(s=t,typeof t=="function")wf(t)&&(b=1);else if(typeof t=="string")b=q_(t,l,oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case re:return t=_n(31,l,r,f),t.elementType=re,t.lanes=h,t;case _:return ua(l.children,f,h,r);case T:b=8,f|=24;break;case A:return t=_n(12,l,r,f|2),t.elementType=A,t.lanes=h,t;case L:return t=_n(13,l,r,f),t.elementType=L,t.lanes=h,t;case j:return t=_n(19,l,r,f),t.elementType=j,t.lanes=h,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case U:b=10;break e;case q:b=9;break e;case P:b=11;break e;case Y:b=14;break e;case $:b=16,s=null;break e}b=29,l=Error(a(130,t===null?"null":typeof t,"")),s=null}return r=_n(b,l,r,f),r.elementType=t,r.type=s,r.lanes=h,r}function ua(t,r,l,s){return t=_n(7,t,s,r),t.lanes=l,t}function Ef(t,r,l){return t=_n(6,t,null,r),t.lanes=l,t}function ug(t){var r=_n(18,null,null,0);return r.stateNode=t,r}function _f(t,r,l){return r=_n(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var cg=new WeakMap;function Zn(t,r){if(typeof t=="object"&&t!==null){var l=cg.get(t);return l!==void 0?l:(r={value:t,source:r,stack:rr(r)},cg.set(t,r),r)}return{value:t,source:r,stack:rr(r)}}var tl=[],nl=0,Js=null,xo=0,Pn=[],Fn=0,hi=null,mr=1,pr="";function Dr(t,r){tl[nl++]=xo,tl[nl++]=Js,Js=t,xo=r}function fg(t,r,l){Pn[Fn++]=mr,Pn[Fn++]=pr,Pn[Fn++]=hi,hi=t;var s=mr;t=pr;var f=32-lt(s)-1;s&=~(1<<f),l+=1;var h=32-lt(r)+f;if(30<h){var b=f-f%5;h=(s&(1<<b)-1).toString(32),s>>=b,f-=b,mr=1<<32-lt(r)+f|l<<f|s,pr=h+t}else mr=1<<h|l<<f|s,pr=t}function Cf(t){t.return!==null&&(Dr(t,1),fg(t,1,0))}function kf(t){for(;t===Js;)Js=tl[--nl],tl[nl]=null,xo=tl[--nl],tl[nl]=null;for(;t===hi;)hi=Pn[--Fn],Pn[Fn]=null,pr=Pn[--Fn],Pn[Fn]=null,mr=Pn[--Fn],Pn[Fn]=null}function dg(t,r){Pn[Fn++]=mr,Pn[Fn++]=pr,Pn[Fn++]=hi,mr=r.id,pr=r.overflow,hi=t}var Ft=null,ft=null,Ze=!1,mi=null,$n=!1,Tf=Error(a(519));function pi(t){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw So(Zn(r,t)),Tf}function hg(t){var r=t.stateNode,l=t.type,s=t.memoizedProps;switch(r[Pt]=t,r[un]=s,l){case"dialog":Ie("cancel",r),Ie("close",r);break;case"iframe":case"object":case"embed":Ie("load",r);break;case"video":case"audio":for(l=0;l<Po.length;l++)Ie(Po[l],r);break;case"source":Ie("error",r);break;case"img":case"image":case"link":Ie("error",r),Ie("load",r);break;case"details":Ie("toggle",r);break;case"input":Ie("invalid",r),kp(r,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ie("invalid",r);break;case"textarea":Ie("invalid",r),Ap(r,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||s.suppressHydrationWarning===!0||zv(r.textContent,l)?(s.popover!=null&&(Ie("beforetoggle",r),Ie("toggle",r)),s.onScroll!=null&&Ie("scroll",r),s.onScrollEnd!=null&&Ie("scrollend",r),s.onClick!=null&&(r.onclick=jr),r=!0):r=!1,r||pi(t,!0)}function mg(t){for(Ft=t.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:$n=!1;return;case 27:case 3:$n=!0;return;default:Ft=Ft.return}}function rl(t){if(t!==Ft)return!1;if(!Ze)return mg(t),Ze=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||$d(t.type,t.memoizedProps)),l=!l),l&&ft&&pi(t),mg(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));ft=Iv(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));ft=Iv(t)}else r===27?(r=ft,Ni(t.type)?(t=Xd,Xd=null,ft=t):ft=r):ft=Ft?Qn(t.stateNode.nextSibling):null;return!0}function ca(){ft=Ft=null,Ze=!1}function Af(){var t=mi;return t!==null&&(mn===null?mn=t:mn.push.apply(mn,t),mi=null),t}function So(t){mi===null?mi=[t]:mi.push(t)}var Nf=D(null),fa=null,Mr=null;function gi(t,r,l){k(Nf,r._currentValue),r._currentValue=l}function Ur(t){t._currentValue=Nf.current,Q(Nf)}function zf(t,r,l){for(;t!==null;){var s=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,s!==null&&(s.childLanes|=r)):s!==null&&(s.childLanes&r)!==r&&(s.childLanes|=r),t===l)break;t=t.return}}function jf(t,r,l,s){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var h=f.dependencies;if(h!==null){var b=f.child;h=h.firstContext;e:for(;h!==null;){var E=h;h=f;for(var z=0;z<r.length;z++)if(E.context===r[z]){h.lanes|=l,E=h.alternate,E!==null&&(E.lanes|=l),zf(h.return,l,t),s||(b=null);break e}h=E.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(a(341));b.lanes|=l,h=b.alternate,h!==null&&(h.lanes|=l),zf(b,l,t),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===t){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function il(t,r,l,s){t=null;for(var f=r,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(a(387));if(b=b.memoizedProps,b!==null){var E=f.type;En(f.pendingProps.value,b.value)||(t!==null?t.push(E):t=[E])}}else if(f===ke.current){if(b=f.alternate,b===null)throw Error(a(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Yo):t=[Yo])}f=f.return}t!==null&&jf(r,t,l,s),r.flags|=262144}function Ws(t){for(t=t.firstContext;t!==null;){if(!En(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function da(t){fa=t,Mr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function $t(t){return pg(fa,t)}function eu(t,r){return fa===null&&da(t),pg(t,r)}function pg(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Mr===null){if(t===null)throw Error(a(308));Mr=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Mr=Mr.next=r;return l}var UE=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,s){t.push(s)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},LE=e.unstable_scheduleCallback,BE=e.unstable_NormalPriority,kt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Of(){return{controller:new UE,data:new Map,refCount:0}}function wo(t){t.refCount--,t.refCount===0&&LE(BE,function(){t.controller.abort()})}var Eo=null,Rf=0,al=0,ll=null;function IE(t,r){if(Eo===null){var l=Eo=[];Rf=0,al=Ud(),ll={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Rf++,r.then(gg,gg),r}function gg(){if(--Rf===0&&Eo!==null){ll!==null&&(ll.status="fulfilled");var t=Eo;Eo=null,al=0,ll=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function qE(t,r){var l=[],s={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return t.then(function(){s.status="fulfilled",s.value=r;for(var f=0;f<l.length;f++)(0,l[f])(r)},function(f){for(s.status="rejected",s.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),s}var yg=I.S;I.S=function(t,r){ev=Lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&IE(t,r),yg!==null&&yg(t,r)};var ha=D(null);function Df(){var t=ha.current;return t!==null?t:ot.pooledCache}function tu(t,r){r===null?k(ha,ha.current):k(ha,r.pool)}function vg(){var t=Df();return t===null?null:{parent:kt._currentValue,pool:t}}var ol=Error(a(460)),Mf=Error(a(474)),nu=Error(a(542)),ru={then:function(){}};function bg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function xg(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(jr,jr),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,wg(t),t;default:if(typeof r.status=="string")r.then(jr,jr);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=r,t.status="pending",t.then(function(s){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=s}},function(s){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=s}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,wg(t),t}throw pa=r,ol}}function ma(t){try{var r=t._init;return r(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(pa=l,ol):l}}var pa=null;function Sg(){if(pa===null)throw Error(a(459));var t=pa;return pa=null,t}function wg(t){if(t===ol||t===nu)throw Error(a(483))}var sl=null,_o=0;function iu(t){var r=_o;return _o+=1,sl===null&&(sl=[]),xg(sl,t,r)}function Co(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function au(t,r){throw r.$$typeof===x?Error(a(525)):(t=Object.prototype.toString.call(r),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Eg(t){function r(B,M){if(t){var H=B.deletions;H===null?(B.deletions=[M],B.flags|=16):H.push(M)}}function l(B,M){if(!t)return null;for(;M!==null;)r(B,M),M=M.sibling;return null}function s(B){for(var M=new Map;B!==null;)B.key!==null?M.set(B.key,B):M.set(B.index,B),B=B.sibling;return M}function f(B,M){return B=Rr(B,M),B.index=0,B.sibling=null,B}function h(B,M,H){return B.index=H,t?(H=B.alternate,H!==null?(H=H.index,H<M?(B.flags|=67108866,M):H):(B.flags|=67108866,M)):(B.flags|=1048576,M)}function b(B){return t&&B.alternate===null&&(B.flags|=67108866),B}function E(B,M,H,K){return M===null||M.tag!==6?(M=Ef(H,B.mode,K),M.return=B,M):(M=f(M,H),M.return=B,M)}function z(B,M,H,K){var Ee=H.type;return Ee===_?G(B,M,H.props.children,K,H.key):M!==null&&(M.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===$&&ma(Ee)===M.type)?(M=f(M,H.props),Co(M,H),M.return=B,M):(M=Ks(H.type,H.key,H.props,null,B.mode,K),Co(M,H),M.return=B,M)}function Z(B,M,H,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=_f(H,B.mode,K),M.return=B,M):(M=f(M,H.children||[]),M.return=B,M)}function G(B,M,H,K,Ee){return M===null||M.tag!==7?(M=ua(H,B.mode,K,Ee),M.return=B,M):(M=f(M,H),M.return=B,M)}function W(B,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ef(""+M,B.mode,H),M.return=B,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case S:return H=Ks(M.type,M.key,M.props,null,B.mode,H),Co(H,M),H.return=B,H;case N:return M=_f(M,B.mode,H),M.return=B,M;case $:return M=ma(M),W(B,M,H)}if(ee(M)||ae(M))return M=ua(M,B.mode,H,null),M.return=B,M;if(typeof M.then=="function")return W(B,iu(M),H);if(M.$$typeof===U)return W(B,eu(B,M),H);au(B,M)}return null}function F(B,M,H,K){var Ee=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return Ee!==null?null:E(B,M,""+H,K);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case S:return H.key===Ee?z(B,M,H,K):null;case N:return H.key===Ee?Z(B,M,H,K):null;case $:return H=ma(H),F(B,M,H,K)}if(ee(H)||ae(H))return Ee!==null?null:G(B,M,H,K,null);if(typeof H.then=="function")return F(B,M,iu(H),K);if(H.$$typeof===U)return F(B,M,eu(B,H),K);au(B,H)}return null}function V(B,M,H,K,Ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return B=B.get(H)||null,E(M,B,""+K,Ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case S:return B=B.get(K.key===null?H:K.key)||null,z(M,B,K,Ee);case N:return B=B.get(K.key===null?H:K.key)||null,Z(M,B,K,Ee);case $:return K=ma(K),V(B,M,H,K,Ee)}if(ee(K)||ae(K))return B=B.get(H)||null,G(M,B,K,Ee,null);if(typeof K.then=="function")return V(B,M,H,iu(K),Ee);if(K.$$typeof===U)return V(B,M,H,eu(M,K),Ee);au(M,K)}return null}function me(B,M,H,K){for(var Ee=null,Qe=null,ve=M,Re=M=0,He=null;ve!==null&&Re<H.length;Re++){ve.index>Re?(He=ve,ve=null):He=ve.sibling;var Ye=F(B,ve,H[Re],K);if(Ye===null){ve===null&&(ve=He);break}t&&ve&&Ye.alternate===null&&r(B,ve),M=h(Ye,M,Re),Qe===null?Ee=Ye:Qe.sibling=Ye,Qe=Ye,ve=He}if(Re===H.length)return l(B,ve),Ze&&Dr(B,Re),Ee;if(ve===null){for(;Re<H.length;Re++)ve=W(B,H[Re],K),ve!==null&&(M=h(ve,M,Re),Qe===null?Ee=ve:Qe.sibling=ve,Qe=ve);return Ze&&Dr(B,Re),Ee}for(ve=s(ve);Re<H.length;Re++)He=V(ve,B,Re,H[Re],K),He!==null&&(t&&He.alternate!==null&&ve.delete(He.key===null?Re:He.key),M=h(He,M,Re),Qe===null?Ee=He:Qe.sibling=He,Qe=He);return t&&ve.forEach(function(Di){return r(B,Di)}),Ze&&Dr(B,Re),Ee}function Ce(B,M,H,K){if(H==null)throw Error(a(151));for(var Ee=null,Qe=null,ve=M,Re=M=0,He=null,Ye=H.next();ve!==null&&!Ye.done;Re++,Ye=H.next()){ve.index>Re?(He=ve,ve=null):He=ve.sibling;var Di=F(B,ve,Ye.value,K);if(Di===null){ve===null&&(ve=He);break}t&&ve&&Di.alternate===null&&r(B,ve),M=h(Di,M,Re),Qe===null?Ee=Di:Qe.sibling=Di,Qe=Di,ve=He}if(Ye.done)return l(B,ve),Ze&&Dr(B,Re),Ee;if(ve===null){for(;!Ye.done;Re++,Ye=H.next())Ye=W(B,Ye.value,K),Ye!==null&&(M=h(Ye,M,Re),Qe===null?Ee=Ye:Qe.sibling=Ye,Qe=Ye);return Ze&&Dr(B,Re),Ee}for(ve=s(ve);!Ye.done;Re++,Ye=H.next())Ye=V(ve,B,Re,Ye.value,K),Ye!==null&&(t&&Ye.alternate!==null&&ve.delete(Ye.key===null?Re:Ye.key),M=h(Ye,M,Re),Qe===null?Ee=Ye:Qe.sibling=Ye,Qe=Ye);return t&&ve.forEach(function(K_){return r(B,K_)}),Ze&&Dr(B,Re),Ee}function at(B,M,H,K){if(typeof H=="object"&&H!==null&&H.type===_&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case S:e:{for(var Ee=H.key;M!==null;){if(M.key===Ee){if(Ee=H.type,Ee===_){if(M.tag===7){l(B,M.sibling),K=f(M,H.props.children),K.return=B,B=K;break e}}else if(M.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===$&&ma(Ee)===M.type){l(B,M.sibling),K=f(M,H.props),Co(K,H),K.return=B,B=K;break e}l(B,M);break}else r(B,M);M=M.sibling}H.type===_?(K=ua(H.props.children,B.mode,K,H.key),K.return=B,B=K):(K=Ks(H.type,H.key,H.props,null,B.mode,K),Co(K,H),K.return=B,B=K)}return b(B);case N:e:{for(Ee=H.key;M!==null;){if(M.key===Ee)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){l(B,M.sibling),K=f(M,H.children||[]),K.return=B,B=K;break e}else{l(B,M);break}else r(B,M);M=M.sibling}K=_f(H,B.mode,K),K.return=B,B=K}return b(B);case $:return H=ma(H),at(B,M,H,K)}if(ee(H))return me(B,M,H,K);if(ae(H)){if(Ee=ae(H),typeof Ee!="function")throw Error(a(150));return H=Ee.call(H),Ce(B,M,H,K)}if(typeof H.then=="function")return at(B,M,iu(H),K);if(H.$$typeof===U)return at(B,M,eu(B,H),K);au(B,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(l(B,M.sibling),K=f(M,H),K.return=B,B=K):(l(B,M),K=Ef(H,B.mode,K),K.return=B,B=K),b(B)):l(B,M)}return function(B,M,H,K){try{_o=0;var Ee=at(B,M,H,K);return sl=null,Ee}catch(ve){if(ve===ol||ve===nu)throw ve;var Qe=_n(29,ve,null,B.mode);return Qe.lanes=K,Qe.return=B,Qe}finally{}}}var ga=Eg(!0),_g=Eg(!1),yi=!1;function Uf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lf(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function vi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function bi(t,r,l){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ge&2)!==0){var f=s.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),s.pending=r,r=Xs(t),og(t,null,l),r}return Gs(t,s,r,l),Xs(t)}function ko(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var s=r.lanes;s&=t.pendingLanes,l|=s,r.lanes=l,pp(t,l)}}function Bf(t,r){var l=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var f=null,h=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};h===null?f=h=b:h=h.next=b,l=l.next}while(l!==null);h===null?f=h=r:h=h.next=r}else f=h=r;l={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var If=!1;function To(){if(If){var t=ll;if(t!==null)throw t}}function Ao(t,r,l,s){If=!1;var f=t.updateQueue;yi=!1;var h=f.firstBaseUpdate,b=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var z=E,Z=z.next;z.next=null,b===null?h=Z:b.next=Z,b=z;var G=t.alternate;G!==null&&(G=G.updateQueue,E=G.lastBaseUpdate,E!==b&&(E===null?G.firstBaseUpdate=Z:E.next=Z,G.lastBaseUpdate=z))}if(h!==null){var W=f.baseState;b=0,G=Z=z=null,E=h;do{var F=E.lane&-536870913,V=F!==E.lane;if(V?(qe&F)===F:(s&F)===F){F!==0&&F===al&&(If=!0),G!==null&&(G=G.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var me=t,Ce=E;F=r;var at=l;switch(Ce.tag){case 1:if(me=Ce.payload,typeof me=="function"){W=me.call(at,W,F);break e}W=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ce.payload,F=typeof me=="function"?me.call(at,W,F):me,F==null)break e;W=v({},W,F);break e;case 2:yi=!0}}F=E.callback,F!==null&&(t.flags|=64,V&&(t.flags|=8192),V=f.callbacks,V===null?f.callbacks=[F]:V.push(F))}else V={lane:F,tag:E.tag,payload:E.payload,callback:E.callback,next:null},G===null?(Z=G=V,z=W):G=G.next=V,b|=F;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;V=E,E=V.next,V.next=null,f.lastBaseUpdate=V,f.shared.pending=null}}while(!0);G===null&&(z=W),f.baseState=z,f.firstBaseUpdate=Z,f.lastBaseUpdate=G,h===null&&(f.shared.lanes=0),_i|=b,t.lanes=b,t.memoizedState=W}}function Cg(t,r){if(typeof t!="function")throw Error(a(191,t));t.call(r)}function kg(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Cg(l[t],r)}var ul=D(null),lu=D(0);function Tg(t,r){t=$r,k(lu,t),k(ul,r),$r=t|r.baseLanes}function qf(){k(lu,$r),k(ul,ul.current)}function Hf(){$r=lu.current,Q(ul),Q(lu)}var Cn=D(null),Vn=null;function xi(t){var r=t.alternate;k(Et,Et.current&1),k(Cn,t),Vn===null&&(r===null||ul.current!==null||r.memoizedState!==null)&&(Vn=t)}function Zf(t){k(Et,Et.current),k(Cn,t),Vn===null&&(Vn=t)}function Ag(t){t.tag===22?(k(Et,Et.current),k(Cn,t),Vn===null&&(Vn=t)):Si()}function Si(){k(Et,Et.current),k(Cn,Cn.current)}function kn(t){Q(Cn),Vn===t&&(Vn=null),Q(Et)}var Et=D(0);function ou(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yd(l)||Gd(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Lr=0,Oe=null,rt=null,Tt=null,su=!1,cl=!1,ya=!1,uu=0,No=0,fl=null,HE=0;function yt(){throw Error(a(321))}function Pf(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!En(t[l],r[l]))return!1;return!0}function Ff(t,r,l,s,f,h){return Lr=h,Oe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,I.H=t===null||t.memoizedState===null?fy:ad,ya=!1,h=l(s,f),ya=!1,cl&&(h=zg(r,l,s,f)),Ng(t),h}function Ng(t){I.H=Oo;var r=rt!==null&&rt.next!==null;if(Lr=0,Tt=rt=Oe=null,su=!1,No=0,fl=null,r)throw Error(a(300));t===null||At||(t=t.dependencies,t!==null&&Ws(t)&&(At=!0))}function zg(t,r,l,s){Oe=t;var f=0;do{if(cl&&(fl=null),No=0,cl=!1,25<=f)throw Error(a(301));if(f+=1,Tt=rt=null,t.updateQueue!=null){var h=t.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}I.H=dy,h=r(l,s)}while(cl);return h}function ZE(){var t=I.H,r=t.useState()[0];return r=typeof r.then=="function"?zo(r):r,t=t.useState()[0],(rt!==null?rt.memoizedState:null)!==t&&(Oe.flags|=1024),r}function $f(){var t=uu!==0;return uu=0,t}function Vf(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function Qf(t){if(su){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}su=!1}Lr=0,Tt=rt=Oe=null,cl=!1,No=uu=0,fl=null}function rn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Oe.memoizedState=Tt=t:Tt=Tt.next=t,Tt}function _t(){if(rt===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=rt.next;var r=Tt===null?Oe.memoizedState:Tt.next;if(r!==null)Tt=r,rt=t;else{if(t===null)throw Oe.alternate===null?Error(a(467)):Error(a(310));rt=t,t={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Tt===null?Oe.memoizedState=Tt=t:Tt=Tt.next=t}return Tt}function cu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zo(t){var r=No;return No+=1,fl===null&&(fl=[]),t=xg(fl,t,r),r=Oe,(Tt===null?r.memoizedState:Tt.next)===null&&(r=r.alternate,I.H=r===null||r.memoizedState===null?fy:ad),t}function fu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return zo(t);if(t.$$typeof===U)return $t(t)}throw Error(a(438,String(t)))}function Yf(t){var r=null,l=Oe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var s=Oe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(r={data:s.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=cu(),Oe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),s=0;s<t;s++)l[s]=de;return r.index++,l}function Br(t,r){return typeof r=="function"?r(t):r}function du(t){var r=_t();return Gf(r,rt,t)}function Gf(t,r,l){var s=t.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=l;var f=t.baseQueue,h=s.pending;if(h!==null){if(f!==null){var b=f.next;f.next=h.next,h.next=b}r.baseQueue=f=h,s.pending=null}if(h=t.baseState,f===null)t.memoizedState=h;else{r=f.next;var E=b=null,z=null,Z=r,G=!1;do{var W=Z.lane&-536870913;if(W!==Z.lane?(qe&W)===W:(Lr&W)===W){var F=Z.revertLane;if(F===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),W===al&&(G=!0);else if((Lr&F)===F){Z=Z.next,F===al&&(G=!0);continue}else W={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},z===null?(E=z=W,b=h):z=z.next=W,Oe.lanes|=F,_i|=F;W=Z.action,ya&&l(h,W),h=Z.hasEagerState?Z.eagerState:l(h,W)}else F={lane:W,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},z===null?(E=z=F,b=h):z=z.next=F,Oe.lanes|=W,_i|=W;Z=Z.next}while(Z!==null&&Z!==r);if(z===null?b=h:z.next=E,!En(h,t.memoizedState)&&(At=!0,G&&(l=ll,l!==null)))throw l;t.memoizedState=h,t.baseState=b,t.baseQueue=z,s.lastRenderedState=h}return f===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Xf(t){var r=_t(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=t;var s=l.dispatch,f=l.pending,h=r.memoizedState;if(f!==null){l.pending=null;var b=f=f.next;do h=t(h,b.action),b=b.next;while(b!==f);En(h,r.memoizedState)||(At=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),l.lastRenderedState=h}return[h,s]}function jg(t,r,l){var s=Oe,f=_t(),h=Ze;if(h){if(l===void 0)throw Error(a(407));l=l()}else l=r();var b=!En((rt||f).memoizedState,l);if(b&&(f.memoizedState=l,At=!0),f=f.queue,Wf(Dg.bind(null,s,f,t),[t]),f.getSnapshot!==r||b||Tt!==null&&Tt.memoizedState.tag&1){if(s.flags|=2048,dl(9,{destroy:void 0},Rg.bind(null,s,f,l,r),null),ot===null)throw Error(a(349));h||(Lr&127)!==0||Og(s,r,l)}return l}function Og(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=Oe.updateQueue,r===null?(r=cu(),Oe.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Rg(t,r,l,s){r.value=l,r.getSnapshot=s,Mg(r)&&Ug(t)}function Dg(t,r,l){return l(function(){Mg(r)&&Ug(t)})}function Mg(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!En(t,l)}catch{return!0}}function Ug(t){var r=sa(t,2);r!==null&&pn(r,t,2)}function Kf(t){var r=rn();if(typeof t=="function"){var l=t;if(t=l(),ya){sn(!0);try{l()}finally{sn(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:t},r}function Lg(t,r,l,s){return t.baseState=l,Gf(t,rt,typeof s=="function"?s:Br)}function PE(t,r,l,s,f){if(pu(t))throw Error(a(485));if(t=r.action,t!==null){var h={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};I.T!==null?l(!0):h.isTransition=!1,s(h),l=r.pending,l===null?(h.next=r.pending=h,Bg(r,h)):(h.next=l.next,r.pending=l.next=h)}}function Bg(t,r){var l=r.action,s=r.payload,f=t.state;if(r.isTransition){var h=I.T,b={};I.T=b;try{var E=l(f,s),z=I.S;z!==null&&z(b,E),Ig(t,r,E)}catch(Z){Jf(t,r,Z)}finally{h!==null&&b.types!==null&&(h.types=b.types),I.T=h}}else try{h=l(f,s),Ig(t,r,h)}catch(Z){Jf(t,r,Z)}}function Ig(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){qg(t,r,s)},function(s){return Jf(t,r,s)}):qg(t,r,l)}function qg(t,r,l){r.status="fulfilled",r.value=l,Hg(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,Bg(t,l)))}function Jf(t,r,l){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do r.status="rejected",r.reason=l,Hg(r),r=r.next;while(r!==s)}t.action=null}function Hg(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Zg(t,r){return r}function Pg(t,r){if(Ze){var l=ot.formState;if(l!==null){e:{var s=Oe;if(Ze){if(ft){t:{for(var f=ft,h=$n;f.nodeType!==8;){if(!h){f=null;break t}if(f=Qn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ft=Qn(f.nextSibling),s=f.data==="F!";break e}}pi(s)}s=!1}s&&(r=l[0])}}return l=rn(),l.memoizedState=l.baseState=r,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zg,lastRenderedState:r},l.queue=s,l=sy.bind(null,Oe,s),s.dispatch=l,s=Kf(!1),h=id.bind(null,Oe,!1,s.queue),s=rn(),f={state:r,dispatch:null,action:t,pending:null},s.queue=f,l=PE.bind(null,Oe,f,h,l),f.dispatch=l,s.memoizedState=t,[r,l,!1]}function Fg(t){var r=_t();return $g(r,rt,t)}function $g(t,r,l){if(r=Gf(t,r,Zg)[0],t=du(Br)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var s=zo(r)}catch(b){throw b===ol?nu:b}else s=r;r=_t();var f=r.queue,h=f.dispatch;return l!==r.memoizedState&&(Oe.flags|=2048,dl(9,{destroy:void 0},FE.bind(null,f,l),null)),[s,h,t]}function FE(t,r){t.action=r}function Vg(t){var r=_t(),l=rt;if(l!==null)return $g(r,l,t);_t(),r=r.memoizedState,l=_t();var s=l.queue.dispatch;return l.memoizedState=t,[r,s,!1]}function dl(t,r,l,s){return t={tag:t,create:l,deps:s,inst:r,next:null},r=Oe.updateQueue,r===null&&(r=cu(),Oe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(s=l.next,l.next=t,t.next=s,r.lastEffect=t),t}function Qg(){return _t().memoizedState}function hu(t,r,l,s){var f=rn();Oe.flags|=t,f.memoizedState=dl(1|r,{destroy:void 0},l,s===void 0?null:s)}function mu(t,r,l,s){var f=_t();s=s===void 0?null:s;var h=f.memoizedState.inst;rt!==null&&s!==null&&Pf(s,rt.memoizedState.deps)?f.memoizedState=dl(r,h,l,s):(Oe.flags|=t,f.memoizedState=dl(1|r,h,l,s))}function Yg(t,r){hu(8390656,8,t,r)}function Wf(t,r){mu(2048,8,t,r)}function $E(t){Oe.flags|=4;var r=Oe.updateQueue;if(r===null)r=cu(),Oe.updateQueue=r,r.events=[t];else{var l=r.events;l===null?r.events=[t]:l.push(t)}}function Gg(t){var r=_t().memoizedState;return $E({ref:r,nextImpl:t}),function(){if((Ge&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Xg(t,r){return mu(4,2,t,r)}function Kg(t,r){return mu(4,4,t,r)}function Jg(t,r){if(typeof r=="function"){t=t();var l=r(t);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Wg(t,r,l){l=l!=null?l.concat([t]):null,mu(4,4,Jg.bind(null,r,t),l)}function ed(){}function ey(t,r){var l=_t();r=r===void 0?null:r;var s=l.memoizedState;return r!==null&&Pf(r,s[1])?s[0]:(l.memoizedState=[t,r],t)}function ty(t,r){var l=_t();r=r===void 0?null:r;var s=l.memoizedState;if(r!==null&&Pf(r,s[1]))return s[0];if(s=t(),ya){sn(!0);try{t()}finally{sn(!1)}}return l.memoizedState=[s,r],s}function td(t,r,l){return l===void 0||(Lr&1073741824)!==0&&(qe&261930)===0?t.memoizedState=r:(t.memoizedState=l,t=nv(),Oe.lanes|=t,_i|=t,l)}function ny(t,r,l,s){return En(l,r)?l:ul.current!==null?(t=td(t,l,s),En(t,r)||(At=!0),t):(Lr&42)===0||(Lr&1073741824)!==0&&(qe&261930)===0?(At=!0,t.memoizedState=l):(t=nv(),Oe.lanes|=t,_i|=t,r)}function ry(t,r,l,s,f){var h=te.p;te.p=h!==0&&8>h?h:8;var b=I.T,E={};I.T=E,id(t,!1,r,l);try{var z=f(),Z=I.S;if(Z!==null&&Z(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var G=qE(z,s);jo(t,r,G,Nn(t))}else jo(t,r,s,Nn(t))}catch(W){jo(t,r,{then:function(){},status:"rejected",reason:W},Nn())}finally{te.p=h,b!==null&&E.types!==null&&(b.types=E.types),I.T=b}}function VE(){}function nd(t,r,l,s){if(t.tag!==5)throw Error(a(476));var f=iy(t).queue;ry(t,f,r,he,l===null?VE:function(){return ay(t),l(s)})}function iy(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:he},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Br,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function ay(t){var r=iy(t);r.next===null&&(r=t.alternate.memoizedState),jo(t,r.next.queue,{},Nn())}function rd(){return $t(Yo)}function ly(){return _t().memoizedState}function oy(){return _t().memoizedState}function QE(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=Nn();t=vi(l);var s=bi(r,t,l);s!==null&&(pn(s,r,l),ko(s,r,l)),r={cache:Of()},t.payload=r;return}r=r.return}}function YE(t,r,l){var s=Nn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},pu(t)?uy(r,l):(l=Sf(t,r,l,s),l!==null&&(pn(l,t,s),cy(l,r,s)))}function sy(t,r,l){var s=Nn();jo(t,r,l,s)}function jo(t,r,l,s){var f={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(pu(t))uy(r,f);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=r.lastRenderedReducer,h!==null))try{var b=r.lastRenderedState,E=h(b,l);if(f.hasEagerState=!0,f.eagerState=E,En(E,b))return Gs(t,r,f,0),ot===null&&Ys(),!1}catch{}finally{}if(l=Sf(t,r,f,s),l!==null)return pn(l,t,s),cy(l,r,s),!0}return!1}function id(t,r,l,s){if(s={lane:2,revertLane:Ud(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},pu(t)){if(r)throw Error(a(479))}else r=Sf(t,l,s,2),r!==null&&pn(r,t,2)}function pu(t){var r=t.alternate;return t===Oe||r!==null&&r===Oe}function uy(t,r){cl=su=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function cy(t,r,l){if((l&4194048)!==0){var s=r.lanes;s&=t.pendingLanes,l|=s,r.lanes=l,pp(t,l)}}var Oo={readContext:$t,use:fu,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Oo.useEffectEvent=yt;var fy={readContext:$t,use:fu,useCallback:function(t,r){return rn().memoizedState=[t,r===void 0?null:r],t},useContext:$t,useEffect:Yg,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,hu(4194308,4,Jg.bind(null,r,t),l)},useLayoutEffect:function(t,r){return hu(4194308,4,t,r)},useInsertionEffect:function(t,r){hu(4,2,t,r)},useMemo:function(t,r){var l=rn();r=r===void 0?null:r;var s=t();if(ya){sn(!0);try{t()}finally{sn(!1)}}return l.memoizedState=[s,r],s},useReducer:function(t,r,l){var s=rn();if(l!==void 0){var f=l(r);if(ya){sn(!0);try{l(r)}finally{sn(!1)}}}else f=r;return s.memoizedState=s.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},s.queue=t,t=t.dispatch=YE.bind(null,Oe,t),[s.memoizedState,t]},useRef:function(t){var r=rn();return t={current:t},r.memoizedState=t},useState:function(t){t=Kf(t);var r=t.queue,l=sy.bind(null,Oe,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:ed,useDeferredValue:function(t,r){var l=rn();return td(l,t,r)},useTransition:function(){var t=Kf(!1);return t=ry.bind(null,Oe,t.queue,!0,!1),rn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var s=Oe,f=rn();if(Ze){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),ot===null)throw Error(a(349));(qe&127)!==0||Og(s,r,l)}f.memoizedState=l;var h={value:l,getSnapshot:r};return f.queue=h,Yg(Dg.bind(null,s,h,t),[t]),s.flags|=2048,dl(9,{destroy:void 0},Rg.bind(null,s,h,l,r),null),l},useId:function(){var t=rn(),r=ot.identifierPrefix;if(Ze){var l=pr,s=mr;l=(s&~(1<<32-lt(s)-1)).toString(32)+l,r="_"+r+"R_"+l,l=uu++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=HE++,r="_"+r+"r_"+l.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:rd,useFormState:Pg,useActionState:Pg,useOptimistic:function(t){var r=rn();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=id.bind(null,Oe,!0,l),l.dispatch=r,[t,r]},useMemoCache:Yf,useCacheRefresh:function(){return rn().memoizedState=QE.bind(null,Oe)},useEffectEvent:function(t){var r=rn(),l={impl:t};return r.memoizedState=l,function(){if((Ge&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},ad={readContext:$t,use:fu,useCallback:ey,useContext:$t,useEffect:Wf,useImperativeHandle:Wg,useInsertionEffect:Xg,useLayoutEffect:Kg,useMemo:ty,useReducer:du,useRef:Qg,useState:function(){return du(Br)},useDebugValue:ed,useDeferredValue:function(t,r){var l=_t();return ny(l,rt.memoizedState,t,r)},useTransition:function(){var t=du(Br)[0],r=_t().memoizedState;return[typeof t=="boolean"?t:zo(t),r]},useSyncExternalStore:jg,useId:ly,useHostTransitionStatus:rd,useFormState:Fg,useActionState:Fg,useOptimistic:function(t,r){var l=_t();return Lg(l,rt,t,r)},useMemoCache:Yf,useCacheRefresh:oy};ad.useEffectEvent=Gg;var dy={readContext:$t,use:fu,useCallback:ey,useContext:$t,useEffect:Wf,useImperativeHandle:Wg,useInsertionEffect:Xg,useLayoutEffect:Kg,useMemo:ty,useReducer:Xf,useRef:Qg,useState:function(){return Xf(Br)},useDebugValue:ed,useDeferredValue:function(t,r){var l=_t();return rt===null?td(l,t,r):ny(l,rt.memoizedState,t,r)},useTransition:function(){var t=Xf(Br)[0],r=_t().memoizedState;return[typeof t=="boolean"?t:zo(t),r]},useSyncExternalStore:jg,useId:ly,useHostTransitionStatus:rd,useFormState:Vg,useActionState:Vg,useOptimistic:function(t,r){var l=_t();return rt!==null?Lg(l,rt,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Yf,useCacheRefresh:oy};dy.useEffectEvent=Gg;function ld(t,r,l,s){r=t.memoizedState,l=l(s,r),l=l==null?r:v({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var od={enqueueSetState:function(t,r,l){t=t._reactInternals;var s=Nn(),f=vi(s);f.payload=r,l!=null&&(f.callback=l),r=bi(t,f,s),r!==null&&(pn(r,t,s),ko(r,t,s))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var s=Nn(),f=vi(s);f.tag=1,f.payload=r,l!=null&&(f.callback=l),r=bi(t,f,s),r!==null&&(pn(r,t,s),ko(r,t,s))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=Nn(),s=vi(l);s.tag=2,r!=null&&(s.callback=r),r=bi(t,s,l),r!==null&&(pn(r,t,l),ko(r,t,l))}};function hy(t,r,l,s,f,h,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,h,b):r.prototype&&r.prototype.isPureReactComponent?!vo(l,s)||!vo(f,h):!0}function my(t,r,l,s){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,s),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,s),r.state!==t&&od.enqueueReplaceState(r,r.state,null)}function va(t,r){var l=r;if("ref"in r){l={};for(var s in r)s!=="ref"&&(l[s]=r[s])}if(t=t.defaultProps){l===r&&(l=v({},l));for(var f in t)l[f]===void 0&&(l[f]=t[f])}return l}function py(t){Qs(t)}function gy(t){console.error(t)}function yy(t){Qs(t)}function gu(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(s){setTimeout(function(){throw s})}}function vy(t,r,l){try{var s=t.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function sd(t,r,l){return l=vi(l),l.tag=3,l.payload={element:null},l.callback=function(){gu(t,r)},l}function by(t){return t=vi(t),t.tag=3,t}function xy(t,r,l,s){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var h=s.value;t.payload=function(){return f(h)},t.callback=function(){vy(r,l,s)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){vy(r,l,s),typeof f!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})})}function GE(t,r,l,s,f){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(r=l.alternate,r!==null&&il(r,l,f,!0),l=Cn.current,l!==null){switch(l.tag){case 31:case 13:return Vn===null?Au():l.alternate===null&&vt===0&&(vt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,s===ru?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([s]):r.add(s),Rd(t,s,f)),!1;case 22:return l.flags|=65536,s===ru?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([s]):l.add(s)),Rd(t,s,f)),!1}throw Error(a(435,l.tag))}return Rd(t,s,f),Au(),!1}if(Ze)return r=Cn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,s!==Tf&&(t=Error(a(422),{cause:s}),So(Zn(t,l)))):(s!==Tf&&(r=Error(a(423),{cause:s}),So(Zn(r,l))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,s=Zn(s,l),f=sd(t.stateNode,s,f),Bf(t,f),vt!==4&&(vt=2)),!1;var h=Error(a(520),{cause:s});if(h=Zn(h,l),qo===null?qo=[h]:qo.push(h),vt!==4&&(vt=2),r===null)return!0;s=Zn(s,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=f&-f,l.lanes|=t,t=sd(l.stateNode,s,t),Bf(l,t),!1;case 1:if(r=l.type,h=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ci===null||!Ci.has(h))))return l.flags|=65536,f&=-f,l.lanes|=f,f=by(f),xy(f,t,l,s),Bf(l,f),!1}l=l.return}while(l!==null);return!1}var ud=Error(a(461)),At=!1;function Vt(t,r,l,s){r.child=t===null?_g(r,null,l,s):ga(r,t.child,l,s)}function Sy(t,r,l,s,f){l=l.render;var h=r.ref;if("ref"in s){var b={};for(var E in s)E!=="ref"&&(b[E]=s[E])}else b=s;return da(r),s=Ff(t,r,l,b,h,f),E=$f(),t!==null&&!At?(Vf(t,r,f),Ir(t,r,f)):(Ze&&E&&Cf(r),r.flags|=1,Vt(t,r,s,f),r.child)}function wy(t,r,l,s,f){if(t===null){var h=l.type;return typeof h=="function"&&!wf(h)&&h.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=h,Ey(t,r,h,s,f)):(t=Ks(l.type,null,s,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(h=t.child,!yd(t,f)){var b=h.memoizedProps;if(l=l.compare,l=l!==null?l:vo,l(b,s)&&t.ref===r.ref)return Ir(t,r,f)}return r.flags|=1,t=Rr(h,s),t.ref=r.ref,t.return=r,r.child=t}function Ey(t,r,l,s,f){if(t!==null){var h=t.memoizedProps;if(vo(h,s)&&t.ref===r.ref)if(At=!1,r.pendingProps=s=h,yd(t,f))(t.flags&131072)!==0&&(At=!0);else return r.lanes=t.lanes,Ir(t,r,f)}return cd(t,r,l,s,f)}function _y(t,r,l,s){var f=s.children,h=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((r.flags&128)!==0){if(h=h!==null?h.baseLanes|l:l,t!==null){for(s=r.child=t.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~h}else s=0,r.child=null;return Cy(t,r,h,l,s)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&tu(r,h!==null?h.cachePool:null),h!==null?Tg(r,h):qf(),Ag(r);else return s=r.lanes=536870912,Cy(t,r,h!==null?h.baseLanes|l:l,l,s)}else h!==null?(tu(r,h.cachePool),Tg(r,h),Si(),r.memoizedState=null):(t!==null&&tu(r,null),qf(),Si());return Vt(t,r,f,l),r.child}function Ro(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Cy(t,r,l,s,f){var h=Df();return h=h===null?null:{parent:kt._currentValue,pool:h},r.memoizedState={baseLanes:l,cachePool:h},t!==null&&tu(r,null),qf(),Ag(r),t!==null&&il(t,r,s,!0),r.childLanes=f,null}function yu(t,r){return r=bu({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function ky(t,r,l){return ga(r,t.child,null,l),t=yu(r,r.pendingProps),t.flags|=2,kn(r),r.memoizedState=null,t}function XE(t,r,l){var s=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ze){if(s.mode==="hidden")return t=yu(r,s),r.lanes=536870912,Ro(null,t);if(Zf(r),(t=ft)?(t=Bv(t,$n),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:hi!==null?{id:mr,overflow:pr}:null,retryLane:536870912,hydrationErrors:null},l=ug(t),l.return=r,r.child=l,Ft=r,ft=null)):t=null,t===null)throw pi(r);return r.lanes=536870912,null}return yu(r,s)}var h=t.memoizedState;if(h!==null){var b=h.dehydrated;if(Zf(r),f)if(r.flags&256)r.flags&=-257,r=ky(t,r,l);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(a(558));else if(At||il(t,r,l,!1),f=(l&t.childLanes)!==0,At||f){if(s=ot,s!==null&&(b=gp(s,l),b!==0&&b!==h.retryLane))throw h.retryLane=b,sa(t,b),pn(s,t,b),ud;Au(),r=ky(t,r,l)}else t=h.treeContext,ft=Qn(b.nextSibling),Ft=r,Ze=!0,mi=null,$n=!1,t!==null&&dg(r,t),r=yu(r,s),r.flags|=4096;return r}return t=Rr(t.child,{mode:s.mode,children:s.children}),t.ref=r.ref,r.child=t,t.return=r,t}function vu(t,r){var l=r.ref;if(l===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function cd(t,r,l,s,f){return da(r),l=Ff(t,r,l,s,void 0,f),s=$f(),t!==null&&!At?(Vf(t,r,f),Ir(t,r,f)):(Ze&&s&&Cf(r),r.flags|=1,Vt(t,r,l,f),r.child)}function Ty(t,r,l,s,f,h){return da(r),r.updateQueue=null,l=zg(r,s,l,f),Ng(t),s=$f(),t!==null&&!At?(Vf(t,r,h),Ir(t,r,h)):(Ze&&s&&Cf(r),r.flags|=1,Vt(t,r,l,h),r.child)}function Ay(t,r,l,s,f){if(da(r),r.stateNode===null){var h=el,b=l.contextType;typeof b=="object"&&b!==null&&(h=$t(b)),h=new l(s,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=od,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=s,h.state=r.memoizedState,h.refs={},Uf(r),b=l.contextType,h.context=typeof b=="object"&&b!==null?$t(b):el,h.state=r.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(ld(r,l,b,s),h.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&od.enqueueReplaceState(h,h.state,null),Ao(r,s,h,f),To(),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308),s=!0}else if(t===null){h=r.stateNode;var E=r.memoizedProps,z=va(l,E);h.props=z;var Z=h.context,G=l.contextType;b=el,typeof G=="object"&&G!==null&&(b=$t(G));var W=l.getDerivedStateFromProps;G=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,G||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(E||Z!==b)&&my(r,h,s,b),yi=!1;var F=r.memoizedState;h.state=F,Ao(r,s,h,f),To(),Z=r.memoizedState,E||F!==Z||yi?(typeof W=="function"&&(ld(r,l,W,s),Z=r.memoizedState),(z=yi||hy(r,l,z,s,F,Z,b))?(G||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(r.flags|=4194308)):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=s,r.memoizedState=Z),h.props=s,h.state=Z,h.context=b,s=z):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),s=!1)}else{h=r.stateNode,Lf(t,r),b=r.memoizedProps,G=va(l,b),h.props=G,W=r.pendingProps,F=h.context,Z=l.contextType,z=el,typeof Z=="object"&&Z!==null&&(z=$t(Z)),E=l.getDerivedStateFromProps,(Z=typeof E=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==W||F!==z)&&my(r,h,s,z),yi=!1,F=r.memoizedState,h.state=F,Ao(r,s,h,f),To();var V=r.memoizedState;b!==W||F!==V||yi||t!==null&&t.dependencies!==null&&Ws(t.dependencies)?(typeof E=="function"&&(ld(r,l,E,s),V=r.memoizedState),(G=yi||hy(r,l,G,s,F,V,z)||t!==null&&t.dependencies!==null&&Ws(t.dependencies))?(Z||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,V,z),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,V,z)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===t.memoizedProps&&F===t.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&F===t.memoizedState||(r.flags|=1024),r.memoizedProps=s,r.memoizedState=V),h.props=s,h.state=V,h.context=z,s=G):(typeof h.componentDidUpdate!="function"||b===t.memoizedProps&&F===t.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&F===t.memoizedState||(r.flags|=1024),s=!1)}return h=s,vu(t,r),s=(r.flags&128)!==0,h||s?(h=r.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:h.render(),r.flags|=1,t!==null&&s?(r.child=ga(r,t.child,null,f),r.child=ga(r,null,l,f)):Vt(t,r,l,f),r.memoizedState=h.state,t=r.child):t=Ir(t,r,f),t}function Ny(t,r,l,s){return ca(),r.flags|=256,Vt(t,r,l,s),r.child}var fd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dd(t){return{baseLanes:t,cachePool:vg()}}function hd(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=An),t}function zy(t,r,l){var s=r.pendingProps,f=!1,h=(r.flags&128)!==0,b;if((b=h)||(b=t!==null&&t.memoizedState===null?!1:(Et.current&2)!==0),b&&(f=!0,r.flags&=-129),b=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ze){if(f?xi(r):Si(),(t=ft)?(t=Bv(t,$n),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:hi!==null?{id:mr,overflow:pr}:null,retryLane:536870912,hydrationErrors:null},l=ug(t),l.return=r,r.child=l,Ft=r,ft=null)):t=null,t===null)throw pi(r);return Gd(t)?r.lanes=32:r.lanes=536870912,null}var E=s.children;return s=s.fallback,f?(Si(),f=r.mode,E=bu({mode:"hidden",children:E},f),s=ua(s,f,l,null),E.return=r,s.return=r,E.sibling=s,r.child=E,s=r.child,s.memoizedState=dd(l),s.childLanes=hd(t,b,l),r.memoizedState=fd,Ro(null,s)):(xi(r),md(r,E))}var z=t.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(h)r.flags&256?(xi(r),r.flags&=-257,r=pd(t,r,l)):r.memoizedState!==null?(Si(),r.child=t.child,r.flags|=128,r=null):(Si(),E=s.fallback,f=r.mode,s=bu({mode:"visible",children:s.children},f),E=ua(E,f,l,null),E.flags|=2,s.return=r,E.return=r,s.sibling=E,r.child=s,ga(r,t.child,null,l),s=r.child,s.memoizedState=dd(l),s.childLanes=hd(t,b,l),r.memoizedState=fd,r=Ro(null,s));else if(xi(r),Gd(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var Z=b.dgst;b=Z,s=Error(a(419)),s.stack="",s.digest=b,So({value:s,source:null,stack:null}),r=pd(t,r,l)}else if(At||il(t,r,l,!1),b=(l&t.childLanes)!==0,At||b){if(b=ot,b!==null&&(s=gp(b,l),s!==0&&s!==z.retryLane))throw z.retryLane=s,sa(t,s),pn(b,t,s),ud;Yd(E)||Au(),r=pd(t,r,l)}else Yd(E)?(r.flags|=192,r.child=t.child,r=null):(t=z.treeContext,ft=Qn(E.nextSibling),Ft=r,Ze=!0,mi=null,$n=!1,t!==null&&dg(r,t),r=md(r,s.children),r.flags|=4096);return r}return f?(Si(),E=s.fallback,f=r.mode,z=t.child,Z=z.sibling,s=Rr(z,{mode:"hidden",children:s.children}),s.subtreeFlags=z.subtreeFlags&65011712,Z!==null?E=Rr(Z,E):(E=ua(E,f,l,null),E.flags|=2),E.return=r,s.return=r,s.sibling=E,r.child=s,Ro(null,s),s=r.child,E=t.child.memoizedState,E===null?E=dd(l):(f=E.cachePool,f!==null?(z=kt._currentValue,f=f.parent!==z?{parent:z,pool:z}:f):f=vg(),E={baseLanes:E.baseLanes|l,cachePool:f}),s.memoizedState=E,s.childLanes=hd(t,b,l),r.memoizedState=fd,Ro(t.child,s)):(xi(r),l=t.child,t=l.sibling,l=Rr(l,{mode:"visible",children:s.children}),l.return=r,l.sibling=null,t!==null&&(b=r.deletions,b===null?(r.deletions=[t],r.flags|=16):b.push(t)),r.child=l,r.memoizedState=null,l)}function md(t,r){return r=bu({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function bu(t,r){return t=_n(22,t,null,r),t.lanes=0,t}function pd(t,r,l){return ga(r,t.child,null,l),t=md(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function jy(t,r,l){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r),zf(t.return,r,l)}function gd(t,r,l,s,f,h){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:f,treeForkCount:h}:(b.isBackwards=r,b.rendering=null,b.renderingStartTime=0,b.last=s,b.tail=l,b.tailMode=f,b.treeForkCount=h)}function Oy(t,r,l){var s=r.pendingProps,f=s.revealOrder,h=s.tail;s=s.children;var b=Et.current,E=(b&2)!==0;if(E?(b=b&1|2,r.flags|=128):b&=1,k(Et,b),Vt(t,r,s,l),s=Ze?xo:0,!E&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&jy(t,l,r);else if(t.tag===19)jy(t,l,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(l=r.child,f=null;l!==null;)t=l.alternate,t!==null&&ou(t)===null&&(f=l),l=l.sibling;l=f,l===null?(f=r.child,r.child=null):(f=l.sibling,l.sibling=null),gd(r,!1,f,l,h,s);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&ou(t)===null){r.child=f;break}t=f.sibling,f.sibling=l,l=f,f=t}gd(r,!0,l,null,h,s);break;case"together":gd(r,!1,null,null,void 0,s);break;default:r.memoizedState=null}return r.child}function Ir(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),_i|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(il(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(a(153));if(r.child!==null){for(t=r.child,l=Rr(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Rr(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function yd(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Ws(t)))}function KE(t,r,l){switch(r.tag){case 3:we(r,r.stateNode.containerInfo),gi(r,kt,t.memoizedState.cache),ca();break;case 27:case 5:Ct(r);break;case 4:we(r,r.stateNode.containerInfo);break;case 10:gi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Zf(r),null;break;case 13:var s=r.memoizedState;if(s!==null)return s.dehydrated!==null?(xi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?zy(t,r,l):(xi(r),t=Ir(t,r,l),t!==null?t.sibling:null);xi(r);break;case 19:var f=(t.flags&128)!==0;if(s=(l&r.childLanes)!==0,s||(il(t,r,l,!1),s=(l&r.childLanes)!==0),f){if(s)return Oy(t,r,l);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),k(Et,Et.current),s)break;return null;case 22:return r.lanes=0,_y(t,r,l,r.pendingProps);case 24:gi(r,kt,t.memoizedState.cache)}return Ir(t,r,l)}function Ry(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)At=!0;else{if(!yd(t,l)&&(r.flags&128)===0)return At=!1,KE(t,r,l);At=(t.flags&131072)!==0}else At=!1,Ze&&(r.flags&1048576)!==0&&fg(r,xo,r.index);switch(r.lanes=0,r.tag){case 16:e:{var s=r.pendingProps;if(t=ma(r.elementType),r.type=t,typeof t=="function")wf(t)?(s=va(t,s),r.tag=1,r=Ay(null,r,t,s,l)):(r.tag=0,r=cd(null,r,t,s,l));else{if(t!=null){var f=t.$$typeof;if(f===P){r.tag=11,r=Sy(null,r,t,s,l);break e}else if(f===Y){r.tag=14,r=wy(null,r,t,s,l);break e}}throw r=se(t)||t,Error(a(306,r,""))}}return r;case 0:return cd(t,r,r.type,r.pendingProps,l);case 1:return s=r.type,f=va(s,r.pendingProps),Ay(t,r,s,f,l);case 3:e:{if(we(r,r.stateNode.containerInfo),t===null)throw Error(a(387));s=r.pendingProps;var h=r.memoizedState;f=h.element,Lf(t,r),Ao(r,s,null,l);var b=r.memoizedState;if(s=b.cache,gi(r,kt,s),s!==h.cache&&jf(r,[kt],l,!0),To(),s=b.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:b.cache},r.updateQueue.baseState=h,r.memoizedState=h,r.flags&256){r=Ny(t,r,s,l);break e}else if(s!==f){f=Zn(Error(a(424)),r),So(f),r=Ny(t,r,s,l);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ft=Qn(t.firstChild),Ft=r,Ze=!0,mi=null,$n=!0,l=_g(r,null,s,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ca(),s===f){r=Ir(t,r,l);break e}Vt(t,r,s,l)}r=r.child}return r;case 26:return vu(t,r),t===null?(l=Fv(r.type,null,r.pendingProps,null))?r.memoizedState=l:Ze||(l=r.type,t=r.pendingProps,s=Mu(ue.current).createElement(l),s[Pt]=r,s[un]=t,Qt(s,l,t),Bt(s),r.stateNode=s):r.memoizedState=Fv(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return Ct(r),t===null&&Ze&&(s=r.stateNode=Hv(r.type,r.pendingProps,ue.current),Ft=r,$n=!0,f=ft,Ni(r.type)?(Xd=f,ft=Qn(s.firstChild)):ft=f),Vt(t,r,r.pendingProps.children,l),vu(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ze&&((f=s=ft)&&(s=T_(s,r.type,r.pendingProps,$n),s!==null?(r.stateNode=s,Ft=r,ft=Qn(s.firstChild),$n=!1,f=!0):f=!1),f||pi(r)),Ct(r),f=r.type,h=r.pendingProps,b=t!==null?t.memoizedProps:null,s=h.children,$d(f,h)?s=null:b!==null&&$d(f,b)&&(r.flags|=32),r.memoizedState!==null&&(f=Ff(t,r,ZE,null,null,l),Yo._currentValue=f),vu(t,r),Vt(t,r,s,l),r.child;case 6:return t===null&&Ze&&((t=l=ft)&&(l=A_(l,r.pendingProps,$n),l!==null?(r.stateNode=l,Ft=r,ft=null,t=!0):t=!1),t||pi(r)),null;case 13:return zy(t,r,l);case 4:return we(r,r.stateNode.containerInfo),s=r.pendingProps,t===null?r.child=ga(r,null,s,l):Vt(t,r,s,l),r.child;case 11:return Sy(t,r,r.type,r.pendingProps,l);case 7:return Vt(t,r,r.pendingProps,l),r.child;case 8:return Vt(t,r,r.pendingProps.children,l),r.child;case 12:return Vt(t,r,r.pendingProps.children,l),r.child;case 10:return s=r.pendingProps,gi(r,r.type,s.value),Vt(t,r,s.children,l),r.child;case 9:return f=r.type._context,s=r.pendingProps.children,da(r),f=$t(f),s=s(f),r.flags|=1,Vt(t,r,s,l),r.child;case 14:return wy(t,r,r.type,r.pendingProps,l);case 15:return Ey(t,r,r.type,r.pendingProps,l);case 19:return Oy(t,r,l);case 31:return XE(t,r,l);case 22:return _y(t,r,l,r.pendingProps);case 24:return da(r),s=$t(kt),t===null?(f=Df(),f===null&&(f=ot,h=Of(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=l),f=h),r.memoizedState={parent:s,cache:f},Uf(r),gi(r,kt,f)):((t.lanes&l)!==0&&(Lf(t,r),Ao(r,null,null,l),To()),f=t.memoizedState,h=r.memoizedState,f.parent!==s?(f={parent:s,cache:s},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),gi(r,kt,s)):(s=h.cache,gi(r,kt,s),s!==f.cache&&jf(r,[kt],l,!0))),Vt(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function qr(t){t.flags|=4}function vd(t,r,l,s,f){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(lv())t.flags|=8192;else throw pa=ru,Mf}else t.flags&=-16777217}function Dy(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Gv(r))if(lv())t.flags|=8192;else throw pa=ru,Mf}function xu(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?hp():536870912,t.lanes|=r,gl|=r)}function Do(t,r){if(!Ze)switch(t.tailMode){case"hidden":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function dt(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,s=0;if(r)for(var f=t.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=s,t.childLanes=l,r}function JE(t,r,l){var s=r.pendingProps;switch(kf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(r),null;case 1:return dt(r),null;case 3:return l=r.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),Ur(kt),be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(rl(r)?qr(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Af())),dt(r),null;case 26:var f=r.type,h=r.memoizedState;return t===null?(qr(r),h!==null?(dt(r),Dy(r,h)):(dt(r),vd(r,f,null,s,l))):h?h!==t.memoizedState?(qr(r),dt(r),Dy(r,h)):(dt(r),r.flags&=-16777217):(t=t.memoizedProps,t!==s&&qr(r),dt(r),vd(r,f,t,s,l)),null;case 27:if(Xt(r),l=ue.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&qr(r);else{if(!s){if(r.stateNode===null)throw Error(a(166));return dt(r),null}t=oe.current,rl(r)?hg(r):(t=Hv(f,s,l),r.stateNode=t,qr(r))}return dt(r),null;case 5:if(Xt(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&qr(r);else{if(!s){if(r.stateNode===null)throw Error(a(166));return dt(r),null}if(h=oe.current,rl(r))hg(r);else{var b=Mu(ue.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?b.createElement("select",{is:s.is}):b.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?b.createElement(f,{is:s.is}):b.createElement(f)}}h[Pt]=r,h[un]=s;e:for(b=r.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===r)break e;for(;b.sibling===null;){if(b.return===null||b.return===r)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}r.stateNode=h;e:switch(Qt(h,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&qr(r)}}return dt(r),vd(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,l),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==s&&qr(r);else{if(typeof s!="string"&&r.stateNode===null)throw Error(a(166));if(t=ue.current,rl(r)){if(t=r.stateNode,l=r.memoizedProps,s=null,f=Ft,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}t[Pt]=r,t=!!(t.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||zv(t.nodeValue,l)),t||pi(r,!0)}else t=Mu(t).createTextNode(s),t[Pt]=r,r.stateNode=t}return dt(r),null;case 31:if(l=r.memoizedState,t===null||t.memoizedState!==null){if(s=rl(r),l!==null){if(t===null){if(!s)throw Error(a(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[Pt]=r}else ca(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;dt(r),t=!1}else l=Af(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return r.flags&256?(kn(r),r):(kn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return dt(r),null;case 13:if(s=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=rl(r),s!==null&&s.dehydrated!==null){if(t===null){if(!f)throw Error(a(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Pt]=r}else ca(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;dt(r),f=!1}else f=Af(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(kn(r),r):(kn(r),null)}return kn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=s!==null,t=t!==null&&t.memoizedState!==null,l&&(s=r.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==f&&(s.flags|=2048)),l!==t&&l&&(r.child.flags|=8192),xu(r,r.updateQueue),dt(r),null);case 4:return be(),t===null&&qd(r.stateNode.containerInfo),dt(r),null;case 10:return Ur(r.type),dt(r),null;case 19:if(Q(Et),s=r.memoizedState,s===null)return dt(r),null;if(f=(r.flags&128)!==0,h=s.rendering,h===null)if(f)Do(s,!1);else{if(vt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(h=ou(t),h!==null){for(r.flags|=128,Do(s,!1),t=h.updateQueue,r.updateQueue=t,xu(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)sg(l,t),l=l.sibling;return k(Et,Et.current&1|2),Ze&&Dr(r,s.treeForkCount),r.child}t=t.sibling}s.tail!==null&&Lt()>Cu&&(r.flags|=128,f=!0,Do(s,!1),r.lanes=4194304)}else{if(!f)if(t=ou(h),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,xu(r,t),Do(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!Ze)return dt(r),null}else 2*Lt()-s.renderingStartTime>Cu&&l!==536870912&&(r.flags|=128,f=!0,Do(s,!1),r.lanes=4194304);s.isBackwards?(h.sibling=r.child,r.child=h):(t=s.last,t!==null?t.sibling=h:r.child=h,s.last=h)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Lt(),t.sibling=null,l=Et.current,k(Et,f?l&1|2:l&1),Ze&&Dr(r,s.treeForkCount),t):(dt(r),null);case 22:case 23:return kn(r),Hf(),s=r.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(r.flags|=8192):s&&(r.flags|=8192),s?(l&536870912)!==0&&(r.flags&128)===0&&(dt(r),r.subtreeFlags&6&&(r.flags|=8192)):dt(r),l=r.updateQueue,l!==null&&xu(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==l&&(r.flags|=2048),t!==null&&Q(ha),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Ur(kt),dt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function WE(t,r){switch(kf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Ur(kt),be(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Xt(r),null;case 31:if(r.memoizedState!==null){if(kn(r),r.alternate===null)throw Error(a(340));ca()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(kn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(a(340));ca()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Q(Et),null;case 4:return be(),null;case 10:return Ur(r.type),null;case 22:case 23:return kn(r),Hf(),t!==null&&Q(ha),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Ur(kt),null;case 25:return null;default:return null}}function My(t,r){switch(kf(r),r.tag){case 3:Ur(kt),be();break;case 26:case 27:case 5:Xt(r);break;case 4:be();break;case 31:r.memoizedState!==null&&kn(r);break;case 13:kn(r);break;case 19:Q(Et);break;case 10:Ur(r.type);break;case 22:case 23:kn(r),Hf(),t!==null&&Q(ha);break;case 24:Ur(kt)}}function Mo(t,r){try{var l=r.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var f=s.next;l=f;do{if((l.tag&t)===t){s=void 0;var h=l.create,b=l.inst;s=h(),b.destroy=s}l=l.next}while(l!==f)}}catch(E){et(r,r.return,E)}}function wi(t,r,l){try{var s=r.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var h=f.next;s=h;do{if((s.tag&t)===t){var b=s.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,f=r;var z=l,Z=E;try{Z()}catch(G){et(f,z,G)}}}s=s.next}while(s!==h)}}catch(G){et(r,r.return,G)}}function Uy(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{kg(r,l)}catch(s){et(t,t.return,s)}}}function Ly(t,r,l){l.props=va(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(s){et(t,r,s)}}function Uo(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof l=="function"?t.refCleanup=l(s):l.current=s}}catch(f){et(t,r,f)}}function gr(t,r){var l=t.ref,s=t.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(f){et(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){et(t,r,f)}else l.current=null}function By(t){var r=t.type,l=t.memoizedProps,s=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(f){et(t,t.return,f)}}function bd(t,r,l){try{var s=t.stateNode;S_(s,t.type,l,r),s[un]=r}catch(f){et(t,t.return,f)}}function Iy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ni(t.type)||t.tag===4}function xd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Iy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ni(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Sd(t,r,l){var s=t.tag;if(s===5||s===6)t=t.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(t),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=jr));else if(s!==4&&(s===27&&Ni(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(Sd(t,r,l),t=t.sibling;t!==null;)Sd(t,r,l),t=t.sibling}function Su(t,r,l){var s=t.tag;if(s===5||s===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(s!==4&&(s===27&&Ni(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Su(t,r,l),t=t.sibling;t!==null;)Su(t,r,l),t=t.sibling}function qy(t){var r=t.stateNode,l=t.memoizedProps;try{for(var s=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);Qt(r,s,l),r[Pt]=t,r[un]=l}catch(h){et(t,t.return,h)}}var Hr=!1,Nt=!1,wd=!1,Hy=typeof WeakSet=="function"?WeakSet:Set,It=null;function e_(t,r){if(t=t.containerInfo,Pd=Zu,t=Wp(t),pf(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var f=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{l.nodeType,h.nodeType}catch{l=null;break e}var b=0,E=-1,z=-1,Z=0,G=0,W=t,F=null;t:for(;;){for(var V;W!==l||f!==0&&W.nodeType!==3||(E=b+f),W!==h||s!==0&&W.nodeType!==3||(z=b+s),W.nodeType===3&&(b+=W.nodeValue.length),(V=W.firstChild)!==null;)F=W,W=V;for(;;){if(W===t)break t;if(F===l&&++Z===f&&(E=b),F===h&&++G===s&&(z=b),(V=W.nextSibling)!==null)break;W=F,F=W.parentNode}W=V}l=E===-1||z===-1?null:{start:E,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(Fd={focusedElem:t,selectionRange:l},Zu=!1,It=r;It!==null;)if(r=It,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,It=t;else for(;It!==null;){switch(r=It,h=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)f=t[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&h!==null){t=void 0,l=r,f=h.memoizedProps,h=h.memoizedState,s=l.stateNode;try{var me=va(l.type,f);t=s.getSnapshotBeforeUpdate(me,h),s.__reactInternalSnapshotBeforeUpdate=t}catch(Ce){et(l,l.return,Ce)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)Qd(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Qd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=r.sibling,t!==null){t.return=r.return,It=t;break}It=r.return}}function Zy(t,r,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:Pr(t,l),s&4&&Mo(5,l);break;case 1:if(Pr(t,l),s&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(b){et(l,l.return,b)}else{var f=va(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(b){et(l,l.return,b)}}s&64&&Uy(l),s&512&&Uo(l,l.return);break;case 3:if(Pr(t,l),s&64&&(t=l.updateQueue,t!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{kg(t,r)}catch(b){et(l,l.return,b)}}break;case 27:r===null&&s&4&&qy(l);case 26:case 5:Pr(t,l),r===null&&s&4&&By(l),s&512&&Uo(l,l.return);break;case 12:Pr(t,l);break;case 31:Pr(t,l),s&4&&$y(t,l);break;case 13:Pr(t,l),s&4&&Vy(t,l),s&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=u_.bind(null,l),N_(t,l))));break;case 22:if(s=l.memoizedState!==null||Hr,!s){r=r!==null&&r.memoizedState!==null||Nt,f=Hr;var h=Nt;Hr=s,(Nt=r)&&!h?Fr(t,l,(l.subtreeFlags&8772)!==0):Pr(t,l),Hr=f,Nt=h}break;case 30:break;default:Pr(t,l)}}function Py(t){var r=t.alternate;r!==null&&(t.alternate=null,Py(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Kc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,fn=!1;function Zr(t,r,l){for(l=l.child;l!==null;)Fy(t,r,l),l=l.sibling}function Fy(t,r,l){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(nn,l)}catch{}switch(l.tag){case 26:Nt||gr(l,r),Zr(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Nt||gr(l,r);var s=ht,f=fn;Ni(l.type)&&(ht=l.stateNode,fn=!1),Zr(t,r,l),$o(l.stateNode),ht=s,fn=f;break;case 5:Nt||gr(l,r);case 6:if(s=ht,f=fn,ht=null,Zr(t,r,l),ht=s,fn=f,ht!==null)if(fn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(l.stateNode)}catch(h){et(l,r,h)}else try{ht.removeChild(l.stateNode)}catch(h){et(l,r,h)}break;case 18:ht!==null&&(fn?(t=ht,Uv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),_l(t)):Uv(ht,l.stateNode));break;case 4:s=ht,f=fn,ht=l.stateNode.containerInfo,fn=!0,Zr(t,r,l),ht=s,fn=f;break;case 0:case 11:case 14:case 15:wi(2,l,r),Nt||wi(4,l,r),Zr(t,r,l);break;case 1:Nt||(gr(l,r),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Ly(l,r,s)),Zr(t,r,l);break;case 21:Zr(t,r,l);break;case 22:Nt=(s=Nt)||l.memoizedState!==null,Zr(t,r,l),Nt=s;break;default:Zr(t,r,l)}}function $y(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{_l(t)}catch(l){et(r,r.return,l)}}}function Vy(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{_l(t)}catch(l){et(r,r.return,l)}}function t_(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Hy),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Hy),r;default:throw Error(a(435,t.tag))}}function wu(t,r){var l=t_(t);r.forEach(function(s){if(!l.has(s)){l.add(s);var f=c_.bind(null,t,s);s.then(f,f)}})}function dn(t,r){var l=r.deletions;if(l!==null)for(var s=0;s<l.length;s++){var f=l[s],h=t,b=r,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(Ni(E.type)){ht=E.stateNode,fn=!1;break e}break;case 5:ht=E.stateNode,fn=!1;break e;case 3:case 4:ht=E.stateNode.containerInfo,fn=!0;break e}E=E.return}if(ht===null)throw Error(a(160));Fy(h,b,f),ht=null,fn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Qy(r,t),r=r.sibling}var lr=null;function Qy(t,r){var l=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:dn(r,t),hn(t),s&4&&(wi(3,t,t.return),Mo(3,t),wi(5,t,t.return));break;case 1:dn(r,t),hn(t),s&512&&(Nt||l===null||gr(l,l.return)),s&64&&Hr&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?s:l.concat(s))));break;case 26:var f=lr;if(dn(r,t),hn(t),s&512&&(Nt||l===null||gr(l,l.return)),s&4){var h=l!==null?l.memoizedState:null;if(s=t.memoizedState,l===null)if(s===null)if(t.stateNode===null){e:{s=t.type,l=t.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":h=f.getElementsByTagName("title")[0],(!h||h[so]||h[Pt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(s),f.head.insertBefore(h,f.querySelector("head > title"))),Qt(h,s,l),h[Pt]=t,Bt(h),s=h;break e;case"link":var b=Qv("link","href",f).get(s+(l.href||""));if(b){for(var E=0;E<b.length;E++)if(h=b[E],h.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&h.getAttribute("rel")===(l.rel==null?null:l.rel)&&h.getAttribute("title")===(l.title==null?null:l.title)&&h.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(E,1);break t}}h=f.createElement(s),Qt(h,s,l),f.head.appendChild(h);break;case"meta":if(b=Qv("meta","content",f).get(s+(l.content||""))){for(E=0;E<b.length;E++)if(h=b[E],h.getAttribute("content")===(l.content==null?null:""+l.content)&&h.getAttribute("name")===(l.name==null?null:l.name)&&h.getAttribute("property")===(l.property==null?null:l.property)&&h.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&h.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(E,1);break t}}h=f.createElement(s),Qt(h,s,l),f.head.appendChild(h);break;default:throw Error(a(468,s))}h[Pt]=t,Bt(h),s=h}t.stateNode=s}else Yv(f,t.type,t.stateNode);else t.stateNode=Vv(f,s,t.memoizedProps);else h!==s?(h===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):h.count--,s===null?Yv(f,t.type,t.stateNode):Vv(f,s,t.memoizedProps)):s===null&&t.stateNode!==null&&bd(t,t.memoizedProps,l.memoizedProps)}break;case 27:dn(r,t),hn(t),s&512&&(Nt||l===null||gr(l,l.return)),l!==null&&s&4&&bd(t,t.memoizedProps,l.memoizedProps);break;case 5:if(dn(r,t),hn(t),s&512&&(Nt||l===null||gr(l,l.return)),t.flags&32){f=t.stateNode;try{Qa(f,"")}catch(me){et(t,t.return,me)}}s&4&&t.stateNode!=null&&(f=t.memoizedProps,bd(t,f,l!==null?l.memoizedProps:f)),s&1024&&(wd=!0);break;case 6:if(dn(r,t),hn(t),s&4){if(t.stateNode===null)throw Error(a(162));s=t.memoizedProps,l=t.stateNode;try{l.nodeValue=s}catch(me){et(t,t.return,me)}}break;case 3:if(Bu=null,f=lr,lr=Uu(r.containerInfo),dn(r,t),lr=f,hn(t),s&4&&l!==null&&l.memoizedState.isDehydrated)try{_l(r.containerInfo)}catch(me){et(t,t.return,me)}wd&&(wd=!1,Yy(t));break;case 4:s=lr,lr=Uu(t.stateNode.containerInfo),dn(r,t),hn(t),lr=s;break;case 12:dn(r,t),hn(t);break;case 31:dn(r,t),hn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,wu(t,s)));break;case 13:dn(r,t),hn(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(_u=Lt()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,wu(t,s)));break;case 22:f=t.memoizedState!==null;var z=l!==null&&l.memoizedState!==null,Z=Hr,G=Nt;if(Hr=Z||f,Nt=G||z,dn(r,t),Nt=G,Hr=Z,hn(t),s&8192)e:for(r=t.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(l===null||z||Hr||Nt||ba(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){z=l=r;try{if(h=z.stateNode,f)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=z.stateNode;var W=z.memoizedProps.style,F=W!=null&&W.hasOwnProperty("display")?W.display:null;E.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(me){et(z,z.return,me)}}}else if(r.tag===6){if(l===null){z=r;try{z.stateNode.nodeValue=f?"":z.memoizedProps}catch(me){et(z,z.return,me)}}}else if(r.tag===18){if(l===null){z=r;try{var V=z.stateNode;f?Lv(V,!0):Lv(z.stateNode,!1)}catch(me){et(z,z.return,me)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}s&4&&(s=t.updateQueue,s!==null&&(l=s.retryQueue,l!==null&&(s.retryQueue=null,wu(t,l))));break;case 19:dn(r,t),hn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,wu(t,s)));break;case 30:break;case 21:break;default:dn(r,t),hn(t)}}function hn(t){var r=t.flags;if(r&2){try{for(var l,s=t.return;s!==null;){if(Iy(s)){l=s;break}s=s.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,h=xd(t);Su(t,h,f);break;case 5:var b=l.stateNode;l.flags&32&&(Qa(b,""),l.flags&=-33);var E=xd(t);Su(t,E,b);break;case 3:case 4:var z=l.stateNode.containerInfo,Z=xd(t);Sd(t,Z,z);break;default:throw Error(a(161))}}catch(G){et(t,t.return,G)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Yy(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Yy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Pr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Zy(t,r.alternate,r),r=r.sibling}function ba(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:wi(4,r,r.return),ba(r);break;case 1:gr(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Ly(r,r.return,l),ba(r);break;case 27:$o(r.stateNode);case 26:case 5:gr(r,r.return),ba(r);break;case 22:r.memoizedState===null&&ba(r);break;case 30:ba(r);break;default:ba(r)}t=t.sibling}}function Fr(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var s=r.alternate,f=t,h=r,b=h.flags;switch(h.tag){case 0:case 11:case 15:Fr(f,h,l),Mo(4,h);break;case 1:if(Fr(f,h,l),s=h,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(Z){et(s,s.return,Z)}if(s=h,f=s.updateQueue,f!==null){var E=s.stateNode;try{var z=f.shared.hiddenCallbacks;if(z!==null)for(f.shared.hiddenCallbacks=null,f=0;f<z.length;f++)Cg(z[f],E)}catch(Z){et(s,s.return,Z)}}l&&b&64&&Uy(h),Uo(h,h.return);break;case 27:qy(h);case 26:case 5:Fr(f,h,l),l&&s===null&&b&4&&By(h),Uo(h,h.return);break;case 12:Fr(f,h,l);break;case 31:Fr(f,h,l),l&&b&4&&$y(f,h);break;case 13:Fr(f,h,l),l&&b&4&&Vy(f,h);break;case 22:h.memoizedState===null&&Fr(f,h,l),Uo(h,h.return);break;case 30:break;default:Fr(f,h,l)}r=r.sibling}}function Ed(t,r){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&wo(l))}function _d(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&wo(t))}function or(t,r,l,s){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Gy(t,r,l,s),r=r.sibling}function Gy(t,r,l,s){var f=r.flags;switch(r.tag){case 0:case 11:case 15:or(t,r,l,s),f&2048&&Mo(9,r);break;case 1:or(t,r,l,s);break;case 3:or(t,r,l,s),f&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&wo(t)));break;case 12:if(f&2048){or(t,r,l,s),t=r.stateNode;try{var h=r.memoizedProps,b=h.id,E=h.onPostCommit;typeof E=="function"&&E(b,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(z){et(r,r.return,z)}}else or(t,r,l,s);break;case 31:or(t,r,l,s);break;case 13:or(t,r,l,s);break;case 23:break;case 22:h=r.stateNode,b=r.alternate,r.memoizedState!==null?h._visibility&2?or(t,r,l,s):Lo(t,r):h._visibility&2?or(t,r,l,s):(h._visibility|=2,hl(t,r,l,s,(r.subtreeFlags&10256)!==0||!1)),f&2048&&Ed(b,r);break;case 24:or(t,r,l,s),f&2048&&_d(r.alternate,r);break;default:or(t,r,l,s)}}function hl(t,r,l,s,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var h=t,b=r,E=l,z=s,Z=b.flags;switch(b.tag){case 0:case 11:case 15:hl(h,b,E,z,f),Mo(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?hl(h,b,E,z,f):Lo(h,b):(G._visibility|=2,hl(h,b,E,z,f)),f&&Z&2048&&Ed(b.alternate,b);break;case 24:hl(h,b,E,z,f),f&&Z&2048&&_d(b.alternate,b);break;default:hl(h,b,E,z,f)}r=r.sibling}}function Lo(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,s=r,f=s.flags;switch(s.tag){case 22:Lo(l,s),f&2048&&Ed(s.alternate,s);break;case 24:Lo(l,s),f&2048&&_d(s.alternate,s);break;default:Lo(l,s)}r=r.sibling}}var Bo=8192;function ml(t,r,l){if(t.subtreeFlags&Bo)for(t=t.child;t!==null;)Xy(t,r,l),t=t.sibling}function Xy(t,r,l){switch(t.tag){case 26:ml(t,r,l),t.flags&Bo&&t.memoizedState!==null&&H_(l,lr,t.memoizedState,t.memoizedProps);break;case 5:ml(t,r,l);break;case 3:case 4:var s=lr;lr=Uu(t.stateNode.containerInfo),ml(t,r,l),lr=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Bo,Bo=16777216,ml(t,r,l),Bo=s):ml(t,r,l));break;default:ml(t,r,l)}}function Ky(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Io(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var s=r[l];It=s,Wy(s,t)}Ky(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jy(t),t=t.sibling}function Jy(t){switch(t.tag){case 0:case 11:case 15:Io(t),t.flags&2048&&wi(9,t,t.return);break;case 3:Io(t);break;case 12:Io(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Eu(t)):Io(t);break;default:Io(t)}}function Eu(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var s=r[l];It=s,Wy(s,t)}Ky(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:wi(8,r,r.return),Eu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Eu(r));break;default:Eu(r)}t=t.sibling}}function Wy(t,r){for(;It!==null;){var l=It;switch(l.tag){case 0:case 11:case 15:wi(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:wo(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,It=s;else e:for(l=t;It!==null;){s=It;var f=s.sibling,h=s.return;if(Py(s),s===l){It=null;break e}if(f!==null){f.return=h,It=f;break e}It=h}}}var n_={getCacheForType:function(t){var r=$t(kt),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l},cacheSignal:function(){return $t(kt).controller.signal}},r_=typeof WeakMap=="function"?WeakMap:Map,Ge=0,ot=null,Be=null,qe=0,We=0,Tn=null,Ei=!1,pl=!1,Cd=!1,$r=0,vt=0,_i=0,xa=0,kd=0,An=0,gl=0,qo=null,mn=null,Td=!1,_u=0,ev=0,Cu=1/0,ku=null,Ci=null,Rt=0,ki=null,yl=null,Vr=0,Ad=0,Nd=null,tv=null,Ho=0,zd=null;function Nn(){return(Ge&2)!==0&&qe!==0?qe&-qe:I.T!==null?Ud():yp()}function nv(){if(An===0)if((qe&536870912)===0||Ze){var t=Ds;Ds<<=1,(Ds&3932160)===0&&(Ds=262144),An=t}else An=536870912;return t=Cn.current,t!==null&&(t.flags|=32),An}function pn(t,r,l){(t===ot&&(We===2||We===9)||t.cancelPendingCommit!==null)&&(vl(t,0),Ti(t,qe,An,!1)),oo(t,l),((Ge&2)===0||t!==ot)&&(t===ot&&((Ge&2)===0&&(xa|=l),vt===4&&Ti(t,qe,An,!1)),yr(t))}function rv(t,r,l){if((Ge&6)!==0)throw Error(a(327));var s=!l&&(r&127)===0&&(r&t.expiredLanes)===0||lo(t,r),f=s?l_(t,r):Od(t,r,!0),h=s;do{if(f===0){pl&&!s&&Ti(t,r,0,!1);break}else{if(l=t.current.alternate,h&&!i_(l)){f=Od(t,r,!1),h=!1;continue}if(f===2){if(h=r,t.errorRecoveryDisabledLanes&h)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){r=b;e:{var E=t;f=qo;var z=E.current.memoizedState.isDehydrated;if(z&&(vl(E,b).flags|=256),b=Od(E,b,!1),b!==2){if(Cd&&!z){E.errorRecoveryDisabledLanes|=h,xa|=h,f=4;break e}h=mn,mn=f,h!==null&&(mn===null?mn=h:mn.push.apply(mn,h))}f=b}if(h=!1,f!==2)continue}}if(f===1){vl(t,0),Ti(t,r,0,!0);break}e:{switch(s=t,h=f,h){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ti(s,r,An,!Ei);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(f=_u+300-Lt(),10<f)){if(Ti(s,r,An,!Ei),Us(s,0,!0)!==0)break e;Vr=r,s.timeoutHandle=Dv(iv.bind(null,s,l,mn,ku,Td,r,An,xa,gl,Ei,h,"Throttled",-0,0),f);break e}iv(s,l,mn,ku,Td,r,An,xa,gl,Ei,h,null,-0,0)}}break}while(!0);yr(t)}function iv(t,r,l,s,f,h,b,E,z,Z,G,W,F,V){if(t.timeoutHandle=-1,W=r.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jr},Xy(r,h,W);var me=(h&62914560)===h?_u-Lt():(h&4194048)===h?ev-Lt():0;if(me=Z_(W,me),me!==null){Vr=h,t.cancelPendingCommit=me(dv.bind(null,t,r,h,l,s,f,b,E,z,G,W,null,F,V)),Ti(t,h,b,!Z);return}}dv(t,r,h,l,s,f,b,E,z)}function i_(t){for(var r=t;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var f=l[s],h=f.getSnapshot;f=f.value;try{if(!En(h(),f))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ti(t,r,l,s){r&=~kd,r&=~xa,t.suspendedLanes|=r,t.pingedLanes&=~r,s&&(t.warmLanes|=r),s=t.expirationTimes;for(var f=r;0<f;){var h=31-lt(f),b=1<<h;s[h]=-1,f&=~b}l!==0&&mp(t,l,r)}function Tu(){return(Ge&6)===0?(Zo(0),!1):!0}function jd(){if(Be!==null){if(We===0)var t=Be.return;else t=Be,Mr=fa=null,Qf(t),sl=null,_o=0,t=Be;for(;t!==null;)My(t.alternate,t),t=t.return;Be=null}}function vl(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,__(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Vr=0,jd(),ot=t,Be=l=Rr(t.current,null),qe=r,We=0,Tn=null,Ei=!1,pl=lo(t,r),Cd=!1,gl=An=kd=xa=_i=vt=0,mn=qo=null,Td=!1,(r&8)!==0&&(r|=r&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=r;0<s;){var f=31-lt(s),h=1<<f;r|=t[f],s&=~h}return $r=r,Ys(),l}function av(t,r){Oe=null,I.H=Oo,r===ol||r===nu?(r=Sg(),We=3):r===Mf?(r=Sg(),We=4):We=r===ud?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Tn=r,Be===null&&(vt=1,gu(t,Zn(r,t.current)))}function lv(){var t=Cn.current;return t===null?!0:(qe&4194048)===qe?Vn===null:(qe&62914560)===qe||(qe&536870912)!==0?t===Vn:!1}function ov(){var t=I.H;return I.H=Oo,t===null?Oo:t}function sv(){var t=I.A;return I.A=n_,t}function Au(){vt=4,Ei||(qe&4194048)!==qe&&Cn.current!==null||(pl=!0),(_i&134217727)===0&&(xa&134217727)===0||ot===null||Ti(ot,qe,An,!1)}function Od(t,r,l){var s=Ge;Ge|=2;var f=ov(),h=sv();(ot!==t||qe!==r)&&(ku=null,vl(t,r)),r=!1;var b=vt;e:do try{if(We!==0&&Be!==null){var E=Be,z=Tn;switch(We){case 8:jd(),b=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(r=!0);var Z=We;if(We=0,Tn=null,bl(t,E,z,Z),l&&pl){b=0;break e}break;default:Z=We,We=0,Tn=null,bl(t,E,z,Z)}}a_(),b=vt;break}catch(G){av(t,G)}while(!0);return r&&t.shellSuspendCounter++,Mr=fa=null,Ge=s,I.H=f,I.A=h,Be===null&&(ot=null,qe=0,Ys()),b}function a_(){for(;Be!==null;)uv(Be)}function l_(t,r){var l=Ge;Ge|=2;var s=ov(),f=sv();ot!==t||qe!==r?(ku=null,Cu=Lt()+500,vl(t,r)):pl=lo(t,r);e:do try{if(We!==0&&Be!==null){r=Be;var h=Tn;t:switch(We){case 1:We=0,Tn=null,bl(t,r,h,1);break;case 2:case 9:if(bg(h)){We=0,Tn=null,cv(r);break}r=function(){We!==2&&We!==9||ot!==t||(We=7),yr(t)},h.then(r,r);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:bg(h)?(We=0,Tn=null,cv(r)):(We=0,Tn=null,bl(t,r,h,7));break;case 5:var b=null;switch(Be.tag){case 26:b=Be.memoizedState;case 5:case 27:var E=Be;if(b?Gv(b):E.stateNode.complete){We=0,Tn=null;var z=E.sibling;if(z!==null)Be=z;else{var Z=E.return;Z!==null?(Be=Z,Nu(Z)):Be=null}break t}}We=0,Tn=null,bl(t,r,h,5);break;case 6:We=0,Tn=null,bl(t,r,h,6);break;case 8:jd(),vt=6;break e;default:throw Error(a(462))}}o_();break}catch(G){av(t,G)}while(!0);return Mr=fa=null,I.H=s,I.A=f,Ge=l,Be!==null?0:(ot=null,qe=0,Ys(),vt)}function o_(){for(;Be!==null&&!Ba();)uv(Be)}function uv(t){var r=Ry(t.alternate,t,$r);t.memoizedProps=t.pendingProps,r===null?Nu(t):Be=r}function cv(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Ty(l,r,r.pendingProps,r.type,void 0,qe);break;case 11:r=Ty(l,r,r.pendingProps,r.type.render,r.ref,qe);break;case 5:Qf(r);default:My(l,r),r=Be=sg(r,$r),r=Ry(l,r,$r)}t.memoizedProps=t.pendingProps,r===null?Nu(t):Be=r}function bl(t,r,l,s){Mr=fa=null,Qf(r),sl=null,_o=0;var f=r.return;try{if(GE(t,f,r,l,qe)){vt=1,gu(t,Zn(l,t.current)),Be=null;return}}catch(h){if(f!==null)throw Be=f,h;vt=1,gu(t,Zn(l,t.current)),Be=null;return}r.flags&32768?(Ze||s===1?t=!0:pl||(qe&536870912)!==0?t=!1:(Ei=t=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),fv(r,t)):Nu(r)}function Nu(t){var r=t;do{if((r.flags&32768)!==0){fv(r,Ei);return}t=r.return;var l=JE(r.alternate,r,$r);if(l!==null){Be=l;return}if(r=r.sibling,r!==null){Be=r;return}Be=r=t}while(r!==null);vt===0&&(vt=5)}function fv(t,r){do{var l=WE(t.alternate,t);if(l!==null){l.flags&=32767,Be=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){Be=t;return}Be=t=l}while(t!==null);vt=6,Be=null}function dv(t,r,l,s,f,h,b,E,z){t.cancelPendingCommit=null;do zu();while(Rt!==0);if((Ge&6)!==0)throw Error(a(327));if(r!==null){if(r===t.current)throw Error(a(177));if(h=r.lanes|r.childLanes,h|=xf,qw(t,l,h,b,E,z),t===ot&&(Be=ot=null,qe=0),yl=r,ki=t,Vr=l,Ad=h,Nd=f,tv=s,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,f_(_e,function(){return yv(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,f=te.p,te.p=2,b=Ge,Ge|=4;try{e_(t,r,l)}finally{Ge=b,te.p=f,I.T=s}}Rt=1,hv(),mv(),pv()}}function hv(){if(Rt===1){Rt=0;var t=ki,r=yl,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=I.T,I.T=null;var s=te.p;te.p=2;var f=Ge;Ge|=4;try{Qy(r,t);var h=Fd,b=Wp(t.containerInfo),E=h.focusedElem,z=h.selectionRange;if(b!==E&&E&&E.ownerDocument&&Jp(E.ownerDocument.documentElement,E)){if(z!==null&&pf(E)){var Z=z.start,G=z.end;if(G===void 0&&(G=Z),"selectionStart"in E)E.selectionStart=Z,E.selectionEnd=Math.min(G,E.value.length);else{var W=E.ownerDocument||document,F=W&&W.defaultView||window;if(F.getSelection){var V=F.getSelection(),me=E.textContent.length,Ce=Math.min(z.start,me),at=z.end===void 0?Ce:Math.min(z.end,me);!V.extend&&Ce>at&&(b=at,at=Ce,Ce=b);var B=Kp(E,Ce),M=Kp(E,at);if(B&&M&&(V.rangeCount!==1||V.anchorNode!==B.node||V.anchorOffset!==B.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var H=W.createRange();H.setStart(B.node,B.offset),V.removeAllRanges(),Ce>at?(V.addRange(H),V.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),V.addRange(H))}}}}for(W=[],V=E;V=V.parentNode;)V.nodeType===1&&W.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<W.length;E++){var K=W[E];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Zu=!!Pd,Fd=Pd=null}finally{Ge=f,te.p=s,I.T=l}}t.current=r,Rt=2}}function mv(){if(Rt===2){Rt=0;var t=ki,r=yl,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=I.T,I.T=null;var s=te.p;te.p=2;var f=Ge;Ge|=4;try{Zy(t,r.alternate,r)}finally{Ge=f,te.p=s,I.T=l}}Rt=3}}function pv(){if(Rt===4||Rt===3){Rt=0,Ia();var t=ki,r=yl,l=Vr,s=tv;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Rt=5:(Rt=0,yl=ki=null,gv(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Ci=null),Gc(l),r=r.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(nn,r,void 0,(r.current.flags&128)===128)}catch{}if(s!==null){r=I.T,f=te.p,te.p=2,I.T=null;try{for(var h=t.onRecoverableError,b=0;b<s.length;b++){var E=s[b];h(E.value,{componentStack:E.stack})}}finally{I.T=r,te.p=f}}(Vr&3)!==0&&zu(),yr(t),f=t.pendingLanes,(l&261930)!==0&&(f&42)!==0?t===zd?Ho++:(Ho=0,zd=t):Ho=0,Zo(0)}}function gv(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,wo(r)))}function zu(){return hv(),mv(),pv(),yv()}function yv(){if(Rt!==5)return!1;var t=ki,r=Ad;Ad=0;var l=Gc(Vr),s=I.T,f=te.p;try{te.p=32>l?32:l,I.T=null,l=Nd,Nd=null;var h=ki,b=Vr;if(Rt=0,yl=ki=null,Vr=0,(Ge&6)!==0)throw Error(a(331));var E=Ge;if(Ge|=4,Jy(h.current),Gy(h,h.current,b,l),Ge=E,Zo(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(nn,h)}catch{}return!0}finally{te.p=f,I.T=s,gv(t,r)}}function vv(t,r,l){r=Zn(l,r),r=sd(t.stateNode,r,2),t=bi(t,r,2),t!==null&&(oo(t,2),yr(t))}function et(t,r,l){if(t.tag===3)vv(t,t,l);else for(;r!==null;){if(r.tag===3){vv(r,t,l);break}else if(r.tag===1){var s=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ci===null||!Ci.has(s))){t=Zn(l,t),l=by(2),s=bi(r,l,2),s!==null&&(xy(l,s,r,t),oo(s,2),yr(s));break}}r=r.return}}function Rd(t,r,l){var s=t.pingCache;if(s===null){s=t.pingCache=new r_;var f=new Set;s.set(r,f)}else f=s.get(r),f===void 0&&(f=new Set,s.set(r,f));f.has(l)||(Cd=!0,f.add(l),t=s_.bind(null,t,r,l),r.then(t,t))}function s_(t,r,l){var s=t.pingCache;s!==null&&s.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,ot===t&&(qe&l)===l&&(vt===4||vt===3&&(qe&62914560)===qe&&300>Lt()-_u?(Ge&2)===0&&vl(t,0):kd|=l,gl===qe&&(gl=0)),yr(t)}function bv(t,r){r===0&&(r=hp()),t=sa(t,r),t!==null&&(oo(t,r),yr(t))}function u_(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),bv(t,l)}function c_(t,r){var l=0;switch(t.tag){case 31:case 13:var s=t.stateNode,f=t.memoizedState;f!==null&&(l=f.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(a(314))}s!==null&&s.delete(r),bv(t,l)}function f_(t,r){return hr(t,r)}var ju=null,xl=null,Dd=!1,Ou=!1,Md=!1,Ai=0;function yr(t){t!==xl&&t.next===null&&(xl===null?ju=xl=t:xl=xl.next=t),Ou=!0,Dd||(Dd=!0,h_())}function Zo(t,r){if(!Md&&Ou){Md=!0;do for(var l=!1,s=ju;s!==null;){if(t!==0){var f=s.pendingLanes;if(f===0)var h=0;else{var b=s.suspendedLanes,E=s.pingedLanes;h=(1<<31-lt(42|t)+1)-1,h&=f&~(b&~E),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(l=!0,Ev(s,h))}else h=qe,h=Us(s,s===ot?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||lo(s,h)||(l=!0,Ev(s,h));s=s.next}while(l);Md=!1}}function d_(){xv()}function xv(){Ou=Dd=!1;var t=0;Ai!==0&&E_()&&(t=Ai);for(var r=Lt(),l=null,s=ju;s!==null;){var f=s.next,h=Sv(s,r);h===0?(s.next=null,l===null?ju=f:l.next=f,f===null&&(xl=l)):(l=s,(t!==0||(h&3)!==0)&&(Ou=!0)),s=f}Rt!==0&&Rt!==5||Zo(t),Ai!==0&&(Ai=0)}function Sv(t,r){for(var l=t.suspendedLanes,s=t.pingedLanes,f=t.expirationTimes,h=t.pendingLanes&-62914561;0<h;){var b=31-lt(h),E=1<<b,z=f[b];z===-1?((E&l)===0||(E&s)!==0)&&(f[b]=Iw(E,r)):z<=r&&(t.expiredLanes|=E),h&=~E}if(r=ot,l=qe,l=Us(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,l===0||t===r&&(We===2||We===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ui(s),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||lo(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(s!==null&&ui(s),Gc(l)){case 2:case 8:l=ne;break;case 32:l=_e;break;case 268435456:l=Ke;break;default:l=_e}return s=wv.bind(null,t),l=hr(l,s),t.callbackPriority=r,t.callbackNode=l,r}return s!==null&&s!==null&&ui(s),t.callbackPriority=2,t.callbackNode=null,2}function wv(t,r){if(Rt!==0&&Rt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(zu()&&t.callbackNode!==l)return null;var s=qe;return s=Us(t,t===ot?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(rv(t,s,r),Sv(t,Lt()),t.callbackNode!=null&&t.callbackNode===l?wv.bind(null,t):null)}function Ev(t,r){if(zu())return null;rv(t,r,!0)}function h_(){C_(function(){(Ge&6)!==0?hr(R,d_):xv()})}function Ud(){if(Ai===0){var t=al;t===0&&(t=Rs,Rs<<=1,(Rs&261888)===0&&(Rs=256)),Ai=t}return Ai}function _v(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:qs(""+t)}function Cv(t,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,t.id&&l.setAttribute("form",t.id),r.parentNode.insertBefore(l,r),t=new FormData(t),l.parentNode.removeChild(l),t}function m_(t,r,l,s,f){if(r==="submit"&&l&&l.stateNode===f){var h=_v((f[un]||null).action),b=s.submitter;b&&(r=(r=b[un]||null)?_v(r.formAction):b.getAttribute("formAction"),r!==null&&(h=r,b=null));var E=new Fs("action","action",null,s,f);t.push({event:E,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ai!==0){var z=b?Cv(f,b):new FormData(f);nd(l,{pending:!0,data:z,method:f.method,action:h},null,z)}}else typeof h=="function"&&(E.preventDefault(),z=b?Cv(f,b):new FormData(f),nd(l,{pending:!0,data:z,method:f.method,action:h},h,z))},currentTarget:f}]})}}for(var Ld=0;Ld<bf.length;Ld++){var Bd=bf[Ld],p_=Bd.toLowerCase(),g_=Bd[0].toUpperCase()+Bd.slice(1);ar(p_,"on"+g_)}ar(ng,"onAnimationEnd"),ar(rg,"onAnimationIteration"),ar(ig,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(OE,"onTransitionRun"),ar(RE,"onTransitionStart"),ar(DE,"onTransitionCancel"),ar(ag,"onTransitionEnd"),$a("onMouseEnter",["mouseout","mouseover"]),$a("onMouseLeave",["mouseout","mouseover"]),$a("onPointerEnter",["pointerout","pointerover"]),$a("onPointerLeave",["pointerout","pointerover"]),ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Po="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(" "),y_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Po));function kv(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var s=t[l],f=s.event;s=s.listeners;e:{var h=void 0;if(r)for(var b=s.length-1;0<=b;b--){var E=s[b],z=E.instance,Z=E.currentTarget;if(E=E.listener,z!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=Z;try{h(f)}catch(G){Qs(G)}f.currentTarget=null,h=z}else for(b=0;b<s.length;b++){if(E=s[b],z=E.instance,Z=E.currentTarget,E=E.listener,z!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=Z;try{h(f)}catch(G){Qs(G)}f.currentTarget=null,h=z}}}}function Ie(t,r){var l=r[Xc];l===void 0&&(l=r[Xc]=new Set);var s=t+"__bubble";l.has(s)||(Tv(r,t,2,!1),l.add(s))}function Id(t,r,l){var s=0;r&&(s|=4),Tv(l,t,s,r)}var Ru="_reactListening"+Math.random().toString(36).slice(2);function qd(t){if(!t[Ru]){t[Ru]=!0,xp.forEach(function(l){l!=="selectionchange"&&(y_.has(l)||Id(l,!1,t),Id(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Ru]||(r[Ru]=!0,Id("selectionchange",!1,r))}}function Tv(t,r,l,s){switch(nb(r)){case 2:var f=$_;break;case 8:f=V_;break;default:f=th}l=f.bind(null,r,l,t),f=void 0,!lf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),s?f!==void 0?t.addEventListener(r,l,{capture:!0,passive:f}):t.addEventListener(r,l,!0):f!==void 0?t.addEventListener(r,l,{passive:f}):t.addEventListener(r,l,!1)}function Hd(t,r,l,s,f){var h=s;if((r&1)===0&&(r&2)===0&&s!==null)e:for(;;){if(s===null)return;var b=s.tag;if(b===3||b===4){var E=s.stateNode.containerInfo;if(E===f)break;if(b===4)for(b=s.return;b!==null;){var z=b.tag;if((z===3||z===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;E!==null;){if(b=Za(E),b===null)return;if(z=b.tag,z===5||z===6||z===26||z===27){s=h=b;continue e}E=E.parentNode}}s=s.return}Op(function(){var Z=h,G=rf(l),W=[];e:{var F=lg.get(t);if(F!==void 0){var V=Fs,me=t;switch(t){case"keypress":if(Zs(l)===0)break e;case"keydown":case"keyup":V=cE;break;case"focusin":me="focus",V=cf;break;case"focusout":me="blur",V=cf;break;case"beforeblur":case"afterblur":V=cf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Mp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Jw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=hE;break;case ng:case rg:case ig:V=tE;break;case ag:V=pE;break;case"scroll":case"scrollend":V=Xw;break;case"wheel":V=yE;break;case"copy":case"cut":case"paste":V=rE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Lp;break;case"toggle":case"beforetoggle":V=bE}var Ce=(r&4)!==0,at=!Ce&&(t==="scroll"||t==="scrollend"),B=Ce?F!==null?F+"Capture":null:F;Ce=[];for(var M=Z,H;M!==null;){var K=M;if(H=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||H===null||B===null||(K=co(M,B),K!=null&&Ce.push(Fo(M,K,H))),at)break;M=M.return}0<Ce.length&&(F=new V(F,me,null,l,G),W.push({event:F,listeners:Ce}))}}if((r&7)===0){e:{if(F=t==="mouseover"||t==="pointerover",V=t==="mouseout"||t==="pointerout",F&&l!==nf&&(me=l.relatedTarget||l.fromElement)&&(Za(me)||me[Ha]))break e;if((V||F)&&(F=G.window===G?G:(F=G.ownerDocument)?F.defaultView||F.parentWindow:window,V?(me=l.relatedTarget||l.toElement,V=Z,me=me?Za(me):null,me!==null&&(at=u(me),Ce=me.tag,me!==at||Ce!==5&&Ce!==27&&Ce!==6)&&(me=null)):(V=null,me=Z),V!==me)){if(Ce=Mp,K="onMouseLeave",B="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=Lp,K="onPointerLeave",B="onPointerEnter",M="pointer"),at=V==null?F:uo(V),H=me==null?F:uo(me),F=new Ce(K,M+"leave",V,l,G),F.target=at,F.relatedTarget=H,K=null,Za(G)===Z&&(Ce=new Ce(B,M+"enter",me,l,G),Ce.target=H,Ce.relatedTarget=at,K=Ce),at=K,V&&me)t:{for(Ce=v_,B=V,M=me,H=0,K=B;K;K=Ce(K))H++;K=0;for(var Ee=M;Ee;Ee=Ce(Ee))K++;for(;0<H-K;)B=Ce(B),H--;for(;0<K-H;)M=Ce(M),K--;for(;H--;){if(B===M||M!==null&&B===M.alternate){Ce=B;break t}B=Ce(B),M=Ce(M)}Ce=null}else Ce=null;V!==null&&Av(W,F,V,Ce,!1),me!==null&&at!==null&&Av(W,at,me,Ce,!0)}}e:{if(F=Z?uo(Z):window,V=F.nodeName&&F.nodeName.toLowerCase(),V==="select"||V==="input"&&F.type==="file")var Qe=$p;else if(Pp(F))if(Vp)Qe=NE;else{Qe=TE;var ve=kE}else V=F.nodeName,!V||V.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?Z&&tf(Z.elementType)&&(Qe=$p):Qe=AE;if(Qe&&(Qe=Qe(t,Z))){Fp(W,Qe,l,G);break e}ve&&ve(t,F,Z),t==="focusout"&&Z&&F.type==="number"&&Z.memoizedProps.value!=null&&ef(F,"number",F.value)}switch(ve=Z?uo(Z):window,t){case"focusin":(Pp(ve)||ve.contentEditable==="true")&&(Ka=ve,gf=Z,bo=null);break;case"focusout":bo=gf=Ka=null;break;case"mousedown":yf=!0;break;case"contextmenu":case"mouseup":case"dragend":yf=!1,eg(W,l,G);break;case"selectionchange":if(jE)break;case"keydown":case"keyup":eg(W,l,G)}var Re;if(df)e:{switch(t){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Xa?Hp(t,l)&&(He="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(Bp&&l.locale!=="ko"&&(Xa||He!=="onCompositionStart"?He==="onCompositionEnd"&&Xa&&(Re=Rp()):(di=G,of="value"in di?di.value:di.textContent,Xa=!0)),ve=Du(Z,He),0<ve.length&&(He=new Up(He,t,null,l,G),W.push({event:He,listeners:ve}),Re?He.data=Re:(Re=Zp(l),Re!==null&&(He.data=Re)))),(Re=SE?wE(t,l):EE(t,l))&&(He=Du(Z,"onBeforeInput"),0<He.length&&(ve=new Up("onBeforeInput","beforeinput",null,l,G),W.push({event:ve,listeners:He}),ve.data=Re)),m_(W,t,Z,l,G)}kv(W,r)})}function Fo(t,r,l){return{instance:t,listener:r,currentTarget:l}}function Du(t,r){for(var l=r+"Capture",s=[];t!==null;){var f=t,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=co(t,l),f!=null&&s.unshift(Fo(t,f,h)),f=co(t,r),f!=null&&s.push(Fo(t,f,h))),t.tag===3)return s;t=t.return}return[]}function v_(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Av(t,r,l,s,f){for(var h=r._reactName,b=[];l!==null&&l!==s;){var E=l,z=E.alternate,Z=E.stateNode;if(E=E.tag,z!==null&&z===s)break;E!==5&&E!==26&&E!==27||Z===null||(z=Z,f?(Z=co(l,h),Z!=null&&b.unshift(Fo(l,Z,z))):f||(Z=co(l,h),Z!=null&&b.push(Fo(l,Z,z)))),l=l.return}b.length!==0&&t.push({event:r,listeners:b})}var b_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function Nv(t){return(typeof t=="string"?t:""+t).replace(b_,`
|
|
49
|
+
`).replace(x_,"")}function zv(t,r){return r=Nv(r),Nv(t)===r}function it(t,r,l,s,f,h){switch(l){case"children":typeof s=="string"?r==="body"||r==="textarea"&&s===""||Qa(t,s):(typeof s=="number"||typeof s=="bigint")&&r!=="body"&&Qa(t,""+s);break;case"className":Bs(t,"class",s);break;case"tabIndex":Bs(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Bs(t,l,s);break;case"style":zp(t,s,h);break;case"data":if(r!=="object"){Bs(t,"data",s);break}case"src":case"href":if(s===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(l);break}s=qs(""+s),t.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(l==="formAction"?(r!=="input"&&it(t,r,"name",f.name,f,null),it(t,r,"formEncType",f.formEncType,f,null),it(t,r,"formMethod",f.formMethod,f,null),it(t,r,"formTarget",f.formTarget,f,null)):(it(t,r,"encType",f.encType,f,null),it(t,r,"method",f.method,f,null),it(t,r,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(l);break}s=qs(""+s),t.setAttribute(l,s);break;case"onClick":s!=null&&(t.onclick=jr);break;case"onScroll":s!=null&&Ie("scroll",t);break;case"onScrollEnd":s!=null&&Ie("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}l=qs(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,""+s):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":s===!0?t.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,s):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(l,s):t.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(l):t.setAttribute(l,s);break;case"popover":Ie("beforetoggle",t),Ie("toggle",t),Ls(t,"popover",s);break;case"xlinkActuate":zr(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":zr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":zr(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":zr(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":zr(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":zr(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":zr(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":zr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":zr(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ls(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Yw.get(l)||l,Ls(t,l,s))}}function Zd(t,r,l,s,f,h){switch(l){case"style":zp(t,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"children":typeof s=="string"?Qa(t,s):(typeof s=="number"||typeof s=="bigint")&&Qa(t,""+s);break;case"onScroll":s!=null&&Ie("scroll",t);break;case"onScrollEnd":s!=null&&Ie("scrollend",t);break;case"onClick":s!=null&&(t.onclick=jr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sp.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),r=l.slice(2,f?l.length-7:void 0),h=t[un]||null,h=h!=null?h[l]:null,typeof h=="function"&&t.removeEventListener(r,h,f),typeof s=="function")){typeof h!="function"&&h!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,s,f);break e}l in t?t[l]=s:s===!0?t.setAttribute(l,""):Ls(t,l,s)}}}function Qt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",t),Ie("load",t);var s=!1,f=!1,h;for(h in l)if(l.hasOwnProperty(h)){var b=l[h];if(b!=null)switch(h){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:it(t,r,h,b,l,null)}}f&&it(t,r,"srcSet",l.srcSet,l,null),s&&it(t,r,"src",l.src,l,null);return;case"input":Ie("invalid",t);var E=h=b=f=null,z=null,Z=null;for(s in l)if(l.hasOwnProperty(s)){var G=l[s];if(G!=null)switch(s){case"name":f=G;break;case"type":b=G;break;case"checked":z=G;break;case"defaultChecked":Z=G;break;case"value":h=G;break;case"defaultValue":E=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,r));break;default:it(t,r,s,G,l,null)}}kp(t,h,E,z,Z,b,f,!1);return;case"select":Ie("invalid",t),s=b=h=null;for(f in l)if(l.hasOwnProperty(f)&&(E=l[f],E!=null))switch(f){case"value":h=E;break;case"defaultValue":b=E;break;case"multiple":s=E;default:it(t,r,f,E,l,null)}r=h,l=b,t.multiple=!!s,r!=null?Va(t,!!s,r,!1):l!=null&&Va(t,!!s,l,!0);return;case"textarea":Ie("invalid",t),h=f=s=null;for(b in l)if(l.hasOwnProperty(b)&&(E=l[b],E!=null))switch(b){case"value":s=E;break;case"defaultValue":f=E;break;case"children":h=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:it(t,r,b,E,l,null)}Ap(t,s,f,h);return;case"option":for(z in l)if(l.hasOwnProperty(z)&&(s=l[z],s!=null))switch(z){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:it(t,r,z,s,l,null)}return;case"dialog":Ie("beforetoggle",t),Ie("toggle",t),Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":Ie("load",t);break;case"video":case"audio":for(s=0;s<Po.length;s++)Ie(Po[s],t);break;case"image":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"embed":case"source":case"link":Ie("error",t),Ie("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in l)if(l.hasOwnProperty(Z)&&(s=l[Z],s!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:it(t,r,Z,s,l,null)}return;default:if(tf(r)){for(G in l)l.hasOwnProperty(G)&&(s=l[G],s!==void 0&&Zd(t,r,G,s,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(s=l[E],s!=null&&it(t,r,E,s,l,null))}function S_(t,r,l,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,b=null,E=null,z=null,Z=null,G=null;for(V in l){var W=l[V];if(l.hasOwnProperty(V)&&W!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":z=W;default:s.hasOwnProperty(V)||it(t,r,V,null,s,W)}}for(var F in s){var V=s[F];if(W=l[F],s.hasOwnProperty(F)&&(V!=null||W!=null))switch(F){case"type":h=V;break;case"name":f=V;break;case"checked":Z=V;break;case"defaultChecked":G=V;break;case"value":b=V;break;case"defaultValue":E=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(a(137,r));break;default:V!==W&&it(t,r,F,V,s,W)}}Wc(t,b,E,z,Z,G,h,f);return;case"select":V=b=E=F=null;for(h in l)if(z=l[h],l.hasOwnProperty(h)&&z!=null)switch(h){case"value":break;case"multiple":V=z;default:s.hasOwnProperty(h)||it(t,r,h,null,s,z)}for(f in s)if(h=s[f],z=l[f],s.hasOwnProperty(f)&&(h!=null||z!=null))switch(f){case"value":F=h;break;case"defaultValue":E=h;break;case"multiple":b=h;default:h!==z&&it(t,r,f,h,s,z)}r=E,l=b,s=V,F!=null?Va(t,!!l,F,!1):!!s!=!!l&&(r!=null?Va(t,!!l,r,!0):Va(t,!!l,l?[]:"",!1));return;case"textarea":V=F=null;for(E in l)if(f=l[E],l.hasOwnProperty(E)&&f!=null&&!s.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:it(t,r,E,null,s,f)}for(b in s)if(f=s[b],h=l[b],s.hasOwnProperty(b)&&(f!=null||h!=null))switch(b){case"value":F=f;break;case"defaultValue":V=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==h&&it(t,r,b,f,s,h)}Tp(t,F,V);return;case"option":for(var me in l)if(F=l[me],l.hasOwnProperty(me)&&F!=null&&!s.hasOwnProperty(me))switch(me){case"selected":t.selected=!1;break;default:it(t,r,me,null,s,F)}for(z in s)if(F=s[z],V=l[z],s.hasOwnProperty(z)&&F!==V&&(F!=null||V!=null))switch(z){case"selected":t.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:it(t,r,z,F,s,V)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in l)F=l[Ce],l.hasOwnProperty(Ce)&&F!=null&&!s.hasOwnProperty(Ce)&&it(t,r,Ce,null,s,F);for(Z in s)if(F=s[Z],V=l[Z],s.hasOwnProperty(Z)&&F!==V&&(F!=null||V!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,r));break;default:it(t,r,Z,F,s,V)}return;default:if(tf(r)){for(var at in l)F=l[at],l.hasOwnProperty(at)&&F!==void 0&&!s.hasOwnProperty(at)&&Zd(t,r,at,void 0,s,F);for(G in s)F=s[G],V=l[G],!s.hasOwnProperty(G)||F===V||F===void 0&&V===void 0||Zd(t,r,G,F,s,V);return}}for(var B in l)F=l[B],l.hasOwnProperty(B)&&F!=null&&!s.hasOwnProperty(B)&&it(t,r,B,null,s,F);for(W in s)F=s[W],V=l[W],!s.hasOwnProperty(W)||F===V||F==null&&V==null||it(t,r,W,F,s,V)}function jv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function w_(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var f=l[s],h=f.transferSize,b=f.initiatorType,E=f.duration;if(h&&E&&jv(b)){for(b=0,E=f.responseEnd,s+=1;s<l.length;s++){var z=l[s],Z=z.startTime;if(Z>E)break;var G=z.transferSize,W=z.initiatorType;G&&jv(W)&&(z=z.responseEnd,b+=G*(z<E?1:(E-Z)/(z-Z)))}if(--s,r+=8*(h+b)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Pd=null,Fd=null;function Mu(t){return t.nodeType===9?t:t.ownerDocument}function Ov(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Rv(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function $d(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Vd=null;function E_(){var t=window.event;return t&&t.type==="popstate"?t===Vd?!1:(Vd=t,!0):(Vd=null,!1)}var Dv=typeof setTimeout=="function"?setTimeout:void 0,__=typeof clearTimeout=="function"?clearTimeout:void 0,Mv=typeof Promise=="function"?Promise:void 0,C_=typeof queueMicrotask=="function"?queueMicrotask:typeof Mv<"u"?function(t){return Mv.resolve(null).then(t).catch(k_)}:Dv;function k_(t){setTimeout(function(){throw t})}function Ni(t){return t==="head"}function Uv(t,r){var l=r,s=0;do{var f=l.nextSibling;if(t.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(s===0){t.removeChild(f),_l(r);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")$o(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,$o(l);for(var h=l.firstChild;h;){var b=h.nextSibling,E=h.nodeName;h[so]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&h.rel.toLowerCase()==="stylesheet"||l.removeChild(h),h=b}}else l==="body"&&$o(t.ownerDocument.body);l=f}while(l);_l(r)}function Lv(t,r){var l=t;t=0;do{var s=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=s}while(l)}function Qd(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Qd(l),Kc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function T_(t,r,l,s){for(;t.nodeType===1;){var f=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[so])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(h=t.getAttribute("rel"),h==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(h!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(h=t.getAttribute("src"),(h!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===h)return t}else return t;if(t=Qn(t.nextSibling),t===null)break}return null}function A_(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Qn(t.nextSibling),t===null))return null;return t}function Bv(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Qn(t.nextSibling),t===null))return null;return t}function Yd(t){return t.data==="$?"||t.data==="$~"}function Gd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function N_(t,r){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||l.readyState!=="loading")r();else{var s=function(){r(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Qn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var Xd=null;function Iv(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(r===0)return Qn(t.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}t=t.nextSibling}return null}function qv(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return t;r--}else l!=="/$"&&l!=="/&"||r++}t=t.previousSibling}return null}function Hv(t,r,l){switch(r=Mu(l),t){case"html":if(t=r.documentElement,!t)throw Error(a(452));return t;case"head":if(t=r.head,!t)throw Error(a(453));return t;case"body":if(t=r.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function $o(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Kc(t)}var Yn=new Map,Zv=new Set;function Uu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Qr=te.d;te.d={f:z_,r:j_,D:O_,C:R_,L:D_,m:M_,X:L_,S:U_,M:B_};function z_(){var t=Qr.f(),r=Tu();return t||r}function j_(t){var r=Pa(t);r!==null&&r.tag===5&&r.type==="form"?ay(r):Qr.r(t)}var Sl=typeof document>"u"?null:document;function Pv(t,r,l){var s=Sl;if(s&&typeof r=="string"&&r){var f=qn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),Zv.has(f)||(Zv.add(f),t={rel:t,crossOrigin:l,href:r},s.querySelector(f)===null&&(r=s.createElement("link"),Qt(r,"link",t),Bt(r),s.head.appendChild(r)))}}function O_(t){Qr.D(t),Pv("dns-prefetch",t,null)}function R_(t,r){Qr.C(t,r),Pv("preconnect",t,r)}function D_(t,r,l){Qr.L(t,r,l);var s=Sl;if(s&&t&&r){var f='link[rel="preload"][as="'+qn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+qn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+qn(l.imageSizes)+'"]')):f+='[href="'+qn(t)+'"]';var h=f;switch(r){case"style":h=wl(t);break;case"script":h=El(t)}Yn.has(h)||(t=v({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),Yn.set(h,t),s.querySelector(f)!==null||r==="style"&&s.querySelector(Vo(h))||r==="script"&&s.querySelector(Qo(h))||(r=s.createElement("link"),Qt(r,"link",t),Bt(r),s.head.appendChild(r)))}}function M_(t,r){Qr.m(t,r);var l=Sl;if(l&&t){var s=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+qn(s)+'"][href="'+qn(t)+'"]',h=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=El(t)}if(!Yn.has(h)&&(t=v({rel:"modulepreload",href:t},r),Yn.set(h,t),l.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Qo(h)))return}s=l.createElement("link"),Qt(s,"link",t),Bt(s),l.head.appendChild(s)}}}function U_(t,r,l){Qr.S(t,r,l);var s=Sl;if(s&&t){var f=Fa(s).hoistableStyles,h=wl(t);r=r||"default";var b=f.get(h);if(!b){var E={loading:0,preload:null};if(b=s.querySelector(Vo(h)))E.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":r},l),(l=Yn.get(h))&&Kd(t,l);var z=b=s.createElement("link");Bt(z),Qt(z,"link",t),z._p=new Promise(function(Z,G){z.onload=Z,z.onerror=G}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Lu(b,r,s)}b={type:"stylesheet",instance:b,count:1,state:E},f.set(h,b)}}}function L_(t,r){Qr.X(t,r);var l=Sl;if(l&&t){var s=Fa(l).hoistableScripts,f=El(t),h=s.get(f);h||(h=l.querySelector(Qo(f)),h||(t=v({src:t,async:!0},r),(r=Yn.get(f))&&Jd(t,r),h=l.createElement("script"),Bt(h),Qt(h,"link",t),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function B_(t,r){Qr.M(t,r);var l=Sl;if(l&&t){var s=Fa(l).hoistableScripts,f=El(t),h=s.get(f);h||(h=l.querySelector(Qo(f)),h||(t=v({src:t,async:!0,type:"module"},r),(r=Yn.get(f))&&Jd(t,r),h=l.createElement("script"),Bt(h),Qt(h,"link",t),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function Fv(t,r,l,s){var f=(f=ue.current)?Uu(f):null;if(!f)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=wl(l.href),l=Fa(f).hoistableStyles,s=l.get(r),s||(s={type:"style",instance:null,count:0,state:null},l.set(r,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=wl(l.href);var h=Fa(f).hoistableStyles,b=h.get(t);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,b),(h=f.querySelector(Vo(t)))&&!h._p&&(b.instance=h,b.state.loading=5),Yn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Yn.set(t,l),h||I_(f,t,l,b.state))),r&&s===null)throw Error(a(528,""));return b}if(r&&s!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=El(l),l=Fa(f).hoistableScripts,s=l.get(r),s||(s={type:"script",instance:null,count:0,state:null},l.set(r,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function wl(t){return'href="'+qn(t)+'"'}function Vo(t){return'link[rel="stylesheet"]['+t+"]"}function $v(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function I_(t,r,l,s){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?s.loading=1:(r=t.createElement("link"),s.preload=r,r.addEventListener("load",function(){return s.loading|=1}),r.addEventListener("error",function(){return s.loading|=2}),Qt(r,"link",l),Bt(r),t.head.appendChild(r))}function El(t){return'[src="'+qn(t)+'"]'}function Qo(t){return"script[async]"+t}function Vv(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var s=t.querySelector('style[data-href~="'+qn(l.href)+'"]');if(s)return r.instance=s,Bt(s),s;var f=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Bt(s),Qt(s,"style",f),Lu(s,l.precedence,t),r.instance=s;case"stylesheet":f=wl(l.href);var h=t.querySelector(Vo(f));if(h)return r.state.loading|=4,r.instance=h,Bt(h),h;s=$v(l),(f=Yn.get(f))&&Kd(s,f),h=(t.ownerDocument||t).createElement("link"),Bt(h);var b=h;return b._p=new Promise(function(E,z){b.onload=E,b.onerror=z}),Qt(h,"link",s),r.state.loading|=4,Lu(h,l.precedence,t),r.instance=h;case"script":return h=El(l.src),(f=t.querySelector(Qo(h)))?(r.instance=f,Bt(f),f):(s=l,(f=Yn.get(h))&&(s=v({},l),Jd(s,f)),t=t.ownerDocument||t,f=t.createElement("script"),Bt(f),Qt(f,"link",s),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(s=r.instance,r.state.loading|=4,Lu(s,l.precedence,t));return r.instance}function Lu(t,r,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,h=f,b=0;b<s.length;b++){var E=s[b];if(E.dataset.precedence===r)h=E;else if(h!==f)break}h?h.parentNode.insertBefore(t,h.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function Kd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Jd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Bu=null;function Qv(t,r,l){if(Bu===null){var s=new Map,f=Bu=new Map;f.set(l,s)}else f=Bu,s=f.get(l),s||(s=new Map,f.set(l,s));if(s.has(t))return s;for(s.set(t,null),l=l.getElementsByTagName(t),f=0;f<l.length;f++){var h=l[f];if(!(h[so]||h[Pt]||t==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(r)||"";b=t+b;var E=s.get(b);E?E.push(h):s.set(b,[h])}}return s}function Yv(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function q_(t,r,l){if(l===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Gv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function H_(t,r,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=wl(s.href),h=r.querySelector(Vo(f));if(h){r=h._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Iu.bind(t),r.then(t,t)),l.state.loading|=4,l.instance=h,Bt(h);return}h=r.ownerDocument||r,s=$v(s),(f=Yn.get(f))&&Kd(s,f),h=h.createElement("link"),Bt(h);var b=h;b._p=new Promise(function(E,z){b.onload=E,b.onerror=z}),Qt(h,"link",s),l.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Iu.bind(t),r.addEventListener("load",l),r.addEventListener("error",l))}}var Wd=0;function Z_(t,r){return t.stylesheets&&t.count===0&&Hu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var s=setTimeout(function(){if(t.stylesheets&&Hu(t,t.stylesheets),t.unsuspend){var h=t.unsuspend;t.unsuspend=null,h()}},6e4+r);0<t.imgBytes&&Wd===0&&(Wd=62500*w_());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Hu(t,t.stylesheets),t.unsuspend)){var h=t.unsuspend;t.unsuspend=null,h()}},(t.imgBytes>Wd?50:800)+r);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function Iu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var qu=null;function Hu(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,qu=new Map,r.forEach(P_,t),qu=null,Iu.call(t))}function P_(t,r){if(!(r.state.loading&4)){var l=qu.get(t);if(l)var s=l.get(null);else{l=new Map,qu.set(t,l);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var b=f[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),s=b)}s&&l.set(null,s)}f=r.instance,b=f.getAttribute("data-precedence"),h=l.get(b)||s,h===s&&l.set(null,f),l.set(b,f),this.count++,s=Iu.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),h?h.parentNode.insertBefore(f,h.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var Yo={$$typeof:U,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function F_(t,r,l,s,f,h,b,E,z){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qc(0),this.hiddenUpdates=Qc(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function Xv(t,r,l,s,f,h,b,E,z,Z,G,W){return t=new F_(t,r,l,b,z,Z,G,W,E),r=1,h===!0&&(r|=24),h=_n(3,null,null,r),t.current=h,h.stateNode=t,r=Of(),r.refCount++,t.pooledCache=r,r.refCount++,h.memoizedState={element:s,isDehydrated:l,cache:r},Uf(h),t}function Kv(t){return t?(t=el,t):el}function Jv(t,r,l,s,f,h){f=Kv(f),s.context===null?s.context=f:s.pendingContext=f,s=vi(r),s.payload={element:l},h=h===void 0?null:h,h!==null&&(s.callback=h),l=bi(t,s,r),l!==null&&(pn(l,t,r),ko(l,t,r))}function Wv(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function eh(t,r){Wv(t,r),(t=t.alternate)&&Wv(t,r)}function eb(t){if(t.tag===13||t.tag===31){var r=sa(t,67108864);r!==null&&pn(r,t,67108864),eh(t,67108864)}}function tb(t){if(t.tag===13||t.tag===31){var r=Nn();r=Yc(r);var l=sa(t,r);l!==null&&pn(l,t,r),eh(t,r)}}var Zu=!0;function $_(t,r,l,s){var f=I.T;I.T=null;var h=te.p;try{te.p=2,th(t,r,l,s)}finally{te.p=h,I.T=f}}function V_(t,r,l,s){var f=I.T;I.T=null;var h=te.p;try{te.p=8,th(t,r,l,s)}finally{te.p=h,I.T=f}}function th(t,r,l,s){if(Zu){var f=nh(s);if(f===null)Hd(t,r,s,Pu,l),rb(t,s);else if(Y_(f,t,r,l,s))s.stopPropagation();else if(rb(t,s),r&4&&-1<Q_.indexOf(t)){for(;f!==null;){var h=Pa(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=ra(h.pendingLanes);if(b!==0){var E=h;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var z=1<<31-lt(b);E.entanglements[1]|=z,b&=~z}yr(h),(Ge&6)===0&&(Cu=Lt()+500,Zo(0))}}break;case 31:case 13:E=sa(h,2),E!==null&&pn(E,h,2),Tu(),eh(h,2)}if(h=nh(s),h===null&&Hd(t,r,s,Pu,l),h===f)break;f=h}f!==null&&s.stopPropagation()}else Hd(t,r,s,null,l)}}function nh(t){return t=rf(t),rh(t)}var Pu=null;function rh(t){if(Pu=null,t=Za(t),t!==null){var r=u(t);if(r===null)t=null;else{var l=r.tag;if(l===13){if(t=c(r),t!==null)return t;t=null}else if(l===31){if(t=d(r),t!==null)return t;t=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return Pu=t,null}function nb(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qa()){case R:return 2;case ne:return 8;case _e:case Ue:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var ih=!1,zi=null,ji=null,Oi=null,Go=new Map,Xo=new Map,Ri=[],Q_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function rb(t,r){switch(t){case"focusin":case"focusout":zi=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":Go.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xo.delete(r.pointerId)}}function Ko(t,r,l,s,f,h){return t===null||t.nativeEvent!==h?(t={blockedOn:r,domEventName:l,eventSystemFlags:s,nativeEvent:h,targetContainers:[f]},r!==null&&(r=Pa(r),r!==null&&eb(r)),t):(t.eventSystemFlags|=s,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function Y_(t,r,l,s,f){switch(r){case"focusin":return zi=Ko(zi,t,r,l,s,f),!0;case"dragenter":return ji=Ko(ji,t,r,l,s,f),!0;case"mouseover":return Oi=Ko(Oi,t,r,l,s,f),!0;case"pointerover":var h=f.pointerId;return Go.set(h,Ko(Go.get(h)||null,t,r,l,s,f)),!0;case"gotpointercapture":return h=f.pointerId,Xo.set(h,Ko(Xo.get(h)||null,t,r,l,s,f)),!0}return!1}function ib(t){var r=Za(t.target);if(r!==null){var l=u(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){t.blockedOn=r,vp(t.priority,function(){tb(l)});return}}else if(r===31){if(r=d(l),r!==null){t.blockedOn=r,vp(t.priority,function(){tb(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Fu(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=nh(t.nativeEvent);if(l===null){l=t.nativeEvent;var s=new l.constructor(l.type,l);nf=s,l.target.dispatchEvent(s),nf=null}else return r=Pa(l),r!==null&&eb(r),t.blockedOn=l,!1;r.shift()}return!0}function ab(t,r,l){Fu(t)&&l.delete(r)}function G_(){ih=!1,zi!==null&&Fu(zi)&&(zi=null),ji!==null&&Fu(ji)&&(ji=null),Oi!==null&&Fu(Oi)&&(Oi=null),Go.forEach(ab),Xo.forEach(ab)}function $u(t,r){t.blockedOn===r&&(t.blockedOn=null,ih||(ih=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,G_)))}var Vu=null;function lb(t){Vu!==t&&(Vu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Vu===t&&(Vu=null);for(var r=0;r<t.length;r+=3){var l=t[r],s=t[r+1],f=t[r+2];if(typeof s!="function"){if(rh(s||l)===null)continue;break}var h=Pa(l);h!==null&&(t.splice(r,3),r-=3,nd(h,{pending:!0,data:f,method:l.method,action:s},s,f))}}))}function _l(t){function r(z){return $u(z,t)}zi!==null&&$u(zi,t),ji!==null&&$u(ji,t),Oi!==null&&$u(Oi,t),Go.forEach(r),Xo.forEach(r);for(var l=0;l<Ri.length;l++){var s=Ri[l];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Ri.length&&(l=Ri[0],l.blockedOn===null);)ib(l),l.blockedOn===null&&Ri.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var f=l[s],h=l[s+1],b=f[un]||null;if(typeof h=="function")b||lb(l);else if(b){var E=null;if(h&&h.hasAttribute("formAction")){if(f=h,b=h[un]||null)E=b.formAction;else if(rh(f)!==null)continue}else E=b.action;typeof E=="function"?l[s+1]=E:(l.splice(s,3),s-=3),lb(l)}}}function ob(){function t(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function ah(t){this._internalRoot=t}Qu.prototype.render=ah.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,s=Nn();Jv(l,s,t,r,null,null)},Qu.prototype.unmount=ah.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Jv(t.current,2,null,t,null,null),Tu(),r[Ha]=null}};function Qu(t){this._internalRoot=t}Qu.prototype.unstable_scheduleHydration=function(t){if(t){var r=yp();t={blockedOn:null,target:t,priority:r};for(var l=0;l<Ri.length&&r!==0&&r<Ri[l].priority;l++);Ri.splice(l,0,t),l===0&&ib(t)}};var sb=n.version;if(sb!=="19.2.4")throw Error(a(527,sb,"19.2.4"));te.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=m(r),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var X_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yu.isDisabled&&Yu.supportsFiber)try{nn=Yu.inject(X_),Ot=Yu}catch{}}return Wo.createRoot=function(t,r){if(!o(t))throw Error(a(299));var l=!1,s="",f=py,h=gy,b=yy;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError)),r=Xv(t,1,!1,null,null,l,s,null,f,h,b,ob),t[Ha]=r.current,qd(t),new ah(r)},Wo.hydrateRoot=function(t,r,l){if(!o(t))throw Error(a(299));var s=!1,f="",h=py,b=gy,E=yy,z=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(h=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(z=l.formState)),r=Xv(t,1,!0,r,l??null,s,f,z,h,b,E,ob),r.context=Kv(null),l=r.current,s=Nn(),s=Yc(s),f=vi(s),f.callback=null,bi(l,f,s),l=s,r.current.lanes=l,oo(r,l),yr(r),t[Ha]=r.current,qd(t),new Qu(r)},Wo.version="19.2.4",Wo}var bb;function oC(){if(bb)return uh.exports;bb=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(n){console.error(n)}}return e(),uh.exports=lC(),uh.exports}var sC=oC(),Jl=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(){}},Ea,qi,Il,p0,uC=(p0=class extends Jl{constructor(){super();xe(this,Ea);xe(this,qi);xe(this,Il);ce(this,Il,n=>{if(typeof window<"u"&&window.addEventListener){const i=()=>n();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){O(this,qi)||this.setEventListener(O(this,Il))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,qi))==null||n.call(this),ce(this,qi,void 0))}setEventListener(n){var i;ce(this,Il,n),(i=O(this,qi))==null||i.call(this),ce(this,qi,n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(n){O(this,Ea)!==n&&(ce(this,Ea,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(i=>{i(n)})}isFocused(){var n;return typeof O(this,Ea)=="boolean"?O(this,Ea):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ea=new WeakMap,qi=new WeakMap,Il=new WeakMap,p0),wm=new uC,cC={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},Hi,bm,g0,fC=(g0=class{constructor(){xe(this,Hi,cC);xe(this,bm,!1)}setTimeoutProvider(e){ce(this,Hi,e)}setTimeout(e,n){return O(this,Hi).setTimeout(e,n)}clearTimeout(e){O(this,Hi).clearTimeout(e)}setInterval(e,n){return O(this,Hi).setInterval(e,n)}clearInterval(e){O(this,Hi).clearInterval(e)}},Hi=new WeakMap,bm=new WeakMap,g0),wa=new fC;function dC(e){setTimeout(e,0)}var hC=typeof window>"u"||"Deno"in globalThis;function on(){}function mC(e,n){return typeof e=="function"?e(n):e}function Hh(e){return typeof e=="number"&&e>=0&&e!==1/0}function T0(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Gi(e,n){return typeof e=="function"?e(n):e}function Xn(e,n){return typeof e=="function"?e(n):e}function xb(e,n){const{type:i="all",exact:a,fetchStatus:o,predicate:u,queryKey:c,stale:d}=e;if(c){if(a){if(n.queryHash!==Em(c,n.options))return!1}else if(!ps(n.queryKey,c))return!1}if(i!=="all"){const p=n.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||o&&o!==n.state.fetchStatus||u&&!u(n))}function Sb(e,n){const{exact:i,status:a,predicate:o,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(i){if(Oa(n.options.mutationKey)!==Oa(u))return!1}else if(!ps(n.options.mutationKey,u))return!1}return!(a&&n.state.status!==a||o&&!o(n))}function Em(e,n){return((n==null?void 0:n.queryKeyHashFn)||Oa)(e)}function Oa(e){return JSON.stringify(e,(n,i)=>Zh(i)?Object.keys(i).sort().reduce((a,o)=>(a[o]=i[o],a),{}):i)}function ps(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(i=>ps(e[i],n[i])):!1}var pC=Object.prototype.hasOwnProperty;function A0(e,n,i=0){if(e===n)return e;if(i>500)return n;const a=wb(e)&&wb(n);if(!a&&!(Zh(e)&&Zh(n)))return n;const u=(a?e:Object.keys(e)).length,c=a?n:Object.keys(n),d=c.length,p=a?new Array(d):{};let m=0;for(let g=0;g<d;g++){const v=a?g:c[g],x=e[v],S=n[v];if(x===S){p[v]=x,(a?g<u:pC.call(e,v))&&m++;continue}if(x===null||S===null||typeof x!="object"||typeof S!="object"){p[v]=S;continue}const N=A0(x,S,i+1);p[v]=N,N===x&&m++}return u===d&&m===u?e:p}function bc(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const i in e)if(e[i]!==n[i])return!1;return!0}function wb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zh(e){if(!Eb(e))return!1;const n=e.constructor;if(n===void 0)return!0;const i=n.prototype;return!(!Eb(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Eb(e){return Object.prototype.toString.call(e)==="[object Object]"}function gC(e){return new Promise(n=>{wa.setTimeout(n,e)})}function Ph(e,n,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,n):i.structuralSharing!==!1?A0(e,n):n}function yC(e,n,i=0){const a=[...e,n];return i&&a.length>i?a.slice(1):a}function vC(e,n,i=0){const a=[n,...e];return i&&a.length>i?a.slice(0,-1):a}var _m=Symbol();function N0(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===_m?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cm(e,n){return typeof e=="function"?e(...n):!!e}function bC(e,n,i){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=n()),a||(a=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),e}var gs=(()=>{let e=()=>hC;return{isServer(){return e()},setIsServer(n){e=n}}})();function Fh(){let e,n;const i=new Promise((o,u)=>{e=o,n=u});i.status="pending",i.catch(()=>{});function a(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},i.reject=o=>{a({status:"rejected",reason:o}),n(o)},i}var xC=dC;function SC(){let e=[],n=0,i=d=>{d()},a=d=>{d()},o=xC;const u=d=>{n?e.push(d):o(()=>{i(d)})},c=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(p=>{i(p)})})})};return{batch:d=>{let p;n++;try{p=d()}finally{n--,n||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{i=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}var Ut=SC(),ql,Zi,Hl,y0,wC=(y0=class extends Jl{constructor(){super();xe(this,ql,!0);xe(this,Zi);xe(this,Hl);ce(this,Hl,n=>{if(typeof window<"u"&&window.addEventListener){const i=()=>n(!0),a=()=>n(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",a)}}})}onSubscribe(){O(this,Zi)||this.setEventListener(O(this,Hl))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,Zi))==null||n.call(this),ce(this,Zi,void 0))}setEventListener(n){var i;ce(this,Hl,n),(i=O(this,Zi))==null||i.call(this),ce(this,Zi,n(this.setOnline.bind(this)))}setOnline(n){O(this,ql)!==n&&(ce(this,ql,n),this.listeners.forEach(a=>{a(n)}))}isOnline(){return O(this,ql)}},ql=new WeakMap,Zi=new WeakMap,Hl=new WeakMap,y0),xc=new wC;function EC(e){return Math.min(1e3*2**e,3e4)}function z0(e){return(e??"online")==="online"?xc.isOnline():!0}var $h=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function j0(e){let n=!1,i=0,a;const o=Fh(),u=()=>o.status!=="pending",c=_=>{var T;if(!u()){const A=new $h(_);x(A),(T=e.onCancel)==null||T.call(e,A)}},d=()=>{n=!0},p=()=>{n=!1},m=()=>wm.isFocused()&&(e.networkMode==="always"||xc.isOnline())&&e.canRun(),g=()=>z0(e.networkMode)&&e.canRun(),v=_=>{u()||(a==null||a(),o.resolve(_))},x=_=>{u()||(a==null||a(),o.reject(_))},S=()=>new Promise(_=>{var T;a=A=>{(u()||m())&&_(A)},(T=e.onPause)==null||T.call(e)}).then(()=>{var _;a=void 0,u()||(_=e.onContinue)==null||_.call(e)}),N=()=>{if(u())return;let _;const T=i===0?e.initialPromise:void 0;try{_=T??e.fn()}catch(A){_=Promise.reject(A)}Promise.resolve(_).then(v).catch(A=>{var j;if(u())return;const q=e.retry??(gs.isServer()?0:3),U=e.retryDelay??EC,P=typeof U=="function"?U(i,A):U,L=q===!0||typeof q=="number"&&i<q||typeof q=="function"&&q(i,A);if(n||!L){x(A);return}i++,(j=e.onFail)==null||j.call(e,i,A),gC(P).then(()=>m()?void 0:S()).then(()=>{n?x(A):N()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(a==null||a(),o),cancelRetry:d,continueRetry:p,canStart:g,start:()=>(g()?N():S().then(N),o)}}var _a,v0,O0=(v0=class{constructor(){xe(this,_a)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hh(this.gcTime)&&ce(this,_a,wa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gs.isServer()?1/0:300*1e3))}clearGcTimeout(){O(this,_a)&&(wa.clearTimeout(O(this,_a)),ce(this,_a,void 0))}},_a=new WeakMap,v0),Ca,Zl,Gn,ka,qt,Es,Ta,jn,R0,Gr,b0,_C=(b0=class extends O0{constructor(n){super();xe(this,jn);xe(this,Ca);xe(this,Zl);xe(this,Gn);xe(this,ka);xe(this,qt);xe(this,Es);xe(this,Ta);ce(this,Ta,!1),ce(this,Es,n.defaultOptions),this.setOptions(n.options),this.observers=[],ce(this,ka,n.client),ce(this,Gn,O(this,ka).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,ce(this,Ca,Cb(this.options)),this.state=n.state??O(this,Ca),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=O(this,qt))==null?void 0:n.promise}setOptions(n){if(this.options={...O(this,Es),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Cb(this.options);i.data!==void 0&&(this.setState(_b(i.data,i.dataUpdatedAt)),ce(this,Ca,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Gn).remove(this)}setData(n,i){const a=Ph(this.state.data,n,this.options);return De(this,jn,Gr).call(this,{data:a,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),a}setState(n,i){De(this,jn,Gr).call(this,{type:"setState",state:n,setStateOptions:i})}cancel(n){var a,o;const i=(a=O(this,qt))==null?void 0:a.promise;return(o=O(this,qt))==null||o.cancel(n),i?i.then(on).catch(on):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return O(this,Ca)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Xn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_m||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Gi(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!T0(this.state.dataUpdatedAt,n)}onFocus(){var i;const n=this.observers.find(a=>a.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(i=O(this,qt))==null||i.continue()}onOnline(){var i;const n=this.observers.find(a=>a.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(i=O(this,qt))==null||i.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),O(this,Gn).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(i=>i!==n),this.observers.length||(O(this,qt)&&(O(this,Ta)||De(this,jn,R0).call(this)?O(this,qt).cancel({revert:!0}):O(this,qt).cancelRetry()),this.scheduleGc()),O(this,Gn).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,jn,Gr).call(this,{type:"invalidate"})}async fetch(n,i){var p,m,g,v,x,S,N,_,T,A,q,U;if(this.state.fetchStatus!=="idle"&&((p=O(this,qt))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(O(this,qt))return O(this,qt).continueRetry(),O(this,qt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const P=this.observers.find(L=>L.options.queryFn);P&&this.setOptions(P.options)}const a=new AbortController,o=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ce(this,Ta,!0),a.signal)})},u=()=>{const P=N0(this.options,i),j=(()=>{const Y={client:O(this,ka),queryKey:this.queryKey,meta:this.meta};return o(Y),Y})();return ce(this,Ta,!1),this.options.persister?this.options.persister(P,j,this):P(j)},d=(()=>{const P={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:O(this,ka),state:this.state,fetchFn:u};return o(P),P})();(m=this.options.behavior)==null||m.onFetch(d,this),ce(this,Zl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&De(this,jn,Gr).call(this,{type:"fetch",meta:(v=d.fetchOptions)==null?void 0:v.meta}),ce(this,qt,j0({initialPromise:i==null?void 0:i.initialPromise,fn:d.fetchFn,onCancel:P=>{P instanceof $h&&P.revert&&this.setState({...O(this,Zl),fetchStatus:"idle"}),a.abort()},onFail:(P,L)=>{De(this,jn,Gr).call(this,{type:"failed",failureCount:P,error:L})},onPause:()=>{De(this,jn,Gr).call(this,{type:"pause"})},onContinue:()=>{De(this,jn,Gr).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const P=await O(this,qt).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(S=(x=O(this,Gn).config).onSuccess)==null||S.call(x,P,this),(_=(N=O(this,Gn).config).onSettled)==null||_.call(N,P,this.state.error,this),P}catch(P){if(P instanceof $h){if(P.silent)return O(this,qt).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw De(this,jn,Gr).call(this,{type:"error",error:P}),(A=(T=O(this,Gn).config).onError)==null||A.call(T,P,this),(U=(q=O(this,Gn).config).onSettled)==null||U.call(q,this.state.data,P,this),P}finally{this.scheduleGc()}}},Ca=new WeakMap,Zl=new WeakMap,Gn=new WeakMap,ka=new WeakMap,qt=new WeakMap,Es=new WeakMap,Ta=new WeakMap,jn=new WeakSet,R0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Gr=function(n){const i=a=>{switch(n.type){case"failed":return{...a,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...D0(a.data,this.options),fetchMeta:n.meta??null};case"success":const o={...a,..._b(n.data,n.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ce(this,Zl,n.manual?o:void 0),o;case"error":const u=n.error;return{...a,error:u,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...n.state}}};this.state=i(this.state),Ut.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),O(this,Gn).notify({query:this,type:"updated",action:n})})},b0);function D0(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _b(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Cb(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,i=n!==void 0,a=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:i?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var yn,Pe,_s,ln,Aa,Pl,Xr,Pi,Cs,Fl,$l,Na,za,Fi,Vl,Je,os,Vh,Qh,Yh,Gh,Xh,Kh,Jh,M0,x0,CC=(x0=class extends Jl{constructor(n,i){super();xe(this,Je);xe(this,yn);xe(this,Pe);xe(this,_s);xe(this,ln);xe(this,Aa);xe(this,Pl);xe(this,Xr);xe(this,Pi);xe(this,Cs);xe(this,Fl);xe(this,$l);xe(this,Na);xe(this,za);xe(this,Fi);xe(this,Vl,new Set);this.options=i,ce(this,yn,n),ce(this,Pi,null),ce(this,Xr,Fh()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Pe).addObserver(this),kb(O(this,Pe),this.options)?De(this,Je,os).call(this):this.updateResult(),De(this,Je,Gh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wh(O(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wh(O(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Je,Xh).call(this),De(this,Je,Kh).call(this),O(this,Pe).removeObserver(this)}setOptions(n){const i=this.options,a=O(this,Pe);if(this.options=O(this,yn).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xn(this.options.enabled,O(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Je,Jh).call(this),O(this,Pe).setOptions(this.options),i._defaulted&&!bc(this.options,i)&&O(this,yn).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Pe),observer:this});const o=this.hasListeners();o&&Tb(O(this,Pe),a,this.options,i)&&De(this,Je,os).call(this),this.updateResult(),o&&(O(this,Pe)!==a||Xn(this.options.enabled,O(this,Pe))!==Xn(i.enabled,O(this,Pe))||Gi(this.options.staleTime,O(this,Pe))!==Gi(i.staleTime,O(this,Pe)))&&De(this,Je,Vh).call(this);const u=De(this,Je,Qh).call(this);o&&(O(this,Pe)!==a||Xn(this.options.enabled,O(this,Pe))!==Xn(i.enabled,O(this,Pe))||u!==O(this,Fi))&&De(this,Je,Yh).call(this,u)}getOptimisticResult(n){const i=O(this,yn).getQueryCache().build(O(this,yn),n),a=this.createResult(i,n);return TC(this,a)&&(ce(this,ln,a),ce(this,Pl,this.options),ce(this,Aa,O(this,Pe).state)),a}getCurrentResult(){return O(this,ln)}trackResult(n,i){return new Proxy(n,{get:(a,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,Xr).status==="pending"&&O(this,Xr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,o))})}trackProp(n){O(this,Vl).add(n)}getCurrentQuery(){return O(this,Pe)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const i=O(this,yn).defaultQueryOptions(n),a=O(this,yn).getQueryCache().build(O(this,yn),i);return a.fetch().then(()=>this.createResult(a,i))}fetch(n){return De(this,Je,os).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,ln)))}createResult(n,i){var re;const a=O(this,Pe),o=this.options,u=O(this,ln),c=O(this,Aa),d=O(this,Pl),m=n!==a?n.state:O(this,_s),{state:g}=n;let v={...g},x=!1,S;if(i._optimisticResults){const de=this.hasListeners(),le=!de&&kb(n,i),ae=de&&Tb(n,a,i,o);(le||ae)&&(v={...v,...D0(g.data,n.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:N,errorUpdatedAt:_,status:T}=v;S=v.data;let A=!1;if(i.placeholderData!==void 0&&S===void 0&&T==="pending"){let de;u!=null&&u.isPlaceholderData&&i.placeholderData===(d==null?void 0:d.placeholderData)?(de=u.data,A=!0):de=typeof i.placeholderData=="function"?i.placeholderData((re=O(this,$l))==null?void 0:re.state.data,O(this,$l)):i.placeholderData,de!==void 0&&(T="success",S=Ph(u==null?void 0:u.data,de,i),x=!0)}if(i.select&&S!==void 0&&!A)if(u&&S===(c==null?void 0:c.data)&&i.select===O(this,Cs))S=O(this,Fl);else try{ce(this,Cs,i.select),S=i.select(S),S=Ph(u==null?void 0:u.data,S,i),ce(this,Fl,S),ce(this,Pi,null)}catch(de){ce(this,Pi,de)}O(this,Pi)&&(N=O(this,Pi),S=O(this,Fl),_=Date.now(),T="error");const q=v.fetchStatus==="fetching",U=T==="pending",P=T==="error",L=U&&q,j=S!==void 0,$={status:T,fetchStatus:v.fetchStatus,isPending:U,isSuccess:T==="success",isError:P,isInitialLoading:L,isLoading:L,data:S,dataUpdatedAt:v.dataUpdatedAt,error:N,errorUpdatedAt:_,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:q,isRefetching:q&&!U,isLoadingError:P&&!j,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:P&&j,isStale:km(n,i),refetch:this.refetch,promise:O(this,Xr),isEnabled:Xn(i.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const de=$.data!==void 0,le=$.status==="error"&&!de,ae=ee=>{le?ee.reject($.error):de&&ee.resolve($.data)},Ae=()=>{const ee=ce(this,Xr,$.promise=Fh());ae(ee)},se=O(this,Xr);switch(se.status){case"pending":n.queryHash===a.queryHash&&ae(se);break;case"fulfilled":(le||$.data!==se.value)&&Ae();break;case"rejected":(!le||$.error!==se.reason)&&Ae();break}}return $}updateResult(){const n=O(this,ln),i=this.createResult(O(this,Pe),this.options);if(ce(this,Aa,O(this,Pe).state),ce(this,Pl,this.options),O(this,Aa).data!==void 0&&ce(this,$l,O(this,Pe)),bc(i,n))return;ce(this,ln,i);const a=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!O(this,Vl).size)return!0;const c=new Set(u??O(this,Vl));return this.options.throwOnError&&c.add("error"),Object.keys(O(this,ln)).some(d=>{const p=d;return O(this,ln)[p]!==n[p]&&c.has(p)})};De(this,Je,M0).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Je,Gh).call(this)}},yn=new WeakMap,Pe=new WeakMap,_s=new WeakMap,ln=new WeakMap,Aa=new WeakMap,Pl=new WeakMap,Xr=new WeakMap,Pi=new WeakMap,Cs=new WeakMap,Fl=new WeakMap,$l=new WeakMap,Na=new WeakMap,za=new WeakMap,Fi=new WeakMap,Vl=new WeakMap,Je=new WeakSet,os=function(n){De(this,Je,Jh).call(this);let i=O(this,Pe).fetch(this.options,n);return n!=null&&n.throwOnError||(i=i.catch(on)),i},Vh=function(){De(this,Je,Xh).call(this);const n=Gi(this.options.staleTime,O(this,Pe));if(gs.isServer()||O(this,ln).isStale||!Hh(n))return;const a=T0(O(this,ln).dataUpdatedAt,n)+1;ce(this,Na,wa.setTimeout(()=>{O(this,ln).isStale||this.updateResult()},a))},Qh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Pe)):this.options.refetchInterval)??!1},Yh=function(n){De(this,Je,Kh).call(this),ce(this,Fi,n),!(gs.isServer()||Xn(this.options.enabled,O(this,Pe))===!1||!Hh(O(this,Fi))||O(this,Fi)===0)&&ce(this,za,wa.setInterval(()=>{(this.options.refetchIntervalInBackground||wm.isFocused())&&De(this,Je,os).call(this)},O(this,Fi)))},Gh=function(){De(this,Je,Vh).call(this),De(this,Je,Yh).call(this,De(this,Je,Qh).call(this))},Xh=function(){O(this,Na)&&(wa.clearTimeout(O(this,Na)),ce(this,Na,void 0))},Kh=function(){O(this,za)&&(wa.clearInterval(O(this,za)),ce(this,za,void 0))},Jh=function(){const n=O(this,yn).getQueryCache().build(O(this,yn),this.options);if(n===O(this,Pe))return;const i=O(this,Pe);ce(this,Pe,n),ce(this,_s,n.state),this.hasListeners()&&(i==null||i.removeObserver(this),n.addObserver(this))},M0=function(n){Ut.batch(()=>{n.listeners&&this.listeners.forEach(i=>{i(O(this,ln))}),O(this,yn).getQueryCache().notify({query:O(this,Pe),type:"observerResultsUpdated"})})},x0);function kC(e,n){return Xn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function kb(e,n){return kC(e,n)||e.state.data!==void 0&&Wh(e,n,n.refetchOnMount)}function Wh(e,n,i){if(Xn(n.enabled,e)!==!1&&Gi(n.staleTime,e)!=="static"){const a=typeof i=="function"?i(e):i;return a==="always"||a!==!1&&km(e,n)}return!1}function Tb(e,n,i,a){return(e!==n||Xn(a.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&km(e,i)}function km(e,n){return Xn(n.enabled,e)!==!1&&e.isStaleByTime(Gi(n.staleTime,e))}function TC(e,n){return!bc(e.getCurrentResult(),n)}function Ab(e){return{onFetch:(n,i)=>{var g,v,x,S,N;const a=n.options,o=(x=(v=(g=n.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,u=((S=n.state.data)==null?void 0:S.pages)||[],c=((N=n.state.data)==null?void 0:N.pageParams)||[];let d={pages:[],pageParams:[]},p=0;const m=async()=>{let _=!1;const T=U=>{bC(U,()=>n.signal,()=>_=!0)},A=N0(n.options,n.fetchOptions),q=async(U,P,L)=>{if(_)return Promise.reject();if(P==null&&U.pages.length)return Promise.resolve(U);const Y=(()=>{const le={client:n.client,queryKey:n.queryKey,pageParam:P,direction:L?"backward":"forward",meta:n.options.meta};return T(le),le})(),$=await A(Y),{maxPages:re}=n.options,de=L?vC:yC;return{pages:de(U.pages,$,re),pageParams:de(U.pageParams,P,re)}};if(o&&u.length){const U=o==="backward",P=U?AC:Nb,L={pages:u,pageParams:c},j=P(a,L);d=await q(L,j,U)}else{const U=e??u.length;do{const P=p===0?c[0]??a.initialPageParam:Nb(a,d);if(p>0&&P==null)break;d=await q(d,P),p++}while(p<U)}return d};n.options.persister?n.fetchFn=()=>{var _,T;return(T=(_=n.options).persister)==null?void 0:T.call(_,m,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},i)}:n.fetchFn=m}}}function Nb(e,{pages:n,pageParams:i}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,i[a],i):void 0}function AC(e,{pages:n,pageParams:i}){var a;return n.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,n[0],n,i[0],i):void 0}var ks,br,Wt,ja,xr,Bi,S0,NC=(S0=class extends O0{constructor(n){super();xe(this,xr);xe(this,ks);xe(this,br);xe(this,Wt);xe(this,ja);ce(this,ks,n.client),this.mutationId=n.mutationId,ce(this,Wt,n.mutationCache),ce(this,br,[]),this.state=n.state||U0(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){O(this,br).includes(n)||(O(this,br).push(n),this.clearGcTimeout(),O(this,Wt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){ce(this,br,O(this,br).filter(i=>i!==n)),this.scheduleGc(),O(this,Wt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){O(this,br).length||(this.state.status==="pending"?this.scheduleGc():O(this,Wt).remove(this))}continue(){var n;return((n=O(this,ja))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var c,d,p,m,g,v,x,S,N,_,T,A,q,U,P,L,j,Y;const i=()=>{De(this,xr,Bi).call(this,{type:"continue"})},a={client:O(this,ks),meta:this.options.meta,mutationKey:this.options.mutationKey};ce(this,ja,j0({fn:()=>this.options.mutationFn?this.options.mutationFn(n,a):Promise.reject(new Error("No mutationFn found")),onFail:($,re)=>{De(this,xr,Bi).call(this,{type:"failed",failureCount:$,error:re})},onPause:()=>{De(this,xr,Bi).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Wt).canRun(this)}));const o=this.state.status==="pending",u=!O(this,ja).canStart();try{if(o)i();else{De(this,xr,Bi).call(this,{type:"pending",variables:n,isPaused:u}),O(this,Wt).config.onMutate&&await O(this,Wt).config.onMutate(n,this,a);const re=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,n,a));re!==this.state.context&&De(this,xr,Bi).call(this,{type:"pending",context:re,variables:n,isPaused:u})}const $=await O(this,ja).start();return await((m=(p=O(this,Wt).config).onSuccess)==null?void 0:m.call(p,$,n,this.state.context,this,a)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,$,n,this.state.context,a)),await((S=(x=O(this,Wt).config).onSettled)==null?void 0:S.call(x,$,null,this.state.variables,this.state.context,this,a)),await((_=(N=this.options).onSettled)==null?void 0:_.call(N,$,null,n,this.state.context,a)),De(this,xr,Bi).call(this,{type:"success",data:$}),$}catch($){try{await((A=(T=O(this,Wt).config).onError)==null?void 0:A.call(T,$,n,this.state.context,this,a))}catch(re){Promise.reject(re)}try{await((U=(q=this.options).onError)==null?void 0:U.call(q,$,n,this.state.context,a))}catch(re){Promise.reject(re)}try{await((L=(P=O(this,Wt).config).onSettled)==null?void 0:L.call(P,void 0,$,this.state.variables,this.state.context,this,a))}catch(re){Promise.reject(re)}try{await((Y=(j=this.options).onSettled)==null?void 0:Y.call(j,void 0,$,n,this.state.context,a))}catch(re){Promise.reject(re)}throw De(this,xr,Bi).call(this,{type:"error",error:$}),$}finally{O(this,Wt).runNext(this)}}},ks=new WeakMap,br=new WeakMap,Wt=new WeakMap,ja=new WeakMap,xr=new WeakSet,Bi=function(n){const i=a=>{switch(n.type){case"failed":return{...a,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...a,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:n.error,failureCount:a.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Ut.batch(()=>{O(this,br).forEach(a=>{a.onMutationUpdate(n)}),O(this,Wt).notify({mutation:this,type:"updated",action:n})})},S0);function U0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kr,ur,Ts,w0,zC=(w0=class extends Jl{constructor(n={}){super();xe(this,Kr);xe(this,ur);xe(this,Ts);this.config=n,ce(this,Kr,new Set),ce(this,ur,new Map),ce(this,Ts,0)}build(n,i,a){const o=new NC({client:n,mutationCache:this,mutationId:++Gu(this,Ts)._,options:n.defaultMutationOptions(i),state:a});return this.add(o),o}add(n){O(this,Kr).add(n);const i=Xu(n);if(typeof i=="string"){const a=O(this,ur).get(i);a?a.push(n):O(this,ur).set(i,[n])}this.notify({type:"added",mutation:n})}remove(n){if(O(this,Kr).delete(n)){const i=Xu(n);if(typeof i=="string"){const a=O(this,ur).get(i);if(a)if(a.length>1){const o=a.indexOf(n);o!==-1&&a.splice(o,1)}else a[0]===n&&O(this,ur).delete(i)}}this.notify({type:"removed",mutation:n})}canRun(n){const i=Xu(n);if(typeof i=="string"){const a=O(this,ur).get(i),o=a==null?void 0:a.find(u=>u.state.status==="pending");return!o||o===n}else return!0}runNext(n){var a;const i=Xu(n);if(typeof i=="string"){const o=(a=O(this,ur).get(i))==null?void 0:a.find(u=>u!==n&&u.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ut.batch(()=>{O(this,Kr).forEach(n=>{this.notify({type:"removed",mutation:n})}),O(this,Kr).clear(),O(this,ur).clear()})}getAll(){return Array.from(O(this,Kr))}find(n){const i={exact:!0,...n};return this.getAll().find(a=>Sb(i,a))}findAll(n={}){return this.getAll().filter(i=>Sb(n,i))}notify(n){Ut.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return Ut.batch(()=>Promise.all(n.map(i=>i.continue().catch(on))))}},Kr=new WeakMap,ur=new WeakMap,Ts=new WeakMap,w0);function Xu(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Jr,$i,vn,Wr,ii,dc,em,E0,jC=(E0=class extends Jl{constructor(i,a){super();xe(this,ii);xe(this,Jr);xe(this,$i);xe(this,vn);xe(this,Wr);ce(this,Jr,i),this.setOptions(a),this.bindMethods(),De(this,ii,dc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const a=this.options;this.options=O(this,Jr).defaultMutationOptions(i),bc(this.options,a)||O(this,Jr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,vn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&Oa(a.mutationKey)!==Oa(this.options.mutationKey)?this.reset():((o=O(this,vn))==null?void 0:o.state.status)==="pending"&&O(this,vn).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=O(this,vn))==null||i.removeObserver(this)}onMutationUpdate(i){De(this,ii,dc).call(this),De(this,ii,em).call(this,i)}getCurrentResult(){return O(this,$i)}reset(){var i;(i=O(this,vn))==null||i.removeObserver(this),ce(this,vn,void 0),De(this,ii,dc).call(this),De(this,ii,em).call(this)}mutate(i,a){var o;return ce(this,Wr,a),(o=O(this,vn))==null||o.removeObserver(this),ce(this,vn,O(this,Jr).getMutationCache().build(O(this,Jr),this.options)),O(this,vn).addObserver(this),O(this,vn).execute(i)}},Jr=new WeakMap,$i=new WeakMap,vn=new WeakMap,Wr=new WeakMap,ii=new WeakSet,dc=function(){var a;const i=((a=O(this,vn))==null?void 0:a.state)??U0();ce(this,$i,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},em=function(i){Ut.batch(()=>{var a,o,u,c,d,p,m,g;if(O(this,Wr)&&this.hasListeners()){const v=O(this,$i).variables,x=O(this,$i).context,S={client:O(this,Jr),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(o=(a=O(this,Wr)).onSuccess)==null||o.call(a,i.data,v,x,S)}catch(N){Promise.reject(N)}try{(c=(u=O(this,Wr)).onSettled)==null||c.call(u,i.data,null,v,x,S)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(d=O(this,Wr)).onError)==null||p.call(d,i.error,v,x,S)}catch(N){Promise.reject(N)}try{(g=(m=O(this,Wr)).onSettled)==null||g.call(m,void 0,i.error,v,x,S)}catch(N){Promise.reject(N)}}}this.listeners.forEach(v=>{v(O(this,$i))})})},E0),Sr,_0,OC=(_0=class extends Jl{constructor(n={}){super();xe(this,Sr);this.config=n,ce(this,Sr,new Map)}build(n,i,a){const o=i.queryKey,u=i.queryHash??Em(o,i);let c=this.get(u);return c||(c=new _C({client:n,queryKey:o,queryHash:u,options:n.defaultQueryOptions(i),state:a,defaultOptions:n.getQueryDefaults(o)}),this.add(c)),c}add(n){O(this,Sr).has(n.queryHash)||(O(this,Sr).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const i=O(this,Sr).get(n.queryHash);i&&(n.destroy(),i===n&&O(this,Sr).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ut.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return O(this,Sr).get(n)}getAll(){return[...O(this,Sr).values()]}find(n){const i={exact:!0,...n};return this.getAll().find(a=>xb(i,a))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(a=>xb(n,a)):i}notify(n){Ut.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Sr=new WeakMap,_0),bt,Vi,Qi,Ql,Yl,Yi,Gl,Xl,C0,RC=(C0=class{constructor(e={}){xe(this,bt);xe(this,Vi);xe(this,Qi);xe(this,Ql);xe(this,Yl);xe(this,Yi);xe(this,Gl);xe(this,Xl);ce(this,bt,e.queryCache||new OC),ce(this,Vi,e.mutationCache||new zC),ce(this,Qi,e.defaultOptions||{}),ce(this,Ql,new Map),ce(this,Yl,new Map),ce(this,Yi,0)}mount(){Gu(this,Yi)._++,O(this,Yi)===1&&(ce(this,Gl,wm.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,bt).onFocus())})),ce(this,Xl,xc.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,bt).onOnline())})))}unmount(){var e,n;Gu(this,Yi)._--,O(this,Yi)===0&&((e=O(this,Gl))==null||e.call(this),ce(this,Gl,void 0),(n=O(this,Xl))==null||n.call(this),ce(this,Xl,void 0))}isFetching(e){return O(this,bt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Vi).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=O(this,bt).get(n.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),i=O(this,bt).build(this,n),a=i.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Gi(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return O(this,bt).findAll(e).map(({queryKey:n,state:i})=>{const a=i.data;return[n,a]})}setQueryData(e,n,i){const a=this.defaultQueryOptions({queryKey:e}),o=O(this,bt).get(a.queryHash),u=o==null?void 0:o.state.data,c=mC(n,u);if(c!==void 0)return O(this,bt).build(this,a).setData(c,{...i,manual:!0})}setQueriesData(e,n,i){return Ut.batch(()=>O(this,bt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,i)]))}getQueryState(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=O(this,bt).get(n.queryHash))==null?void 0:i.state}removeQueries(e){const n=O(this,bt);Ut.batch(()=>{n.findAll(e).forEach(i=>{n.remove(i)})})}resetQueries(e,n){const i=O(this,bt);return Ut.batch(()=>(i.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const i={revert:!0,...n},a=Ut.batch(()=>O(this,bt).findAll(e).map(o=>o.cancel(i)));return Promise.all(a).then(on).catch(on)}invalidateQueries(e,n={}){return Ut.batch(()=>(O(this,bt).findAll(e).forEach(i=>{i.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"},n)))}refetchQueries(e,n={}){const i={...n,cancelRefetch:n.cancelRefetch??!0},a=Ut.batch(()=>O(this,bt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let u=o.fetch(void 0,i);return i.throwOnError||(u=u.catch(on)),o.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(on)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const i=O(this,bt).build(this,n);return i.isStaleByTime(Gi(n.staleTime,i))?i.fetch(n):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(on).catch(on)}fetchInfiniteQuery(e){return e.behavior=Ab(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(on).catch(on)}ensureInfiniteQueryData(e){return e.behavior=Ab(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xc.isOnline()?O(this,Vi).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,bt)}getMutationCache(){return O(this,Vi)}getDefaultOptions(){return O(this,Qi)}setDefaultOptions(e){ce(this,Qi,e)}setQueryDefaults(e,n){O(this,Ql).set(Oa(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...O(this,Ql).values()],i={};return n.forEach(a=>{ps(e,a.queryKey)&&Object.assign(i,a.defaultOptions)}),i}setMutationDefaults(e,n){O(this,Yl).set(Oa(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...O(this,Yl).values()],i={};return n.forEach(a=>{ps(e,a.mutationKey)&&Object.assign(i,a.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const n={...O(this,Qi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Em(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===_m&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,Qi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,bt).clear(),O(this,Vi).clear()}},bt=new WeakMap,Vi=new WeakMap,Qi=new WeakMap,Ql=new WeakMap,Yl=new WeakMap,Yi=new WeakMap,Gl=new WeakMap,Xl=new WeakMap,C0),L0=w.createContext(void 0),Wl=e=>{const n=w.useContext(L0);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},DC=({client:e,children:n})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(L0.Provider,{value:e,children:n})),B0=w.createContext(!1),MC=()=>w.useContext(B0);B0.Provider;function UC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LC=w.createContext(UC()),BC=()=>w.useContext(LC),IC=(e,n,i)=>{const a=i!=null&&i.state.error&&typeof e.throwOnError=="function"?Cm(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},qC=e=>{w.useEffect(()=>{e.clearReset()},[e])},HC=({result:e,errorResetBoundary:n,throwOnError:i,query:a,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||Cm(i,[e.error,a])),ZC=e=>{if(e.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>i(a(...o)):i(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},PC=(e,n)=>e.isLoading&&e.isFetching&&!n,FC=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,zb=(e,n,i)=>n.fetchOptimistic(e).catch(()=>{i.clearReset()});function $C(e,n,i){var x,S,N,_;const a=MC(),o=BC(),u=Wl(),c=u.defaultQueryOptions(e);(S=(x=u.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||S.call(x,c);const d=u.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",ZC(c),IC(c,o,d),qC(o);const p=!u.getQueryCache().get(c.queryHash),[m]=w.useState(()=>new n(u,c)),g=m.getOptimisticResult(c),v=!a&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(T=>{const A=v?m.subscribe(Ut.batchCalls(T)):on;return m.updateResult(),A},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),w.useEffect(()=>{m.setOptions(c)},[c,m]),FC(c,g))throw zb(c,m,o);if(HC({result:g,errorResetBoundary:o,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;if((_=(N=u.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||_.call(N,c,g),c.experimental_prefetchInRender&&!gs.isServer()&&PC(g,a)){const T=p?zb(c,m,o):d==null?void 0:d.promise;T==null||T.catch(on).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?g:m.trackResult(g)}function en(e,n){return $C(e,CC)}function Ht(e,n){const i=Wl(),[a]=w.useState(()=>new jC(i,e));w.useEffect(()=>{a.setOptions(e)},[a,e]);const o=w.useSyncExternalStore(w.useCallback(c=>a.subscribe(Ut.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=w.useCallback((c,d)=>{a.mutate(c,d).catch(on)},[a]);if(o.error&&Cm(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}/**
|
|
50
|
+
* react-router v7.13.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var jb="popstate";function Ob(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function VC(e={}){function n(a,o){var m;let u=(m=o.state)==null?void 0:m.masked,{pathname:c,search:d,hash:p}=u||a.location;return tm("",{pathname:c,search:d,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",u?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function i(a,o){return typeof o=="string"?o:ys(o)}return YC(n,i,null,e)}function mt(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function cr(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function QC(){return Math.random().toString(36).substring(2,10)}function Rb(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function tm(e,n,i=null,a,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?eo(n):n,state:i,key:n&&n.key||a||QC(),unstable_mask:o}}function ys({pathname:e="/",search:n="",hash:i=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function eo(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function YC(e,n,i,a={}){let{window:o=document.defaultView,v5Compat:u=!1}=a,c=o.history,d="POP",p=null,m=g();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function g(){return(c.state||{idx:null}).idx}function v(){d="POP";let T=g(),A=T==null?null:T-m;m=T,p&&p({action:d,location:_.location,delta:A})}function x(T,A){d="PUSH";let q=Ob(T)?T:tm(_.location,T,A);m=g()+1;let U=Rb(q,m),P=_.createHref(q.unstable_mask||q);try{c.pushState(U,"",P)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(P)}u&&p&&p({action:d,location:_.location,delta:1})}function S(T,A){d="REPLACE";let q=Ob(T)?T:tm(_.location,T,A);m=g();let U=Rb(q,m),P=_.createHref(q.unstable_mask||q);c.replaceState(U,"",P),u&&p&&p({action:d,location:_.location,delta:0})}function N(T){return GC(T)}let _={get action(){return d},get location(){return e(o,c)},listen(T){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(jb,v),p=T,()=>{o.removeEventListener(jb,v),p=null}},createHref(T){return n(o,T)},createURL:N,encodeLocation(T){let A=N(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:x,replace:S,go(T){return c.go(T)}};return _}function GC(e,n=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),mt(i,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ys(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function I0(e,n,i="/"){return XC(e,n,i,!1)}function XC(e,n,i,a){let o=typeof n=="string"?eo(n):n,u=ai(o.pathname||"/",i);if(u==null)return null;let c=q0(e);KC(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=sk(u);d=lk(c[p],m,a)}return d}function q0(e,n=[],i=[],a="",o=!1){let u=(c,d,p=o,m)=>{let g={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&p)return;mt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let v=_r([a,g.relativePath]),x=i.concat(g);c.children&&c.children.length>0&&(mt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),q0(c.children,n,x,v,p)),!(c.path==null&&!c.index)&&n.push({path:v,score:ik(v,c.index),routesMeta:x})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))u(c,d);else for(let m of H0(c.path))u(c,d,!0,m)}),n}function H0(e){let n=e.split("/");if(n.length===0)return[];let[i,...a]=n,o=i.endsWith("?"),u=i.replace(/\?$/,"");if(a.length===0)return o?[u,""]:[u];let c=H0(a.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),o&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function KC(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:ak(n.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var JC=/^:[\w-]+$/,WC=3,ek=2,tk=1,nk=10,rk=-2,Db=e=>e==="*";function ik(e,n){let i=e.split("/"),a=i.length;return i.some(Db)&&(a+=rk),n&&(a+=ek),i.filter(o=>!Db(o)).reduce((o,u)=>o+(JC.test(u)?WC:u===""?tk:nk),a)}function ak(e,n){return e.length===n.length&&e.slice(0,-1).every((a,o)=>a===n[o])?e[e.length-1]-n[n.length-1]:0}function lk(e,n,i=!1){let{routesMeta:a}=e,o={},u="/",c=[];for(let d=0;d<a.length;++d){let p=a[d],m=d===a.length-1,g=u==="/"?n:n.slice(u.length)||"/",v=Sc({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},g),x=p.route;if(!v&&m&&i&&!a[a.length-1].route.index&&(v=Sc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!v)return null;Object.assign(o,v.params),c.push({params:o,pathname:_r([u,v.pathname]),pathnameBase:dk(_r([u,v.pathnameBase])),route:x}),v.pathnameBase!=="/"&&(u=_r([u,v.pathnameBase]))}return c}function Sc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=ok(e.path,e.caseSensitive,e.end),o=n.match(i);if(!o)return null;let u=o[0],c=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:a.reduce((m,{paramName:g,isOptional:v},x)=>{if(g==="*"){let N=d[x]||"";c=u.slice(0,u.length-N.length).replace(/(.)\/+$/,"$1")}const S=d[x];return v&&!S?m[g]=void 0:m[g]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:c,pattern:e}}function ok(e,n=!1,i=!0){cr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,m,g)=>{if(a.push({paramName:d,isOptional:p!=null}),p){let v=g.charAt(m+c.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),a]}function sk(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return cr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function ai(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}var uk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ck(e,n="/"){let{pathname:i,search:a="",hash:o=""}=typeof e=="string"?eo(e):e,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=Mb(i.substring(1),"/"):u=Mb(i,n)):u=n,{pathname:u,search:hk(a),hash:mk(o)}}function Mb(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function hh(e,n,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fk(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function Tm(e){let n=fk(e);return n.map((i,a)=>a===n.length-1?i.pathname:i.pathnameBase)}function Rc(e,n,i,a=!1){let o;typeof e=="string"?o=eo(e):(o={...e},mt(!o.pathname||!o.pathname.includes("?"),hh("?","pathname","search",o)),mt(!o.pathname||!o.pathname.includes("#"),hh("#","pathname","hash",o)),mt(!o.search||!o.search.includes("#"),hh("#","search","hash",o)));let u=e===""||o.pathname==="",c=u?"/":o.pathname,d;if(c==null)d=i;else{let v=n.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),v-=1;o.pathname=x.join("/")}d=v>=0?n[v]:"/"}let p=ck(o,d),m=c&&c!=="/"&&c.endsWith("/"),g=(u||c===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var _r=e=>e.join("/").replace(/\/\/+/g,"/"),dk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,pk=class{constructor(e,n,i,a=!1){this.status=e,this.statusText=n||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function gk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yk(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Z0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function P0(e,n){let i=e;if(typeof i!="string"||!uk.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,o=!1;if(Z0)try{let u=new URL(window.location.href),c=i.startsWith("//")?new URL(u.protocol+i):new URL(i),d=ai(c.pathname,n);c.origin===u.origin&&d!=null?i=d+c.search+c.hash:o=!0}catch{cr(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var F0=["POST","PUT","PATCH","DELETE"];new Set(F0);var vk=["GET",...F0];new Set(vk);var to=w.createContext(null);to.displayName="DataRouter";var Dc=w.createContext(null);Dc.displayName="DataRouterState";var bk=w.createContext(!1),$0=w.createContext({isTransitioning:!1});$0.displayName="ViewTransition";var xk=w.createContext(new Map);xk.displayName="Fetchers";var Sk=w.createContext(null);Sk.displayName="Await";var Un=w.createContext(null);Un.displayName="Navigation";var As=w.createContext(null);As.displayName="Location";var er=w.createContext({outlet:null,matches:[],isDataRoute:!1});er.displayName="Route";var Am=w.createContext(null);Am.displayName="RouteError";var V0="REACT_ROUTER_ERROR",wk="REDIRECT",Ek="ROUTE_ERROR_RESPONSE";function _k(e){if(e.startsWith(`${V0}:${wk}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function Ck(e){if(e.startsWith(`${V0}:${Ek}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new pk(n.status,n.statusText,n.data)}catch{}}function kk(e,{relative:n}={}){mt(no(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=w.useContext(Un),{hash:o,pathname:u,search:c}=zs(e,{relative:n}),d=u;return i!=="/"&&(d=u==="/"?i:_r([i,u])),a.createHref({pathname:d,search:c,hash:o})}function no(){return w.useContext(As)!=null}function li(){return mt(no(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(As).location}var Q0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Y0(e){w.useContext(Un).static||w.useLayoutEffect(e)}function Ns(){let{isDataRoute:e}=w.useContext(er);return e?Zk():Tk()}function Tk(){mt(no(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(to),{basename:n,navigator:i}=w.useContext(Un),{matches:a}=w.useContext(er),{pathname:o}=li(),u=JSON.stringify(Tm(a)),c=w.useRef(!1);return Y0(()=>{c.current=!0}),w.useCallback((p,m={})=>{if(cr(c.current,Q0),!c.current)return;if(typeof p=="number"){i.go(p);return}let g=Rc(p,JSON.parse(u),o,m.relative==="path");e==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:_r([n,g.pathname])),(m.replace?i.replace:i.push)(g,m.state,m)},[n,i,u,o,e])}var Ak=w.createContext(null);function Nk(e){let n=w.useContext(er).outlet;return w.useMemo(()=>n&&w.createElement(Ak.Provider,{value:e},n),[n,e])}function zk(){let{matches:e}=w.useContext(er),n=e[e.length-1];return n?n.params:{}}function zs(e,{relative:n}={}){let{matches:i}=w.useContext(er),{pathname:a}=li(),o=JSON.stringify(Tm(i));return w.useMemo(()=>Rc(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function jk(e,n){return G0(e,n)}function G0(e,n,i){var T;mt(no(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=w.useContext(Un),{matches:o}=w.useContext(er),u=o[o.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",m=u&&u.route;{let A=m&&m.path||"";K0(d,!m||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let g=li(),v;if(n){let A=typeof n=="string"?eo(n):n;mt(p==="/"||((T=A.pathname)==null?void 0:T.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${A.pathname}" was given in the \`location\` prop.`),v=A}else v=g;let x=v.pathname||"/",S=x;if(p!=="/"){let A=p.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(A.length).join("/")}let N=I0(e,{pathname:S});cr(m||N!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),cr(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=Uk(N&&N.map(A=>Object.assign({},A,{params:Object.assign({},c,A.params),pathname:_r([p,a.encodeLocation?a.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?p:_r([p,a.encodeLocation?a.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),o,i);return n&&_?w.createElement(As.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},_):_}function Ok(){let e=Hk(),n=gk(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:u},"ErrorBoundary")," or"," ",w.createElement("code",{style:u},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},n),i?w.createElement("pre",{style:o},i):null,c)}var Rk=w.createElement(Ok,null),X0=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=Ck(e.digest);i&&(e=i)}let n=e!==void 0?w.createElement(er.Provider,{value:this.props.routeContext},w.createElement(Am.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(Dk,{error:e},n):n}};X0.contextType=bk;var mh=new WeakMap;function Dk({children:e,error:n}){let{basename:i}=w.useContext(Un);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=_k(n.digest);if(a){let o=mh.get(n);if(o)throw o;let u=P0(a.location,i);if(Z0&&!mh.get(n))if(u.isExternal||a.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:a.replace}));throw mh.set(n,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function Mk({routeContext:e,match:n,children:i}){let a=w.useContext(to);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(er.Provider,{value:e},i)}function Uk(e,n=[],i){let a=i==null?void 0:i.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let o=e,u=a==null?void 0:a.errors;if(u!=null){let g=o.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);mt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,g+1))}let c=!1,d=-1;if(i&&a){c=a.renderFallback;for(let g=0;g<o.length;g++){let v=o[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(d=g),v.route.id){let{loaderData:x,errors:S}=a,N=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!S||S[v.route.id]===void 0);if(v.route.lazy||N){i.isStatic&&(c=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let p=i==null?void 0:i.onError,m=a&&p?(g,v)=>{var x,S;p(g,{location:a.location,params:((S=(x=a.matches)==null?void 0:x[0])==null?void 0:S.params)??{},unstable_pattern:yk(a.matches),errorInfo:v})}:void 0;return o.reduceRight((g,v,x)=>{let S,N=!1,_=null,T=null;a&&(S=u&&v.route.id?u[v.route.id]:void 0,_=v.route.errorElement||Rk,c&&(d<0&&x===0?(K0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,T=null):d===x&&(N=!0,T=v.route.hydrateFallbackElement||null)));let A=n.concat(o.slice(0,x+1)),q=()=>{let U;return S?U=_:N?U=T:v.route.Component?U=w.createElement(v.route.Component,null):v.route.element?U=v.route.element:U=g,w.createElement(Mk,{match:v,routeContext:{outlet:g,matches:A,isDataRoute:a!=null},children:U})};return a&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?w.createElement(X0,{location:a.location,revalidation:a.revalidation,component:_,error:S,children:q(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:m}):q()},null)}function Nm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lk(e){let n=w.useContext(to);return mt(n,Nm(e)),n}function Bk(e){let n=w.useContext(Dc);return mt(n,Nm(e)),n}function Ik(e){let n=w.useContext(er);return mt(n,Nm(e)),n}function zm(e){let n=Ik(e),i=n.matches[n.matches.length-1];return mt(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function qk(){return zm("useRouteId")}function Hk(){var a;let e=w.useContext(Am),n=Bk("useRouteError"),i=zm("useRouteError");return e!==void 0?e:(a=n.errors)==null?void 0:a[i]}function Zk(){let{router:e}=Lk("useNavigate"),n=zm("useNavigate"),i=w.useRef(!1);return Y0(()=>{i.current=!0}),w.useCallback(async(o,u={})=>{cr(i.current,Q0),i.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...u}))},[e,n])}var Ub={};function K0(e,n,i){!n&&!Ub[e]&&(Ub[e]=!0,cr(!1,i))}w.memo(Pk);function Pk({routes:e,future:n,state:i,isStatic:a,onError:o}){return G0(e,void 0,{state:i,isStatic:a,onError:o})}function J0({to:e,replace:n,state:i,relative:a}){mt(no(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=w.useContext(Un);cr(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=w.useContext(er),{pathname:c}=li(),d=Ns(),p=Rc(e,Tm(u),c,a==="path"),m=JSON.stringify(p);return w.useEffect(()=>{d(JSON.parse(m),{replace:n,state:i,relative:a})},[d,m,a,n,i]),null}function W0(e){return Nk(e.context)}function sr(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Fk({basename:e="/",children:n=null,location:i,navigationType:a="POP",navigator:o,static:u=!1,unstable_useTransitions:c}){mt(!no(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=w.useMemo(()=>({basename:d,navigator:o,static:u,unstable_useTransitions:c,future:{}}),[d,o,u,c]);typeof i=="string"&&(i=eo(i));let{pathname:m="/",search:g="",hash:v="",state:x=null,key:S="default",unstable_mask:N}=i,_=w.useMemo(()=>{let T=ai(m,d);return T==null?null:{location:{pathname:T,search:g,hash:v,state:x,key:S,unstable_mask:N},navigationType:a}},[d,m,g,v,x,S,a,N]);return cr(_!=null,`<Router basename="${d}"> is not able to match the URL "${m}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:w.createElement(Un.Provider,{value:p},w.createElement(As.Provider,{children:n,value:_}))}function $k({children:e,location:n}){return jk(nm(e),n)}function nm(e,n=[]){let i=[];return w.Children.forEach(e,(a,o)=>{if(!w.isValidElement(a))return;let u=[...n,o];if(a.type===w.Fragment){i.push.apply(i,nm(a.props.children,u));return}mt(a.type===sr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||u.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=nm(a.props.children,u)),i.push(c)}),i}var hc="get",mc="application/x-www-form-urlencoded";function Mc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Vk(e){return Mc(e)&&e.tagName.toLowerCase()==="button"}function Qk(e){return Mc(e)&&e.tagName.toLowerCase()==="form"}function Yk(e){return Mc(e)&&e.tagName.toLowerCase()==="input"}function Gk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Xk(e,n){return e.button===0&&(!n||n==="_self")&&!Gk(e)}var Ku=null;function Kk(){if(Ku===null)try{new FormData(document.createElement("form"),0),Ku=!1}catch{Ku=!0}return Ku}var Jk=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ph(e){return e!=null&&!Jk.has(e)?(cr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mc}"`),null):e}function Wk(e,n){let i,a,o,u,c;if(Qk(e)){let d=e.getAttribute("action");a=d?ai(d,n):null,i=e.getAttribute("method")||hc,o=ph(e.getAttribute("enctype"))||mc,u=new FormData(e)}else if(Vk(e)||Yk(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(a=p?ai(p,n):null,i=e.getAttribute("formmethod")||d.getAttribute("method")||hc,o=ph(e.getAttribute("formenctype"))||ph(d.getAttribute("enctype"))||mc,u=new FormData(d,e),!Kk()){let{name:m,type:g,value:v}=e;if(g==="image"){let x=m?`${m}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else m&&u.append(m,v)}}else{if(Mc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=hc,a=null,o=mc,c=e}return u&&o==="text/plain"&&(c=u,u=void 0),{action:a,method:i.toLowerCase(),encType:o,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function jm(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function e2(e,n,i,a){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${a}`:o.pathname=`${o.pathname}.${a}`:o.pathname==="/"?o.pathname=`_root.${a}`:n&&ai(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function t2(e,n){if(e.id in n)return n[e.id];try{let i=await import(e.module);return n[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function n2(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function r2(e,n,i){let a=await Promise.all(e.map(async o=>{let u=n.routes[o.route.id];if(u){let c=await t2(u,i);return c.links?c.links():[]}return[]}));return o2(a.flat(1).filter(n2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Lb(e,n,i,a,o,u){let c=(p,m)=>i[m]?p.route.id!==i[m].route.id:!0,d=(p,m)=>{var g;return i[m].pathname!==p.pathname||((g=i[m].route.path)==null?void 0:g.endsWith("*"))&&i[m].params["*"]!==p.params["*"]};return u==="assets"?n.filter((p,m)=>c(p,m)||d(p,m)):u==="data"?n.filter((p,m)=>{var v;let g=a.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function i2(e,n,{includeHydrateFallback:i}={}){return a2(e.map(a=>{let o=n.routes[a.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function a2(e){return[...new Set(e)]}function l2(e){let n={},i=Object.keys(e).sort();for(let a of i)n[a]=e[a];return n}function o2(e,n){let i=new Set;return new Set(n),e.reduce((a,o)=>{let u=JSON.stringify(l2(o));return i.has(u)||(i.add(u),a.push({key:u,link:o})),a},[])}function e1(){let e=w.useContext(to);return jm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function s2(){let e=w.useContext(Dc);return jm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Om=w.createContext(void 0);Om.displayName="FrameworkContext";function t1(){let e=w.useContext(Om);return jm(e,"You must render this element inside a <HydratedRouter> element"),e}function u2(e,n){let i=w.useContext(Om),[a,o]=w.useState(!1),[u,c]=w.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:v}=n,x=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=A=>{A.forEach(q=>{c(q.isIntersecting)})},T=new IntersectionObserver(_,{threshold:.5});return x.current&&T.observe(x.current),()=>{T.disconnect()}}},[e]),w.useEffect(()=>{if(a){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[a]);let S=()=>{o(!0)},N=()=>{o(!1),c(!1)};return i?e!=="intent"?[u,x,{}]:[u,x,{onFocus:es(d,S),onBlur:es(p,N),onMouseEnter:es(m,S),onMouseLeave:es(g,N),onTouchStart:es(v,S)}]:[!1,x,{}]}function es(e,n){return i=>{e&&e(i),i.defaultPrevented||n(i)}}function c2({page:e,...n}){let{router:i}=e1(),a=w.useMemo(()=>I0(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?w.createElement(d2,{page:e,matches:a,...n}):null}function f2(e){let{manifest:n,routeModules:i}=t1(),[a,o]=w.useState([]);return w.useEffect(()=>{let u=!1;return r2(e,n,i).then(c=>{u||o(c)}),()=>{u=!0}},[e,n,i]),a}function d2({page:e,matches:n,...i}){let a=li(),{future:o,manifest:u,routeModules:c}=t1(),{basename:d}=e1(),{loaderData:p,matches:m}=s2(),g=w.useMemo(()=>Lb(e,n,m,u,a,"data"),[e,n,m,u,a]),v=w.useMemo(()=>Lb(e,n,m,u,a,"assets"),[e,n,m,u,a]),x=w.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let _=new Set,T=!1;if(n.forEach(q=>{var P;let U=u.routes[q.route.id];!U||!U.hasLoader||(!g.some(L=>L.route.id===q.route.id)&&q.route.id in p&&((P=c[q.route.id])!=null&&P.shouldRevalidate)||U.hasClientLoader?T=!0:_.add(q.route.id))}),_.size===0)return[];let A=e2(e,d,o.unstable_trailingSlashAwareDataRequests,"data");return T&&_.size>0&&A.searchParams.set("_routes",n.filter(q=>_.has(q.route.id)).map(q=>q.route.id).join(",")),[A.pathname+A.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,a,u,g,n,e,c]),S=w.useMemo(()=>i2(v,u),[v,u]),N=f2(v);return w.createElement(w.Fragment,null,x.map(_=>w.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...i})),S.map(_=>w.createElement("link",{key:_,rel:"modulepreload",href:_,...i})),N.map(({key:_,link:T})=>w.createElement("link",{key:_,nonce:i.nonce,...T,crossOrigin:T.crossOrigin??i.crossOrigin})))}function h2(...e){return n=>{e.forEach(i=>{typeof i=="function"?i(n):i!=null&&(i.current=n)})}}var m2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{m2&&(window.__reactRouterVersion="7.13.1")}catch{}function p2({basename:e,children:n,unstable_useTransitions:i,window:a}){let o=w.useRef();o.current==null&&(o.current=VC({window:a,v5Compat:!0}));let u=o.current,[c,d]=w.useState({action:u.action,location:u.location}),p=w.useCallback(m=>{i===!1?d(m):w.startTransition(()=>d(m))},[i]);return w.useLayoutEffect(()=>u.listen(p),[u,p]),w.createElement(Fk,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:u,unstable_useTransitions:i})}var n1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,r1=w.forwardRef(function({onClick:n,discover:i="render",prefetch:a="none",relative:o,reloadDocument:u,replace:c,unstable_mask:d,state:p,target:m,to:g,preventScrollReset:v,viewTransition:x,unstable_defaultShouldRevalidate:S,...N},_){let{basename:T,navigator:A,unstable_useTransitions:q}=w.useContext(Un),U=typeof g=="string"&&n1.test(g),P=P0(g,T);g=P.to;let L=kk(g,{relative:o}),j=li(),Y=null;if(d){let ee=Rc(d,[],j.unstable_mask?j.unstable_mask.pathname:"/",!0);T!=="/"&&(ee.pathname=ee.pathname==="/"?T:_r([T,ee.pathname])),Y=A.createHref(ee)}let[$,re,de]=u2(a,N),le=v2(g,{replace:c,unstable_mask:d,state:p,target:m,preventScrollReset:v,relative:o,viewTransition:x,unstable_defaultShouldRevalidate:S,unstable_useTransitions:q});function ae(ee){n&&n(ee),ee.defaultPrevented||le(ee)}let Ae=!(P.isExternal||u),se=w.createElement("a",{...N,...de,href:(Ae?Y:void 0)||P.absoluteURL||L,onClick:Ae?ae:n,ref:h2(_,re),target:m,"data-discover":!U&&i==="render"?"true":void 0});return $&&!U?w.createElement(w.Fragment,null,se,w.createElement(c2,{page:L})):se});r1.displayName="Link";var i1=w.forwardRef(function({"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:u,to:c,viewTransition:d,children:p,...m},g){let v=zs(c,{relative:m.relative}),x=li(),S=w.useContext(Dc),{navigator:N,basename:_}=w.useContext(Un),T=S!=null&&E2(v)&&d===!0,A=N.encodeLocation?N.encodeLocation(v).pathname:v.pathname,q=x.pathname,U=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(q=q.toLowerCase(),U=U?U.toLowerCase():null,A=A.toLowerCase()),U&&_&&(U=ai(U,_)||U);const P=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let L=q===A||!o&&q.startsWith(A)&&q.charAt(P)==="/",j=U!=null&&(U===A||!o&&U.startsWith(A)&&U.charAt(A.length)==="/"),Y={isActive:L,isPending:j,isTransitioning:T},$=L?n:void 0,re;typeof a=="function"?re=a(Y):re=[a,L?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let de=typeof u=="function"?u(Y):u;return w.createElement(r1,{...m,"aria-current":$,className:re,ref:g,style:de,to:c,viewTransition:d},typeof p=="function"?p(Y):p)});i1.displayName="NavLink";var g2=w.forwardRef(({discover:e="render",fetcherKey:n,navigate:i,reloadDocument:a,replace:o,state:u,method:c=hc,action:d,onSubmit:p,relative:m,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...S},N)=>{let{unstable_useTransitions:_}=w.useContext(Un),T=S2(),A=w2(d,{relative:m}),q=c.toLowerCase()==="get"?"get":"post",U=typeof d=="string"&&n1.test(d),P=L=>{if(p&&p(L),L.defaultPrevented)return;L.preventDefault();let j=L.nativeEvent.submitter,Y=(j==null?void 0:j.getAttribute("formmethod"))||c,$=()=>T(j||L.currentTarget,{fetcherKey:n,method:Y,navigate:i,replace:o,state:u,relative:m,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x});_&&i!==!1?w.startTransition(()=>$()):$()};return w.createElement("form",{ref:N,method:q,action:A,onSubmit:a?p:P,...S,"data-discover":!U&&e==="render"?"true":void 0})});g2.displayName="Form";function y2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function a1(e){let n=w.useContext(to);return mt(n,y2(e)),n}function v2(e,{target:n,replace:i,unstable_mask:a,state:o,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m}={}){let g=Ns(),v=li(),x=zs(e,{relative:c});return w.useCallback(S=>{if(Xk(S,n)){S.preventDefault();let N=i!==void 0?i:ys(v)===ys(x),_=()=>g(e,{replace:N,unstable_mask:a,state:o,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});m?w.startTransition(()=>_()):_()}},[v,g,x,i,a,o,n,e,u,c,d,p,m])}var b2=0,x2=()=>`__${String(++b2)}__`;function S2(){let{router:e}=a1("useSubmit"),{basename:n}=w.useContext(Un),i=qk(),a=e.fetch,o=e.navigate;return w.useCallback(async(u,c={})=>{let{action:d,method:p,encType:m,formData:g,body:v}=Wk(u,n);if(c.navigate===!1){let x=c.fetcherKey||x2();await a(x,i,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:v,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await o(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:v,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,o,n,i])}function w2(e,{relative:n}={}){let{basename:i}=w.useContext(Un),a=w.useContext(er);mt(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),u={...zs(e||".",{relative:n})},c=li();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(g=>g==="")){d.delete("index"),p.filter(v=>v).forEach(v=>d.append("index",v));let g=d.toString();u.search=g?`?${g}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:_r([i,u.pathname])),ys(u)}function E2(e,{relative:n}={}){let i=w.useContext($0);mt(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=a1("useViewTransitionState"),o=zs(e,{relative:n});if(!i.isTransitioning)return!1;let u=ai(i.currentLocation.pathname,a)||i.currentLocation.pathname,c=ai(i.nextLocation.pathname,a)||i.nextLocation.pathname;return Sc(o.pathname,c)!=null||Sc(o.pathname,u)!=null}const _2="/api/v1";async function C2(e,n){const i=await fetch(`${_2}/admin/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:n})});if(!i.ok){const a=await i.text();let o;try{o=JSON.parse(a).error??a}catch{o=a}throw new Error(o)}return await i.json()}const l1="/api/v1",Rm="first-tree-hub:tokens";function o1(){const e=localStorage.getItem(Rm);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function s1(e){localStorage.setItem(Rm,JSON.stringify(e))}function u1(){localStorage.removeItem(Rm)}class k2 extends Error{constructor(n,i){super(i),this.status=n,this.name="ApiError"}}let ts=null;async function T2(e){return ts||(ts=(async()=>{try{const n=await fetch(`${l1}/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:e})});if(!n.ok)return null;const i=await n.json(),a={accessToken:i.accessToken,refreshToken:i.refreshToken??e};return s1(a),a}catch{return null}finally{ts=null}})(),ts)}async function Ju(e,n){const{method:i="GET",body:a}=n??{},o=d=>{const p={};return d&&(p.Authorization=`Bearer ${d}`),a!==void 0&&(p["Content-Type"]="application/json"),fetch(`${l1}${e}`,{method:i,headers:p,body:a!==void 0?JSON.stringify(a):void 0})},u=o1();let c=await o(u==null?void 0:u.accessToken);if(c.status===401&&(u!=null&&u.refreshToken)){const d=await T2(u.refreshToken);d&&(c=await o(d.accessToken))}if(!c.ok){c.status===401&&(u1(),window.dispatchEvent(new CustomEvent("auth:logout")));const d=await c.text();let p;try{p=JSON.parse(d).error??d}catch{p=d}throw new k2(c.status,p)}if(c.status!==204)return await c.json()}const nt={get:e=>Ju(e),post:(e,n)=>Ju(e,{method:"POST",body:n}),patch:(e,n)=>Ju(e,{method:"PATCH",body:n}),delete:e=>Ju(e,{method:"DELETE"})},c1=w.createContext(null);function A2({children:e}){const[n,i]=w.useState(()=>!!o1()),a=w.useCallback(()=>{u1(),i(!1)},[]),o=w.useCallback(async(u,c)=>{const d=await C2(u,c);s1({accessToken:d.accessToken,refreshToken:d.refreshToken}),i(!0)},[]);return w.useEffect(()=>{const u=()=>a();return window.addEventListener("auth:logout",u),()=>window.removeEventListener("auth:logout",u)},[a]),y.jsx(c1.Provider,{value:{isAuthenticated:n,login:o,logout:a},children:e})}function Dm(){const e=w.useContext(c1);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function N2(){const{isAuthenticated:e}=Dm();return e?y.jsx(W0,{}):y.jsx(J0,{to:"/login",replace:!0})}/**
|
|
61
|
+
* @license lucide-react v0.577.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const f1=(...e)=>e.filter((n,i,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===i).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.577.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const z2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v0.577.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const j2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,a)=>a?a.toUpperCase():i.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v0.577.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Bb=e=>{const n=j2(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
81
|
+
* @license lucide-react v0.577.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var O2={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"};/**
|
|
86
|
+
* @license lucide-react v0.577.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const R2=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
|
|
91
|
+
* @license lucide-react v0.577.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const D2=w.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:u,iconNode:c,...d},p)=>w.createElement("svg",{ref:p,...O2,width:n,height:n,stroke:e,strokeWidth:a?Number(i)*24/Number(n):i,className:f1("lucide",o),...!u&&!R2(d)&&{"aria-hidden":"true"},...d},[...c.map(([m,g])=>w.createElement(m,g)),...Array.isArray(u)?u:[u]]));/**
|
|
96
|
+
* @license lucide-react v0.577.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Gt=(e,n)=>{const i=w.forwardRef(({className:a,...o},u)=>w.createElement(D2,{ref:u,iconNode:n,className:f1(`lucide-${z2(Bb(e))}`,`lucide-${e}`,a),...o}));return i.displayName=Bb(e),i};/**
|
|
101
|
+
* @license lucide-react v0.577.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const M2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],d1=Gt("arrow-left",M2);/**
|
|
106
|
+
* @license lucide-react v0.577.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const U2=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],h1=Gt("bot",U2);/**
|
|
111
|
+
* @license lucide-react v0.577.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const L2=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],m1=Gt("cable",L2);/**
|
|
116
|
+
* @license lucide-react v0.577.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const B2=[["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"}]],I2=Gt("copy",B2);/**
|
|
121
|
+
* @license lucide-react v0.577.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const q2=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],H2=Gt("key",q2);/**
|
|
126
|
+
* @license lucide-react v0.577.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const Z2=[["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"}]],P2=Gt("layout-dashboard",Z2);/**
|
|
131
|
+
* @license lucide-react v0.577.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const F2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],$2=Gt("link-2",F2);/**
|
|
136
|
+
* @license lucide-react v0.577.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const V2=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Q2=Gt("log-out",V2);/**
|
|
141
|
+
* @license lucide-react v0.577.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Y2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Mm=Gt("message-square",Y2);/**
|
|
146
|
+
* @license lucide-react v0.577.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const G2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],pc=Gt("pencil",G2);/**
|
|
151
|
+
* @license lucide-react v0.577.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const X2=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],K2=Gt("play",X2);/**
|
|
156
|
+
* @license lucide-react v0.577.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const J2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wc=Gt("plus",J2);/**
|
|
161
|
+
* @license lucide-react v0.577.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const W2=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],eT=Gt("radio",W2);/**
|
|
166
|
+
* @license lucide-react v0.577.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const tT=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nT=Gt("settings",tT);/**
|
|
171
|
+
* @license lucide-react v0.577.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const rT=[["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"}]],iT=Gt("shield",rT);/**
|
|
176
|
+
* @license lucide-react v0.577.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const aT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ss=Gt("trash-2",aT);/**
|
|
181
|
+
* @license lucide-react v0.577.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const lT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oT=Gt("x",lT);function p1(e){var n,i,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(i=p1(e[n]))&&(a&&(a+=" "),a+=i)}else for(i in e)e[i]&&(a&&(a+=" "),a+=i);return a}function g1(){for(var e,n,i=0,a="",o=arguments.length;i<o;i++)(e=arguments[i])&&(n=p1(e))&&(a&&(a+=" "),a+=n);return a}const sT=(e,n)=>{const i=new Array(e.length+n.length);for(let a=0;a<e.length;a++)i[a]=e[a];for(let a=0;a<n.length;a++)i[e.length+a]=n[a];return i},uT=(e,n)=>({classGroupId:e,validator:n}),y1=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),Ec="-",Ib=[],cT="arbitrary..",fT=e=>{const n=hT(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return dT(c);const d=c.split(Ec),p=d[0]===""&&d.length>1?1:0;return v1(d,p,n)},getConflictingClassGroupIds:(c,d)=>{if(d){const p=a[c],m=i[c];return p?m?sT(m,p):p:m||Ib}return i[c]||Ib}}},v1=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const o=e[n],u=i.nextPart.get(o);if(u){const m=v1(e,n+1,u);if(m)return m}const c=i.validators;if(c===null)return;const d=n===0?e.join(Ec):e.slice(n).join(Ec),p=c.length;for(let m=0;m<p;m++){const g=c[m];if(g.validator(d))return g.classGroupId}},dT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),i=n.indexOf(":"),a=n.slice(0,i);return a?cT+a:void 0})(),hT=e=>{const{theme:n,classGroups:i}=e;return mT(i,n)},mT=(e,n)=>{const i=y1();for(const a in e){const o=e[a];Um(o,i,a,n)}return i},Um=(e,n,i,a)=>{const o=e.length;for(let u=0;u<o;u++){const c=e[u];pT(c,n,i,a)}},pT=(e,n,i,a)=>{if(typeof e=="string"){gT(e,n,i);return}if(typeof e=="function"){yT(e,n,i,a);return}vT(e,n,i,a)},gT=(e,n,i)=>{const a=e===""?n:b1(n,e);a.classGroupId=i},yT=(e,n,i,a)=>{if(bT(e)){Um(e(a),n,i,a);return}n.validators===null&&(n.validators=[]),n.validators.push(uT(i,e))},vT=(e,n,i,a)=>{const o=Object.entries(e),u=o.length;for(let c=0;c<u;c++){const[d,p]=o[c];Um(p,b1(n,d),i,a)}},b1=(e,n)=>{let i=e;const a=n.split(Ec),o=a.length;for(let u=0;u<o;u++){const c=a[u];let d=i.nextPart.get(c);d||(d=y1(),i.nextPart.set(c,d)),i=d}return i},bT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,xT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),a=Object.create(null);const o=(u,c)=>{i[u]=c,n++,n>e&&(n=0,a=i,i=Object.create(null))};return{get(u){let c=i[u];if(c!==void 0)return c;if((c=a[u])!==void 0)return o(u,c),c},set(u,c){u in i?i[u]=c:o(u,c)}}},rm="!",qb=":",ST=[],Hb=(e,n,i,a,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:a,isExternal:o}),wT=e=>{const{prefix:n,experimentalParseClassName:i}=e;let a=o=>{const u=[];let c=0,d=0,p=0,m;const g=o.length;for(let _=0;_<g;_++){const T=o[_];if(c===0&&d===0){if(T===qb){u.push(o.slice(p,_)),p=_+1;continue}if(T==="/"){m=_;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const v=u.length===0?o:o.slice(p);let x=v,S=!1;v.endsWith(rm)?(x=v.slice(0,-1),S=!0):v.startsWith(rm)&&(x=v.slice(1),S=!0);const N=m&&m>p?m-p:void 0;return Hb(u,S,x,N)};if(n){const o=n+qb,u=a;a=c=>c.startsWith(o)?u(c.slice(o.length)):Hb(ST,!1,c,void 0,!0)}if(i){const o=a;a=u=>i({className:u,parseClassName:o})}return a},ET=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,a)=>{n.set(i,1e6+a)}),i=>{const a=[];let o=[];for(let u=0;u<i.length;u++){const c=i[u],d=c[0]==="[",p=n.has(c);d||p?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(c)):o.push(c)}return o.length>0&&(o.sort(),a.push(...o)),a}},_T=e=>({cache:xT(e.cacheSize),parseClassName:wT(e),sortModifiers:ET(e),...fT(e)}),CT=/\s+/,kT=(e,n)=>{const{parseClassName:i,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:u}=n,c=[],d=e.trim().split(CT);let p="";for(let m=d.length-1;m>=0;m-=1){const g=d[m],{isExternal:v,modifiers:x,hasImportantModifier:S,baseClassName:N,maybePostfixModifierPosition:_}=i(g);if(v){p=g+(p.length>0?" "+p:p);continue}let T=!!_,A=a(T?N.substring(0,_):N);if(!A){if(!T){p=g+(p.length>0?" "+p:p);continue}if(A=a(N),!A){p=g+(p.length>0?" "+p:p);continue}T=!1}const q=x.length===0?"":x.length===1?x[0]:u(x).join(":"),U=S?q+rm:q,P=U+A;if(c.indexOf(P)>-1)continue;c.push(P);const L=o(A,T);for(let j=0;j<L.length;++j){const Y=L[j];c.push(U+Y)}p=g+(p.length>0?" "+p:p)}return p},TT=(...e)=>{let n=0,i,a,o="";for(;n<e.length;)(i=e[n++])&&(a=x1(i))&&(o&&(o+=" "),o+=a);return o},x1=e=>{if(typeof e=="string")return e;let n,i="";for(let a=0;a<e.length;a++)e[a]&&(n=x1(e[a]))&&(i&&(i+=" "),i+=n);return i},AT=(e,...n)=>{let i,a,o,u;const c=p=>{const m=n.reduce((g,v)=>v(g),e());return i=_T(m),a=i.cache.get,o=i.cache.set,u=d,d(p)},d=p=>{const m=a(p);if(m)return m;const g=kT(p,i);return o(p,g),g};return u=c,(...p)=>u(TT(...p))},NT=[],Dt=e=>{const n=i=>i[e]||NT;return n.isThemeGetter=!0,n},S1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OT=/\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$/,RT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,DT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mi=e=>zT.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),Ui=e=>!!e&&Number.isInteger(Number(e)),gh=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Yr=e=>jT.test(e),E1=()=>!0,UT=e=>OT.test(e)&&!RT.test(e),Lm=()=>!1,LT=e=>DT.test(e),BT=e=>MT.test(e),IT=e=>!pe(e)&&!ge(e),qT=e=>Wi(e,k1,Lm),pe=e=>S1.test(e),Sa=e=>Wi(e,T1,UT),Zb=e=>Wi(e,YT,Le),HT=e=>Wi(e,N1,E1),ZT=e=>Wi(e,A1,Lm),Pb=e=>Wi(e,_1,Lm),PT=e=>Wi(e,C1,BT),Wu=e=>Wi(e,z1,LT),ge=e=>w1.test(e),ns=e=>Da(e,T1),FT=e=>Da(e,A1),Fb=e=>Da(e,_1),$T=e=>Da(e,k1),VT=e=>Da(e,C1),ec=e=>Da(e,z1,!0),QT=e=>Da(e,N1,!0),Wi=(e,n,i)=>{const a=S1.exec(e);return a?a[1]?n(a[1]):i(a[2]):!1},Da=(e,n,i=!1)=>{const a=w1.exec(e);return a?a[1]?n(a[1]):i:!1},_1=e=>e==="position"||e==="percentage",C1=e=>e==="image"||e==="url",k1=e=>e==="length"||e==="size"||e==="bg-size",T1=e=>e==="length",YT=e=>e==="number",A1=e=>e==="family-name",N1=e=>e==="number"||e==="weight",z1=e=>e==="shadow",GT=()=>{const e=Dt("color"),n=Dt("font"),i=Dt("text"),a=Dt("font-weight"),o=Dt("tracking"),u=Dt("leading"),c=Dt("breakpoint"),d=Dt("container"),p=Dt("spacing"),m=Dt("radius"),g=Dt("shadow"),v=Dt("inset-shadow"),x=Dt("text-shadow"),S=Dt("drop-shadow"),N=Dt("blur"),_=Dt("perspective"),T=Dt("aspect"),A=Dt("ease"),q=Dt("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...P(),ge,pe],j=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],$=()=>[ge,pe,p],re=()=>[Mi,"full","auto",...$()],de=()=>[Ui,"none","subgrid",ge,pe],le=()=>["auto",{span:["full",Ui,ge,pe]},Ui,ge,pe],ae=()=>[Ui,"auto",ge,pe],Ae=()=>["auto","min","max","fr",ge,pe],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...$()],te=()=>[Mi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],he=()=>[Mi,"screen","full","dvw","lvw","svw","min","max","fit",...$()],ze=()=>[Mi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],C=()=>[e,ge,pe],D=()=>[...P(),Fb,Pb,{position:[ge,pe]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",$T,qT,{size:[ge,pe]}],oe=()=>[gh,ns,Sa],fe=()=>["","none","full",m,ge,pe],ue=()=>["",Le,ns,Sa],ke=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[Le,gh,Fb,Pb],Ct=()=>["","none",N,ge,pe],Xt=()=>["none",Le,ge,pe],Bn=()=>["none",Le,ge,pe],dr=()=>[Le,ge,pe],Kt=()=>[Mi,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yr],breakpoint:[Yr],color:[E1],container:[Yr],"drop-shadow":[Yr],ease:["in","out","in-out"],font:[IT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yr],shadow:[Yr],spacing:["px",Le],text:[Yr],"text-shadow":[Yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mi,pe,ge,T]}],container:["container"],columns:[{columns:[Le,pe,ge,d]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{"inset-s":re(),start:re()}],end:[{"inset-e":re(),end:re()}],"inset-bs":[{"inset-bs":re()}],"inset-be":[{"inset-be":re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Ui,"auto",ge,pe]}],basis:[{basis:[Mi,"full","auto",d,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Mi,"auto","initial","none",pe]}],grow:[{grow:["",Le,ge,pe]}],shrink:[{shrink:["",Le,ge,pe]}],order:[{order:[Ui,"first","last","none",ge,pe]}],"grid-cols":[{"grid-cols":de()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":de()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...he()]}],"min-inline-size":[{"min-inline":["auto",...he()]}],"max-inline-size":[{"max-inline":["none",...he()]}],"block-size":[{block:["auto",...ze()]}],"min-block-size":[{"min-block":["auto",...ze()]}],"max-block-size":[{"max-block":["none",...ze()]}],w:[{w:[d,"screen",...te()]}],"min-w":[{"min-w":[d,"screen","none",...te()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",i,ns,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,QT,HT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gh,pe]}],"font-family":[{font:[FT,ZT,n]}],"font-features":[{"font-features":[pe]}],"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:[o,ge,pe]}],"line-clamp":[{"line-clamp":[Le,"none",ge,Zb]}],leading:[{leading:[u,...$()]}],"list-image":[{"list-image":["none",ge,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ge,Sa]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[Le,"auto",ge,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ui,ge,pe],radial:["",ge,pe],conic:[Ui,ge,pe]},VT,PT]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ke(),"hidden","none"]}],"divide-style":[{divide:[...ke(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ge,pe]}],"outline-w":[{outline:["",Le,ns,Sa]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",g,ec,Wu]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",v,ec,Wu]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[Le,Sa]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",x,ec,Wu]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[Le,ge,pe]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ge,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,pe]}],filter:[{filter:["","none",ge,pe]}],blur:[{blur:Ct()}],brightness:[{brightness:[Le,ge,pe]}],contrast:[{contrast:[Le,ge,pe]}],"drop-shadow":[{"drop-shadow":["","none",S,ec,Wu]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",Le,ge,pe]}],"hue-rotate":[{"hue-rotate":[Le,ge,pe]}],invert:[{invert:["",Le,ge,pe]}],saturate:[{saturate:[Le,ge,pe]}],sepia:[{sepia:["",Le,ge,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,pe]}],"backdrop-blur":[{"backdrop-blur":Ct()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ge,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ge,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ge,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ge,pe]}],"backdrop-invert":[{"backdrop-invert":["",Le,ge,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ge,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ge,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ge,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ge,pe]}],ease:[{ease:["linear","initial",A,ge,pe]}],delay:[{delay:[Le,ge,pe]}],animate:[{animate:["none",q,ge,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,ge,pe]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Xt()}],"rotate-x":[{"rotate-x":Xt()}],"rotate-y":[{"rotate-y":Xt()}],"rotate-z":[{"rotate-z":Xt()}],scale:[{scale:Bn()}],"scale-x":[{"scale-x":Bn()}],"scale-y":[{"scale-y":Bn()}],"scale-z":[{"scale-z":Bn()}],"scale-3d":["scale-3d"],skew:[{skew:dr()}],"skew-x":[{"skew-x":dr()}],"skew-y":[{"skew-y":dr()}],transform:[{transform:[ge,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Kt()}],"translate-x":[{"translate-x":Kt()}],"translate-y":[{"translate-y":Kt()}],"translate-z":[{"translate-z":Kt()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",ge,pe]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[Le,ns,Sa,Zb]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},XT=AT(GT);function st(...e){return XT(g1(e))}function On(e){return e?new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)):"—"}const KT=[{to:"/",icon:P2,label:"Overview"},{to:"/agents",icon:h1,label:"Agents"},{to:"/bindings",icon:m1,label:"Bindings"},{to:"/chats",icon:Mm,label:"Chats"},{to:"/admin-users",icon:iT,label:"Admin Users"},{to:"/settings",icon:nT,label:"Settings"}];function JT(){const{logout:e}=Dm();return y.jsxs("div",{className:"flex h-screen bg-background",children:[y.jsxs("aside",{className:"w-60 shrink-0 border-r border-border bg-card flex flex-col",children:[y.jsxs("div",{className:"p-4 border-b border-border",children:[y.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:"First Tree"}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"Admin Console"})]}),y.jsx("nav",{className:"flex-1 p-2 space-y-1",children:KT.map(n=>y.jsxs(i1,{to:n.to,end:n.to==="/",className:({isActive:i})=>st("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",i?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[y.jsx(n.icon,{className:"h-4 w-4"}),n.label]},n.to))}),y.jsx("div",{className:"p-2 border-t border-border",children:y.jsxs("button",{type:"button",onClick:e,className:"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[y.jsx(Q2,{className:"h-4 w-4"}),"Logout"]})})]}),y.jsx("main",{className:"flex-1 overflow-auto",children:y.jsx("div",{className:"p-6 max-w-5xl",children:y.jsx(W0,{})})})]})}function J(e,n,i){function a(d,p){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:p,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),n(d,p);const m=c.prototype,g=Object.keys(m);for(let v=0;v<g.length;v++){const x=g[v];x in d||(d[x]=m[x].bind(d))}}const o=(i==null?void 0:i.Parent)??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function c(d){var p;const m=i!=null&&i.Parent?new u:this;a(m,d),(p=m._zod).deferred??(p.deferred=[]);for(const g of m._zod.deferred)g();return m}return Object.defineProperty(c,"init",{value:a}),Object.defineProperty(c,Symbol.hasInstance,{value:d=>{var p,m;return i!=null&&i.Parent&&d instanceof i.Parent?!0:(m=(p=d==null?void 0:d._zod)==null?void 0:p.traits)==null?void 0:m.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}class Rl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class j1 extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const O1={};function Ki(e){return O1}function R1(e){const n=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>n.indexOf(+a)===-1).map(([a,o])=>o)}function im(e,n){return typeof n=="bigint"?n.toString():n}function Bm(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Im(e){return e==null}function qm(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function WT(e,n){const i=(e.toString().split(".")[1]||"").length,a=n.toString();let o=(a.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(a)){const p=a.match(/\d?e-(\d?)/);p!=null&&p[1]&&(o=Number.parseInt(p[1]))}const u=i>o?i:o,c=Number.parseInt(e.toFixed(u).replace(".","")),d=Number.parseInt(n.toFixed(u).replace(".",""));return c%d/10**u}const $b=Symbol("evaluating");function tt(e,n,i){let a;Object.defineProperty(e,n,{get(){if(a!==$b)return a===void 0&&(a=$b,a=i()),a},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function Ma(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ea(...e){const n={};for(const i of e){const a=Object.getOwnPropertyDescriptors(i);Object.assign(n,a)}return Object.defineProperties({},n)}function Vb(e){return JSON.stringify(e)}function eA(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const D1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const tA=Bm(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function Kl(e){if(_c(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(_c(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function M1(e){return Kl(e)?{...e}:Array.isArray(e)?[...e]:e}const nA=new Set(["string","number","symbol"]);function Uc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ta(e,n,i){const a=new e._zod.constr(n??e._zod.def);return(!n||i!=null&&i.parent)&&(a._zod.parent=e),a}function Se(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function rA(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const iA={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function aA(e,n){const i=e._zod.def,a=i.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=ea(e._zod.def,{get shape(){const c={};for(const d in n){if(!(d in i.shape))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(c[d]=i.shape[d])}return Ma(this,"shape",c),c},checks:[]});return ta(e,u)}function lA(e,n){const i=e._zod.def,a=i.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=ea(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d in n){if(!(d in i.shape))throw new Error(`Unrecognized key: "${d}"`);n[d]&&delete c[d]}return Ma(this,"shape",c),c},checks:[]});return ta(e,u)}function oA(e,n){if(!Kl(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._zod.def.shape;for(const c in n)if(Object.getOwnPropertyDescriptor(u,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=ea(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Ma(this,"shape",u),u}});return ta(e,o)}function sA(e,n){if(!Kl(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=ea(e._zod.def,{get shape(){const a={...e._zod.def.shape,...n};return Ma(this,"shape",a),a}});return ta(e,i)}function uA(e,n){const i=ea(e._zod.def,{get shape(){const a={...e._zod.def.shape,...n._zod.def.shape};return Ma(this,"shape",a),a},get catchall(){return n._zod.def.catchall},checks:[]});return ta(e,i)}function cA(e,n,i){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=ea(n._zod.def,{get shape(){const d=n._zod.def.shape,p={...d};if(i)for(const m in i){if(!(m in d))throw new Error(`Unrecognized key: "${m}"`);i[m]&&(p[m]=e?new e({type:"optional",innerType:d[m]}):d[m])}else for(const m in d)p[m]=e?new e({type:"optional",innerType:d[m]}):d[m];return Ma(this,"shape",p),p},checks:[]});return ta(n,c)}function fA(e,n,i){const a=ea(n._zod.def,{get shape(){const o=n._zod.def.shape,u={...o};if(i)for(const c in i){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);i[c]&&(u[c]=new e({type:"nonoptional",innerType:o[c]}))}else for(const c in o)u[c]=new e({type:"nonoptional",innerType:o[c]});return Ma(this,"shape",u),u}});return ta(n,a)}function zl(e,n=0){var i;if(e.aborted===!0)return!0;for(let a=n;a<e.issues.length;a++)if(((i=e.issues[a])==null?void 0:i.continue)!==!0)return!0;return!1}function jl(e,n){return n.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}function tc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ji(e,n,i){var o,u,c,d,p,m;const a={...e,path:e.path??[]};if(!e.message){const g=tc((c=(u=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:u.error)==null?void 0:c.call(u,e))??tc((d=n==null?void 0:n.error)==null?void 0:d.call(n,e))??tc((p=i.customError)==null?void 0:p.call(i,e))??tc((m=i.localeError)==null?void 0:m.call(i,e))??"Invalid input";a.message=g}return delete a.inst,delete a.continue,n!=null&&n.reportInput||delete a.input,a}function Hm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vs(...e){const[n,i,a]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:a}:{...n}}const U1=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,im,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},L1=J("$ZodError",U1),B1=J("$ZodError",U1,{Parent:Error});function dA(e,n=i=>i.message){const i={},a=[];for(const o of e.issues)o.path.length>0?(i[o.path[0]]=i[o.path[0]]||[],i[o.path[0]].push(n(o))):a.push(n(o));return{formErrors:a,fieldErrors:i}}function hA(e,n=i=>i.message){const i={_errors:[]},a=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>a({issues:c}));else if(u.code==="invalid_key")a({issues:u.issues});else if(u.code==="invalid_element")a({issues:u.issues});else if(u.path.length===0)i._errors.push(n(u));else{let c=i,d=0;for(;d<u.path.length;){const p=u.path[d];d===u.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(n(u))):c[p]=c[p]||{_errors:[]},c=c[p],d++}}};return a(e),i}const Zm=e=>(n,i,a,o)=>{const u=a?Object.assign(a,{async:!1}):{async:!1},c=n._zod.run({value:i,issues:[]},u);if(c instanceof Promise)throw new Rl;if(c.issues.length){const d=new((o==null?void 0:o.Err)??e)(c.issues.map(p=>Ji(p,u,Ki())));throw D1(d,o==null?void 0:o.callee),d}return c.value},Pm=e=>async(n,i,a,o)=>{const u=a?Object.assign(a,{async:!0}):{async:!0};let c=n._zod.run({value:i,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new((o==null?void 0:o.Err)??e)(c.issues.map(p=>Ji(p,u,Ki())));throw D1(d,o==null?void 0:o.callee),d}return c.value},Lc=e=>(n,i,a)=>{const o=a?{...a,async:!1}:{async:!1},u=n._zod.run({value:i,issues:[]},o);if(u instanceof Promise)throw new Rl;return u.issues.length?{success:!1,error:new(e??L1)(u.issues.map(c=>Ji(c,o,Ki())))}:{success:!0,data:u.value}},mA=Lc(B1),Bc=e=>async(n,i,a)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let u=n._zod.run({value:i,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ji(c,o,Ki())))}:{success:!0,data:u.value}},pA=Bc(B1),gA=e=>(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Zm(e)(n,i,o)},yA=e=>(n,i,a)=>Zm(e)(n,i,a),vA=e=>async(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Pm(e)(n,i,o)},bA=e=>async(n,i,a)=>Pm(e)(n,i,a),xA=e=>(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Lc(e)(n,i,o)},SA=e=>(n,i,a)=>Lc(e)(n,i,a),wA=e=>async(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Bc(e)(n,i,o)},EA=e=>async(n,i,a)=>Bc(e)(n,i,a),_A=/^[cC][^\s-]{8,}$/,CA=/^[0-9a-z]+$/,kA=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,TA=/^[0-9a-vA-V]{20}$/,AA=/^[A-Za-z0-9]{27}$/,NA=/^[a-zA-Z0-9_-]{21}$/,zA=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jA=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Qb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,OA=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,RA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function DA(){return new RegExp(RA,"u")}const MA=/^(?:(?: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])$/,UA=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,LA=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,BA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,IA=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,I1=/^[A-Za-z0-9_-]*$/,qA=/^\+[1-9]\d{6,14}$/,q1="(?:(?:\\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])))",HA=new RegExp(`^${q1}$`);function H1(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ZA(e){return new RegExp(`^${H1(e)}$`)}function PA(e){const n=H1({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${n}(?:${i.join("|")})`;return new RegExp(`^${q1}T(?:${a})$`)}const FA=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},$A=/^-?\d+$/,Z1=/^-?\d+(?:\.\d+)?$/,VA=/^(?:true|false)$/i,QA=/^[^A-Z]*$/,YA=/^[^a-z]*$/,xn=J("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),P1={number:"number",bigint:"bigint",object:"date"},F1=J("$ZodCheckLessThan",(e,n)=>{xn.init(e,n);const i=P1[typeof n.value];e._zod.onattach.push(a=>{const o=a._zod.bag,u=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),e._zod.check=a=>{(n.inclusive?a.value<=n.value:a.value<n.value)||a.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:a.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),$1=J("$ZodCheckGreaterThan",(e,n)=>{xn.init(e,n);const i=P1[typeof n.value];e._zod.onattach.push(a=>{const o=a._zod.bag,u=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),e._zod.check=a=>{(n.inclusive?a.value>=n.value:a.value>n.value)||a.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:a.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),GA=J("$ZodCheckMultipleOf",(e,n)=>{xn.init(e,n),e._zod.onattach.push(i=>{var a;(a=i._zod.bag).multipleOf??(a.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):WT(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),XA=J("$ZodCheckNumberFormat",(e,n)=>{var c;xn.init(e,n),n.format=n.format||"float64";const i=(c=n.format)==null?void 0:c.includes("int"),a=i?"int":"number",[o,u]=iA[n.format];e._zod.onattach.push(d=>{const p=d._zod.bag;p.format=n.format,p.minimum=o,p.maximum=u,i&&(p.pattern=$A)}),e._zod.check=d=>{const p=d.value;if(i){if(!Number.isInteger(p)){d.issues.push({expected:a,format:n.format,code:"invalid_type",continue:!1,input:p,inst:e});return}if(!Number.isSafeInteger(p)){p>0?d.issues.push({input:p,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!n.abort}):d.issues.push({input:p,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!n.abort});return}}p<o&&d.issues.push({origin:"number",input:p,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!n.abort}),p>u&&d.issues.push({origin:"number",input:p,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),KA=J("$ZodCheckMaxLength",(e,n)=>{var i;xn.init(e,n),(i=e._zod.def).when??(i.when=a=>{const o=a.value;return!Im(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(a._zod.bag.maximum=n.maximum)}),e._zod.check=a=>{const o=a.value;if(o.length<=n.maximum)return;const c=Hm(o);a.issues.push({origin:c,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),JA=J("$ZodCheckMinLength",(e,n)=>{var i;xn.init(e,n),(i=e._zod.def).when??(i.when=a=>{const o=a.value;return!Im(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(a._zod.bag.minimum=n.minimum)}),e._zod.check=a=>{const o=a.value;if(o.length>=n.minimum)return;const c=Hm(o);a.issues.push({origin:c,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),WA=J("$ZodCheckLengthEquals",(e,n)=>{var i;xn.init(e,n),(i=e._zod.def).when??(i.when=a=>{const o=a.value;return!Im(o)&&o.length!==void 0}),e._zod.onattach.push(a=>{const o=a._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=a=>{const o=a.value,u=o.length;if(u===n.length)return;const c=Hm(o),d=u>n.length;a.issues.push({origin:c,...d?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!n.abort})}}),Ic=J("$ZodCheckStringFormat",(e,n)=>{var i,a;xn.init(e,n),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(a=e._zod).check??(a.check=()=>{})}),eN=J("$ZodCheckRegex",(e,n)=>{Ic.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),tN=J("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=QA),Ic.init(e,n)}),nN=J("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=YA),Ic.init(e,n)}),rN=J("$ZodCheckIncludes",(e,n)=>{xn.init(e,n);const i=Uc(n.includes),a=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=a,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(a)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),iN=J("$ZodCheckStartsWith",(e,n)=>{xn.init(e,n);const i=new RegExp(`^${Uc(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=a=>{a.value.startsWith(n.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:a.value,inst:e,continue:!n.abort})}}),aN=J("$ZodCheckEndsWith",(e,n)=>{xn.init(e,n);const i=new RegExp(`.*${Uc(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=a=>{a.value.endsWith(n.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:a.value,inst:e,continue:!n.abort})}}),lN=J("$ZodCheckOverwrite",(e,n)=>{xn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class oN{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const a=n.split(`
|
|
186
|
+
`).filter(c=>c),o=Math.min(...a.map(c=>c.length-c.trimStart().length)),u=a.map(c=>c.slice(o)).map(c=>" ".repeat(this.indent*2)+c);for(const c of u)this.content.push(c)}compile(){const n=Function,i=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(u=>` ${u}`)];return new n(...i,o.join(`
|
|
187
|
+
`))}}const sN={major:4,minor:3,patch:6},St=J("$ZodType",(e,n)=>{var o;var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=sN;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const u of a)for(const c of u._zod.onattach)c(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const u=(d,p,m)=>{let g=zl(d),v;for(const x of p){if(x._zod.def.when){if(!x._zod.def.when(d))continue}else if(g)continue;const S=d.issues.length,N=x._zod.check(d);if(N instanceof Promise&&(m==null?void 0:m.async)===!1)throw new Rl;if(v||N instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await N,d.issues.length!==S&&(g||(g=zl(d,S)))});else{if(d.issues.length===S)continue;g||(g=zl(d,S))}}return v?v.then(()=>d):d},c=(d,p,m)=>{if(zl(d))return d.aborted=!0,d;const g=u(p,a,m);if(g instanceof Promise){if(m.async===!1)throw new Rl;return g.then(v=>e._zod.parse(v,m))}return e._zod.parse(g,m)};e._zod.run=(d,p)=>{if(p.skipChecks)return e._zod.parse(d,p);if(p.direction==="backward"){const g=e._zod.parse({value:d.value,issues:[]},{...p,skipChecks:!0});return g instanceof Promise?g.then(v=>c(v,d,p)):c(g,d,p)}const m=e._zod.parse(d,p);if(m instanceof Promise){if(p.async===!1)throw new Rl;return m.then(g=>u(g,a,p))}return u(m,a,p)}}tt(e,"~standard",()=>({validate:u=>{var c;try{const d=mA(e,u);return d.success?{value:d.data}:{issues:(c=d.error)==null?void 0:c.issues}}catch{return pA(e,u).then(p=>{var m;return p.success?{value:p.data}:{issues:(m=p.error)==null?void 0:m.issues}})}},vendor:"zod",version:1}))}),Fm=J("$ZodString",(e,n)=>{var i;St.init(e,n),e._zod.pattern=[...((i=e==null?void 0:e._zod.bag)==null?void 0:i.patterns)??[]].pop()??FA(e._zod.bag),e._zod.parse=(a,o)=>{if(n.coerce)try{a.value=String(a.value)}catch{}return typeof a.value=="string"||a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:e}),a}}),pt=J("$ZodStringFormat",(e,n)=>{Ic.init(e,n),Fm.init(e,n)}),uN=J("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=jA),pt.init(e,n)}),cN=J("$ZodUUID",(e,n)=>{if(n.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(a===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Qb(a))}else n.pattern??(n.pattern=Qb());pt.init(e,n)}),fN=J("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=OA),pt.init(e,n)}),dN=J("$ZodURL",(e,n)=>{pt.init(e,n),e._zod.check=i=>{try{const a=i.value.trim(),o=new URL(a);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=o.href:i.value=a;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),hN=J("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=DA()),pt.init(e,n)}),mN=J("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=NA),pt.init(e,n)}),pN=J("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=_A),pt.init(e,n)}),gN=J("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=CA),pt.init(e,n)}),yN=J("$ZodULID",(e,n)=>{n.pattern??(n.pattern=kA),pt.init(e,n)}),vN=J("$ZodXID",(e,n)=>{n.pattern??(n.pattern=TA),pt.init(e,n)}),bN=J("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=AA),pt.init(e,n)}),xN=J("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=PA(n)),pt.init(e,n)}),SN=J("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=HA),pt.init(e,n)}),wN=J("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=ZA(n)),pt.init(e,n)}),EN=J("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=zA),pt.init(e,n)}),_N=J("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=MA),pt.init(e,n),e._zod.bag.format="ipv4"}),CN=J("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=UA),pt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),kN=J("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=LA),pt.init(e,n)}),TN=J("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=BA),pt.init(e,n),e._zod.check=i=>{const a=i.value.split("/");try{if(a.length!==2)throw new Error;const[o,u]=a;if(!u)throw new Error;const c=Number(u);if(`${c}`!==u)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${o}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function V1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const AN=J("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=IA),pt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{V1(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function NN(e){if(!I1.test(e))return!1;const n=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return V1(i)}const zN=J("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=I1),pt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{NN(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),jN=J("$ZodE164",(e,n)=>{n.pattern??(n.pattern=qA),pt.init(e,n)});function ON(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[a]=i;if(!a)return!1;const o=JSON.parse(atob(a));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const RN=J("$ZodJWT",(e,n)=>{pt.init(e,n),e._zod.check=i=>{ON(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Q1=J("$ZodNumber",(e,n)=>{St.init(e,n),e._zod.pattern=e._zod.bag.pattern??Z1,e._zod.parse=(i,a)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...u?{received:u}:{}}),i}}),DN=J("$ZodNumberFormat",(e,n)=>{XA.init(e,n),Q1.init(e,n)}),MN=J("$ZodBoolean",(e,n)=>{St.init(e,n),e._zod.pattern=VA,e._zod.parse=(i,a)=>{if(n.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),i}}),UN=J("$ZodUnknown",(e,n)=>{St.init(e,n),e._zod.parse=i=>i}),LN=J("$ZodNever",(e,n)=>{St.init(e,n),e._zod.parse=(i,a)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function Yb(e,n,i){e.issues.length&&n.issues.push(...jl(i,e.issues)),n.value[i]=e.value}const BN=J("$ZodArray",(e,n)=>{St.init(e,n),e._zod.parse=(i,a)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=Array(o.length);const u=[];for(let c=0;c<o.length;c++){const d=o[c],p=n.element._zod.run({value:d,issues:[]},a);p instanceof Promise?u.push(p.then(m=>Yb(m,i,c))):Yb(p,i,c)}return u.length?Promise.all(u).then(()=>i):i}});function Cc(e,n,i,a,o){if(e.issues.length){if(o&&!(i in a))return;n.issues.push(...jl(i,e.issues))}e.value===void 0?i in a&&(n.value[i]=void 0):n.value[i]=e.value}function Y1(e){var a,o,u,c;const n=Object.keys(e.shape);for(const d of n)if(!((c=(u=(o=(a=e.shape)==null?void 0:a[d])==null?void 0:o._zod)==null?void 0:u.traits)!=null&&c.has("$ZodType")))throw new Error(`Invalid element at key "${d}": expected a Zod schema`);const i=rA(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function G1(e,n,i,a,o,u){const c=[],d=o.keySet,p=o.catchall._zod,m=p.def.type,g=p.optout==="optional";for(const v in n){if(d.has(v))continue;if(m==="never"){c.push(v);continue}const x=p.run({value:n[v],issues:[]},a);x instanceof Promise?e.push(x.then(S=>Cc(S,i,v,n,g))):Cc(x,i,v,n,g)}return c.length&&i.issues.push({code:"unrecognized_keys",keys:c,input:n,inst:u}),e.length?Promise.all(e).then(()=>i):i}const IN=J("$ZodObject",(e,n)=>{St.init(e,n);const i=Object.getOwnPropertyDescriptor(n,"shape");if(!(i!=null&&i.get)){const d=n.shape;Object.defineProperty(n,"shape",{get:()=>{const p={...d};return Object.defineProperty(n,"shape",{value:p}),p}})}const a=Bm(()=>Y1(n));tt(e._zod,"propValues",()=>{const d=n.shape,p={};for(const m in d){const g=d[m]._zod;if(g.values){p[m]??(p[m]=new Set);for(const v of g.values)p[m].add(v)}}return p});const o=_c,u=n.catchall;let c;e._zod.parse=(d,p)=>{c??(c=a.value);const m=d.value;if(!o(m))return d.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),d;d.value={};const g=[],v=c.shape;for(const x of c.keys){const S=v[x],N=S._zod.optout==="optional",_=S._zod.run({value:m[x],issues:[]},p);_ instanceof Promise?g.push(_.then(T=>Cc(T,d,x,m,N))):Cc(_,d,x,m,N)}return u?G1(g,m,d,p,a.value,e):g.length?Promise.all(g).then(()=>d):d}}),qN=J("$ZodObjectJIT",(e,n)=>{IN.init(e,n);const i=e._zod.parse,a=Bm(()=>Y1(n)),o=x=>{var U;const S=new oN(["shape","payload","ctx"]),N=a.value,_=P=>{const L=Vb(P);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};S.write("const input = payload.value;");const T=Object.create(null);let A=0;for(const P of N.keys)T[P]=`key_${A++}`;S.write("const newResult = {};");for(const P of N.keys){const L=T[P],j=Vb(P),Y=x[P],$=((U=Y==null?void 0:Y._zod)==null?void 0:U.optout)==="optional";S.write(`const ${L} = ${_(P)};`),$?S.write(`
|
|
188
|
+
if (${L}.issues.length) {
|
|
189
|
+
if (${j} in input) {
|
|
190
|
+
payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
|
|
191
|
+
...iss,
|
|
192
|
+
path: iss.path ? [${j}, ...iss.path] : [${j}]
|
|
193
|
+
})));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (${L}.value === undefined) {
|
|
198
|
+
if (${j} in input) {
|
|
199
|
+
newResult[${j}] = undefined;
|
|
200
|
+
}
|
|
201
|
+
} else {
|
|
202
|
+
newResult[${j}] = ${L}.value;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
`):S.write(`
|
|
206
|
+
if (${L}.issues.length) {
|
|
207
|
+
payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
|
|
208
|
+
...iss,
|
|
209
|
+
path: iss.path ? [${j}, ...iss.path] : [${j}]
|
|
210
|
+
})));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (${L}.value === undefined) {
|
|
214
|
+
if (${j} in input) {
|
|
215
|
+
newResult[${j}] = undefined;
|
|
216
|
+
}
|
|
217
|
+
} else {
|
|
218
|
+
newResult[${j}] = ${L}.value;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
`)}S.write("payload.value = newResult;"),S.write("return payload;");const q=S.compile();return(P,L)=>q(x,P,L)};let u;const c=_c,d=!O1.jitless,m=d&&tA.value,g=n.catchall;let v;e._zod.parse=(x,S)=>{v??(v=a.value);const N=x.value;return c(N)?d&&m&&(S==null?void 0:S.async)===!1&&S.jitless!==!0?(u||(u=o(n.shape)),x=u(x,S),g?G1([],N,x,S,v,e):x):i(x,S):(x.issues.push({expected:"object",code:"invalid_type",input:N,inst:e}),x)}});function Gb(e,n,i,a){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const o=e.filter(u=>!zl(u));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(u=>u.issues.map(c=>Ji(c,a,Ki())))}),n)}const HN=J("$ZodUnion",(e,n)=>{St.init(e,n),tt(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),tt(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),tt(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),tt(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>qm(u.source)).join("|")})$`)}});const i=n.options.length===1,a=n.options[0]._zod.run;e._zod.parse=(o,u)=>{if(i)return a(o,u);let c=!1;const d=[];for(const p of n.options){const m=p._zod.run({value:o.value,issues:[]},u);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(p=>Gb(p,o,e,u)):Gb(d,o,e,u)}}),ZN=J("$ZodIntersection",(e,n)=>{St.init(e,n),e._zod.parse=(i,a)=>{const o=i.value,u=n.left._zod.run({value:o,issues:[]},a),c=n.right._zod.run({value:o,issues:[]},a);return u instanceof Promise||c instanceof Promise?Promise.all([u,c]).then(([p,m])=>Xb(i,p,m)):Xb(i,u,c)}});function am(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Kl(e)&&Kl(n)){const i=Object.keys(n),a=Object.keys(e).filter(u=>i.indexOf(u)!==-1),o={...e,...n};for(const u of a){const c=am(e[u],n[u]);if(!c.valid)return{valid:!1,mergeErrorPath:[u,...c.mergeErrorPath]};o[u]=c.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let a=0;a<e.length;a++){const o=e[a],u=n[a],c=am(o,u);if(!c.valid)return{valid:!1,mergeErrorPath:[a,...c.mergeErrorPath]};i.push(c.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Xb(e,n,i){const a=new Map;let o;for(const d of n.issues)if(d.code==="unrecognized_keys"){o??(o=d);for(const p of d.keys)a.has(p)||a.set(p,{}),a.get(p).l=!0}else e.issues.push(d);for(const d of i.issues)if(d.code==="unrecognized_keys")for(const p of d.keys)a.has(p)||a.set(p,{}),a.get(p).r=!0;else e.issues.push(d);const u=[...a].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(u.length&&o&&e.issues.push({...o,keys:u}),zl(e))return e;const c=am(n.value,i.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const PN=J("$ZodRecord",(e,n)=>{St.init(e,n),e._zod.parse=(i,a)=>{const o=i.value;if(!Kl(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;const u=[],c=n.keyType._zod.values;if(c){i.value={};const d=new Set;for(const m of c)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){d.add(typeof m=="number"?m.toString():m);const g=n.valueType._zod.run({value:o[m],issues:[]},a);g instanceof Promise?u.push(g.then(v=>{v.issues.length&&i.issues.push(...jl(m,v.issues)),i.value[m]=v.value})):(g.issues.length&&i.issues.push(...jl(m,g.issues)),i.value[m]=g.value)}let p;for(const m in o)d.has(m)||(p=p??[],p.push(m));p&&p.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{i.value={};for(const d of Reflect.ownKeys(o)){if(d==="__proto__")continue;let p=n.keyType._zod.run({value:d,issues:[]},a);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&Z1.test(d)&&p.issues.length){const v=n.keyType._zod.run({value:Number(d),issues:[]},a);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(p=v)}if(p.issues.length){n.mode==="loose"?i.value[d]=o[d]:i.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(v=>Ji(v,a,Ki())),input:d,path:[d],inst:e});continue}const g=n.valueType._zod.run({value:o[d],issues:[]},a);g instanceof Promise?u.push(g.then(v=>{v.issues.length&&i.issues.push(...jl(d,v.issues)),i.value[p.value]=v.value})):(g.issues.length&&i.issues.push(...jl(d,g.issues)),i.value[p.value]=g.value)}}return u.length?Promise.all(u).then(()=>i):i}}),FN=J("$ZodEnum",(e,n)=>{St.init(e,n);const i=R1(n.entries),a=new Set(i);e._zod.values=a,e._zod.pattern=new RegExp(`^(${i.filter(o=>nA.has(typeof o)).map(o=>typeof o=="string"?Uc(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const c=o.value;return a.has(c)||o.issues.push({code:"invalid_value",values:i,input:c,inst:e}),o}}),$N=J("$ZodTransform",(e,n)=>{St.init(e,n),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new j1(e.constructor.name);const o=n.transform(i.value,i);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(i.value=c,i));if(o instanceof Promise)throw new Rl;return i.value=o,i}});function Kb(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const X1=J("$ZodOptional",(e,n)=>{St.init(e,n),e._zod.optin="optional",e._zod.optout="optional",tt(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),tt(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${qm(i.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(i,a);return o instanceof Promise?o.then(u=>Kb(u,i.value)):Kb(o,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,a)}}),VN=J("$ZodExactOptional",(e,n)=>{X1.init(e,n),tt(e._zod,"values",()=>n.innerType._zod.values),tt(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,a)=>n.innerType._zod.run(i,a)}),QN=J("$ZodNullable",(e,n)=>{St.init(e,n),tt(e._zod,"optin",()=>n.innerType._zod.optin),tt(e._zod,"optout",()=>n.innerType._zod.optout),tt(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${qm(i.source)}|null)$`):void 0}),tt(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:n.innerType._zod.run(i,a)}),YN=J("$ZodDefault",(e,n)=>{St.init(e,n),e._zod.optin="optional",tt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return n.innerType._zod.run(i,a);if(i.value===void 0)return i.value=n.defaultValue,i;const o=n.innerType._zod.run(i,a);return o instanceof Promise?o.then(u=>Jb(u,n)):Jb(o,n)}});function Jb(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const GN=J("$ZodPrefault",(e,n)=>{St.init(e,n),e._zod.optin="optional",tt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,a)=>(a.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,a))}),XN=J("$ZodNonOptional",(e,n)=>{St.init(e,n),tt(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(a=>a!==void 0)):void 0}),e._zod.parse=(i,a)=>{const o=n.innerType._zod.run(i,a);return o instanceof Promise?o.then(u=>Wb(u,e)):Wb(o,e)}});function Wb(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const KN=J("$ZodCatch",(e,n)=>{St.init(e,n),tt(e._zod,"optin",()=>n.innerType._zod.optin),tt(e._zod,"optout",()=>n.innerType._zod.optout),tt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return n.innerType._zod.run(i,a);const o=n.innerType._zod.run(i,a);return o instanceof Promise?o.then(u=>(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(c=>Ji(c,a,Ki()))},input:i.value}),i.issues=[]),i)):(i.value=o.value,o.issues.length&&(i.value=n.catchValue({...i,error:{issues:o.issues.map(u=>Ji(u,a,Ki()))},input:i.value}),i.issues=[]),i)}}),JN=J("$ZodPipe",(e,n)=>{St.init(e,n),tt(e._zod,"values",()=>n.in._zod.values),tt(e._zod,"optin",()=>n.in._zod.optin),tt(e._zod,"optout",()=>n.out._zod.optout),tt(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){const u=n.out._zod.run(i,a);return u instanceof Promise?u.then(c=>nc(c,n.in,a)):nc(u,n.in,a)}const o=n.in._zod.run(i,a);return o instanceof Promise?o.then(u=>nc(u,n.out,a)):nc(o,n.out,a)}});function nc(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const WN=J("$ZodReadonly",(e,n)=>{St.init(e,n),tt(e._zod,"propValues",()=>n.innerType._zod.propValues),tt(e._zod,"values",()=>n.innerType._zod.values),tt(e._zod,"optin",()=>{var i,a;return(a=(i=n.innerType)==null?void 0:i._zod)==null?void 0:a.optin}),tt(e._zod,"optout",()=>{var i,a;return(a=(i=n.innerType)==null?void 0:i._zod)==null?void 0:a.optout}),e._zod.parse=(i,a)=>{if(a.direction==="backward")return n.innerType._zod.run(i,a);const o=n.innerType._zod.run(i,a);return o instanceof Promise?o.then(ex):ex(o)}});function ex(e){return e.value=Object.freeze(e.value),e}const ez=J("$ZodCustom",(e,n)=>{xn.init(e,n),St.init(e,n),e._zod.parse=(i,a)=>i,e._zod.check=i=>{const a=i.value,o=n.fn(a);if(o instanceof Promise)return o.then(u=>tx(u,i,a,e));tx(o,i,a,e)}});function tx(e,n,i,a){if(!e){const o={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(o.params=a._zod.def.params),n.issues.push(vs(o))}}var nx;class tz{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const a=i[0];return this._map.set(n,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const a={...this.get(i)??{}};delete a.id;const o={...a,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function nz(){return new tz}(nx=globalThis).__zod_globalRegistry??(nx.__zod_globalRegistry=nz());const us=globalThis.__zod_globalRegistry;function rz(e,n){return new e({type:"string",...Se(n)})}function iz(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Se(n)})}function rx(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Se(n)})}function az(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Se(n)})}function lz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Se(n)})}function oz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Se(n)})}function sz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Se(n)})}function uz(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Se(n)})}function cz(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Se(n)})}function fz(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Se(n)})}function dz(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Se(n)})}function hz(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Se(n)})}function mz(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Se(n)})}function pz(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Se(n)})}function gz(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Se(n)})}function yz(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Se(n)})}function vz(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Se(n)})}function bz(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Se(n)})}function xz(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Se(n)})}function Sz(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Se(n)})}function wz(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Se(n)})}function Ez(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Se(n)})}function _z(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Se(n)})}function Cz(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Se(n)})}function kz(e,n){return new e({type:"string",format:"date",check:"string_format",...Se(n)})}function Tz(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...Se(n)})}function Az(e,n){return new e({type:"string",format:"duration",check:"string_format",...Se(n)})}function Nz(e,n){return new e({type:"number",checks:[],...Se(n)})}function zz(e,n){return new e({type:"number",coerce:!0,checks:[],...Se(n)})}function jz(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Se(n)})}function Oz(e,n){return new e({type:"boolean",...Se(n)})}function Rz(e){return new e({type:"unknown"})}function Dz(e,n){return new e({type:"never",...Se(n)})}function ix(e,n){return new F1({check:"less_than",...Se(n),value:e,inclusive:!1})}function yh(e,n){return new F1({check:"less_than",...Se(n),value:e,inclusive:!0})}function ax(e,n){return new $1({check:"greater_than",...Se(n),value:e,inclusive:!1})}function vh(e,n){return new $1({check:"greater_than",...Se(n),value:e,inclusive:!0})}function lx(e,n){return new GA({check:"multiple_of",...Se(n),value:e})}function K1(e,n){return new KA({check:"max_length",...Se(n),maximum:e})}function kc(e,n){return new JA({check:"min_length",...Se(n),minimum:e})}function J1(e,n){return new WA({check:"length_equals",...Se(n),length:e})}function Mz(e,n){return new eN({check:"string_format",format:"regex",...Se(n),pattern:e})}function Uz(e){return new tN({check:"string_format",format:"lowercase",...Se(e)})}function Lz(e){return new nN({check:"string_format",format:"uppercase",...Se(e)})}function Bz(e,n){return new rN({check:"string_format",format:"includes",...Se(n),includes:e})}function Iz(e,n){return new iN({check:"string_format",format:"starts_with",...Se(n),prefix:e})}function qz(e,n){return new aN({check:"string_format",format:"ends_with",...Se(n),suffix:e})}function ro(e){return new lN({check:"overwrite",tx:e})}function Hz(e){return ro(n=>n.normalize(e))}function Zz(){return ro(e=>e.trim())}function Pz(){return ro(e=>e.toLowerCase())}function Fz(){return ro(e=>e.toUpperCase())}function $z(){return ro(e=>eA(e))}function Vz(e,n,i){return new e({type:"array",element:n,...Se(i)})}function Qz(e,n,i){return new e({type:"custom",check:"custom",fn:n,...Se(i)})}function Yz(e){const n=Gz(i=>(i.addIssue=a=>{if(typeof a=="string")i.issues.push(vs(a,i.value,n._zod.def));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(vs(o))}},e(i.value,i)));return n}function Gz(e,n){const i=new xn({check:"custom",...Se(n)});return i._zod.check=e,i}function W1(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??us,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function jt(e,n,i={path:[],schemaPath:[]}){var g,v;var a;const o=e._zod.def,u=n.seen.get(e);if(u)return u.count++,i.schemaPath.includes(e)&&(u.cycle=i.path),u.schema;const c={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,c);const d=(v=(g=e._zod).toJSONSchema)==null?void 0:v.call(g);if(d)c.schema=d;else{const x={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,c.schema,x);else{const N=c.schema,_=n.processors[o.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);_(e,n,N,x)}const S=e._zod.parent;S&&(c.ref||(c.ref=S),jt(S,n,x),n.seen.get(S).isParent=!0)}const p=n.metadataRegistry.get(e);return p&&Object.assign(c.schema,p),n.io==="input"&&an(e)&&(delete c.schema.examples,delete c.schema.default),n.io==="input"&&c.schema._prefault&&((a=c.schema).default??(a.default=c.schema._prefault)),delete c.schema._prefault,n.seen.get(e).schema}function eS(e,n){var c,d,p,m;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const g of e.seen.entries()){const v=(c=e.metadataRegistry.get(g[0]))==null?void 0:c.id;if(v){const x=a.get(v);if(x&&x!==g[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(v,g[0])}}const o=g=>{var _;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const T=(_=e.external.registry.get(g[0]))==null?void 0:_.id,A=e.external.uri??(U=>U);if(T)return{ref:A(T)};const q=g[1].defId??g[1].schema.id??`schema${e.counter++}`;return g[1].defId=q,{defId:q,ref:`${A("__shared")}#/${v}/${q}`}}if(g[1]===i)return{ref:"#"};const S=`#/${v}/`,N=g[1].schema.id??`__schema${e.counter++}`;return{defId:N,ref:S+N}},u=g=>{if(g[1].schema.$ref)return;const v=g[1],{ref:x,defId:S}=o(g);v.def={...v.schema},S&&(v.defId=S);const N=v.schema;for(const _ in N)delete N[_];N.$ref=x};if(e.cycles==="throw")for(const g of e.seen.entries()){const v=g[1];if(v.cycle)throw new Error(`Cycle detected: #/${(d=v.cycle)==null?void 0:d.join("/")}/<root>
|
|
222
|
+
|
|
223
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const g of e.seen.entries()){const v=g[1];if(n===g[0]){u(g);continue}if(e.external){const S=(p=e.external.registry.get(g[0]))==null?void 0:p.id;if(n!==g[0]&&S){u(g);continue}}if((m=e.metadataRegistry.get(g[0]))==null?void 0:m.id){u(g);continue}if(v.cycle){u(g);continue}if(v.count>1&&e.reused==="ref"){u(g);continue}}}function tS(e,n){var c,d,p;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=m=>{const g=e.seen.get(m);if(g.ref===null)return;const v=g.def??g.schema,x={...v},S=g.ref;if(g.ref=null,S){a(S);const _=e.seen.get(S),T=_.schema;if(T.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(T)):Object.assign(v,T),Object.assign(v,x),m._zod.parent===S)for(const q in v)q==="$ref"||q==="allOf"||q in x||delete v[q];if(T.$ref&&_.def)for(const q in v)q==="$ref"||q==="allOf"||q in _.def&&JSON.stringify(v[q])===JSON.stringify(_.def[q])&&delete v[q]}const N=m._zod.parent;if(N&&N!==S){a(N);const _=e.seen.get(N);if(_!=null&&_.schema.$ref&&(v.$ref=_.schema.$ref,_.def))for(const T in v)T==="$ref"||T==="allOf"||T in _.def&&JSON.stringify(v[T])===JSON.stringify(_.def[T])&&delete v[T]}e.override({zodSchema:m,jsonSchema:v,path:g.path??[]})};for(const m of[...e.seen.entries()].reverse())a(m[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const m=(d=e.external.registry.get(n))==null?void 0:d.id;if(!m)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(m)}Object.assign(o,i.def??i.schema);const u=((p=e.external)==null?void 0:p.defs)??{};for(const m of e.seen.entries()){const g=m[1];g.def&&g.defId&&(u[g.defId]=g.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const m=JSON.parse(JSON.stringify(o));return Object.defineProperty(m,"~standard",{value:{...n["~standard"],jsonSchema:{input:Tc(n,"input",e.processors),output:Tc(n,"output",e.processors)}},enumerable:!1,writable:!1}),m}catch{throw new Error("Error converting schema to JSON.")}}function an(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return an(a.element,i);if(a.type==="set")return an(a.valueType,i);if(a.type==="lazy")return an(a.getter(),i);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return an(a.innerType,i);if(a.type==="intersection")return an(a.left,i)||an(a.right,i);if(a.type==="record"||a.type==="map")return an(a.keyType,i)||an(a.valueType,i);if(a.type==="pipe")return an(a.in,i)||an(a.out,i);if(a.type==="object"){for(const o in a.shape)if(an(a.shape[o],i))return!0;return!1}if(a.type==="union"){for(const o of a.options)if(an(o,i))return!0;return!1}if(a.type==="tuple"){for(const o of a.items)if(an(o,i))return!0;return!!(a.rest&&an(a.rest,i))}return!1}const Xz=(e,n={})=>i=>{const a=W1({...i,processors:n});return jt(e,a),eS(a,e),tS(a,e)},Tc=(e,n,i={})=>a=>{const{libraryOptions:o,target:u}=a??{},c=W1({...o??{},target:u,io:n,processors:i});return jt(e,c),eS(c,e),tS(c,e)},Kz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jz=(e,n,i,a)=>{const o=i;o.type="string";const{minimum:u,maximum:c,format:d,patterns:p,contentEncoding:m}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof c=="number"&&(o.maxLength=c),d&&(o.format=Kz[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),m&&(o.contentEncoding=m),p&&p.size>0){const g=[...p];g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},Wz=(e,n,i,a)=>{const o=i,{minimum:u,maximum:c,format:d,multipleOf:p,exclusiveMaximum:m,exclusiveMinimum:g}=e._zod.bag;typeof d=="string"&&d.includes("int")?o.type="integer":o.type="number",typeof g=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=g,o.exclusiveMinimum=!0):o.exclusiveMinimum=g),typeof u=="number"&&(o.minimum=u,typeof g=="number"&&n.target!=="draft-04"&&(g>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof m=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m),typeof c=="number"&&(o.maximum=c,typeof m=="number"&&n.target!=="draft-04"&&(m<=c?delete o.maximum:delete o.exclusiveMaximum)),typeof p=="number"&&(o.multipleOf=p)},ej=(e,n,i,a)=>{i.type="boolean"},tj=(e,n,i,a)=>{i.not={}},nj=(e,n,i,a)=>{},rj=(e,n,i,a)=>{const o=e._zod.def,u=R1(o.entries);u.every(c=>typeof c=="number")&&(i.type="number"),u.every(c=>typeof c=="string")&&(i.type="string"),i.enum=u},ij=(e,n,i,a)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},aj=(e,n,i,a)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},lj=(e,n,i,a)=>{const o=i,u=e._zod.def,{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(o.minItems=c),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=jt(u.element,n,{...a,path:[...a.path,"items"]})},oj=(e,n,i,a)=>{var m;const o=i,u=e._zod.def;o.type="object",o.properties={};const c=u.shape;for(const g in c)o.properties[g]=jt(c[g],n,{...a,path:[...a.path,"properties",g]});const d=new Set(Object.keys(c)),p=new Set([...d].filter(g=>{const v=u.shape[g]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));p.size>0&&(o.required=Array.from(p)),((m=u.catchall)==null?void 0:m._zod.def.type)==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=jt(u.catchall,n,{...a,path:[...a.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},sj=(e,n,i,a)=>{const o=e._zod.def,u=o.inclusive===!1,c=o.options.map((d,p)=>jt(d,n,{...a,path:[...a.path,u?"oneOf":"anyOf",p]}));u?i.oneOf=c:i.anyOf=c},uj=(e,n,i,a)=>{const o=e._zod.def,u=jt(o.left,n,{...a,path:[...a.path,"allOf",0]}),c=jt(o.right,n,{...a,path:[...a.path,"allOf",1]}),d=m=>"allOf"in m&&Object.keys(m).length===1,p=[...d(u)?u.allOf:[u],...d(c)?c.allOf:[c]];i.allOf=p},cj=(e,n,i,a)=>{const o=i,u=e._zod.def;o.type="object";const c=u.keyType,d=c._zod.bag,p=d==null?void 0:d.patterns;if(u.mode==="loose"&&p&&p.size>0){const g=jt(u.valueType,n,{...a,path:[...a.path,"patternProperties","*"]});o.patternProperties={};for(const v of p)o.patternProperties[v.source]=g}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=jt(u.keyType,n,{...a,path:[...a.path,"propertyNames"]})),o.additionalProperties=jt(u.valueType,n,{...a,path:[...a.path,"additionalProperties"]});const m=c._zod.values;if(m){const g=[...m].filter(v=>typeof v=="string"||typeof v=="number");g.length>0&&(o.required=g)}},fj=(e,n,i,a)=>{const o=e._zod.def,u=jt(o.innerType,n,a),c=n.seen.get(e);n.target==="openapi-3.0"?(c.ref=o.innerType,i.nullable=!0):i.anyOf=[u,{type:"null"}]},dj=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType},hj=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType,i.default=JSON.parse(JSON.stringify(o.defaultValue))},mj=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},pj=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType;let c;try{c=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=c},gj=(e,n,i,a)=>{const o=e._zod.def,u=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;jt(u,n,a);const c=n.seen.get(e);c.ref=u},yj=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType,i.readOnly=!0},nS=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType},vj=J("ZodISODateTime",(e,n)=>{xN.init(e,n),gt.init(e,n)});function bj(e){return Cz(vj,e)}const xj=J("ZodISODate",(e,n)=>{SN.init(e,n),gt.init(e,n)});function Sj(e){return kz(xj,e)}const wj=J("ZodISOTime",(e,n)=>{wN.init(e,n),gt.init(e,n)});function Ej(e){return Tz(wj,e)}const _j=J("ZodISODuration",(e,n)=>{EN.init(e,n),gt.init(e,n)});function Cj(e){return Az(_j,e)}const kj=(e,n)=>{L1.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>hA(e,i)},flatten:{value:i=>dA(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,im,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,im,2)}},isEmpty:{get(){return e.issues.length===0}}})},tr=J("ZodError",kj,{Parent:Error}),Tj=Zm(tr),Aj=Pm(tr),Nj=Lc(tr),zj=Bc(tr),jj=gA(tr),Oj=yA(tr),Rj=vA(tr),Dj=bA(tr),Mj=xA(tr),Uj=SA(tr),Lj=wA(tr),Bj=EA(tr),wt=J("ZodType",(e,n)=>(St.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Tc(e,"input"),output:Tc(e,"output")}}),e.toJSONSchema=Xz(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(ea(n,{checks:[...n.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(i,a)=>ta(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.parse=(i,a)=>Tj(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>Nj(e,i,a),e.parseAsync=async(i,a)=>Aj(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>zj(e,i,a),e.spa=e.safeParseAsync,e.encode=(i,a)=>jj(e,i,a),e.decode=(i,a)=>Oj(e,i,a),e.encodeAsync=async(i,a)=>Rj(e,i,a),e.decodeAsync=async(i,a)=>Dj(e,i,a),e.safeEncode=(i,a)=>Mj(e,i,a),e.safeDecode=(i,a)=>Uj(e,i,a),e.safeEncodeAsync=async(i,a)=>Lj(e,i,a),e.safeDecodeAsync=async(i,a)=>Bj(e,i,a),e.refine=(i,a)=>e.check(jO(i,a)),e.superRefine=i=>e.check(OO(i)),e.overwrite=i=>e.check(ro(i)),e.optional=()=>ux(e),e.exactOptional=()=>vO(e),e.nullable=()=>cx(e),e.nullish=()=>ux(cx(e)),e.nonoptional=i=>_O(e,i),e.array=()=>Qm(e),e.or=i=>fO([e,i]),e.and=i=>hO(e,i),e.transform=i=>fx(e,gO(i)),e.default=i=>SO(e,i),e.prefault=i=>EO(e,i),e.catch=i=>kO(e,i),e.pipe=i=>fx(e,i),e.readonly=()=>NO(e),e.describe=i=>{const a=e.clone();return us.add(a,{description:i}),a},Object.defineProperty(e,"description",{get(){var i;return(i=us.get(e))==null?void 0:i.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return us.get(e);const a=e.clone();return us.add(a,i[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),rS=J("_ZodString",(e,n)=>{Fm.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(a,o,u)=>Jz(e,a,o);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...a)=>e.check(Mz(...a)),e.includes=(...a)=>e.check(Bz(...a)),e.startsWith=(...a)=>e.check(Iz(...a)),e.endsWith=(...a)=>e.check(qz(...a)),e.min=(...a)=>e.check(kc(...a)),e.max=(...a)=>e.check(K1(...a)),e.length=(...a)=>e.check(J1(...a)),e.nonempty=(...a)=>e.check(kc(1,...a)),e.lowercase=a=>e.check(Uz(a)),e.uppercase=a=>e.check(Lz(a)),e.trim=()=>e.check(Zz()),e.normalize=(...a)=>e.check(Hz(...a)),e.toLowerCase=()=>e.check(Pz()),e.toUpperCase=()=>e.check(Fz()),e.slugify=()=>e.check($z())}),Ij=J("ZodString",(e,n)=>{Fm.init(e,n),rS.init(e,n),e.email=i=>e.check(iz(qj,i)),e.url=i=>e.check(uz(Hj,i)),e.jwt=i=>e.check(_z(nO,i)),e.emoji=i=>e.check(cz(Zj,i)),e.guid=i=>e.check(rx(ox,i)),e.uuid=i=>e.check(az(rc,i)),e.uuidv4=i=>e.check(lz(rc,i)),e.uuidv6=i=>e.check(oz(rc,i)),e.uuidv7=i=>e.check(sz(rc,i)),e.nanoid=i=>e.check(fz(Pj,i)),e.guid=i=>e.check(rx(ox,i)),e.cuid=i=>e.check(dz(Fj,i)),e.cuid2=i=>e.check(hz($j,i)),e.ulid=i=>e.check(mz(Vj,i)),e.base64=i=>e.check(Sz(Wj,i)),e.base64url=i=>e.check(wz(eO,i)),e.xid=i=>e.check(pz(Qj,i)),e.ksuid=i=>e.check(gz(Yj,i)),e.ipv4=i=>e.check(yz(Gj,i)),e.ipv6=i=>e.check(vz(Xj,i)),e.cidrv4=i=>e.check(bz(Kj,i)),e.cidrv6=i=>e.check(xz(Jj,i)),e.e164=i=>e.check(Ez(tO,i)),e.datetime=i=>e.check(bj(i)),e.date=i=>e.check(Sj(i)),e.time=i=>e.check(Ej(i)),e.duration=i=>e.check(Cj(i))});function X(e){return rz(Ij,e)}const gt=J("ZodStringFormat",(e,n)=>{pt.init(e,n),rS.init(e,n)}),qj=J("ZodEmail",(e,n)=>{fN.init(e,n),gt.init(e,n)}),ox=J("ZodGUID",(e,n)=>{uN.init(e,n),gt.init(e,n)}),rc=J("ZodUUID",(e,n)=>{cN.init(e,n),gt.init(e,n)}),Hj=J("ZodURL",(e,n)=>{dN.init(e,n),gt.init(e,n)}),Zj=J("ZodEmoji",(e,n)=>{hN.init(e,n),gt.init(e,n)}),Pj=J("ZodNanoID",(e,n)=>{mN.init(e,n),gt.init(e,n)}),Fj=J("ZodCUID",(e,n)=>{pN.init(e,n),gt.init(e,n)}),$j=J("ZodCUID2",(e,n)=>{gN.init(e,n),gt.init(e,n)}),Vj=J("ZodULID",(e,n)=>{yN.init(e,n),gt.init(e,n)}),Qj=J("ZodXID",(e,n)=>{vN.init(e,n),gt.init(e,n)}),Yj=J("ZodKSUID",(e,n)=>{bN.init(e,n),gt.init(e,n)}),Gj=J("ZodIPv4",(e,n)=>{_N.init(e,n),gt.init(e,n)}),Xj=J("ZodIPv6",(e,n)=>{CN.init(e,n),gt.init(e,n)}),Kj=J("ZodCIDRv4",(e,n)=>{kN.init(e,n),gt.init(e,n)}),Jj=J("ZodCIDRv6",(e,n)=>{TN.init(e,n),gt.init(e,n)}),Wj=J("ZodBase64",(e,n)=>{AN.init(e,n),gt.init(e,n)}),eO=J("ZodBase64URL",(e,n)=>{zN.init(e,n),gt.init(e,n)}),tO=J("ZodE164",(e,n)=>{jN.init(e,n),gt.init(e,n)}),nO=J("ZodJWT",(e,n)=>{RN.init(e,n),gt.init(e,n)}),$m=J("ZodNumber",(e,n)=>{Q1.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(a,o,u)=>Wz(e,a,o),e.gt=(a,o)=>e.check(ax(a,o)),e.gte=(a,o)=>e.check(vh(a,o)),e.min=(a,o)=>e.check(vh(a,o)),e.lt=(a,o)=>e.check(ix(a,o)),e.lte=(a,o)=>e.check(yh(a,o)),e.max=(a,o)=>e.check(yh(a,o)),e.int=a=>e.check(sx(a)),e.safe=a=>e.check(sx(a)),e.positive=a=>e.check(ax(0,a)),e.nonnegative=a=>e.check(vh(0,a)),e.negative=a=>e.check(ix(0,a)),e.nonpositive=a=>e.check(yh(0,a)),e.multipleOf=(a,o)=>e.check(lx(a,o)),e.step=(a,o)=>e.check(lx(a,o)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function bs(e){return Nz($m,e)}const rO=J("ZodNumberFormat",(e,n)=>{DN.init(e,n),$m.init(e,n)});function sx(e){return jz(rO,e)}const iO=J("ZodBoolean",(e,n)=>{MN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>ej(e,i,a)});function Vm(e){return Oz(iO,e)}const aO=J("ZodUnknown",(e,n)=>{UN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>nj()});function Zt(){return Rz(aO)}const lO=J("ZodNever",(e,n)=>{LN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>tj(e,i,a)});function oO(e){return Dz(lO,e)}const sO=J("ZodArray",(e,n)=>{BN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>lj(e,i,a,o),e.element=n.element,e.min=(i,a)=>e.check(kc(i,a)),e.nonempty=i=>e.check(kc(1,i)),e.max=(i,a)=>e.check(K1(i,a)),e.length=(i,a)=>e.check(J1(i,a)),e.unwrap=()=>e.element});function Qm(e,n){return Vz(sO,e,n)}const uO=J("ZodObject",(e,n)=>{qN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>oj(e,i,a,o),tt(e,"shape",()=>n.shape),e.keyof=()=>Ln(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Zt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Zt()}),e.strict=()=>e.clone({...e._zod.def,catchall:oO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>oA(e,i),e.safeExtend=i=>sA(e,i),e.merge=i=>uA(e,i),e.pick=i=>aA(e,i),e.omit=i=>lA(e,i),e.partial=(...i)=>cA(iS,e,i[0]),e.required=(...i)=>fA(aS,e,i[0])});function Fe(e,n){const i={type:"object",shape:e??{},...Se(n)};return new uO(i)}const cO=J("ZodUnion",(e,n)=>{HN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>sj(e,i,a,o),e.options=n.options});function fO(e,n){return new cO({type:"union",options:e,...Se(n)})}const dO=J("ZodIntersection",(e,n)=>{ZN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>uj(e,i,a,o)});function hO(e,n){return new dO({type:"intersection",left:e,right:n})}const mO=J("ZodRecord",(e,n)=>{PN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>cj(e,i,a,o),e.keyType=n.keyType,e.valueType=n.valueType});function nr(e,n,i){return new mO({type:"record",keyType:e,valueType:n,...Se(i)})}const lm=J("ZodEnum",(e,n)=>{FN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(a,o,u)=>rj(e,a,o),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(a,o)=>{const u={};for(const c of a)if(i.has(c))u[c]=n.entries[c];else throw new Error(`Key ${c} not found in enum`);return new lm({...n,checks:[],...Se(o),entries:u})},e.exclude=(a,o)=>{const u={...n.entries};for(const c of a)if(i.has(c))delete u[c];else throw new Error(`Key ${c} not found in enum`);return new lm({...n,checks:[],...Se(o),entries:u})}});function Ln(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new lm({type:"enum",entries:i,...Se(n)})}const pO=J("ZodTransform",(e,n)=>{$N.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>aj(e,i),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new j1(e.constructor.name);i.addIssue=u=>{if(typeof u=="string")i.issues.push(vs(u,i.value,n));else{const c=u;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=i.value),c.inst??(c.inst=e),i.issues.push(vs(c))}};const o=n.transform(i.value,i);return o instanceof Promise?o.then(u=>(i.value=u,i)):(i.value=o,i)}});function gO(e){return new pO({type:"transform",transform:e})}const iS=J("ZodOptional",(e,n)=>{X1.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>nS(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function ux(e){return new iS({type:"optional",innerType:e})}const yO=J("ZodExactOptional",(e,n)=>{VN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>nS(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function vO(e){return new yO({type:"optional",innerType:e})}const bO=J("ZodNullable",(e,n)=>{QN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>fj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function cx(e){return new bO({type:"nullable",innerType:e})}const xO=J("ZodDefault",(e,n)=>{YN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>hj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function SO(e,n){return new xO({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():M1(n)}})}const wO=J("ZodPrefault",(e,n)=>{GN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>mj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function EO(e,n){return new wO({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():M1(n)}})}const aS=J("ZodNonOptional",(e,n)=>{XN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>dj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function _O(e,n){return new aS({type:"nonoptional",innerType:e,...Se(n)})}const CO=J("ZodCatch",(e,n)=>{KN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>pj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kO(e,n){return new CO({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const TO=J("ZodPipe",(e,n)=>{JN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>gj(e,i,a,o),e.in=n.in,e.out=n.out});function fx(e,n){return new TO({type:"pipe",in:e,out:n})}const AO=J("ZodReadonly",(e,n)=>{WN.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>yj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function NO(e){return new AO({type:"readonly",innerType:e})}const zO=J("ZodCustom",(e,n)=>{ez.init(e,n),wt.init(e,n),e._zod.processJSONSchema=(i,a,o)=>ij(e,i)});function jO(e,n={}){return Qz(zO,e,n)}function OO(e){return Yz(e)}function lS(e){return zz($m,e)}const RO={FEISHU:"feishu",SLACK:"slack",KAEL:"kael"},oS=Ln(["feishu","slack","kael"]),sS=Ln(["active","inactive"]);Fe({platform:oS,agentId:X().min(1),credentials:nr(X(),Zt()),status:sS.default("active")});Fe({agentId:X().min(1).optional(),credentials:nr(X(),Zt()).optional(),status:sS.optional()});Fe({id:bs(),platform:X(),agentId:X(),hasCredentials:Vm(),status:X(),createdAt:X(),updatedAt:X()});const DO=Ln(["code","reverse_token","oauth","manual"]);Fe({appId:X().min(1),appSecret:X().min(1)});Fe({platform:oS,externalUserId:X().min(1),agentId:X().min(1),boundVia:DO.default("manual"),displayName:X().max(200).optional()});Fe({id:bs(),platform:X(),externalUserId:X(),agentId:X(),boundVia:X().nullable(),displayName:X().nullable(),createdAt:X()});Fe({feishuUserId:X().min(1),displayName:X().max(200).optional()});Fe({configId:bs(),platform:X(),agentId:X(),appId:X(),connected:Vm(),lastActiveAt:X().nullable()});Fe({username:X().min(1),password:X().min(1)});Fe({accessToken:X(),refreshToken:X()});Fe({refreshToken:X().min(1)});const MO={SUPER_ADMIN:"super_admin",ADMIN:"admin"},Ym=Ln(["super_admin","admin"]);Fe({id:X(),username:X(),role:Ym,createdAt:X(),lastLoginAt:X().nullable()});Fe({username:X().min(1).max(100),password:X().min(8).max(200),role:Ym.default("admin")});Fe({role:Ym.optional(),password:X().min(8).max(200).optional()});const uS=Ln(["online","offline"]);Fe({agentId:X(),status:uS,connectedAt:X().nullable(),lastSeenAt:X()});const cS={HUMAN:"human",PERSONAL_ASSISTANT:"personal_assistant",AUTONOMOUS_AGENT:"autonomous_agent"},qc=Ln(["human","personal_assistant","autonomous_agent"]);Ln(["active","suspended"]);Fe({id:X().min(1).max(100).regex(/^[a-z0-9_-]+$/,"Only lowercase alphanumeric, hyphens, and underscores").optional(),type:qc,displayName:X().max(200).optional(),delegateMention:X().max(100).optional(),profile:X().optional(),organizationId:X().max(100).optional(),metadata:nr(X(),Zt()).optional()});Fe({type:qc.optional(),displayName:X().max(200).nullable().optional(),delegateMention:X().max(100).nullable().optional(),profile:X().nullable().optional(),metadata:nr(X(),Zt()).optional()});Fe({id:X(),organizationId:X(),type:qc,displayName:X().nullable(),delegateMention:X().nullable(),profile:X().nullable(),inboxId:X(),status:X(),metadata:nr(X(),Zt()),presenceStatus:uS.optional(),createdAt:X(),updatedAt:X()});Fe({name:X().max(100).optional(),type:qc.optional(),displayName:X().max(200).optional(),delegateMention:X().max(100).optional(),profile:X().optional(),metadata:nr(X(),Zt()).optional()});Fe({exists:Vm(),status:Ln(["active","suspended"]).nullable()});Fe({repo:X().nullable(),branch:X().nullable()});Fe({name:X().max(100).optional(),expiresAt:X().datetime().optional()});const UO=Fe({id:X(),agentId:X(),name:X().nullable(),expiresAt:X().nullable(),revokedAt:X().nullable(),createdAt:X(),lastUsedAt:X().nullable()});UO.extend({token:X()});const LO=Ln(["direct","group","thread"]);Fe({type:LO,topic:X().max(500).optional(),participantIds:Qm(X()).min(1),metadata:nr(X(),Zt()).optional()});const BO=Fe({agentId:X(),role:X(),mode:X(),joinedAt:X()}),IO=Fe({id:X(),organizationId:X(),type:X(),topic:X().nullable(),lifecyclePolicy:X().nullable().optional(),metadata:nr(X(),Zt()),createdAt:X(),updatedAt:X()});IO.extend({participants:Qm(BO)});Fe({agentId:X().min(1),mode:Ln(["full","mention_only"]).default("full")});Fe({agentId:X().min(1)});Fe({limit:lS().int().min(1).max(100).default(20),cursor:X().optional()});const fS=Ln(["text","markdown","card","reference","file"]);Fe({format:fS.default("text"),content:Zt(),metadata:nr(X(),Zt()).optional(),inReplyTo:X().optional(),replyToInbox:X().optional(),replyToChat:X().optional()});Fe({format:fS.default("text"),content:Zt(),metadata:nr(X(),Zt()).optional(),replyToInbox:X().optional(),replyToChat:X().optional()});const qO=Fe({id:X(),chatId:X(),senderId:X(),format:X(),content:Zt(),metadata:nr(X(),Zt()),replyToInbox:X().nullable(),replyToChat:X().nullable(),inReplyTo:X().nullable(),createdAt:X()});Ln(["pending","delivered","acked","failed"]);const HO=Fe({id:bs(),inboxId:X(),messageId:X(),chatId:X().nullable(),status:X(),retryCount:bs(),createdAt:X(),deliveredAt:X().nullable(),ackedAt:X().nullable()});HO.extend({message:qO});Fe({limit:lS().int().min(1).max(50).default(10)});Fe({key:X(),value:Zt(),updatedAt:X()});nr(X(),Zt());const ei={INBOX_TIMEOUT_SECONDS:"inbox_timeout_seconds",MAX_RETRY_COUNT:"max_retry_count",POLLING_INTERVAL_SECONDS:"polling_interval_seconds",PRESENCE_CLEANUP_SECONDS:"presence_cleanup_seconds"},bh={[ei.INBOX_TIMEOUT_SECONDS]:300,[ei.MAX_RETRY_COUNT]:3,[ei.POLLING_INTERVAL_SECONDS]:5,[ei.PRESENCE_CLEANUP_SECONDS]:60};function ZO(){return nt.get("/admin/users")}function PO(e){return nt.post("/admin/users",e)}function FO(e,n){return nt.patch(`/admin/users/${encodeURIComponent(e)}`,n)}function $O(e){return nt.delete(`/admin/users/${encodeURIComponent(e)}`)}const dx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hx=g1,dS=(e,n)=>i=>{var a;if((n==null?void 0:n.variants)==null)return hx(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:o,defaultVariants:u}=n,c=Object.keys(o).map(m=>{const g=i==null?void 0:i[m],v=u==null?void 0:u[m];if(g===null)return null;const x=dx(g)||dx(v);return o[m][x]}),d=i&&Object.entries(i).reduce((m,g)=>{let[v,x]=g;return x===void 0||(m[v]=x),m},{}),p=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((m,g)=>{let{class:v,className:x,...S}=g;return Object.entries(S).every(N=>{let[_,T]=N;return Array.isArray(T)?T.includes({...u,...d}[_]):{...u,...d}[_]===T})?[...m,v,x]:m},[]);return hx(e,c,p,i==null?void 0:i.class,i==null?void 0:i.className)},VO=dS("inline-flex items-center rounded-md 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 shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive/10 text-destructive",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Mt({className:e,variant:n,...i}){return y.jsx("div",{className:st(VO({variant:n}),e),...i})}function mx(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Gm(...e){return n=>{let i=!1;const a=e.map(o=>{const u=mx(o,n);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let o=0;o<a.length;o++){const u=a[o];typeof u=="function"?u():mx(e[o],null)}}}}function Ua(...e){return w.useCallback(Gm(...e),e)}var QO=Symbol.for("react.lazy"),Ac=Sm[" use ".trim().toString()];function YO(e){return typeof e=="object"&&e!==null&&"then"in e}function hS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QO&&"_payload"in e&&YO(e._payload)}function mS(e){const n=XO(e),i=w.forwardRef((a,o)=>{let{children:u,...c}=a;hS(u)&&typeof Ac=="function"&&(u=Ac(u._payload));const d=w.Children.toArray(u),p=d.find(JO);if(p){const m=p.props.children,g=d.map(v=>v===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:v);return y.jsx(n,{...c,ref:o,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return y.jsx(n,{...c,ref:o,children:u})});return i.displayName=`${e}.Slot`,i}var GO=mS("Slot");function XO(e){const n=w.forwardRef((i,a)=>{let{children:o,...u}=i;if(hS(o)&&typeof Ac=="function"&&(o=Ac(o._payload)),w.isValidElement(o)){const c=eR(o),d=WO(u,o.props);return o.type!==w.Fragment&&(d.ref=a?Gm(a,c):c),w.cloneElement(o,d)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var KO=Symbol("radix.slottable");function JO(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KO}function WO(e,n){const i={...n};for(const a in n){const o=e[a],u=n[a];/^on[A-Z]/.test(a)?o&&u?i[a]=(...d)=>{const p=u(...d);return o(...d),p}:o&&(i[a]=o):a==="style"?i[a]={...o,...u}:a==="className"&&(i[a]=[o,u].filter(Boolean).join(" "))}return{...e,...i}}function eR(e){var a,o;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}const tR=dS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-white shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),$e=w.forwardRef(({className:e,variant:n,size:i,asChild:a=!1,...o},u)=>{const c=a?GO:"button";return y.jsx(c,{className:st(tR({variant:n,size:i,className:e})),ref:u,...o})});$e.displayName="Button";function Xi(e,n,{checkForDefaultPrevented:i=!0}={}){return function(o){if(e==null||e(o),i===!1||!o.defaultPrevented)return n==null?void 0:n(o)}}function nR(e,n){const i=w.createContext(n),a=u=>{const{children:c,...d}=u,p=w.useMemo(()=>d,Object.values(d));return y.jsx(i.Provider,{value:p,children:c})};a.displayName=e+"Provider";function o(u){const c=w.useContext(i);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${u}\` must be used within \`${e}\``)}return[a,o]}function rR(e,n=[]){let i=[];function a(u,c){const d=w.createContext(c),p=i.length;i=[...i,c];const m=v=>{var A;const{scope:x,children:S,...N}=v,_=((A=x==null?void 0:x[e])==null?void 0:A[p])||d,T=w.useMemo(()=>N,Object.values(N));return y.jsx(_.Provider,{value:T,children:S})};m.displayName=u+"Provider";function g(v,x){var _;const S=((_=x==null?void 0:x[e])==null?void 0:_[p])||d,N=w.useContext(S);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[m,g]}const o=()=>{const u=i.map(c=>w.createContext(c));return function(d){const p=(d==null?void 0:d[e])||u;return w.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return o.scopeName=e,[a,iR(o,...n)]}function iR(...e){const n=e[0];if(e.length===1)return n;const i=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const c=a.reduce((d,{useScope:p,scopeName:m})=>{const v=p(u)[`__scope${m}`];return{...d,...v}},{});return w.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return i.scopeName=n.scopeName,i}var xs=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},aR=Sm[" useId ".trim().toString()]||(()=>{}),lR=0;function xh(e){const[n,i]=w.useState(aR());return xs(()=>{i(a=>a??String(lR++))},[e]),e||(n?`radix-${n}`:"")}var oR=Sm[" useInsertionEffect ".trim().toString()]||xs;function sR({prop:e,defaultProp:n,onChange:i=()=>{},caller:a}){const[o,u,c]=uR({defaultProp:n,onChange:i}),d=e!==void 0,p=d?e:o;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const v=g.current;v!==d&&console.warn(`${a} is changing from ${v?"controlled":"uncontrolled"} to ${d?"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=d},[d,a])}const m=w.useCallback(g=>{var v;if(d){const x=cR(g)?g(e):g;x!==e&&((v=c.current)==null||v.call(c,x))}else u(g)},[d,e,u,c]);return[p,m]}function uR({defaultProp:e,onChange:n}){const[i,a]=w.useState(e),o=w.useRef(i),u=w.useRef(n);return oR(()=>{u.current=n},[n]),w.useEffect(()=>{var c;o.current!==i&&((c=u.current)==null||c.call(u,i),o.current=i)},[i,o]),[i,a,u]}function cR(e){return typeof e=="function"}var pS=k0();const fR=Oc(pS);function gS(e){const n=dR(e),i=w.forwardRef((a,o)=>{const{children:u,...c}=a,d=w.Children.toArray(u),p=d.find(mR);if(p){const m=p.props.children,g=d.map(v=>v===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:v);return y.jsx(n,{...c,ref:o,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return y.jsx(n,{...c,ref:o,children:u})});return i.displayName=`${e}.Slot`,i}function dR(e){const n=w.forwardRef((i,a)=>{const{children:o,...u}=i;if(w.isValidElement(o)){const c=gR(o),d=pR(u,o.props);return o.type!==w.Fragment&&(d.ref=a?Gm(a,c):c),w.cloneElement(o,d)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var hR=Symbol("radix.slottable");function mR(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hR}function pR(e,n){const i={...n};for(const a in n){const o=e[a],u=n[a];/^on[A-Z]/.test(a)?o&&u?i[a]=(...d)=>{const p=u(...d);return o(...d),p}:o&&(i[a]=o):a==="style"?i[a]={...o,...u}:a==="className"&&(i[a]=[o,u].filter(Boolean).join(" "))}return{...e,...i}}function gR(e){var a,o;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var yR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oi=yR.reduce((e,n)=>{const i=gS(`Primitive.${n}`),a=w.forwardRef((o,u)=>{const{asChild:c,...d}=o,p=c?i:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(p,{...d,ref:u})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function vR(e,n){e&&pS.flushSync(()=>e.dispatchEvent(n))}function Ss(e){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useMemo(()=>(...i)=>{var a;return(a=n.current)==null?void 0:a.call(n,...i)},[])}function bR(e,n=globalThis==null?void 0:globalThis.document){const i=Ss(e);w.useEffect(()=>{const a=o=>{o.key==="Escape"&&i(o)};return n.addEventListener("keydown",a,{capture:!0}),()=>n.removeEventListener("keydown",a,{capture:!0})},[i,n])}var xR="DismissableLayer",om="dismissableLayer.update",SR="dismissableLayer.pointerDownOutside",wR="dismissableLayer.focusOutside",px,yS=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vS=w.forwardRef((e,n)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...p}=e,m=w.useContext(yS),[g,v]=w.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=w.useState({}),N=Ua(n,Y=>v(Y)),_=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=_.indexOf(T),q=g?_.indexOf(g):-1,U=m.layersWithOutsidePointerEventsDisabled.size>0,P=q>=A,L=CR(Y=>{const $=Y.target,re=[...m.branches].some(de=>de.contains($));!P||re||(o==null||o(Y),c==null||c(Y),Y.defaultPrevented||d==null||d())},x),j=kR(Y=>{const $=Y.target;[...m.branches].some(de=>de.contains($))||(u==null||u(Y),c==null||c(Y),Y.defaultPrevented||d==null||d())},x);return bR(Y=>{q===m.layers.size-1&&(a==null||a(Y),!Y.defaultPrevented&&d&&(Y.preventDefault(),d()))},x),w.useEffect(()=>{if(g)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(px=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),gx(),()=>{i&&m.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=px)}},[g,x,i,m]),w.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),gx())},[g,m]),w.useEffect(()=>{const Y=()=>S({});return document.addEventListener(om,Y),()=>document.removeEventListener(om,Y)},[]),y.jsx(oi.div,{...p,ref:N,style:{pointerEvents:U?P?"auto":"none":void 0,...e.style},onFocusCapture:Xi(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Xi(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Xi(e.onPointerDownCapture,L.onPointerDownCapture)})});vS.displayName=xR;var ER="DismissableLayerBranch",_R=w.forwardRef((e,n)=>{const i=w.useContext(yS),a=w.useRef(null),o=Ua(n,a);return w.useEffect(()=>{const u=a.current;if(u)return i.branches.add(u),()=>{i.branches.delete(u)}},[i.branches]),y.jsx(oi.div,{...e,ref:o})});_R.displayName=ER;function CR(e,n=globalThis==null?void 0:globalThis.document){const i=Ss(e),a=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const u=d=>{if(d.target&&!a.current){let p=function(){bS(SR,i,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=p,n.addEventListener("click",o.current,{once:!0})):p()}else n.removeEventListener("click",o.current);a.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",u),n.removeEventListener("click",o.current)}},[n,i]),{onPointerDownCapture:()=>a.current=!0}}function kR(e,n=globalThis==null?void 0:globalThis.document){const i=Ss(e),a=w.useRef(!1);return w.useEffect(()=>{const o=u=>{u.target&&!a.current&&bS(wR,i,{originalEvent:u},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,i]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function gx(){const e=new CustomEvent(om);document.dispatchEvent(e)}function bS(e,n,i,{discrete:a}){const o=i.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});n&&o.addEventListener(e,n,{once:!0}),a?vR(o,u):o.dispatchEvent(u)}var Sh="focusScope.autoFocusOnMount",wh="focusScope.autoFocusOnUnmount",yx={bubbles:!1,cancelable:!0},TR="FocusScope",xS=w.forwardRef((e,n)=>{const{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...c}=e,[d,p]=w.useState(null),m=Ss(o),g=Ss(u),v=w.useRef(null),x=Ua(n,_=>p(_)),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(a){let _=function(U){if(S.paused||!d)return;const P=U.target;d.contains(P)?v.current=P:Ii(v.current,{select:!0})},T=function(U){if(S.paused||!d)return;const P=U.relatedTarget;P!==null&&(d.contains(P)||Ii(v.current,{select:!0}))},A=function(U){if(document.activeElement===document.body)for(const L of U)L.removedNodes.length>0&&Ii(d)};document.addEventListener("focusin",_),document.addEventListener("focusout",T);const q=new MutationObserver(A);return d&&q.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",T),q.disconnect()}}},[a,d,S.paused]),w.useEffect(()=>{if(d){bx.add(S);const _=document.activeElement;if(!d.contains(_)){const A=new CustomEvent(Sh,yx);d.addEventListener(Sh,m),d.dispatchEvent(A),A.defaultPrevented||(AR(RR(SS(d)),{select:!0}),document.activeElement===_&&Ii(d))}return()=>{d.removeEventListener(Sh,m),setTimeout(()=>{const A=new CustomEvent(wh,yx);d.addEventListener(wh,g),d.dispatchEvent(A),A.defaultPrevented||Ii(_??document.body,{select:!0}),d.removeEventListener(wh,g),bx.remove(S)},0)}}},[d,m,g,S]);const N=w.useCallback(_=>{if(!i&&!a||S.paused)return;const T=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,A=document.activeElement;if(T&&A){const q=_.currentTarget,[U,P]=NR(q);U&&P?!_.shiftKey&&A===P?(_.preventDefault(),i&&Ii(U,{select:!0})):_.shiftKey&&A===U&&(_.preventDefault(),i&&Ii(P,{select:!0})):A===q&&_.preventDefault()}},[i,a,S.paused]);return y.jsx(oi.div,{tabIndex:-1,...c,ref:x,onKeyDown:N})});xS.displayName=TR;function AR(e,{select:n=!1}={}){const i=document.activeElement;for(const a of e)if(Ii(a,{select:n}),document.activeElement!==i)return}function NR(e){const n=SS(e),i=vx(n,e),a=vx(n.reverse(),e);return[i,a]}function SS(e){const n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)n.push(i.currentNode);return n}function vx(e,n){for(const i of e)if(!zR(i,{upTo:n}))return i}function zR(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function jR(e){return e instanceof HTMLInputElement&&"select"in e}function Ii(e,{select:n=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&jR(e)&&n&&e.select()}}var bx=OR();function OR(){let e=[];return{add(n){const i=e[0];n!==i&&(i==null||i.pause()),e=xx(e,n),e.unshift(n)},remove(n){var i;e=xx(e,n),(i=e[0])==null||i.resume()}}}function xx(e,n){const i=[...e],a=i.indexOf(n);return a!==-1&&i.splice(a,1),i}function RR(e){return e.filter(n=>n.tagName!=="A")}var DR="Portal",wS=w.forwardRef((e,n)=>{var d;const{container:i,...a}=e,[o,u]=w.useState(!1);xs(()=>u(!0),[]);const c=i||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?fR.createPortal(y.jsx(oi.div,{...a,ref:n}),c):null});wS.displayName=DR;function MR(e,n){return w.useReducer((i,a)=>n[i][a]??i,e)}var Hc=e=>{const{present:n,children:i}=e,a=UR(n),o=typeof i=="function"?i({present:a.isPresent}):w.Children.only(i),u=Ua(a.ref,LR(o));return typeof i=="function"||a.isPresent?w.cloneElement(o,{ref:u}):null};Hc.displayName="Presence";function UR(e){const[n,i]=w.useState(),a=w.useRef(null),o=w.useRef(e),u=w.useRef("none"),c=e?"mounted":"unmounted",[d,p]=MR(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=ic(a.current);u.current=d==="mounted"?m:"none"},[d]),xs(()=>{const m=a.current,g=o.current;if(g!==e){const x=u.current,S=ic(m);e?p("MOUNT"):S==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(g&&x!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,p]),xs(()=>{if(n){let m;const g=n.ownerDocument.defaultView??window,v=S=>{const _=ic(a.current).includes(CSS.escape(S.animationName));if(S.target===n&&_&&(p("ANIMATION_END"),!o.current)){const T=n.style.animationFillMode;n.style.animationFillMode="forwards",m=g.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=T)})}},x=S=>{S.target===n&&(u.current=ic(a.current))};return n.addEventListener("animationstart",x),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{g.clearTimeout(m),n.removeEventListener("animationstart",x),n.removeEventListener("animationcancel",v),n.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:w.useCallback(m=>{a.current=m?getComputedStyle(m):null,i(m)},[])}}function ic(e){return(e==null?void 0:e.animationName)||"none"}function LR(e){var a,o;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Eh=0;function BR(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sx()),document.body.insertAdjacentElement("beforeend",e[1]??Sx()),Eh++,()=>{Eh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Eh--}},[])}function Sx(){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 wr=function(){return wr=Object.assign||function(n){for(var i,a=1,o=arguments.length;a<o;a++){i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},wr.apply(this,arguments)};function ES(e,n){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)n.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(i[a[o]]=e[a[o]]);return i}function IR(e,n,i){if(i||arguments.length===2)for(var a=0,o=n.length,u;a<o;a++)(u||!(a in n))&&(u||(u=Array.prototype.slice.call(n,0,a)),u[a]=n[a]);return e.concat(u||Array.prototype.slice.call(n))}var gc="right-scroll-bar-position",yc="width-before-scroll-bar",qR="with-scroll-bars-hidden",HR="--removed-body-scroll-bar-size";function _h(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function ZR(e,n){var i=w.useState(function(){return{value:e,callback:n,facade:{get current(){return i.value},set current(a){var o=i.value;o!==a&&(i.value=a,i.callback(a,o))}}}})[0];return i.callback=n,i.facade}var PR=typeof window<"u"?w.useLayoutEffect:w.useEffect,wx=new WeakMap;function FR(e,n){var i=ZR(null,function(a){return e.forEach(function(o){return _h(o,a)})});return PR(function(){var a=wx.get(i);if(a){var o=new Set(a),u=new Set(e),c=i.current;o.forEach(function(d){u.has(d)||_h(d,null)}),u.forEach(function(d){o.has(d)||_h(d,c)})}wx.set(i,e)},[e]),i}function $R(e){return e}function VR(e,n){n===void 0&&(n=$R);var i=[],a=!1,o={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(u){var c=n(u,a);return i.push(c),function(){i=i.filter(function(d){return d!==c})}},assignSyncMedium:function(u){for(a=!0;i.length;){var c=i;i=[],c.forEach(u)}i={push:function(d){return u(d)},filter:function(){return i}}},assignMedium:function(u){a=!0;var c=[];if(i.length){var d=i;i=[],d.forEach(u),c=i}var p=function(){var g=c;c=[],g.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),i={push:function(g){c.push(g),m()},filter:function(g){return c=c.filter(g),i}}}};return o}function QR(e){e===void 0&&(e={});var n=VR(null);return n.options=wr({async:!0,ssr:!1},e),n}var _S=function(e){var n=e.sideCar,i=ES(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=n.read();if(!a)throw new Error("Sidecar medium not found");return w.createElement(a,wr({},i))};_S.isSideCarExport=!0;function YR(e,n){return e.useMedium(n),_S}var CS=QR(),Ch=function(){},Zc=w.forwardRef(function(e,n){var i=w.useRef(null),a=w.useState({onScrollCapture:Ch,onWheelCapture:Ch,onTouchMoveCapture:Ch}),o=a[0],u=a[1],c=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,g=e.enabled,v=e.shards,x=e.sideCar,S=e.noRelative,N=e.noIsolation,_=e.inert,T=e.allowPinchZoom,A=e.as,q=A===void 0?"div":A,U=e.gapMode,P=ES(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=x,j=FR([i,n]),Y=wr(wr({},P),o);return w.createElement(w.Fragment,null,g&&w.createElement(L,{sideCar:CS,removeScrollBar:m,shards:v,noRelative:S,noIsolation:N,inert:_,setCallbacks:u,allowPinchZoom:!!T,lockRef:i,gapMode:U}),c?w.cloneElement(w.Children.only(d),wr(wr({},Y),{ref:j})):w.createElement(q,wr({},Y,{className:p,ref:j}),d))});Zc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zc.classNames={fullWidth:yc,zeroRight:gc};var GR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=GR();return n&&e.setAttribute("nonce",n),e}function KR(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function JR(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var WR=function(){var e=0,n=null;return{add:function(i){e==0&&(n=XR())&&(KR(n,i),JR(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},eD=function(){var e=WR();return function(n,i){w.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&i])}},kS=function(){var e=eD(),n=function(i){var a=i.styles,o=i.dynamic;return e(a,o),null};return n},tD={left:0,top:0,right:0,gap:0},kh=function(e){return parseInt(e||"",10)||0},nD=function(e){var n=window.getComputedStyle(document.body),i=n[e==="padding"?"paddingLeft":"marginLeft"],a=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[kh(i),kh(a),kh(o)]},rD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tD;var n=nD(e),i=document.documentElement.clientWidth,a=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,a-i+n[2]-n[0])}},iD=kS(),Dl="data-scroll-locked",aD=function(e,n,i,a){var o=e.left,u=e.top,c=e.right,d=e.gap;return i===void 0&&(i="margin"),`
|
|
224
|
+
.`.concat(qR,` {
|
|
225
|
+
overflow: hidden `).concat(a,`;
|
|
226
|
+
padding-right: `).concat(d,"px ").concat(a,`;
|
|
227
|
+
}
|
|
228
|
+
body[`).concat(Dl,`] {
|
|
229
|
+
overflow: hidden `).concat(a,`;
|
|
230
|
+
overscroll-behavior: contain;
|
|
231
|
+
`).concat([n&&"position: relative ".concat(a,";"),i==="margin"&&`
|
|
232
|
+
padding-left: `.concat(o,`px;
|
|
233
|
+
padding-top: `).concat(u,`px;
|
|
234
|
+
padding-right: `).concat(c,`px;
|
|
235
|
+
margin-left:0;
|
|
236
|
+
margin-top:0;
|
|
237
|
+
margin-right: `).concat(d,"px ").concat(a,`;
|
|
238
|
+
`),i==="padding"&&"padding-right: ".concat(d,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.`).concat(gc,` {
|
|
242
|
+
right: `).concat(d,"px ").concat(a,`;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.`).concat(yc,` {
|
|
246
|
+
margin-right: `).concat(d,"px ").concat(a,`;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.`).concat(gc," .").concat(gc,` {
|
|
250
|
+
right: 0 `).concat(a,`;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.`).concat(yc," .").concat(yc,` {
|
|
254
|
+
margin-right: 0 `).concat(a,`;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
body[`).concat(Dl,`] {
|
|
258
|
+
`).concat(HR,": ").concat(d,`px;
|
|
259
|
+
}
|
|
260
|
+
`)},Ex=function(){var e=parseInt(document.body.getAttribute(Dl)||"0",10);return isFinite(e)?e:0},lD=function(){w.useEffect(function(){return document.body.setAttribute(Dl,(Ex()+1).toString()),function(){var e=Ex()-1;e<=0?document.body.removeAttribute(Dl):document.body.setAttribute(Dl,e.toString())}},[])},oD=function(e){var n=e.noRelative,i=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;lD();var u=w.useMemo(function(){return rD(o)},[o]);return w.createElement(iD,{styles:aD(u,!n,o,i?"":"!important")})},sm=!1;if(typeof window<"u")try{var ac=Object.defineProperty({},"passive",{get:function(){return sm=!0,!0}});window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{sm=!1}var Cl=sm?{passive:!1}:!1,sD=function(e){return e.tagName==="TEXTAREA"},TS=function(e,n){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[n]!=="hidden"&&!(i.overflowY===i.overflowX&&!sD(e)&&i[n]==="visible")},uD=function(e){return TS(e,"overflowY")},cD=function(e){return TS(e,"overflowX")},_x=function(e,n){var i=n.ownerDocument,a=n;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=AS(e,a);if(o){var u=NS(e,a),c=u[1],d=u[2];if(c>d)return!0}a=a.parentNode}while(a&&a!==i.body);return!1},fD=function(e){var n=e.scrollTop,i=e.scrollHeight,a=e.clientHeight;return[n,i,a]},dD=function(e){var n=e.scrollLeft,i=e.scrollWidth,a=e.clientWidth;return[n,i,a]},AS=function(e,n){return e==="v"?uD(n):cD(n)},NS=function(e,n){return e==="v"?fD(n):dD(n)},hD=function(e,n){return e==="h"&&n==="rtl"?-1:1},mD=function(e,n,i,a,o){var u=hD(e,window.getComputedStyle(n).direction),c=u*a,d=i.target,p=n.contains(d),m=!1,g=c>0,v=0,x=0;do{if(!d)break;var S=NS(e,d),N=S[0],_=S[1],T=S[2],A=_-T-u*N;(N||A)&&AS(e,d)&&(v+=A,x+=N);var q=d.parentNode;d=q&&q.nodeType===Node.DOCUMENT_FRAGMENT_NODE?q.host:q}while(!p&&d!==document.body||p&&(n.contains(d)||n===d));return(g&&Math.abs(v)<1||!g&&Math.abs(x)<1)&&(m=!0),m},lc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cx=function(e){return[e.deltaX,e.deltaY]},kx=function(e){return e&&"current"in e?e.current:e},pD=function(e,n){return e[0]===n[0]&&e[1]===n[1]},gD=function(e){return`
|
|
261
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
262
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
263
|
+
`)},yD=0,kl=[];function vD(e){var n=w.useRef([]),i=w.useRef([0,0]),a=w.useRef(),o=w.useState(yD++)[0],u=w.useState(kS)[0],c=w.useRef(e);w.useEffect(function(){c.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=IR([e.lockRef.current],(e.shards||[]).map(kx),!0).filter(Boolean);return _.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var d=w.useCallback(function(_,T){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!c.current.allowPinchZoom;var A=lc(_),q=i.current,U="deltaX"in _?_.deltaX:q[0]-A[0],P="deltaY"in _?_.deltaY:q[1]-A[1],L,j=_.target,Y=Math.abs(U)>Math.abs(P)?"h":"v";if("touches"in _&&Y==="h"&&j.type==="range")return!1;var $=window.getSelection(),re=$&&$.anchorNode,de=re?re===j||re.contains(j):!1;if(de)return!1;var le=_x(Y,j);if(!le)return!0;if(le?L=Y:(L=Y==="v"?"h":"v",le=_x(Y,j)),!le)return!1;if(!a.current&&"changedTouches"in _&&(U||P)&&(a.current=L),!L)return!0;var ae=a.current||L;return mD(ae,T,_,ae==="h"?U:P)},[]),p=w.useCallback(function(_){var T=_;if(!(!kl.length||kl[kl.length-1]!==u)){var A="deltaY"in T?Cx(T):lc(T),q=n.current.filter(function(L){return L.name===T.type&&(L.target===T.target||T.target===L.shadowParent)&&pD(L.delta,A)})[0];if(q&&q.should){T.cancelable&&T.preventDefault();return}if(!q){var U=(c.current.shards||[]).map(kx).filter(Boolean).filter(function(L){return L.contains(T.target)}),P=U.length>0?d(T,U[0]):!c.current.noIsolation;P&&T.cancelable&&T.preventDefault()}}},[]),m=w.useCallback(function(_,T,A,q){var U={name:_,delta:T,target:A,should:q,shadowParent:bD(A)};n.current.push(U),setTimeout(function(){n.current=n.current.filter(function(P){return P!==U})},1)},[]),g=w.useCallback(function(_){i.current=lc(_),a.current=void 0},[]),v=w.useCallback(function(_){m(_.type,Cx(_),_.target,d(_,e.lockRef.current))},[]),x=w.useCallback(function(_){m(_.type,lc(_),_.target,d(_,e.lockRef.current))},[]);w.useEffect(function(){return kl.push(u),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",p,Cl),document.addEventListener("touchmove",p,Cl),document.addEventListener("touchstart",g,Cl),function(){kl=kl.filter(function(_){return _!==u}),document.removeEventListener("wheel",p,Cl),document.removeEventListener("touchmove",p,Cl),document.removeEventListener("touchstart",g,Cl)}},[]);var S=e.removeScrollBar,N=e.inert;return w.createElement(w.Fragment,null,N?w.createElement(u,{styles:gD(o)}):null,S?w.createElement(oD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bD(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const xD=YR(CS,vD);var zS=w.forwardRef(function(e,n){return w.createElement(Zc,wr({},e,{ref:n,sideCar:xD}))});zS.classNames=Zc.classNames;var SD=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Tl=new WeakMap,oc=new WeakMap,sc={},Th=0,jS=function(e){return e&&(e.host||jS(e.parentNode))},wD=function(e,n){return n.map(function(i){if(e.contains(i))return i;var a=jS(i);return a&&e.contains(a)?a:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},ED=function(e,n,i,a){var o=wD(n,Array.isArray(e)?e:[e]);sc[i]||(sc[i]=new WeakMap);var u=sc[i],c=[],d=new Set,p=new Set(o),m=function(v){!v||d.has(v)||(d.add(v),m(v.parentNode))};o.forEach(m);var g=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(x){if(d.has(x))g(x);else try{var S=x.getAttribute(a),N=S!==null&&S!=="false",_=(Tl.get(x)||0)+1,T=(u.get(x)||0)+1;Tl.set(x,_),u.set(x,T),c.push(x),_===1&&N&&oc.set(x,!0),T===1&&x.setAttribute(i,"true"),N||x.setAttribute(a,"true")}catch(A){console.error("aria-hidden: cannot operate on ",x,A)}})};return g(n),d.clear(),Th++,function(){c.forEach(function(v){var x=Tl.get(v)-1,S=u.get(v)-1;Tl.set(v,x),u.set(v,S),x||(oc.has(v)||v.removeAttribute(a),oc.delete(v)),S||v.removeAttribute(i)}),Th--,Th||(Tl=new WeakMap,Tl=new WeakMap,oc=new WeakMap,sc={})}},_D=function(e,n,i){i===void 0&&(i="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=SD(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),ED(a,o,i,"aria-hidden")):function(){return null}},Pc="Dialog",[OS]=rR(Pc),[CD,fr]=OS(Pc),RS=e=>{const{__scopeDialog:n,children:i,open:a,defaultOpen:o,onOpenChange:u,modal:c=!0}=e,d=w.useRef(null),p=w.useRef(null),[m,g]=sR({prop:a,defaultProp:o??!1,onChange:u,caller:Pc});return y.jsx(CD,{scope:n,triggerRef:d,contentRef:p,contentId:xh(),titleId:xh(),descriptionId:xh(),open:m,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(v=>!v),[g]),modal:c,children:i})};RS.displayName=Pc;var DS="DialogTrigger",MS=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(DS,i),u=Ua(n,o.triggerRef);return y.jsx(oi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jm(o.open),...a,ref:u,onClick:Xi(e.onClick,o.onOpenToggle)})});MS.displayName=DS;var Xm="DialogPortal",[kD,US]=OS(Xm,{forceMount:void 0}),LS=e=>{const{__scopeDialog:n,forceMount:i,children:a,container:o}=e,u=fr(Xm,n);return y.jsx(kD,{scope:n,forceMount:i,children:w.Children.map(a,c=>y.jsx(Hc,{present:i||u.open,children:y.jsx(wS,{asChild:!0,container:o,children:c})}))})};LS.displayName=Xm;var Nc="DialogOverlay",BS=w.forwardRef((e,n)=>{const i=US(Nc,e.__scopeDialog),{forceMount:a=i.forceMount,...o}=e,u=fr(Nc,e.__scopeDialog);return u.modal?y.jsx(Hc,{present:a||u.open,children:y.jsx(AD,{...o,ref:n})}):null});BS.displayName=Nc;var TD=gS("DialogOverlay.RemoveScroll"),AD=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(Nc,i);return y.jsx(zS,{as:TD,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(oi.div,{"data-state":Jm(o.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),Ra="DialogContent",IS=w.forwardRef((e,n)=>{const i=US(Ra,e.__scopeDialog),{forceMount:a=i.forceMount,...o}=e,u=fr(Ra,e.__scopeDialog);return y.jsx(Hc,{present:a||u.open,children:u.modal?y.jsx(ND,{...o,ref:n}):y.jsx(zD,{...o,ref:n})})});IS.displayName=Ra;var ND=w.forwardRef((e,n)=>{const i=fr(Ra,e.__scopeDialog),a=w.useRef(null),o=Ua(n,i.contentRef,a);return w.useEffect(()=>{const u=a.current;if(u)return _D(u)},[]),y.jsx(qS,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xi(e.onCloseAutoFocus,u=>{var c;u.preventDefault(),(c=i.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Xi(e.onPointerDownOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&u.preventDefault()}),onFocusOutside:Xi(e.onFocusOutside,u=>u.preventDefault())})}),zD=w.forwardRef((e,n)=>{const i=fr(Ra,e.__scopeDialog),a=w.useRef(!1),o=w.useRef(!1);return y.jsx(qS,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,u),u.defaultPrevented||(a.current||(d=i.triggerRef.current)==null||d.focus(),u.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:u=>{var p,m;(p=e.onInteractOutside)==null||p.call(e,u),u.defaultPrevented||(a.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=u.target;((m=i.triggerRef.current)==null?void 0:m.contains(c))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}})}),qS=w.forwardRef((e,n)=>{const{__scopeDialog:i,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:u,...c}=e,d=fr(Ra,i),p=w.useRef(null),m=Ua(n,p);return BR(),y.jsxs(y.Fragment,{children:[y.jsx(xS,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:u,children:y.jsx(vS,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Jm(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(jD,{titleId:d.titleId}),y.jsx(RD,{contentRef:p,descriptionId:d.descriptionId})]})]})}),Km="DialogTitle",HS=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(Km,i);return y.jsx(oi.h2,{id:o.titleId,...a,ref:n})});HS.displayName=Km;var ZS="DialogDescription",PS=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(ZS,i);return y.jsx(oi.p,{id:o.descriptionId,...a,ref:n})});PS.displayName=ZS;var FS="DialogClose",$S=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(FS,i);return y.jsx(oi.button,{type:"button",...a,ref:n,onClick:Xi(e.onClick,()=>o.onOpenChange(!1))})});$S.displayName=FS;function Jm(e){return e?"open":"closed"}var VS="DialogTitleWarning",[nL,QS]=nR(VS,{contentName:Ra,titleName:Km,docsSlug:"dialog"}),jD=({titleId:e})=>{const n=QS(VS),i=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
264
|
+
|
|
265
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
266
|
+
|
|
267
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(i))},[i,e]),null},OD="DialogDescriptionWarning",RD=({contentRef:e,descriptionId:n})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${QS(OD).contentName}}.`;return w.useEffect(()=>{var u;const o=(u=e.current)==null?void 0:u.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(a))},[a,e,n]),null},DD=RS,MD=MS,UD=LS,LD=BS,BD=IS,ID=HS,qD=PS,HD=$S;const cs=DD,ZD=MD,PD=UD,YS=w.forwardRef(({className:e,...n},i)=>y.jsx(LD,{ref:i,className:st("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),...n}));YS.displayName="DialogOverlay";const Ml=w.forwardRef(({className:e,children:n,...i},a)=>y.jsxs(PD,{children:[y.jsx(YS,{}),y.jsxs(BD,{ref:a,className:st("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%] rounded-lg",e),...i,children:[n,y.jsxs(HD,{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:[y.jsx(oT,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ml.displayName="DialogContent";function fs({className:e,...n}){return y.jsx("div",{className:st("flex flex-col space-y-1.5 text-center sm:text-left",e),...n})}function Ol({className:e,...n}){return y.jsx("div",{className:st("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n})}const Ul=w.forwardRef(({className:e,...n},i)=>y.jsx(ID,{ref:i,className:st("text-lg font-semibold leading-none tracking-tight",e),...n}));Ul.displayName="DialogTitle";const FD=w.forwardRef(({className:e,...n},i)=>y.jsx(qD,{ref:i,className:st("text-sm text-muted-foreground",e),...n}));FD.displayName="DialogDescription";const Yt=w.forwardRef(({className:e,type:n,...i},a)=>y.jsx("input",{type:n,className:st("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...i}));Yt.displayName="Input";var $D=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],VD=$D.reduce((e,n)=>{const i=mS(`Primitive.${n}`),a=w.forwardRef((o,u)=>{const{asChild:c,...d}=o,p=c?i:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(p,{...d,ref:u})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{}),QD="Label",GS=w.forwardRef((e,n)=>y.jsx(VD.label,{...e,ref:n,onMouseDown:i=>{var o;i.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}}));GS.displayName=QD;var YD=GS;const xt=w.forwardRef(({className:e,...n},i)=>y.jsx(YD,{ref:i,className:st("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...n}));xt.displayName="Label";const ti=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{className:"relative w-full overflow-auto",children:y.jsx("table",{ref:i,className:st("w-full caption-bottom text-sm",e),...n})}));ti.displayName="Table";const ni=w.forwardRef(({className:e,...n},i)=>y.jsx("thead",{ref:i,className:st("[&_tr]:border-b",e),...n}));ni.displayName="TableHeader";const ri=w.forwardRef(({className:e,...n},i)=>y.jsx("tbody",{ref:i,className:st("[&_tr:last-child]:border-0",e),...n}));ri.displayName="TableBody";const Ve=w.forwardRef(({className:e,...n},i)=>y.jsx("tr",{ref:i,className:st("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...n}));Ve.displayName="TableRow";const Ne=w.forwardRef(({className:e,...n},i)=>y.jsx("th",{ref:i,className:st("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...n}));Ne.displayName="TableHead";const ye=w.forwardRef(({className:e,...n},i)=>y.jsx("td",{ref:i,className:st("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n}));ye.displayName="TableCell";const GD=Object.values(MO);function XD(){const e=Wl(),[n,i]=w.useState(!1),[a,o]=w.useState("create"),[u,c]=w.useState(null),[d,p]=w.useState({username:"",password:"",role:"admin"}),{data:m,isLoading:g,error:v}=en({queryKey:["admin-users"],queryFn:ZO}),x=Ht({mutationFn:()=>PO({username:d.username,password:d.password,role:d.role}),onSuccess:()=>{e.invalidateQueries({queryKey:["admin-users"]}),_()}}),S=Ht({mutationFn:()=>{if(!u)throw new Error("No user selected");const j={};return a==="edit"&&(j.role=d.role),a==="reset-password"&&(j.password=d.password),FO(u,j)},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-users"]}),_()}}),N=Ht({mutationFn:$O,onSuccess:()=>e.invalidateQueries({queryKey:["admin-users"]})});function _(){i(!1),o("create"),c(null),p({username:"",password:"",role:"admin"})}function T(j){c(j.id),o("edit"),p({username:"",password:"",role:j.role}),i(!0)}function A(j){c(j),o("reset-password"),p({username:"",password:"",role:"admin"}),i(!0)}function q(j){j.preventDefault(),a==="create"?x.mutate():S.mutate()}function U(j){window.confirm("Delete this admin user?")&&N.mutate(j)}const P=x.error??S.error,L=x.isPending||S.isPending;return y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsx("h1",{className:"text-2xl font-semibold",children:"Admin Users"}),y.jsxs(cs,{open:n,onOpenChange:j=>j?i(!0):_(),children:[y.jsx(ZD,{asChild:!0,children:y.jsxs($e,{onClick:()=>o("create"),children:[y.jsx(wc,{className:"h-4 w-4 mr-2"}),"Add Admin"]})}),y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:a==="create"?"Create Admin User":a==="edit"?"Edit Role":"Reset Password"})}),y.jsxs("form",{onSubmit:q,className:"space-y-4",children:[a==="create"&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"admin-username",children:"Username"}),y.jsx(Yt,{id:"admin-username",value:d.username,onChange:j=>p({...d,username:j.target.value}),required:!0})]}),(a==="create"||a==="reset-password")&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"admin-password",children:"Password"}),y.jsx(Yt,{id:"admin-password",type:"password",autoComplete:"new-password",value:d.password,onChange:j=>p({...d,password:j.target.value}),required:!0,minLength:8})]}),(a==="create"||a==="edit")&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"admin-role",children:"Role"}),y.jsx("select",{id:"admin-role",value:d.role,onChange:j=>p({...d,role:j.target.value}),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:GD.map(j=>y.jsx("option",{value:j,children:j},j))})]}),P instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:P.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:L,children:L?"Saving...":"Save"})})]})]})]})]}),y.jsx("div",{className:"border rounded-lg",children:y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"Username"}),y.jsx(Ne,{children:"Role"}),y.jsx(Ne,{children:"Created"}),y.jsx(Ne,{children:"Last Login"}),y.jsx(Ne,{className:"w-32"})]})}),y.jsx(ri,{children:g?y.jsx(Ve,{children:y.jsx(ye,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):v?y.jsx(Ve,{children:y.jsxs(ye,{colSpan:5,className:"text-center py-8 text-destructive",children:["Failed to load admin users: ",v instanceof Error?v.message:"Unknown error"]})}):(m==null?void 0:m.length)===0?y.jsx(Ve,{children:y.jsx(ye,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"No admin users"})}):m==null?void 0:m.map(j=>y.jsxs(Ve,{children:[y.jsx(ye,{className:"font-medium",children:j.username}),y.jsx(ye,{children:y.jsx(Mt,{variant:j.role==="super_admin"?"default":"secondary",children:j.role})}),y.jsx(ye,{className:"text-muted-foreground",children:On(j.createdAt)}),y.jsx(ye,{className:"text-muted-foreground",children:On(j.lastLoginAt)}),y.jsx(ye,{children:y.jsxs("div",{className:"flex gap-1",children:[y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>T(j),title:"Edit role",children:y.jsx(pc,{className:"h-4 w-4"})}),y.jsx($e,{variant:"ghost",size:"sm",onClick:()=>A(j.id),title:"Reset password",children:"Reset PW"}),j.role!=="super_admin"&&y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>U(j.id),disabled:N.isPending,title:"Delete",children:y.jsx(ss,{className:"h-4 w-4"})})]})})]},j.id))})]})})]})}function KD(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const JD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e4={};function Tx(e,n){return(e4.jsx?WD:JD).test(e)}const t4=/[ \t\n\f\r]/g;function n4(e){return typeof e=="object"?e.type==="text"?Ax(e.value):!1:Ax(e)}function Ax(e){return e.replace(t4,"")===""}class js{constructor(n,i,a){this.normal=i,this.property=n,a&&(this.space=a)}}js.prototype.normal={};js.prototype.property={};js.prototype.space=void 0;function XS(e,n){const i={},a={};for(const o of e)Object.assign(i,o.property),Object.assign(a,o.normal);return new js(i,a,n)}function um(e){return e.toLowerCase()}class Sn{constructor(n,i){this.attribute=i,this.property=n}}Sn.prototype.attribute="";Sn.prototype.booleanish=!1;Sn.prototype.boolean=!1;Sn.prototype.commaOrSpaceSeparated=!1;Sn.prototype.commaSeparated=!1;Sn.prototype.defined=!1;Sn.prototype.mustUseProperty=!1;Sn.prototype.number=!1;Sn.prototype.overloadedBoolean=!1;Sn.prototype.property="";Sn.prototype.spaceSeparated=!1;Sn.prototype.space=void 0;let r4=0;const Me=La(),zt=La(),cm=La(),ie=La(),ut=La(),Ll=La(),zn=La();function La(){return 2**++r4}const fm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:zt,commaOrSpaceSeparated:zn,commaSeparated:Ll,number:ie,overloadedBoolean:cm,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Ah=Object.keys(fm);class Wm extends Sn{constructor(n,i,a,o){let u=-1;if(super(n,i),Nx(this,"space",o),typeof a=="number")for(;++u<Ah.length;){const c=Ah[u];Nx(this,Ah[u],(a&fm[c])===fm[c])}}}Wm.prototype.defined=!0;function Nx(e,n,i){i&&(e[n]=i)}function io(e){const n={},i={};for(const[a,o]of Object.entries(e.properties)){const u=new Wm(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),n[a]=u,i[um(a)]=a,i[um(u.attribute)]=a}return new js(n,i,e.space)}const KS=io({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:ut,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:ie,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:ut,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:zt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function JS(e,n){return n in e?e[n]:n}function WS(e,n){return JS(e,n.toLowerCase())}const i4=io({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ll,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:ut,autoFocus:Me,autoPlay:Me,blocking:ut,capture:null,charSet:null,checked:Me,cite:null,className:ut,cols:ie,colSpan:null,content:null,contentEditable:zt,controls:Me,controlsList:ut,coords:ie|Ll,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:cm,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:ut,height:ie,hidden:cm,high:ie,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:ut,itemRef:ut,itemScope:Me,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Me,optimum:ie,pattern:null,ping:ut,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:ut,required:Me,reversed:Me,rows:ie,rowSpan:ie,sandbox:ut,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:zt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:WS}),a4=io({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:zn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ll,g2:Ll,glyphName:Ll,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zn,rev:zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zn,requiredFeatures:zn,requiredFonts:zn,requiredFormats:zn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:JS}),ew=io({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),tw=io({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:WS}),nw=io({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),l4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},o4=/[A-Z]/g,zx=/-[a-z]/g,s4=/^data[-\w.:]+$/i;function u4(e,n){const i=um(n);let a=n,o=Sn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&s4.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(zx,f4);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!zx.test(u)){let c=u.replace(o4,c4);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=Wm}return new o(a,n)}function c4(e){return"-"+e.toLowerCase()}function f4(e){return e.charAt(1).toUpperCase()}const d4=XS([KS,i4,ew,tw,nw],"html"),ep=XS([KS,a4,ew,tw,nw],"svg");function h4(e){return e.join(" ").trim()}var Al={},Nh,jx;function m4(){if(jx)return Nh;jx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
268
|
+
`,m="/",g="*",v="",x="comment",S="declaration";function N(T,A){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];A=A||{};var q=1,U=1;function P(se){var ee=se.match(n);ee&&(q+=ee.length);var I=se.lastIndexOf(p);U=~I?se.length-I:U+se.length}function L(){var se={line:q,column:U};return function(ee){return ee.position=new j(se),re(),ee}}function j(se){this.start=se,this.end={line:q,column:U},this.source=A.source}j.prototype.content=T;function Y(se){var ee=new Error(A.source+":"+q+":"+U+": "+se);if(ee.reason=se,ee.filename=A.source,ee.line=q,ee.column=U,ee.source=T,!A.silent)throw ee}function $(se){var ee=se.exec(T);if(ee){var I=ee[0];return P(I),T=T.slice(I.length),ee}}function re(){$(i)}function de(se){var ee;for(se=se||[];ee=le();)ee!==!1&&se.push(ee);return se}function le(){var se=L();if(!(m!=T.charAt(0)||g!=T.charAt(1))){for(var ee=2;v!=T.charAt(ee)&&(g!=T.charAt(ee)||m!=T.charAt(ee+1));)++ee;if(ee+=2,v===T.charAt(ee-1))return Y("End of comment missing");var I=T.slice(2,ee-2);return U+=2,P(I),T=T.slice(ee),U+=2,se({type:x,comment:I})}}function ae(){var se=L(),ee=$(a);if(ee){if(le(),!$(o))return Y("property missing ':'");var I=$(u),te=se({type:S,property:_(ee[0].replace(e,v)),value:I?_(I[0].replace(e,v)):v});return $(c),te}}function Ae(){var se=[];de(se);for(var ee;ee=ae();)ee!==!1&&(se.push(ee),de(se));return se}return re(),Ae()}function _(T){return T?T.replace(d,v):v}return Nh=N,Nh}var Ox;function p4(){if(Ox)return Al;Ox=1;var e=Al&&Al.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Al,"__esModule",{value:!0}),Al.default=i;const n=e(m4());function i(a,o){let u=null;if(!a||typeof a!="string")return u;const c=(0,n.default)(a),d=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:g}=p;d?o(m,g,p):g&&(u=u||{},u[m]=g)}),u}return Al}var rs={},Rx;function g4(){if(Rx)return rs;Rx=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(m){return!m||i.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},d=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),u(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(o,d):m=m.replace(a,d),m.replace(n,c))};return rs.camelCase=p,rs}var is,Dx;function y4(){if(Dx)return is;Dx=1;var e=is&&is.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(p4()),i=g4();function a(o,u){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(d,p){d&&p&&(c[(0,i.camelCase)(d,u)]=p)}),c}return a.default=a,is=a,is}var v4=y4();const b4=Oc(v4),rw=iw("end"),tp=iw("start");function iw(e){return n;function n(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function x4(e){const n=tp(e),i=rw(e);if(n&&i)return{start:n,end:i}}function ds(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mx(e.position):"start"in e||"end"in e?Mx(e):"line"in e||"column"in e?dm(e):""}function dm(e){return Ux(e&&e.line)+":"+Ux(e&&e.column)}function Mx(e){return dm(e&&e.start)+"-"+dm(e&&e.end)}function Ux(e){return e&&typeof e=="number"?e:1}class tn extends Error{constructor(n,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof n=="string"?o=n:!u.cause&&n&&(c=!0,o=n.message,u.cause=n),!u.ruleId&&!u.source&&typeof a=="string"){const p=a.indexOf(":");p===-1?u.ruleId=a:(u.source=a.slice(0,p),u.ruleId=a.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const d=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=ds(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tn.prototype.file="";tn.prototype.name="";tn.prototype.reason="";tn.prototype.message="";tn.prototype.stack="";tn.prototype.column=void 0;tn.prototype.line=void 0;tn.prototype.ancestors=void 0;tn.prototype.cause=void 0;tn.prototype.fatal=void 0;tn.prototype.place=void 0;tn.prototype.ruleId=void 0;tn.prototype.source=void 0;const np={}.hasOwnProperty,S4=new Map,w4=/[A-Z]/g,E4=new Set(["table","tbody","thead","tfoot","tr"]),_4=new Set(["td","th"]),aw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function C4(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let a;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=R4(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=O4(i,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:a,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?ep:d4,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},u=lw(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function lw(e,n,i){if(n.type==="element")return k4(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return T4(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return N4(e,n,i);if(n.type==="mdxjsEsm")return A4(e,n);if(n.type==="root")return z4(e,n,i);if(n.type==="text")return j4(e,n)}function k4(e,n,i){const a=e.schema;let o=a;n.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=ep,e.schema=o),e.ancestors.push(n);const u=sw(e,n.tagName,!1),c=D4(e,n);let d=ip(e,n);return E4.has(n.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!n4(p):!0})),ow(e,c,u,n),rp(c,d),e.ancestors.pop(),e.schema=a,e.create(n,u,c,i)}function T4(e,n){if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}ws(e,n.position)}function A4(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);ws(e,n.position)}function N4(e,n,i){const a=e.schema;let o=a;n.name==="svg"&&a.space==="html"&&(o=ep,e.schema=o),e.ancestors.push(n);const u=n.name===null?e.Fragment:sw(e,n.name,!0),c=M4(e,n),d=ip(e,n);return ow(e,c,u,n),rp(c,d),e.ancestors.pop(),e.schema=a,e.create(n,u,c,i)}function z4(e,n,i){const a={};return rp(a,ip(e,n)),e.create(n,e.Fragment,a,i)}function j4(e,n){return n.value}function ow(e,n,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=a)}function rp(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function O4(e,n,i){return a;function a(o,u,c,d){const m=Array.isArray(c.children)?i:n;return d?m(u,c,d):m(u,c)}}function R4(e,n){return i;function i(a,o,u,c){const d=Array.isArray(u.children),p=tp(a);return n(o,u,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function D4(e,n){const i={};let a,o;for(o in n.properties)if(o!=="children"&&np.call(n.properties,o)){const u=U4(e,o,n.properties[o]);if(u){const[c,d]=u;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&_4.has(n.tagName)?a=d:i[c]=d}}if(a){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function M4(e,n){const i={};for(const a of n.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const c=u.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,e.evaluater.evaluateExpression(d.argument))}else ws(e,n.position);else{const o=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,u=e.evaluater.evaluateExpression(d.expression)}else ws(e,n.position);else u=a.value===null?!0:a.value;i[o]=u}return i}function ip(e,n){const i=[];let a=-1;const o=e.passKeys?new Map:S4;for(;++a<n.children.length;){const u=n.children[a];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const d=lw(e,u,c);d!==void 0&&i.push(d)}return i}function U4(e,n,i){const a=u4(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?KD(i):h4(i)),a.property==="style"){let o=typeof i=="object"?i:L4(e,String(i));return e.stylePropertyNameCase==="css"&&(o=B4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?l4[a.property]||a.property:a.attribute,i]}}function L4(e,n){try{return b4(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,o=new tn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=aw+"#cannot-parse-style-attribute",o}}function sw(e,n,i){let a;if(!i)a={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let u=-1,c;for(;++u<o.length;){const d=Tx(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}a=c}else a=Tx(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(a.type==="Literal"){const o=a.value;return np.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);ws(e)}function ws(e,n){const i=new tn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=aw+"#cannot-handle-mdx-estrees-without-createevaluater",i}function B4(e){const n={};let i;for(i in e)np.call(e,i)&&(n[I4(i)]=e[i]);return n}function I4(e){let n=e.replace(w4,q4);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function q4(e){return"-"+e.toLowerCase()}const zh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},H4={};function Z4(e,n){const i=H4,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return uw(e,a,o)}function uw(e,n,i){if(P4(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Lx(e.children,n,i)}return Array.isArray(e)?Lx(e,n,i):""}function Lx(e,n,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=uw(e[o],n,i);return a.join("")}function P4(e){return!!(e&&typeof e=="object")}const Bx=document.createElement("i");function ap(e){const n="&"+e+";";Bx.innerHTML=n;const i=Bx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function Cr(e,n,i,a){const o=e.length;let u=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);u<a.length;)c=a.slice(u,u+1e4),c.unshift(n,0),e.splice(...c),u+=1e4,n+=1e4}function Kn(e,n){return e.length>0?(Cr(e,e.length,0,n),e):n}const Ix={}.hasOwnProperty;function F4(e){const n={};let i=-1;for(;++i<e.length;)$4(n,e[i]);return n}function $4(e,n){let i;for(i in n){const o=(Ix.call(e,i)?e[i]:void 0)||(e[i]={}),u=n[i];let c;if(u)for(c in u){Ix.call(o,c)||(o[c]=[]);const d=u[c];V4(o[c],Array.isArray(d)?d:d?[d]:[])}}}function V4(e,n){let i=-1;const a=[];for(;++i<n.length;)(n[i].add==="after"?e:a).push(n[i]);Cr(e,0,0,a)}function cw(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Bl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Er=na(/[A-Za-z]/),Rn=na(/[\dA-Za-z]/),Q4=na(/[#-'*+\--9=?A-Z^-~]/);function hm(e){return e!==null&&(e<32||e===127)}const mm=na(/\d/),Y4=na(/[\dA-Fa-f]/),G4=na(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function bn(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const X4=na(new RegExp("\\p{P}|\\p{S}","u")),K4=na(/\s/);function na(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function ao(e){const n=[];let i=-1,a=0,o=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&Rn(e.charCodeAt(i+1))&&Rn(e.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const d=e.charCodeAt(i+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),o=1):c="�"}else c=String.fromCharCode(u);c&&(n.push(e.slice(a,i),encodeURIComponent(c)),a=i+o+1,c=""),o&&(i+=o,o=0)}return n.join("")+e.slice(a)}function ct(e,n,i,a){const o=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return Xe(p)?(e.enter(i),d(p)):n(p)}function d(p){return Xe(p)&&u++<o?(e.consume(p),d):(e.exit(i),n(p))}}const J4={tokenize:W4};function W4(e){const n=e.attempt(this.parser.constructs.contentInitial,a,o);let i;return n;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ct(e,n,"linePrefix")}function o(d){return e.enter("paragraph"),u(d)}function u(d){const p=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Te(d)?(e.consume(d),e.exit("chunkText"),u):(e.consume(d),c)}}const eM={tokenize:tM},qx={tokenize:nM};function tM(e){const n=this,i=[];let a=0,o,u,c;return d;function d(U){if(a<i.length){const P=i[a];return n.containerState=P[1],e.attempt(P[0].continuation,p,m)(U)}return m(U)}function p(U){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&q();const P=n.events.length;let L=P,j;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){j=n.events[L][1].end;break}A(a);let Y=P;for(;Y<n.events.length;)n.events[Y][1].end={...j},Y++;return Cr(n.events,L+1,0,n.events.slice(P)),n.events.length=Y,m(U)}return d(U)}function m(U){if(a===i.length){if(!o)return x(U);if(o.currentConstruct&&o.currentConstruct.concrete)return N(U);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(qx,g,v)(U)}function g(U){return o&&q(),A(a),x(U)}function v(U){return n.parser.lazy[n.now().line]=a!==i.length,c=n.now().offset,N(U)}function x(U){return n.containerState={},e.attempt(qx,S,N)(U)}function S(U){return a++,i.push([n.currentConstruct,n.containerState]),x(U)}function N(U){if(U===null){o&&q(),A(0),e.consume(U);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),_(U)}function _(U){if(U===null){T(e.exit("chunkFlow"),!0),A(0),e.consume(U);return}return Te(U)?(e.consume(U),T(e.exit("chunkFlow")),a=0,n.interrupt=void 0,d):(e.consume(U),_)}function T(U,P){const L=n.sliceStream(U);if(P&&L.push(null),U.previous=u,u&&(u.next=U),u=U,o.defineSkip(U.start),o.write(L),n.parser.lazy[U.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<c&&(!o.events[j][1].end||o.events[j][1].end.offset>c))return;const Y=n.events.length;let $=Y,re,de;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(re){de=n.events[$][1].end;break}re=!0}for(A(a),j=Y;j<n.events.length;)n.events[j][1].end={...de},j++;Cr(n.events,$+1,0,n.events.slice(Y)),n.events.length=j}}function A(U){let P=i.length;for(;P-- >U;){const L=i[P];n.containerState=L[1],L[0].exit.call(n,e)}i.length=U}function q(){o.write([null]),u=void 0,o=void 0,n.containerState._closeFlow=void 0}}function nM(e,n,i){return ct(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hx(e){if(e===null||bn(e)||K4(e))return 1;if(X4(e))return 2}function lp(e,n,i){const a=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!a.includes(u)&&(n=u(n,i),a.push(u))}return n}const pm={name:"attention",resolveAll:rM,tokenize:iM};function rM(e,n){let i=-1,a,o,u,c,d,p,m,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&n.sliceSerialize(e[a][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;p=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const v={...e[a][1].end},x={...e[i][1].start};Zx(v,-p),Zx(x,p),c={type:p>1?"strongSequence":"emphasisSequence",start:v,end:{...e[a][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:x},u={type:p>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[i][1].start={...d.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=Kn(m,[["enter",e[a][1],n],["exit",e[a][1],n]])),m=Kn(m,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",u,n]]),m=Kn(m,lp(n.parser.constructs.insideSpan.null,e.slice(a+1,i),n)),m=Kn(m,[["exit",u,n],["enter",d,n],["exit",d,n],["exit",o,n]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,m=Kn(m,[["enter",e[i][1],n],["exit",e[i][1],n]])):g=0,Cr(e,a-1,i-a+3,m),i=a+m.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function iM(e,n){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Hx(a);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===u)return e.consume(p),d;const m=e.exit("attentionSequence"),g=Hx(p),v=!g||g===2&&o||i.includes(p),x=!o||o===2&&g||i.includes(a);return m._open=!!(u===42?v:v&&(o||!x)),m._close=!!(u===42?x:x&&(g||!v)),n(p)}}function Zx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const aM={name:"autolink",tokenize:lM};function lM(e,n,i){let a=0;return o;function o(S){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(S),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(S){return Er(S)?(e.consume(S),c):S===64?i(S):m(S)}function c(S){return S===43||S===45||S===46||Rn(S)?(a=1,d(S)):m(S)}function d(S){return S===58?(e.consume(S),a=0,p):(S===43||S===45||S===46||Rn(S))&&a++<32?(e.consume(S),d):(a=0,m(S))}function p(S){return S===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(S),e.exit("autolinkMarker"),e.exit("autolink"),n):S===null||S===32||S===60||hm(S)?i(S):(e.consume(S),p)}function m(S){return S===64?(e.consume(S),g):Q4(S)?(e.consume(S),m):i(S)}function g(S){return Rn(S)?v(S):i(S)}function v(S){return S===46?(e.consume(S),a=0,g):S===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(S),e.exit("autolinkMarker"),e.exit("autolink"),n):x(S)}function x(S){if((S===45||Rn(S))&&a++<63){const N=S===45?x:v;return e.consume(S),N}return i(S)}}const Fc={partial:!0,tokenize:oM};function oM(e,n,i){return a;function a(u){return Xe(u)?ct(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Te(u)?n(u):i(u)}}const fw={continuation:{tokenize:uM},exit:cM,name:"blockQuote",tokenize:sM};function sM(e,n,i){const a=this;return o;function o(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return Xe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function uM(e,n,i){const a=this;return o;function o(c){return Xe(c)?ct(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(fw,n,i)(c)}}function cM(e){e.exit("blockQuote")}const dw={name:"characterEscape",tokenize:fM};function fM(e,n,i){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return G4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(u)}}const hw={name:"characterReference",tokenize:dM};function dM(e,n,i){const a=this;let o=0,u,c;return d;function d(v){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(v),e.exit("characterReferenceMarker"),p}function p(v){return v===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(v),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),u=31,c=Rn,g(v))}function m(v){return v===88||v===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(v),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=Y4,g):(e.enter("characterReferenceValue"),u=7,c=mm,g(v))}function g(v){if(v===59&&o){const x=e.exit("characterReferenceValue");return c===Rn&&!ap(a.sliceSerialize(x))?i(v):(e.enter("characterReferenceMarker"),e.consume(v),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(v)&&o++<u?(e.consume(v),g):i(v)}}const Px={partial:!0,tokenize:mM},Fx={concrete:!0,name:"codeFenced",tokenize:hM};function hM(e,n,i){const a=this,o={partial:!0,tokenize:L};let u=0,c=0,d;return p;function p(j){return m(j)}function m(j){const Y=a.events[a.events.length-1];return u=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,d=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===d?(c++,e.consume(j),g):c<3?i(j):(e.exit("codeFencedFenceSequence"),Xe(j)?ct(e,v,"whitespace")(j):v(j))}function v(j){return j===null||Te(j)?(e.exit("codeFencedFence"),a.interrupt?n(j):e.check(Px,_,P)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||Te(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),v(j)):Xe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,S,"whitespace")(j)):j===96&&j===d?i(j):(e.consume(j),x)}function S(j){return j===null||Te(j)?v(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(j))}function N(j){return j===null||Te(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(j)):j===96&&j===d?i(j):(e.consume(j),N)}function _(j){return e.attempt(o,P,T)(j)}function T(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),A}function A(j){return u>0&&Xe(j)?ct(e,q,"linePrefix",u+1)(j):q(j)}function q(j){return j===null||Te(j)?e.check(Px,_,P)(j):(e.enter("codeFlowValue"),U(j))}function U(j){return j===null||Te(j)?(e.exit("codeFlowValue"),q(j)):(e.consume(j),U)}function P(j){return e.exit("codeFenced"),n(j)}function L(j,Y,$){let re=0;return de;function de(ee){return j.enter("lineEnding"),j.consume(ee),j.exit("lineEnding"),le}function le(ee){return j.enter("codeFencedFence"),Xe(ee)?ct(j,ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):ae(ee)}function ae(ee){return ee===d?(j.enter("codeFencedFenceSequence"),Ae(ee)):$(ee)}function Ae(ee){return ee===d?(re++,j.consume(ee),Ae):re>=c?(j.exit("codeFencedFenceSequence"),Xe(ee)?ct(j,se,"whitespace")(ee):se(ee)):$(ee)}function se(ee){return ee===null||Te(ee)?(j.exit("codeFencedFence"),Y(ee)):$(ee)}}}function mM(e,n,i){const a=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?i(c):n(c)}}const jh={name:"codeIndented",tokenize:gM},pM={partial:!0,tokenize:yM};function gM(e,n,i){const a=this;return o;function o(m){return e.enter("codeIndented"),ct(e,u,"linePrefix",5)(m)}function u(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):i(m)}function c(m){return m===null?p(m):Te(m)?e.attempt(pM,c,p)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||Te(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function p(m){return e.exit("codeIndented"),n(m)}}function yM(e,n,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):ct(e,u,"linePrefix",5)(c)}function u(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(c):Te(c)?o(c):i(c)}}const vM={name:"codeText",previous:xM,resolve:bM,tokenize:SM};function bM(e){let n=e.length-4,i=3,a,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(a=i;++a<n;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(a=i-1,n++;++a<=n;)o===void 0?a!==n&&e[a][1].type!=="lineEnding"&&(o=a):(a===n||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),n-=a-o-2,a=o+2),o=void 0);return e}function xM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function SM(e,n,i){let a=0,o,u;return c;function c(v){return e.enter("codeText"),e.enter("codeTextSequence"),d(v)}function d(v){return v===96?(e.consume(v),a++,d):(e.exit("codeTextSequence"),p(v))}function p(v){return v===null?i(v):v===32?(e.enter("space"),e.consume(v),e.exit("space"),p):v===96?(u=e.enter("codeTextSequence"),o=0,g(v)):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(v))}function m(v){return v===null||v===32||v===96||Te(v)?(e.exit("codeTextData"),p(v)):(e.consume(v),m)}function g(v){return v===96?(e.consume(v),o++,g):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),n(v)):(u.type="codeTextData",m(v))}}class wM{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(n,a):n>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(n,i,a){const o=i||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&as(this.left,a),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),as(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),as(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);as(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);as(this.left,i.reverse())}}}function as(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function mw(e){const n={};let i=-1,a,o,u,c,d,p,m;const g=new wM(e);for(;++i<g.length;){for(;i in n;)i=n[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(p=a[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(n,EM(g,i)),i=n[i],m=!0);else if(a[1]._container){for(u=i,o=void 0;u--;)if(c=g.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(a[1].end={...g.get(o)[1].start},d=g.slice(o,i),d.unshift(a),g.splice(o,i-o+1,d))}}return Cr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function EM(e,n){const i=e.get(n)[1],a=e.get(n)[2];let o=n-1;const u=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let g,v,x=-1,S=i,N=0,_=0;const T=[_];for(;S;){for(;e.get(++o)[1]!==S;);u.push(o),S._tokenizer||(g=a.sliceStream(S),S.next||g.push(null),v&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),v=S,S=S.next}for(S=i;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(_=x+1,T.push(_),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):T.pop(),x=T.length;x--;){const A=d.slice(T[x],T[x+1]),q=u.pop();p.push([q,q+A.length-1]),e.splice(q,2,A)}for(p.reverse(),x=-1;++x<p.length;)m[N+p[x][0]]=N+p[x][1],N+=p[x][1]-p[x][0]-1;return m}const _M={resolve:kM,tokenize:TM},CM={partial:!0,tokenize:AM};function kM(e){return mw(e),e}function TM(e,n){let i;return a;function a(d){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?u(d):Te(d)?e.check(CM,c,u)(d):(e.consume(d),o)}function u(d){return e.exit("chunkContent"),e.exit("content"),n(d)}function c(d){return e.consume(d),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function AM(e,n,i){const a=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ct(e,u,"linePrefix")}function u(c){if(c===null||Te(c))return i(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(c):e.interrupt(a.parser.constructs.flow,i,n)(c)}}function pw(e,n,i,a,o,u,c,d,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return v;function v(A){return A===60?(e.enter(a),e.enter(o),e.enter(u),e.consume(A),e.exit(u),x):A===null||A===32||A===41||hm(A)?i(A):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),_(A))}function x(A){return A===62?(e.enter(u),e.consume(A),e.exit(u),e.exit(o),e.exit(a),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===62?(e.exit("chunkString"),e.exit(d),x(A)):A===null||A===60||Te(A)?i(A):(e.consume(A),A===92?N:S)}function N(A){return A===60||A===62||A===92?(e.consume(A),S):S(A)}function _(A){return!g&&(A===null||A===41||bn(A))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),n(A)):g<m&&A===40?(e.consume(A),g++,_):A===41?(e.consume(A),g--,_):A===null||A===32||A===40||hm(A)?i(A):(e.consume(A),A===92?T:_)}function T(A){return A===40||A===41||A===92?(e.consume(A),_):_(A)}}function gw(e,n,i,a,o,u){const c=this;let d=0,p;return m;function m(S){return e.enter(a),e.enter(o),e.consume(S),e.exit(o),e.enter(u),g}function g(S){return d>999||S===null||S===91||S===93&&!p||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(S):S===93?(e.exit(u),e.enter(o),e.consume(S),e.exit(o),e.exit(a),n):Te(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===null||S===91||S===93||Te(S)||d++>999?(e.exit("chunkString"),g(S)):(e.consume(S),p||(p=!Xe(S)),S===92?x:v)}function x(S){return S===91||S===92||S===93?(e.consume(S),d++,v):v(S)}}function yw(e,n,i,a,o,u){let c;return d;function d(x){return x===34||x===39||x===40?(e.enter(a),e.enter(o),e.consume(x),e.exit(o),c=x===40?41:x,p):i(x)}function p(x){return x===c?(e.enter(o),e.consume(x),e.exit(o),e.exit(a),n):(e.enter(u),m(x))}function m(x){return x===c?(e.exit(u),p(c)):x===null?i(x):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||Te(x)?(e.exit("chunkString"),m(x)):(e.consume(x),x===92?v:g)}function v(x){return x===c||x===92?(e.consume(x),g):g(x)}}function hs(e,n){let i;return a;function a(o){return Te(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Xe(o)?ct(e,a,i?"linePrefix":"lineSuffix")(o):n(o)}}const NM={name:"definition",tokenize:jM},zM={partial:!0,tokenize:OM};function jM(e,n,i){const a=this;let o;return u;function u(S){return e.enter("definition"),c(S)}function c(S){return gw.call(a,e,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return o=Bl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),p):i(S)}function p(S){return bn(S)?hs(e,m)(S):m(S)}function m(S){return pw(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function g(S){return e.attempt(zM,v,v)(S)}function v(S){return Xe(S)?ct(e,x,"whitespace")(S):x(S)}function x(S){return S===null||Te(S)?(e.exit("definition"),a.parser.defined.push(o),n(S)):i(S)}}function OM(e,n,i){return a;function a(d){return bn(d)?hs(e,o)(d):i(d)}function o(d){return yw(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return Xe(d)?ct(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Te(d)?n(d):i(d)}}const RM={name:"hardBreakEscape",tokenize:DM};function DM(e,n,i){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Te(u)?(e.exit("hardBreakEscape"),n(u)):i(u)}}const MM={name:"headingAtx",resolve:UM,tokenize:LM};function UM(e,n){let i=e.length-2,a=3,o,u;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},u={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Cr(e,a,i-a+1,[["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n]])),e}function LM(e,n,i){let a=0;return o;function o(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||bn(g)?(e.exit("atxHeadingSequence"),d(g)):i(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),p(g)):g===null||Te(g)?(e.exit("atxHeading"),n(g)):Xe(g)?ct(e,d,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function p(g){return g===35?(e.consume(g),p):(e.exit("atxHeadingSequence"),d(g))}function m(g){return g===null||g===35||bn(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),m)}}const BM=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$x=["pre","script","style","textarea"],IM={concrete:!0,name:"htmlFlow",resolveTo:ZM,tokenize:PM},qM={partial:!0,tokenize:$M},HM={partial:!0,tokenize:FM};function ZM(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function PM(e,n,i){const a=this;let o,u,c,d,p;return m;function m(k){return g(k)}function g(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),v}function v(k){return k===33?(e.consume(k),x):k===47?(e.consume(k),u=!0,_):k===63?(e.consume(k),o=3,a.interrupt?n:C):Er(k)?(e.consume(k),c=String.fromCharCode(k),T):i(k)}function x(k){return k===45?(e.consume(k),o=2,S):k===91?(e.consume(k),o=5,d=0,N):Er(k)?(e.consume(k),o=4,a.interrupt?n:C):i(k)}function S(k){return k===45?(e.consume(k),a.interrupt?n:C):i(k)}function N(k){const oe="CDATA[";return k===oe.charCodeAt(d++)?(e.consume(k),d===oe.length?a.interrupt?n:ae:N):i(k)}function _(k){return Er(k)?(e.consume(k),c=String.fromCharCode(k),T):i(k)}function T(k){if(k===null||k===47||k===62||bn(k)){const oe=k===47,fe=c.toLowerCase();return!oe&&!u&&$x.includes(fe)?(o=1,a.interrupt?n(k):ae(k)):BM.includes(c.toLowerCase())?(o=6,oe?(e.consume(k),A):a.interrupt?n(k):ae(k)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(k):u?q(k):U(k))}return k===45||Rn(k)?(e.consume(k),c+=String.fromCharCode(k),T):i(k)}function A(k){return k===62?(e.consume(k),a.interrupt?n:ae):i(k)}function q(k){return Xe(k)?(e.consume(k),q):de(k)}function U(k){return k===47?(e.consume(k),de):k===58||k===95||Er(k)?(e.consume(k),P):Xe(k)?(e.consume(k),U):de(k)}function P(k){return k===45||k===46||k===58||k===95||Rn(k)?(e.consume(k),P):L(k)}function L(k){return k===61?(e.consume(k),j):Xe(k)?(e.consume(k),L):U(k)}function j(k){return k===null||k===60||k===61||k===62||k===96?i(k):k===34||k===39?(e.consume(k),p=k,Y):Xe(k)?(e.consume(k),j):$(k)}function Y(k){return k===p?(e.consume(k),p=null,re):k===null||Te(k)?i(k):(e.consume(k),Y)}function $(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||bn(k)?L(k):(e.consume(k),$)}function re(k){return k===47||k===62||Xe(k)?U(k):i(k)}function de(k){return k===62?(e.consume(k),le):i(k)}function le(k){return k===null||Te(k)?ae(k):Xe(k)?(e.consume(k),le):i(k)}function ae(k){return k===45&&o===2?(e.consume(k),I):k===60&&o===1?(e.consume(k),te):k===62&&o===4?(e.consume(k),D):k===63&&o===3?(e.consume(k),C):k===93&&o===5?(e.consume(k),ze):Te(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(qM,Q,Ae)(k)):k===null||Te(k)?(e.exit("htmlFlowData"),Ae(k)):(e.consume(k),ae)}function Ae(k){return e.check(HM,se,Q)(k)}function se(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),ee}function ee(k){return k===null||Te(k)?Ae(k):(e.enter("htmlFlowData"),ae(k))}function I(k){return k===45?(e.consume(k),C):ae(k)}function te(k){return k===47?(e.consume(k),c="",he):ae(k)}function he(k){if(k===62){const oe=c.toLowerCase();return $x.includes(oe)?(e.consume(k),D):ae(k)}return Er(k)&&c.length<8?(e.consume(k),c+=String.fromCharCode(k),he):ae(k)}function ze(k){return k===93?(e.consume(k),C):ae(k)}function C(k){return k===62?(e.consume(k),D):k===45&&o===2?(e.consume(k),C):ae(k)}function D(k){return k===null||Te(k)?(e.exit("htmlFlowData"),Q(k)):(e.consume(k),D)}function Q(k){return e.exit("htmlFlow"),n(k)}}function FM(e,n,i){const a=this;return o;function o(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return a.parser.lazy[a.now().line]?i(c):n(c)}}function $M(e,n,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Fc,n,i)}}const VM={name:"htmlText",tokenize:QM};function QM(e,n,i){const a=this;let o,u,c;return d;function d(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),p}function p(C){return C===33?(e.consume(C),m):C===47?(e.consume(C),L):C===63?(e.consume(C),U):Er(C)?(e.consume(C),$):i(C)}function m(C){return C===45?(e.consume(C),g):C===91?(e.consume(C),u=0,N):Er(C)?(e.consume(C),q):i(C)}function g(C){return C===45?(e.consume(C),S):i(C)}function v(C){return C===null?i(C):C===45?(e.consume(C),x):Te(C)?(c=v,te(C)):(e.consume(C),v)}function x(C){return C===45?(e.consume(C),S):v(C)}function S(C){return C===62?I(C):C===45?x(C):v(C)}function N(C){const D="CDATA[";return C===D.charCodeAt(u++)?(e.consume(C),u===D.length?_:N):i(C)}function _(C){return C===null?i(C):C===93?(e.consume(C),T):Te(C)?(c=_,te(C)):(e.consume(C),_)}function T(C){return C===93?(e.consume(C),A):_(C)}function A(C){return C===62?I(C):C===93?(e.consume(C),A):_(C)}function q(C){return C===null||C===62?I(C):Te(C)?(c=q,te(C)):(e.consume(C),q)}function U(C){return C===null?i(C):C===63?(e.consume(C),P):Te(C)?(c=U,te(C)):(e.consume(C),U)}function P(C){return C===62?I(C):U(C)}function L(C){return Er(C)?(e.consume(C),j):i(C)}function j(C){return C===45||Rn(C)?(e.consume(C),j):Y(C)}function Y(C){return Te(C)?(c=Y,te(C)):Xe(C)?(e.consume(C),Y):I(C)}function $(C){return C===45||Rn(C)?(e.consume(C),$):C===47||C===62||bn(C)?re(C):i(C)}function re(C){return C===47?(e.consume(C),I):C===58||C===95||Er(C)?(e.consume(C),de):Te(C)?(c=re,te(C)):Xe(C)?(e.consume(C),re):I(C)}function de(C){return C===45||C===46||C===58||C===95||Rn(C)?(e.consume(C),de):le(C)}function le(C){return C===61?(e.consume(C),ae):Te(C)?(c=le,te(C)):Xe(C)?(e.consume(C),le):re(C)}function ae(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),o=C,Ae):Te(C)?(c=ae,te(C)):Xe(C)?(e.consume(C),ae):(e.consume(C),se)}function Ae(C){return C===o?(e.consume(C),o=void 0,ee):C===null?i(C):Te(C)?(c=Ae,te(C)):(e.consume(C),Ae)}function se(C){return C===null||C===34||C===39||C===60||C===61||C===96?i(C):C===47||C===62||bn(C)?re(C):(e.consume(C),se)}function ee(C){return C===47||C===62||bn(C)?re(C):i(C)}function I(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),n):i(C)}function te(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),he}function he(C){return Xe(C)?ct(e,ze,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ze(C)}function ze(C){return e.enter("htmlTextData"),c(C)}}const op={name:"labelEnd",resolveAll:KM,resolveTo:JM,tokenize:WM},YM={tokenize:e3},GM={tokenize:t3},XM={tokenize:n3};function KM(e){let n=-1;const i=[];for(;++n<e.length;){const a=e[n][1];if(i.push(e[n]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",n+=o}}return e.length!==i.length&&Cr(e,0,e.length,i),e}function JM(e,n){let i=e.length,a=0,o,u,c,d;for(;i--;)if(o=e[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,n],["enter",m,n]],d=Kn(d,e.slice(u+1,u+a+3)),d=Kn(d,[["enter",g,n]]),d=Kn(d,lp(n.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),n)),d=Kn(d,[["exit",g,n],e[c-2],e[c-1],["exit",m,n]]),d=Kn(d,e.slice(c+1)),d=Kn(d,[["exit",p,n]]),Cr(e,u,e.length,d),e}function WM(e,n,i){const a=this;let o=a.events.length,u,c;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){u=a.events[o][1];break}return d;function d(x){return u?u._inactive?v(x):(c=a.parser.defined.includes(Bl(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),p):i(x)}function p(x){return x===40?e.attempt(YM,g,c?g:v)(x):x===91?e.attempt(GM,g,c?m:v)(x):c?g(x):v(x)}function m(x){return e.attempt(XM,g,v)(x)}function g(x){return n(x)}function v(x){return u._balanced=!0,i(x)}}function e3(e,n,i){return a;function a(v){return e.enter("resource"),e.enter("resourceMarker"),e.consume(v),e.exit("resourceMarker"),o}function o(v){return bn(v)?hs(e,u)(v):u(v)}function u(v){return v===41?g(v):pw(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(v)}function c(v){return bn(v)?hs(e,p)(v):g(v)}function d(v){return i(v)}function p(v){return v===34||v===39||v===40?yw(e,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(v):g(v)}function m(v){return bn(v)?hs(e,g)(v):g(v)}function g(v){return v===41?(e.enter("resourceMarker"),e.consume(v),e.exit("resourceMarker"),e.exit("resource"),n):i(v)}}function t3(e,n,i){const a=this;return o;function o(d){return gw.call(a,e,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return a.parser.defined.includes(Bl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?n(d):i(d)}function c(d){return i(d)}}function n3(e,n,i){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),n):i(u)}}const r3={name:"labelStartImage",resolveAll:op.resolveAll,tokenize:i3};function i3(e,n,i){const a=this;return o;function o(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),u}function u(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(d):n(d)}}const a3={name:"labelStartLink",resolveAll:op.resolveAll,tokenize:l3};function l3(e,n,i){const a=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):n(c)}}const Oh={name:"lineEnding",tokenize:o3};function o3(e,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ct(e,n,"linePrefix")}}const vc={name:"thematicBreak",tokenize:s3};function s3(e,n,i){let a=0,o;return u;function u(m){return e.enter("thematicBreak"),c(m)}function c(m){return o=m,d(m)}function d(m){return m===o?(e.enter("thematicBreakSequence"),p(m)):a>=3&&(m===null||Te(m))?(e.exit("thematicBreak"),n(m)):i(m)}function p(m){return m===o?(e.consume(m),a++,p):(e.exit("thematicBreakSequence"),Xe(m)?ct(e,d,"whitespace")(m):d(m))}}const gn={continuation:{tokenize:d3},exit:m3,name:"list",tokenize:f3},u3={partial:!0,tokenize:p3},c3={partial:!0,tokenize:h3};function f3(e,n,i){const a=this,o=a.events[a.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return d;function d(S){const N=a.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!a.containerState.marker||S===a.containerState.marker:mm(S)){if(a.containerState.type||(a.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),S===42||S===45?e.check(vc,i,m)(S):m(S);if(!a.interrupt||S===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(S)}return i(S)}function p(S){return mm(S)&&++c<10?(e.consume(S),p):(!a.interrupt||c<2)&&(a.containerState.marker?S===a.containerState.marker:S===41||S===46)?(e.exit("listItemValue"),m(S)):i(S)}function m(S){return e.enter("listItemMarker"),e.consume(S),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||S,e.check(Fc,a.interrupt?i:g,e.attempt(u3,x,v))}function g(S){return a.containerState.initialBlankLine=!0,u++,x(S)}function v(S){return Xe(S)?(e.enter("listItemPrefixWhitespace"),e.consume(S),e.exit("listItemPrefixWhitespace"),x):i(S)}function x(S){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(S)}}function d3(e,n,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Fc,o,u);function o(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ct(e,n,"listItemIndent",a.containerState.size+1)(d)}function u(d){return a.containerState.furtherBlankLines||!Xe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(c3,n,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,ct(e,e.attempt(gn,n,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function h3(e,n,i){const a=this;return ct(e,o,"listItemIndent",a.containerState.size+1);function o(u){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?n(u):i(u)}}function m3(e){e.exit(this.containerState.type)}function p3(e,n,i){const a=this;return ct(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=a.events[a.events.length-1];return!Xe(u)&&c&&c[1].type==="listItemPrefixWhitespace"?n(u):i(u)}}const Vx={name:"setextUnderline",resolveTo:g3,tokenize:y3};function g3(e,n){let i=e.length,a,o,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,n]),e.splice(u+1,0,["exit",e[a][1],n]),e[a][1].end={...e[u][1].end}):e[a][1]=c,e.push(["exit",c,n]),e}function y3(e,n,i){const a=this;let o;return u;function u(m){let g=a.events.length,v;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){v=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||v)?(e.enter("setextHeadingLine"),o=m,c(m)):i(m)}function c(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===o?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),Xe(m)?ct(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Te(m)?(e.exit("setextHeadingLine"),n(m)):i(m)}}const v3={tokenize:b3};function b3(e){const n=this,i=e.attempt(Fc,a,e.attempt(this.parser.constructs.flowInitial,o,ct(e,e.attempt(this.parser.constructs.flow,o,e.attempt(_M,o)),"linePrefix")));return i;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const x3={resolveAll:bw()},S3=vw("string"),w3=vw("text");function vw(e){return{resolveAll:bw(e==="text"?E3:void 0),tokenize:n};function n(i){const a=this,o=this.parser.constructs[e],u=i.attempt(o,c,d);return c;function c(g){return m(g)?u(g):d(g)}function d(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),p}function p(g){return m(g)?(i.exit("data"),u(g)):(i.consume(g),p)}function m(g){if(g===null)return!0;const v=o[g];let x=-1;if(v)for(;++x<v.length;){const S=v[x];if(!S.previous||S.previous.call(a,a.previous))return!0}return!1}}}function bw(e){return n;function n(i,a){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(i,a):i}}function E3(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],o=n.sliceStream(a);let u=o.length,c=-1,d=0,p;for(;u--;){const m=o[u];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){u++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(d=0),d){const m={type:i===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(i,0,["enter",m,n],["exit",m,n]),i+=2)}i++}return e}const _3={42:gn,43:gn,45:gn,48:gn,49:gn,50:gn,51:gn,52:gn,53:gn,54:gn,55:gn,56:gn,57:gn,62:fw},C3={91:NM},k3={[-2]:jh,[-1]:jh,32:jh},T3={35:MM,42:vc,45:[Vx,vc],60:IM,61:Vx,95:vc,96:Fx,126:Fx},A3={38:hw,92:dw},N3={[-5]:Oh,[-4]:Oh,[-3]:Oh,33:r3,38:hw,42:pm,60:[aM,VM],91:a3,92:[RM,dw],93:op,95:pm,96:vM},z3={null:[pm,x3]},j3={null:[42,95]},O3={null:[]},R3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:j3,contentInitial:C3,disable:O3,document:_3,flow:T3,flowInitial:k3,insideSpan:z3,string:A3,text:N3},Symbol.toStringTag,{value:"Module"}));function D3(e,n,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],d=[];const p={attempt:Y(L),check:Y(j),consume:q,enter:U,exit:P,interrupt:Y(j,{interrupt:!0})},m={code:null,containerState:{},defineSkip:_,events:[],now:N,parser:e,previous:null,sliceSerialize:x,sliceStream:S,write:v};let g=n.tokenize.call(m,p);return n.resolveAll&&u.push(n),m;function v(le){return c=Kn(c,le),T(),c[c.length-1]!==null?[]:($(n,0),m.events=lp(u,m.events,m),m.events)}function x(le,ae){return U3(S(le),ae)}function S(le){return M3(c,le)}function N(){const{_bufferIndex:le,_index:ae,line:Ae,column:se,offset:ee}=a;return{_bufferIndex:le,_index:ae,line:Ae,column:se,offset:ee}}function _(le){o[le.line]=le.column,de()}function T(){let le;for(;a._index<c.length;){const ae=c[a._index];if(typeof ae=="string")for(le=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===le&&a._bufferIndex<ae.length;)A(ae.charCodeAt(a._bufferIndex));else A(ae)}}function A(le){g=g(le)}function q(le){Te(le)?(a.line++,a.column=1,a.offset+=le===-3?2:1,de()):le!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=le}function U(le,ae){const Ae=ae||{};return Ae.type=le,Ae.start=N(),m.events.push(["enter",Ae,m]),d.push(Ae),Ae}function P(le){const ae=d.pop();return ae.end=N(),m.events.push(["exit",ae,m]),ae}function L(le,ae){$(le,ae.from)}function j(le,ae){ae.restore()}function Y(le,ae){return Ae;function Ae(se,ee,I){let te,he,ze,C;return Array.isArray(se)?Q(se):"tokenize"in se?Q([se]):D(se);function D(ue){return ke;function ke(we){const be=we!==null&&ue[we],Ct=we!==null&&ue.null,Xt=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return Q(Xt)(we)}}function Q(ue){return te=ue,he=0,ue.length===0?I:k(ue[he])}function k(ue){return ke;function ke(we){return C=re(),ze=ue,ue.partial||(m.currentConstruct=ue),ue.name&&m.parser.constructs.disable.null.includes(ue.name)?fe():ue.tokenize.call(ae?Object.assign(Object.create(m),ae):m,p,oe,fe)(we)}}function oe(ue){return le(ze,C),ee}function fe(ue){return C.restore(),++he<te.length?k(te[he]):I}}}function $(le,ae){le.resolveAll&&!u.includes(le)&&u.push(le),le.resolve&&Cr(m.events,ae,m.events.length-ae,le.resolve(m.events.slice(ae),m)),le.resolveTo&&(m.events=le.resolveTo(m.events,m))}function re(){const le=N(),ae=m.previous,Ae=m.currentConstruct,se=m.events.length,ee=Array.from(d);return{from:se,restore:I};function I(){a=le,m.previous=ae,m.currentConstruct=Ae,m.events.length=se,d=ee,de()}}function de(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function M3(e,n){const i=n.start._index,a=n.start._bufferIndex,o=n.end._index,u=n.end._bufferIndex;let c;if(i===o)c=[e[i].slice(a,u)];else{if(c=e.slice(i,o),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function U3(e,n){let i=-1;const a=[];let o;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
269
|
+
`;break}case-3:{c=`\r
|
|
270
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,a.push(c)}return a.join("")}function L3(e){const a={constructs:F4([R3,...(e||{}).extensions||[]]),content:o(J4),defined:[],document:o(eM),flow:o(v3),lazy:{},string:o(S3),text:o(w3)};return a;function o(u){return c;function c(d){return D3(a,u,d)}}}function B3(e){for(;!mw(e););return e}const Qx=/[\0\t\n\r]/g;function I3(){let e=1,n="",i=!0,a;return o;function o(u,c,d){const p=[];let m,g,v,x,S;for(u=n+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),v=0,n="",i&&(u.charCodeAt(0)===65279&&v++,i=void 0);v<u.length;){if(Qx.lastIndex=v,m=Qx.exec(u),x=m&&m.index!==void 0?m.index:u.length,S=u.charCodeAt(x),!m){n=u.slice(v);break}if(S===10&&v===x&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),v<x&&(p.push(u.slice(v,x)),e+=x-v),S){case 0:{p.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,p.push(-2);e++<g;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:a=!0,e=1}v=x+1}return d&&(a&&p.push(-5),n&&p.push(n),p.push(null)),p}}const q3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function H3(e){return e.replace(q3,Z3)}function Z3(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return cw(i.slice(u?2:1),u?16:10)}return ap(i)||e}const xw={}.hasOwnProperty;function P3(e,n,i){return n&&typeof n=="object"&&(i=n,n=void 0),F3(i)(B3(L3(i).document().write(I3()(e,n,!0))))}function F3(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ar),autolinkProtocol:re,autolinkEmail:re,atxHeading:u(kr),blockQuote:u(Ct),characterEscape:re,characterReference:re,codeFenced:u(Xt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Xt,c),codeText:u(Bn,c),codeTextData:re,data:re,codeFlowValue:re,definition:u(dr),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Kt),hardBreakEscape:u(Tr),hardBreakTrailing:u(Tr),htmlFlow:u(si,c),htmlFlowData:re,htmlText:u(si,c),htmlTextData:re,image:u(rr),label:c,link:u(Ar),listItem:u(ui),listItemValue:x,listOrdered:u(hr,v),listUnordered:u(hr),paragraph:u(Ba),reference:k,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(kr),strong:u(Ia),thematicBreak:u(qa)},exit:{atxHeading:p(),atxHeadingSequence:L,autolink:p(),autolinkEmail:be,autolinkProtocol:we,blockQuote:p(),characterEscapeValue:de,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ue,characterReference:ke,codeFenced:p(T),codeFencedFence:_,codeFencedFenceInfo:S,codeFencedFenceMeta:N,codeFlowValue:de,codeIndented:p(A),codeText:p(ee),codeTextData:de,data:de,definition:p(),definitionDestinationString:P,definitionLabelString:q,definitionTitleString:U,emphasis:p(),hardBreakEscape:p(ae),hardBreakTrailing:p(ae),htmlFlow:p(Ae),htmlFlowData:de,htmlText:p(se),htmlTextData:de,image:p(te),label:ze,labelText:he,lineEnding:le,link:p(I),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:oe,resourceDestinationString:C,resourceTitleString:D,resource:Q,setextHeading:p($),setextHeadingLineSequence:Y,setextHeadingText:j,strong:p(),thematicBreak:p()}};Sw(n,(e||{}).mdastExtensions||[]);const i={};return a;function a(R){let ne={type:"root",children:[]};const _e={stack:[ne],tokenStack:[],config:n,enter:d,exit:m,buffer:c,resume:g,data:i},Ue=[];let Ke=-1;for(;++Ke<R.length;)if(R[Ke][1].type==="listOrdered"||R[Ke][1].type==="listUnordered")if(R[Ke][0]==="enter")Ue.push(Ke);else{const wn=Ue.pop();Ke=o(R,wn,Ke)}for(Ke=-1;++Ke<R.length;){const wn=n[R[Ke][0]];xw.call(wn,R[Ke][1].type)&&wn[R[Ke][1].type].call(Object.assign({sliceSerialize:R[Ke][2].sliceSerialize},_e),R[Ke][1])}if(_e.tokenStack.length>0){const wn=_e.tokenStack[_e.tokenStack.length-1];(wn[1]||Yx).call(_e,void 0,wn[0])}for(ne.position={start:Li(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:Li(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke<n.transforms.length;)ne=n.transforms[Ke](ne)||ne;return ne}function o(R,ne,_e){let Ue=ne-1,Ke=-1,wn=!1,Nr,nn,Ot,sn;for(;++Ue<=_e;){const lt=R[Ue];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?Ke++:Ke--,sn=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(Nr&&!sn&&!Ke&&!Ot&&(Ot=Ue),sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:sn=void 0}if(!Ke&<[0]==="enter"&<[1].type==="listItemPrefix"||Ke===-1&<[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Nr){let ci=Ue;for(nn=void 0;ci--;){const ir=R[ci];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;nn&&(R[nn][1].type="lineEndingBlank",wn=!0),ir[1].type="lineEnding",nn=ci}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}Ot&&(!nn||Ot<nn)&&(Nr._spread=!0),Nr.end=Object.assign({},nn?R[nn][1].start:lt[1].end),R.splice(nn||Ue,0,["exit",Nr,lt[2]]),Ue++,_e++}if(lt[1].type==="listItemPrefix"){const ci={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Nr=ci,R.splice(Ue,0,["enter",ci,lt[2]]),Ue++,_e++,Ot=void 0,sn=!0}}}return R[ne][1]._spread=wn,_e}function u(R,ne){return _e;function _e(Ue){d.call(this,R(Ue),Ue),ne&&ne.call(this,Ue)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(R,ne,_e){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([ne,_e||void 0]),R.position={start:Li(ne.start),end:void 0}}function p(R){return ne;function ne(_e){R&&R.call(this,_e),m.call(this,_e)}}function m(R,ne){const _e=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==R.type&&(ne?ne.call(this,R,Ue[0]):(Ue[1]||Yx).call(this,R,Ue[0]));else throw new Error("Cannot close `"+R.type+"` ("+ds({start:R.start,end:R.end})+"): it’s not open");_e.position.end=Li(R.end)}function g(){return Z4(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function x(R){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function S(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=R}function N(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=R}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.value=R.replace(/(\r?\n|\r)$/g,"")}function q(R){const ne=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ne,_e.identifier=Bl(this.sliceSerialize(R)).toLowerCase()}function U(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.title=R}function P(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.url=R}function L(R){const ne=this.stack[this.stack.length-1];if(!ne.depth){const _e=this.sliceSerialize(R).length;ne.depth=_e}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function Y(R){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function re(R){const _e=this.stack[this.stack.length-1].children;let Ue=_e[_e.length-1];(!Ue||Ue.type!=="text")&&(Ue=Lt(),Ue.position={start:Li(R.start),end:void 0},_e.push(Ue)),this.stack.push(Ue)}function de(R){const ne=this.stack.pop();ne.value+=this.sliceSerialize(R),ne.position.end=Li(R.end)}function le(R){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=ne.children[ne.children.length-1];_e.position.end=Li(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ne.type)&&(re.call(this,R),de.call(this,R))}function ae(){this.data.atHardBreak=!0}function Ae(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.value=R}function se(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.value=R}function ee(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.value=R}function I(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=ne,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function te(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=ne,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function he(R){const ne=this.sliceSerialize(R),_e=this.stack[this.stack.length-2];_e.label=H3(ne),_e.identifier=Bl(ne).toLowerCase()}function ze(){const R=this.stack[this.stack.length-1],ne=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Ue=R.children;_e.children=Ue}else _e.alt=ne}function C(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.url=R}function D(){const R=this.resume(),ne=this.stack[this.stack.length-1];ne.title=R}function Q(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function oe(R){const ne=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ne,_e.identifier=Bl(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function fe(R){this.data.characterReferenceType=R.type}function ue(R){const ne=this.sliceSerialize(R),_e=this.data.characterReferenceType;let Ue;_e?(Ue=cw(ne,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=ap(ne);const Ke=this.stack[this.stack.length-1];Ke.value+=Ue}function ke(R){const ne=this.stack.pop();ne.position.end=Li(R.end)}function we(R){de.call(this,R);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(R)}function be(R){de.call(this,R);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(R)}function Ct(){return{type:"blockquote",children:[]}}function Xt(){return{type:"code",lang:null,meta:null,value:""}}function Bn(){return{type:"inlineCode",value:""}}function dr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kt(){return{type:"emphasis",children:[]}}function kr(){return{type:"heading",depth:0,children:[]}}function Tr(){return{type:"break"}}function si(){return{type:"html",value:""}}function rr(){return{type:"image",title:null,url:"",alt:null}}function Ar(){return{type:"link",title:null,url:"",children:[]}}function hr(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function ui(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function Ba(){return{type:"paragraph",children:[]}}function Ia(){return{type:"strong",children:[]}}function Lt(){return{type:"text",value:""}}function qa(){return{type:"thematicBreak"}}}function Li(e){return{line:e.line,column:e.column,offset:e.offset}}function Sw(e,n){let i=-1;for(;++i<n.length;){const a=n[i];Array.isArray(a)?Sw(e,a):$3(e,a)}}function $3(e,n){let i;for(i in n)if(xw.call(n,i))switch(i){case"canContainEols":{const a=n[i];a&&e[i].push(...a);break}case"transforms":{const a=n[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=n[i];a&&Object.assign(e[i],a);break}}}function Yx(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+ds({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+ds({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+ds({start:n.start,end:n.end})+") is still open")}function V3(e){const n=this;n.parser=i;function i(a){return P3(a,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Q3(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function Y3(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
|
|
271
|
+
`}]}function G3(e,n){const i=n.value?n.value+`
|
|
272
|
+
`:"",a={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return n.meta&&(u.data={meta:n.meta}),e.patch(n,u),u=e.applyData(n,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(n,u),u}function X3(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function K3(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function J3(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(n.identifier).toUpperCase(),o=ao(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=u+1,d+=1,e.footnoteCounts.set(a,d);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(n,m),e.applyData(n,m)}function W3(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function e6(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function ww(e,n){const i=n.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+a}];const o=e.all(n),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=a:o.push({type:"text",value:a}),o}function t6(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return ww(e,n);const o={src:ao(a.url||""),alt:n.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,u),e.applyData(n,u)}function n6(e,n){const i={src:ao(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function r6(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,a),e.applyData(n,a)}function i6(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return ww(e,n);const o={href:ao(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const u={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,u),e.applyData(n,u)}function a6(e,n){const i={href:ao(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function l6(e,n,i){const a=e.all(n),o=i?o6(i):Ew(n),u={},c=[];if(typeof n.checked=="boolean"){const g=a[0];let v;g&&g.type==="element"&&g.tagName==="p"?v=g:(v={type:"element",tagName:"p",properties:{},children:[]},a.unshift(v)),v.children.length>0&&v.children.unshift({type:"text",value:" "}),v.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(o||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
273
|
+
`}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const p=a[a.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
274
|
+
`});const m={type:"element",tagName:"li",properties:u,children:c};return e.patch(n,m),e.applyData(n,m)}function o6(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let a=-1;for(;!n&&++a<i.length;)n=Ew(i[a])}return n}function Ew(e){const n=e.spread;return n??e.children.length>1}function s6(e,n){const i={},a=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++o<a.length;){const c=a[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(n,u),e.applyData(n,u)}function u6(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function c6(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function f6(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function d6(e,n){const i=e.all(n),a=i.shift(),o=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(n.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},d=tp(n.children[1]),p=rw(n.children[n.children.length-1]);d&&p&&(c.position={start:d,end:p}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,u),e.applyData(n,u)}function h6(e,n,i){const a=i?i.children:void 0,u=(a?a.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,d=c?c.length:n.children.length;let p=-1;const m=[];for(;++p<d;){const v=n.children[p],x={},S=c?c[p]:void 0;S&&(x.align=S);let N={type:"element",tagName:u,properties:x,children:[]};v&&(N.children=e.all(v),e.patch(v,N),N=e.applyData(v,N)),m.push(N)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(n,g),e.applyData(n,g)}function m6(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const Gx=9,Xx=32;function p6(e){const n=String(e),i=/\r?\n|\r/g;let a=i.exec(n),o=0;const u=[];for(;a;)u.push(Kx(n.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(n);return u.push(Kx(n.slice(o),o>0,!1)),u.join("")}function Kx(e,n,i){let a=0,o=e.length;if(n){let u=e.codePointAt(a);for(;u===Gx||u===Xx;)a++,u=e.codePointAt(a)}if(i){let u=e.codePointAt(o-1);for(;u===Gx||u===Xx;)o--,u=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function g6(e,n){const i={type:"text",value:p6(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function y6(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const v6={blockquote:Q3,break:Y3,code:G3,delete:X3,emphasis:K3,footnoteReference:J3,heading:W3,html:e6,imageReference:t6,image:n6,inlineCode:r6,linkReference:i6,link:a6,listItem:l6,list:s6,paragraph:u6,root:c6,strong:f6,table:d6,tableCell:m6,tableRow:h6,text:g6,thematicBreak:y6,toml:uc,yaml:uc,definition:uc,footnoteDefinition:uc};function uc(){}const _w=-1,$c=0,ms=1,zc=2,sp=3,up=4,cp=5,fp=6,Cw=7,kw=8,Jx=typeof self=="object"?self:globalThis,b6=(e,n)=>{const i=(o,u)=>(e.set(u,o),o),a=o=>{if(e.has(o))return e.get(o);const[u,c]=n[o];switch(u){case $c:case _w:return i(c,o);case ms:{const d=i([],o);for(const p of c)d.push(a(p));return d}case zc:{const d=i({},o);for(const[p,m]of c)d[a(p)]=a(m);return d}case sp:return i(new Date(c),o);case up:{const{source:d,flags:p}=c;return i(new RegExp(d,p),o)}case cp:{const d=i(new Map,o);for(const[p,m]of c)d.set(a(p),a(m));return d}case fp:{const d=i(new Set,o);for(const p of c)d.add(a(p));return d}case Cw:{const{name:d,message:p}=c;return i(new Jx[d](p),o)}case kw:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(new Jx[u](c),o)};return a},Wx=e=>b6(new Map,e)(0),Nl="",{toString:x6}={},{keys:S6}=Object,ls=e=>{const n=typeof e;if(n!=="object"||!e)return[$c,n];const i=x6.call(e).slice(8,-1);switch(i){case"Array":return[ms,Nl];case"Object":return[zc,Nl];case"Date":return[sp,Nl];case"RegExp":return[up,Nl];case"Map":return[cp,Nl];case"Set":return[fp,Nl];case"DataView":return[ms,i]}return i.includes("Array")?[ms,i]:i.includes("Error")?[Cw,i]:[zc,i]},cc=([e,n])=>e===$c&&(n==="function"||n==="symbol"),w6=(e,n,i,a)=>{const o=(c,d)=>{const p=a.push(c)-1;return i.set(d,p),p},u=c=>{if(i.has(c))return i.get(c);let[d,p]=ls(c);switch(d){case $c:{let g=c;switch(p){case"bigint":d=kw,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return o([_w],c)}return o([d,g],c)}case ms:{if(p){let x=c;return p==="DataView"?x=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(x=new Uint8Array(c)),o([p,[...x]],c)}const g=[],v=o([d,g],c);for(const x of c)g.push(u(x));return v}case zc:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(n&&"toJSON"in c)return u(c.toJSON());const g=[],v=o([d,g],c);for(const x of S6(c))(e||!cc(ls(c[x])))&&g.push([u(x),u(c[x])]);return v}case sp:return o([d,c.toISOString()],c);case up:{const{source:g,flags:v}=c;return o([d,{source:g,flags:v}],c)}case cp:{const g=[],v=o([d,g],c);for(const[x,S]of c)(e||!(cc(ls(x))||cc(ls(S))))&&g.push([u(x),u(S)]);return v}case fp:{const g=[],v=o([d,g],c);for(const x of c)(e||!cc(ls(x)))&&g.push(u(x));return v}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return u},e0=(e,{json:n,lossy:i}={})=>{const a=[];return w6(!(n||i),!!n,new Map,a)(e),a},jc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Wx(e0(e,n)):structuredClone(e):(e,n)=>Wx(e0(e,n));function E6(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function _6(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function C6(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||E6,a=e.options.footnoteBackLabel||_6,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const g=e.all(m),v=String(m.identifier).toUpperCase(),x=ao(v.toLowerCase());let S=0;const N=[],_=e.footnoteCounts.get(v);for(;_!==void 0&&++S<=_;){N.length>0&&N.push({type:"text",value:" "});let q=typeof i=="string"?i:i(p,S);typeof q=="string"&&(q={type:"text",value:q}),N.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,S),className:["data-footnote-backref"]},children:Array.isArray(q)?q:[q]})}const T=g[g.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const q=T.children[T.children.length-1];q&&q.type==="text"?q.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...N)}else g.push(...N);const A={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(g,!0)};e.patch(m,A),d.push(A)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...jc(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
275
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
276
|
+
`}]}}const Tw=(function(e){if(e==null)return N6;if(typeof e=="function")return Vc(e);if(typeof e=="object")return Array.isArray(e)?k6(e):T6(e);if(typeof e=="string")return A6(e);throw new Error("Expected function, string, or object as test")});function k6(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=Tw(e[i]);return Vc(a);function a(...o){let u=-1;for(;++u<n.length;)if(n[u].apply(this,o))return!0;return!1}}function T6(e){const n=e;return Vc(i);function i(a){const o=a;let u;for(u in e)if(o[u]!==n[u])return!1;return!0}}function A6(e){return Vc(n);function n(i){return i&&i.type===e}}function Vc(e){return n;function n(i,a,o){return!!(z6(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function N6(){return!0}function z6(e){return e!==null&&typeof e=="object"&&"type"in e}const Aw=[],j6=!0,t0=!1,O6="skip";function R6(e,n,i,a){let o;typeof n=="function"&&typeof i!="function"?(a=i,i=n):o=n;const u=Tw(o),c=a?-1:1;d(e,void 0,[])();function d(p,m,g){const v=p&&typeof p=="object"?p:{};if(typeof v.type=="string"){const S=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return x;function x(){let S=Aw,N,_,T;if((!n||u(p,m,g[g.length-1]||void 0))&&(S=D6(i(p,g)),S[0]===t0))return S;if("children"in p&&p.children){const A=p;if(A.children&&S[0]!==O6)for(_=(a?A.children.length:-1)+c,T=g.concat(A);_>-1&&_<A.children.length;){const q=A.children[_];if(N=d(q,_,T)(),N[0]===t0)return N;_=typeof N[1]=="number"?N[1]:_+c}}return S}}}function D6(e){return Array.isArray(e)?e:typeof e=="number"?[j6,e]:e==null?Aw:[e]}function Nw(e,n,i,a){let o,u,c;typeof n=="function"&&typeof i!="function"?(u=void 0,c=n,o=i):(u=n,c=i,o=a),R6(e,u,d,o);function d(p,m){const g=m[m.length-1],v=g?g.children.indexOf(p):void 0;return c(p,v,g)}}const gm={}.hasOwnProperty,M6={};function U6(e,n){const i=n||M6,a=new Map,o=new Map,u=new Map,c={...v6,...i.handlers},d={all:m,applyData:B6,definitionById:a,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:L6,wrap:q6};return Nw(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const v=g.type==="definition"?a:o,x=String(g.identifier).toUpperCase();v.has(x)||v.set(x,g)}}),d;function p(g,v){const x=g.type,S=d.handlers[x];if(gm.call(d.handlers,x)&&S)return S(d,g,v);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in g){const{children:_,...T}=g,A=jc(T);return A.children=d.all(g),A}return jc(g)}return(d.options.unknownHandler||I6)(d,g,v)}function m(g){const v=[];if("children"in g){const x=g.children;let S=-1;for(;++S<x.length;){const N=d.one(x[S],g);if(N){if(S&&x[S-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=n0(N.value)),!Array.isArray(N)&&N.type==="element")){const _=N.children[0];_&&_.type==="text"&&(_.value=n0(_.value))}Array.isArray(N)?v.push(...N):v.push(N)}}}return v}}function L6(e,n){e.position&&(n.position=x4(e))}function B6(e,n){let i=n;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,jc(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function I6(e,n){const i=n.data||{},a="value"in n&&!(gm.call(i,"hProperties")||gm.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function q6(e,n){const i=[];let a=-1;for(n&&i.push({type:"text",value:`
|
|
277
|
+
`});++a<e.length;)a&&i.push({type:"text",value:`
|
|
278
|
+
`}),i.push(e[a]);return n&&e.length>0&&i.push({type:"text",value:`
|
|
279
|
+
`}),i}function n0(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function r0(e,n){const i=U6(e,n),a=i.one(e,void 0),o=C6(i),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
280
|
+
`},o),u}function H6(e,n){return e&&"run"in e?async function(i,a){const o=r0(i,{file:a,...n});await e.run(o,a)}:function(i,a){return r0(i,{file:a,...e||n})}}function i0(e){if(e)throw e}var Rh,a0;function Z6(){if(a0)return Rh;a0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):n.call(m)==="[object Array]"},u=function(m){if(!m||n.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),v=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!v)return!1;var x;for(x in m);return typeof x>"u"||e.call(m,x)},c=function(m,g){i&&g.name==="__proto__"?i(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},d=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return Rh=function p(){var m,g,v,x,S,N,_=arguments[0],T=1,A=arguments.length,q=!1;for(typeof _=="boolean"&&(q=_,_=arguments[1]||{},T=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});T<A;++T)if(m=arguments[T],m!=null)for(g in m)v=d(_,g),x=d(m,g),_!==x&&(q&&x&&(u(x)||(S=o(x)))?(S?(S=!1,N=v&&o(v)?v:[]):N=v&&u(v)?v:{},c(_,{name:g,newValue:p(q,N,x)})):typeof x<"u"&&c(_,{name:g,newValue:x}));return _},Rh}var P6=Z6();const Dh=Oc(P6);function ym(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function F6(){const e=[],n={run:i,use:a};return n;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(p,...m){const g=e[++u];let v=-1;if(p){c(p);return}for(;++v<o.length;)(m[v]===null||m[v]===void 0)&&(m[v]=o[v]);o=m,g?$6(g,d)(...m):c(null,...m)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function $6(e,n){let i;return a;function a(...c){const d=e.length>c.length;let p;d&&c.push(o);try{p=e.apply(this,c)}catch(m){const g=m;if(d&&i)throw g;return o(g)}d||(p&&p.then&&typeof p.then=="function"?p.then(u,o):p instanceof Error?o(p):u(p))}function o(c,...d){i||(i=!0,n(c,...d))}function u(c){o(null,c)}}const vr={basename:V6,dirname:Q6,extname:Y6,join:G6,sep:"/"};function V6(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Os(e);let i=0,a=-1,o=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else a<0&&(u=!0,a=o+1);return a<0?"":e.slice(i,a)}if(n===e)return"";let c=-1,d=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),d>-1&&(e.codePointAt(o)===n.codePointAt(d--)?d<0&&(a=o):(d=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function Q6(e){if(Os(e),e.length===0)return".";let n=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){n=i;break}}else a||(a=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Y6(e){Os(e);let n=e.length,i=-1,a=0,o=-1,u=0,c;for(;n--;){const d=e.codePointAt(n);if(d===47){if(c){a=n+1;break}continue}i<0&&(c=!0,i=n+1),d===46?o<0?o=n:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===a+1?"":e.slice(o,i)}function G6(...e){let n=-1,i;for(;++n<e.length;)Os(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":X6(i)}function X6(e){Os(e);const n=e.codePointAt(0)===47;let i=K6(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function K6(e,n){let i="",a=0,o=-1,u=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",a=0):(i=i.slice(0,p),a=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",a=0,o=c,u=0;continue}}n&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),a=c-o-1;o=c,u=0}else d===46&&u>-1?u++:u=-1}return i}function Os(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const J6={cwd:W6};function W6(){return"/"}function vm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eU(e){if(typeof e=="string")e=new URL(e);else if(!vm(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return tU(e)}function tU(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const a=n.codePointAt(i+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Mh=["history","path","basename","stem","extname","dirname"];class zw{constructor(n){let i;n?vm(n)?i={path:n}:typeof n=="string"||nU(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":J6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Mh.length;){const u=Mh[a];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)Mh.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(n){Lh(n,"basename"),Uh(n,"basename"),this.path=vr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(n){l0(this.basename,"dirname"),this.path=vr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(n){if(Uh(n,"extname"),l0(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){vm(n)&&(n=eU(n)),Lh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(n){Lh(n,"stem"),Uh(n,"stem"),this.path=vr.join(this.dirname||"",n+(this.extname||""))}fail(n,i,a){const o=this.message(n,i,a);throw o.fatal=!0,o}info(n,i,a){const o=this.message(n,i,a);return o.fatal=void 0,o}message(n,i,a){const o=new tn(n,i,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Uh(e,n){if(e&&e.includes(vr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+vr.sep+"`")}function Lh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function l0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function nU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rU=(function(e){const a=this.constructor.prototype,o=a[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),iU={}.hasOwnProperty;class dp extends rU{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=F6()}copy(){const n=new dp;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];n.use(...a)}return n.data(Dh(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(qh("data",this.frozen),this.namespace[n]=i,this):iU.call(this.namespace,n)&&this.namespace[n]||void 0:n?(qh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=i.call(n,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=fc(n),a=this.parser||this.Parser;return Bh("parse",a),a(String(i),i)}process(n,i){const a=this;return this.freeze(),Bh("process",this.parser||this.Parser),Ih("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const d=fc(n),p=a.parse(d);a.run(p,d,function(g,v,x){if(g||!v||!x)return m(g);const S=v,N=a.stringify(S,x);oU(N)?x.value=N:x.result=N,m(g,x)});function m(g,v){g||!v?c(g):u?u(v):i(void 0,v)}}}processSync(n){let i=!1,a;return this.freeze(),Bh("processSync",this.parser||this.Parser),Ih("processSync",this.compiler||this.Compiler),this.process(n,o),s0("processSync","process",i),a;function o(u,c){i=!0,i0(u),a=c}}run(n,i,a){o0(n),this.freeze();const o=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?u(void 0,a):new Promise(u);function u(c,d){const p=fc(i);o.run(n,p,m);function m(g,v,x){const S=v||n;g?d(g):c?c(S):a(void 0,S,x)}}}runSync(n,i){let a=!1,o;return this.run(n,i,u),s0("runSync","run",a),o;function u(c,d){i0(c),o=d,a=!0}}stringify(n,i){this.freeze();const a=fc(i),o=this.compiler||this.Compiler;return Ih("stringify",o),o0(n),o(n,a)}use(n,...i){const a=this.attachers,o=this.namespace;if(qh("use",this.frozen),n!=null)if(typeof n=="function")p(n,i);else if(typeof n=="object")Array.isArray(n)?d(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function u(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...v]=m;p(g,v)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(m.plugins),m.settings&&(o.settings=Dh(!0,o.settings,m.settings))}function d(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const v=m[g];u(v)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let v=-1,x=-1;for(;++v<a.length;)if(a[v][0]===m){x=v;break}if(x===-1)a.push([m,...g]);else if(g.length>0){let[S,...N]=g;const _=a[x][1];ym(_)&&ym(S)&&(S=Dh(!0,_,S)),a[x]=[m,S,...N]}}}}const aU=new dp().freeze();function Bh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ih(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function o0(e){if(!ym(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function s0(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function fc(e){return lU(e)?e:new zw(e)}function lU(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oU(e){return typeof e=="string"||sU(e)}function sU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uU="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",u0=[],c0={allowDangerousHtml:!0},cU=/^(https?|ircs?|mailto|xmpp)$/i,fU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dU(e){const n=hU(e),i=mU(e);return pU(n.runSync(n.parse(i),i),e)}function hU(e){const n=e.rehypePlugins||u0,i=e.remarkPlugins||u0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...c0}:c0;return aU().use(V3).use(i).use(H6,a).use(n)}function mU(e){const n=e.children||"",i=new zw;return typeof n=="string"&&(i.value=n),i}function pU(e,n){const i=n.allowedElements,a=n.allowElement,o=n.components,u=n.disallowedElements,c=n.skipHtml,d=n.unwrapDisallowed,p=n.urlTransform||gU;for(const g of fU)Object.hasOwn(n,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+uU+g.id,void 0);return Nw(e,m),C4(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function m(g,v,x){if(g.type==="raw"&&x&&typeof v=="number")return c?x.children.splice(v,1):x.children[v]={type:"text",value:g.value},v;if(g.type==="element"){let S;for(S in zh)if(Object.hasOwn(zh,S)&&Object.hasOwn(g.properties,S)){const N=g.properties[S],_=zh[S];(_===null||_.includes(g.tagName))&&(g.properties[S]=p(String(N||""),S,g))}}if(g.type==="element"){let S=i?!i.includes(g.tagName):u?u.includes(g.tagName):!1;if(!S&&a&&typeof v=="number"&&(S=!a(g,v,x)),S&&x&&typeof v=="number")return d&&g.children?x.children.splice(v,1,...g.children):x.children.splice(v,1),v}}}function gU(e){const n=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||i!==-1&&n>i||a!==-1&&n>a||cU.test(e.slice(0,n))?e:""}function jw(){return nt.get("/admin/adapter-mappings")}function yU(e){return nt.post("/admin/adapter-mappings",e)}function vU(e){return nt.delete(`/admin/adapter-mappings/${e}`)}function Ow(){return nt.get("/admin/adapters/status")}function Rw(){return nt.get("/admin/adapters")}function bU(e){return nt.post("/admin/adapters",e)}function xU(e,n){return nt.patch(`/admin/adapters/${e}`,n)}function SU(e){return nt.delete(`/admin/adapters/${e}`)}function Dw(e){const n=new URLSearchParams;e!=null&&e.limit&&n.set("limit",String(e.limit)),e!=null&&e.cursor&&n.set("cursor",e.cursor),e!=null&&e.type&&n.set("type",e.type);const i=n.toString();return nt.get(`/admin/agents${i?`?${i}`:""}`)}function wU(e){return nt.get(`/admin/agents/${encodeURIComponent(e)}`)}function EU(e){return nt.post("/admin/agents",e)}function f0(e,n){return nt.patch(`/admin/agents/${encodeURIComponent(e)}`,n)}function _U(e){return nt.delete(`/admin/agents/${encodeURIComponent(e)}`)}function CU(e){return nt.post(`/admin/agents/${encodeURIComponent(e)}/suspend`,{})}function kU(e){return nt.post(`/admin/agents/${encodeURIComponent(e)}/reactivate`,{})}function TU(e){return nt.post(`/admin/agents/${encodeURIComponent(e)}/test`,{})}function AU(e){return nt.get(`/admin/agents/${encodeURIComponent(e)}/tokens`)}function d0(e,n){return nt.post(`/admin/agents/${encodeURIComponent(e)}/tokens`,n)}function NU(e,n){return nt.delete(`/admin/agents/${encodeURIComponent(e)}/tokens/${encodeURIComponent(n)}`)}const zU=Object.values(cS);function Mw(e){var P;const{open:n,onOpenChange:i,onSubmit:a,isPending:o,error:u,mode:c}=e,d=c==="edit"?e.agent:void 0,[p,m]=w.useState(""),[g,v]=w.useState("personal_assistant"),[x,S]=w.useState(""),[N,_]=w.useState(""),T=g==="human",A=en({queryKey:["agents-for-delegate"],queryFn:async()=>(await Dw({limit:100})).items.filter(j=>j.type==="personal_assistant"&&j.status==="active"),enabled:n&&T});w.useEffect(()=>{n&&(d?(m(d.id),v(d.type),S(d.displayName??""),_(d.delegateMention??"")):(m(""),v("personal_assistant"),S(""),_("")))},[n,d]);const q=L=>{L.preventDefault(),a({id:c==="create"&&p?p:void 0,type:g,displayName:x||null,delegateMention:N||null})},U=c==="edit";return y.jsx(cs,{open:n,onOpenChange:i,children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:U?"Edit Agent":"New Agent"})}),y.jsxs("form",{onSubmit:q,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"agent-id",children:"ID"}),U?y.jsx(Yt,{id:"agent-id",value:p,disabled:!0,className:"font-mono"}):y.jsx(Yt,{id:"agent-id",value:p,onChange:L=>m(L.target.value),placeholder:"Leave empty to auto-generate",pattern:"^[a-z0-9_-]*$",title:"Only lowercase alphanumeric, hyphens, and underscores",className:"font-mono"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"agent-type",children:"Type"}),y.jsx("select",{id:"agent-type",value:g,onChange:L=>{const j=L.target.value;v(j),j!=="human"&&_("")},disabled:U,className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50",children:zU.map(L=>y.jsx("option",{value:L,children:L},L))})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"agent-display-name",children:"Display Name"}),y.jsx(Yt,{id:"agent-display-name",value:x,onChange:L=>S(L.target.value),placeholder:"Optional",maxLength:200})]}),T&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"agent-delegate",children:"Delegate Mention"}),y.jsxs("select",{id:"agent-delegate",value:N,onChange:L=>_(L.target.value),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[y.jsx("option",{value:"",children:"None"}),(P=A.data)==null?void 0:P.map(L=>y.jsx("option",{value:L.id,children:L.displayName?`${L.displayName} (${L.id})`:L.id},L.id))]}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"The personal assistant that acts on behalf of this agent"})]}),u&&y.jsx("div",{className:"text-sm text-destructive",children:u.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:o,children:o?"Saving...":U?"Save":"Create"})})]})]})})}const Dn=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("rounded-xl border bg-card text-card-foreground shadow-sm",e),...n}));Dn.displayName="Card";const Jn=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("flex flex-col space-y-1.5 p-6",e),...n}));Jn.displayName="CardHeader";const Wn=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("font-semibold leading-none tracking-tight",e),...n}));Wn.displayName="CardTitle";const Uw=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("text-sm text-muted-foreground",e),...n}));Uw.displayName="CardDescription";const Mn=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("p-6 pt-0",e),...n}));Mn.displayName="CardContent";const jU=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("flex items-center p-6 pt-0",e),...n}));jU.displayName="CardFooter";const OU=Object.values(RO);function RU(){var ui,Ba,Ia,Lt,qa;const n=zk().agentId??"",i=Ns(),a=Wl(),o=en({queryKey:["agent",n],queryFn:()=>wU(n),enabled:!!n}),u=en({queryKey:["tokens",n],queryFn:()=>AU(n),enabled:!!n&&o.isSuccess&&((ui=o.data)==null?void 0:ui.type)!=="human"}),c=en({queryKey:["adapters"],queryFn:Rw}),d=en({queryKey:["adapter-mappings"],queryFn:jw}),{data:p}=en({queryKey:["adapter-statuses"],queryFn:Ow,refetchInterval:15e3}),m=((Ba=c.data)==null?void 0:Ba.filter(R=>R.agentId===n))??[],g=((Ia=d.data)==null?void 0:Ia.filter(R=>R.agentId===n))??[],[v,x]=w.useState(!1),[S,N]=w.useState(""),[_,T]=w.useState(null),[A,q]=w.useState(!1),[U,P]=w.useState(null),[L,j]=w.useState({platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),[Y,$]=w.useState(""),re=Ht({mutationFn:()=>CU(n),onSuccess:()=>a.invalidateQueries({queryKey:["agent",n]})}),de=Ht({mutationFn:()=>kU(n),onSuccess:()=>a.invalidateQueries({queryKey:["agent",n]})}),le=Ht({mutationFn:()=>_U(n),onSuccess:()=>i("/agents")}),ae=Ht({mutationFn:R=>d0(n,{name:R||void 0}),onSuccess:R=>{T(R.token),N(""),a.invalidateQueries({queryKey:["tokens",n]})}}),Ae=Ht({mutationFn:R=>NU(n,R),onSuccess:()=>a.invalidateQueries({queryKey:["tokens",n]})}),se=Ht({mutationFn:async()=>{let R=h0(L);if(!R)throw new Error("Credentials are required");if(L.platform==="kael"&&!R.agentToken){const ne=await d0(n,{name:"kael-hub-binding"});R={...R,agentToken:ne.token}}return bU({platform:L.platform,agentId:n,credentials:R,status:L.status})},onSuccess:()=>{a.invalidateQueries({queryKey:["adapters"]}),a.invalidateQueries({queryKey:["tokens",n]}),Ct()}}),ee=Ht({mutationFn:()=>{if(!U)throw new Error("No adapter selected");const R={status:L.status},ne=h0(L);return ne&&(R.credentials=ne),xU(U,R)},onSuccess:()=>{a.invalidateQueries({queryKey:["adapters"]}),Ct()}}),I=Ht({mutationFn:SU,onSuccess:()=>a.invalidateQueries({queryKey:["adapters"]})}),te=Ht({mutationFn:()=>yU({platform:L.platform,externalUserId:L.externalUserId,agentId:n,boundVia:"manual",displayName:L.displayName||void 0}),onSuccess:()=>{a.invalidateQueries({queryKey:["adapter-mappings"]}),Ct()}}),he=Ht({mutationFn:vU,onSuccess:()=>a.invalidateQueries({queryKey:["adapter-mappings"]})}),[ze,C]=w.useState(!1),D=Ht({mutationFn:R=>f0(n,{displayName:R.displayName,delegateMention:R.delegateMention}),onSuccess:()=>{C(!1),a.invalidateQueries({queryKey:["agent",n]}),a.invalidateQueries({queryKey:["agents"]})}}),Q=Ht({mutationFn:()=>TU(n)}),[k,oe]=w.useState(!1),[fe,ue]=w.useState(""),ke=Ht({mutationFn:R=>f0(n,{profile:R||null}),onSuccess:()=>{oe(!1),a.invalidateQueries({queryKey:["agent",n]})}}),we=o.data,be=(we==null?void 0:we.type)==="human";function Ct(){q(!1),P(null),j({platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),$("")}function Xt(R){P(R.id),j({platform:R.platform,feishuAppId:"",feishuAppSecret:"",credentialsJson:"",status:R.status,externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),q(!0)}function Bn(R){if(R.preventDefault(),$(""),be){if(!L.externalUserId)return;te.mutate();return}if(L.platform==="feishu"){if(!U&&(!L.feishuAppId||!L.feishuAppSecret)){$("App ID and App Secret are required");return}}else if(L.platform==="kael"){if(!U&&(!L.kaelUserId||!L.kaelProjectId)){$("User ID and Project ID are required");return}}else{const ne=L.credentialsJson.trim();if(!U&&!ne){$("Credentials are required");return}if(ne)try{JSON.parse(ne)}catch{$("Invalid JSON");return}}U?ee.mutate():se.mutate()}if(o.isLoading)return y.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(o.error)return y.jsxs("div",{className:"text-destructive",children:["Failed to load agent: ",o.error instanceof Error?o.error.message:"Unknown error"]});if(!we)return y.jsx("div",{className:"text-muted-foreground",children:"Agent not found"});const dr=()=>{window.confirm("Are you sure you want to delete this agent? This cannot be undone.")&&le.mutate()},Kt=R=>{R.preventDefault(),ae.mutate(S)},kr=se.error??ee.error??te.error,Tr=se.isPending||ee.isPending||te.isPending,si=we.metadata,rr=si==null?void 0:si.tree,Ar=rr==null?void 0:rr.role,hr=rr==null?void 0:rr.domains;return y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>i("/agents"),children:y.jsx(d1,{className:"h-4 w-4"})}),y.jsxs("div",{className:"flex-1",children:[y.jsx("h1",{className:"text-2xl font-semibold",children:we.displayName??we.id}),y.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:we.id})]}),we.status==="active"&&y.jsxs($e,{variant:"outline",size:"sm",onClick:()=>C(!0),children:[y.jsx(pc,{className:"h-4 w-4 mr-2"}),"Edit"]}),!be&&we.status==="active"&&y.jsxs($e,{variant:"outline",size:"sm",onClick:()=>{Q.reset(),Q.mutate()},disabled:Q.isPending,children:[y.jsx(K2,{className:"h-4 w-4 mr-2"}),Q.isPending?"Testing...":"Test Connection"]}),we.status==="active"&&y.jsx($e,{variant:"outline",size:"sm",onClick:()=>{window.confirm("Suspend this agent? All tokens will be revoked.")&&re.mutate()},disabled:re.isPending,children:re.isPending?"Suspending...":"Suspend"}),we.status==="suspended"&&y.jsxs(y.Fragment,{children:[y.jsx($e,{variant:"outline",size:"sm",onClick:()=>de.mutate(),disabled:de.isPending,children:de.isPending?"Reactivating...":"Reactivate"}),y.jsxs($e,{variant:"destructive",size:"sm",onClick:dr,children:[y.jsx(ss,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]}),(Q.data||Q.error)&&y.jsx(MU,{result:Q.data??{status:"error",message:"Failed to reach server"},onDismiss:()=>Q.reset()}),y.jsxs(Dn,{children:[y.jsx(Jn,{children:y.jsx(Wn,{children:"Agent Info"})}),y.jsx(Mn,{children:y.jsxs("dl",{className:"grid grid-cols-2 gap-4 text-sm",children:[y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Display Name"}),y.jsx("dd",{children:we.displayName??"—"})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Type"}),y.jsx("dd",{children:y.jsx(Mt,{variant:"secondary",children:we.type})})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Status"}),y.jsx("dd",{children:y.jsx(Mt,{variant:we.status==="active"?"default":"destructive",children:we.status})})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Inbox ID"}),y.jsx("dd",{className:"font-mono",children:we.inboxId})]}),we.delegateMention&&y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Delegate Mention"}),y.jsx("dd",{className:"font-mono",children:we.delegateMention})]}),Ar&&y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Role"}),y.jsx("dd",{children:Ar})]}),hr&&hr.length>0&&y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Domains"}),y.jsx("dd",{className:"flex flex-wrap gap-1",children:hr.map(R=>y.jsx(Mt,{variant:"outline",children:R},R))})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Organization"}),y.jsx("dd",{className:"font-mono",children:we.organizationId})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Created"}),y.jsx("dd",{children:On(we.createdAt)})]})]})})]}),y.jsxs(Dn,{children:[y.jsxs(Jn,{className:"flex flex-row items-center justify-between",children:[y.jsx(Wn,{children:"Profile"}),we.status==="active"&&y.jsxs($e,{variant:"outline",size:"sm",onClick:()=>{ue(we.profile??""),oe(!0)},children:[y.jsx(pc,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),y.jsx(Mn,{children:we.profile?y.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none max-h-64 overflow-auto bg-muted rounded p-4",children:y.jsx(dU,{children:we.profile})}):y.jsx("p",{className:"text-sm text-muted-foreground",children:"No profile"})})]}),y.jsx(cs,{open:k,onOpenChange:oe,children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:"Edit Profile"})}),y.jsxs("form",{onSubmit:R=>{R.preventDefault(),ke.mutate(fe)},className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"profile-editor",children:"Markdown"}),y.jsx("textarea",{id:"profile-editor",value:fe,onChange:R=>ue(R.target.value),rows:12,className:"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm font-mono transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",placeholder:"Agent self-description in markdown..."})]}),ke.error instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:ke.error.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:ke.isPending,children:ke.isPending?"Saving...":"Save"})})]})]})}),y.jsxs(Dn,{children:[y.jsxs(Jn,{className:"flex flex-row items-center justify-between",children:[y.jsxs(Wn,{className:"flex items-center gap-2",children:[be?y.jsx($2,{className:"h-4 w-4"}):y.jsx(m1,{className:"h-4 w-4"}),"Platform Bindings"]}),y.jsxs($e,{size:"sm",onClick:()=>q(!0),children:[y.jsx(wc,{className:"h-4 w-4 mr-2"}),be?"Bind User":"Bind Bot"]})]}),y.jsx(Mn,{children:be?y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"Platform"}),y.jsx(Ne,{children:"External User ID"}),y.jsx(Ne,{children:"Display Name"}),y.jsx(Ne,{children:"Bound Via"}),y.jsx(Ne,{children:"Created"}),y.jsx(Ne,{className:"w-16"})]})}),y.jsx(ri,{children:g.length===0?y.jsx(Ve,{children:y.jsx(ye,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):g.map(R=>y.jsxs(Ve,{children:[y.jsx(ye,{children:y.jsx(Mt,{variant:"secondary",children:R.platform})}),y.jsx(ye,{className:"font-mono text-sm",children:R.externalUserId}),y.jsx(ye,{children:R.displayName??"—"}),y.jsx(ye,{children:y.jsx(Mt,{variant:"outline",children:R.boundVia??"—"})}),y.jsx(ye,{className:"text-muted-foreground",children:On(R.createdAt)}),y.jsx(ye,{children:y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>{window.confirm("Remove this binding?")&&he.mutate(R.id)},disabled:he.isPending,children:y.jsx(ss,{className:"h-4 w-4"})})})]},R.id))})]}):y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"Platform"}),y.jsx(Ne,{children:"Status"}),y.jsx(Ne,{children:"Connection"}),y.jsx(Ne,{children:"Created"}),y.jsx(Ne,{className:"w-24"})]})}),y.jsx(ri,{children:m.length===0?y.jsx(Ve,{children:y.jsx(ye,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):m.map(R=>{const ne=p==null?void 0:p.find(Ue=>Ue.configId===R.id),_e=R.platform==="kael"?R.status==="active":!!(ne!=null&&ne.connected);return y.jsxs(Ve,{children:[y.jsx(ye,{children:y.jsx(Mt,{variant:"secondary",children:R.platform})}),y.jsx(ye,{children:y.jsx(Mt,{variant:R.status==="active"?"default":"destructive",children:R.status})}),y.jsx(ye,{children:y.jsxs("span",{className:"flex items-center gap-1.5",children:[y.jsx("span",{className:st("inline-block h-2 w-2 rounded-full",_e?"bg-green-500":"bg-gray-300")}),y.jsx("span",{className:"text-xs text-muted-foreground",children:_e?"Online":"Offline"})]})}),y.jsx(ye,{className:"text-muted-foreground",children:On(R.createdAt)}),y.jsx(ye,{children:y.jsxs("div",{className:"flex gap-1",children:[y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>Xt(R),title:"Edit",children:y.jsx(pc,{className:"h-4 w-4"})}),y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>{window.confirm("Remove this bot binding?")&&I.mutate(R.id)},disabled:I.isPending,title:"Delete",children:y.jsx(ss,{className:"h-4 w-4"})})]})})]},R.id)})})]})})]}),!be&&y.jsxs(Dn,{children:[y.jsxs(Jn,{className:"flex flex-row items-center justify-between",children:[y.jsxs(Wn,{className:"flex items-center gap-2",children:[y.jsx(H2,{className:"h-4 w-4"}),"Tokens"]}),y.jsxs($e,{size:"sm",onClick:()=>{T(null),N(""),x(!0)},children:[y.jsx(wc,{className:"h-4 w-4 mr-2"}),"Create Token"]})]}),y.jsx(Mn,{children:y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"Name"}),y.jsx(Ne,{children:"Created"}),y.jsx(Ne,{children:"Last Used"}),y.jsx(Ne,{children:"Expires"}),y.jsx(Ne,{className:"w-20"})]})}),y.jsx(ri,{children:((Lt=u.data)==null?void 0:Lt.length)===0?y.jsx(Ve,{children:y.jsx(ye,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No tokens"})}):(qa=u.data)==null?void 0:qa.map(R=>y.jsxs(Ve,{children:[y.jsx(ye,{children:R.name??"—"}),y.jsx(ye,{className:"text-muted-foreground",children:On(R.createdAt)}),y.jsx(ye,{className:"text-muted-foreground",children:On(R.lastUsedAt)}),y.jsx(ye,{className:"text-muted-foreground",children:R.revokedAt?y.jsx(Mt,{variant:"destructive",children:"Revoked"}):R.expiresAt?On(R.expiresAt):"Never"}),y.jsx(ye,{children:!R.revokedAt&&y.jsx($e,{variant:"ghost",size:"sm",onClick:()=>Ae.mutate(R.id),disabled:Ae.isPending,children:y.jsx(ss,{className:"h-4 w-4"})})})]},R.id))})]})})]}),y.jsx(cs,{open:A,onOpenChange:R=>R?q(!0):Ct(),children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:be?"Bind External User":U?"Edit Bot Binding":"Bind Bot"})}),y.jsxs("form",{onSubmit:Bn,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"binding-platform",children:"Platform"}),y.jsx("select",{id:"binding-platform",value:L.platform,onChange:R=>j({...L,platform:R.target.value}),disabled:!!U,className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50",children:OU.map(R=>y.jsx("option",{value:R,children:R},R))})]}),be?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"binding-ext-id",children:"External User ID"}),y.jsx(Yt,{id:"binding-ext-id",value:L.externalUserId,onChange:R=>j({...L,externalUserId:R.target.value}),placeholder:"ou_xxxxxxxx...",className:"font-mono",required:!0})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"binding-name",children:"Display Name (optional)"}),y.jsx(Yt,{id:"binding-name",value:L.displayName,onChange:R=>j({...L,displayName:R.target.value})})]})]}):y.jsxs(y.Fragment,{children:[L.platform==="feishu"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(xt,{htmlFor:"feishu-app-id",children:["App ID",U?" — leave empty to keep existing":""]}),y.jsx(Yt,{id:"feishu-app-id",value:L.feishuAppId,onChange:R=>j({...L,feishuAppId:R.target.value}),placeholder:"cli_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(xt,{htmlFor:"feishu-app-secret",children:["App Secret",U?" — leave empty to keep existing":""]}),y.jsx(Yt,{id:"feishu-app-secret",type:"password",autoComplete:"new-password",value:L.feishuAppSecret,onChange:R=>j({...L,feishuAppSecret:R.target.value}),placeholder:"••••••••"})]})]}):L.platform==="kael"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(xt,{htmlFor:"kael-user-id",children:["User ID",U?" — leave empty to keep existing":""]}),y.jsx(Yt,{id:"kael-user-id",value:L.kaelUserId,onChange:R=>j({...L,kaelUserId:R.target.value}),placeholder:"user_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(xt,{htmlFor:"kael-project-id",children:["Project ID",U?" — leave empty to keep existing":""]}),y.jsx(Yt,{id:"kael-project-id",value:L.kaelProjectId,onChange:R=>j({...L,kaelProjectId:R.target.value}),placeholder:"proj_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),!U&&y.jsx("p",{className:"text-sm text-muted-foreground",children:"Agent Token will be created automatically when you save."})]}):y.jsxs("div",{className:"space-y-2",children:[y.jsxs(xt,{htmlFor:"binding-creds",children:["Credentials (JSON)",U?" — leave empty to keep existing":""]}),y.jsx("textarea",{id:"binding-creds",value:L.credentialsJson,onChange:R=>j({...L,credentialsJson:R.target.value}),rows:4,className:"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm font-mono transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",placeholder:'{"bot_token": "xoxb-...", "signing_secret": "..."}'})]}),Y&&y.jsx("p",{className:"text-sm text-destructive",children:Y}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"binding-status",children:"Status"}),y.jsxs("select",{id:"binding-status",value:L.status,onChange:R=>j({...L,status:R.target.value}),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[y.jsx("option",{value:"active",children:"active"}),y.jsx("option",{value:"inactive",children:"inactive"})]})]})]}),kr instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:kr.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:Tr,children:Tr?"Saving...":U?"Update":"Create"})})]})]})}),we.status==="active"&&y.jsx(Mw,{mode:"edit",agent:we,open:ze,onOpenChange:C,onSubmit:R=>D.mutate(R),isPending:D.isPending,error:D.error instanceof Error?D.error:null}),!be&&y.jsx(cs,{open:v,onOpenChange:R=>{x(R),R||T(null)},children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:_?"Token Created":"Create Token"})}),_?y.jsxs("div",{className:"space-y-4",children:[y.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy this token now. It will not be shown again."}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx(Yt,{value:_,readOnly:!0,className:"font-mono text-xs"}),y.jsx($e,{variant:"outline",size:"icon",onClick:()=>navigator.clipboard.writeText(_),children:y.jsx(I2,{className:"h-4 w-4"})})]}),y.jsx(Ol,{children:y.jsx($e,{onClick:()=>x(!1),children:"Done"})})]}):y.jsxs("form",{onSubmit:Kt,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{children:"Name (optional)"}),y.jsx(Yt,{value:S,onChange:R=>N(R.target.value),placeholder:"e.g. production"})]}),ae.error instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:ae.error.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:ae.isPending,children:ae.isPending?"Creating...":"Create"})})]})]})})]})}const DU={success:"Connected",timeout:"Timed out",offline:"Offline",error:"Error"};function MU({result:e,onDismiss:n}){const i={success:"border-l-green-500",timeout:"border-l-yellow-500",offline:"border-l-gray-400",error:"border-l-red-500"}[e.status],a=e.status==="success"?"default":e.status==="timeout"?"secondary":"destructive";return y.jsx(Dn,{className:st("border-l-4",i),children:y.jsx(Mn,{className:"pt-4",children:y.jsxs("div",{className:"flex items-start justify-between",children:[y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Mt,{variant:a,children:DU[e.status]}),e.responseTime!=null&&y.jsxs("span",{className:"text-xs text-muted-foreground",children:[(e.responseTime/1e3).toFixed(1),"s"]})]}),e.message&&y.jsx("p",{className:"text-sm text-muted-foreground",children:e.message}),e.responseContent&&y.jsx("p",{className:"text-sm mt-2 whitespace-pre-wrap bg-muted rounded p-2 max-h-40 overflow-auto",children:e.responseContent})]}),y.jsx($e,{variant:"ghost",size:"sm",onClick:n,children:"Dismiss"})]})})})}function h0(e){if(e.platform==="feishu"){if(!e.feishuAppId&&!e.feishuAppSecret)return null;if(!e.feishuAppId||!e.feishuAppSecret)throw new Error("Both App ID and App Secret are required");return{app_id:e.feishuAppId,app_secret:e.feishuAppSecret}}if(e.platform==="kael"){if(!e.kaelUserId&&!e.kaelProjectId)return null;if(!e.kaelUserId||!e.kaelProjectId)throw new Error("User ID and Project ID are required");return{kaelUserId:e.kaelUserId,kaelProjectId:e.kaelProjectId}}const n=e.credentialsJson.trim();return n?JSON.parse(n):null}const UU=Object.values(cS);function LU(){const e=Ns(),n=Wl(),[i,a]=w.useState(),[o,u]=w.useState(""),[c,d]=w.useState(!1),{data:p,isLoading:m,error:g}=en({queryKey:["agents",i,o],queryFn:()=>Dw({limit:20,cursor:i,type:o||void 0})}),v=Ht({mutationFn:x=>EU({id:x.id,type:x.type,displayName:x.displayName??void 0,delegateMention:x.delegateMention??void 0}),onSuccess:x=>{d(!1),n.invalidateQueries({queryKey:["agents"]}),e(`/agents/${x.id}`)}});return y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx("h1",{className:"text-2xl font-semibold",children:"Agents"}),y.jsxs("select",{value:o,onChange:x=>{u(x.target.value),a(void 0)},className:"h-8 rounded-md border border-input bg-transparent px-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[y.jsx("option",{value:"",children:"All types"}),UU.map(x=>y.jsx("option",{value:x,children:x},x))]})]}),y.jsxs($e,{size:"sm",onClick:()=>d(!0),children:[y.jsx(wc,{className:"h-4 w-4 mr-2"}),"New Agent"]})]}),y.jsx("div",{className:"border rounded-lg",children:y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"ID"}),y.jsx(Ne,{children:"Display Name"}),y.jsx(Ne,{children:"Type"}),y.jsx(Ne,{children:"Delegate"}),y.jsx(Ne,{children:"Online"}),y.jsx(Ne,{children:"Status"}),y.jsx(Ne,{children:"Created"})]})}),y.jsx(ri,{children:m?y.jsx(Ve,{children:y.jsx(ye,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):g?y.jsx(Ve,{children:y.jsxs(ye,{colSpan:7,className:"text-center py-8 text-destructive",children:["Failed to load agents: ",g instanceof Error?g.message:"Unknown error"]})}):p!=null&&p.items.length?p.items.map(x=>y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>e(`/agents/${x.id}`),children:[y.jsx(ye,{className:"font-mono text-sm",children:x.id}),y.jsx(ye,{children:x.displayName??"—"}),y.jsx(ye,{children:y.jsx(Mt,{variant:"secondary",children:x.type})}),y.jsx(ye,{className:"font-mono text-sm text-muted-foreground",children:x.delegateMention??"—"}),y.jsx(ye,{children:y.jsx("span",{className:st("inline-block h-2 w-2 rounded-full",x.presenceStatus==="online"?"bg-green-500":"bg-gray-300"),title:x.presenceStatus??"offline"})}),y.jsx(ye,{children:y.jsx(Mt,{variant:x.status==="active"?"default":"destructive",children:x.status})}),y.jsx(ye,{className:"text-muted-foreground",children:On(x.createdAt)})]},x.id)):y.jsx(Ve,{children:y.jsx(ye,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:o?`No ${o} agents`:"No agents yet"})})})]})}),(p==null?void 0:p.nextCursor)&&y.jsx("div",{className:"flex justify-end mt-4",children:y.jsx($e,{variant:"outline",onClick:()=>a(p.nextCursor??void 0),children:"Next Page"})}),y.jsx(Mw,{mode:"create",open:c,onOpenChange:d,onSubmit:x=>v.mutate(x),isPending:v.isPending,error:v.error instanceof Error?v.error:null})]})}function BU(){const e=Ns(),{data:n,isLoading:i}=en({queryKey:["adapters"],queryFn:Rw}),{data:a,isLoading:o}=en({queryKey:["adapter-mappings"],queryFn:jw}),{data:u}=en({queryKey:["adapter-statuses"],queryFn:Ow,refetchInterval:15e3}),c=i||o;return y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-semibold",children:"Platform Bindings"}),y.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Overview of all platform bindings. Manage bindings from each Agent's detail page."})]}),y.jsxs(Dn,{children:[y.jsx(Jn,{children:y.jsx(Wn,{children:"Bot Bindings"})}),y.jsx(Mn,{children:y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"Agent"}),y.jsx(Ne,{children:"Platform"}),y.jsx(Ne,{children:"Status"}),y.jsx(Ne,{children:"Connection"}),y.jsx(Ne,{children:"Created"})]})}),y.jsx(ri,{children:c?y.jsx(Ve,{children:y.jsx(ye,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):n!=null&&n.length?n.map(d=>{const p=u==null?void 0:u.find(m=>m.configId===d.id);return y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>e(`/agents/${d.agentId}`),children:[y.jsx(ye,{className:"font-mono text-sm",children:d.agentId}),y.jsx(ye,{children:y.jsx(Mt,{variant:"secondary",children:d.platform})}),y.jsx(ye,{children:y.jsx(Mt,{variant:d.status==="active"?"default":"destructive",children:d.status})}),y.jsx(ye,{children:y.jsxs("span",{className:"flex items-center gap-1.5",children:[y.jsx("span",{className:st("inline-block h-2 w-2 rounded-full",p!=null&&p.connected?"bg-green-500":"bg-gray-300")}),y.jsx("span",{className:"text-xs text-muted-foreground",children:p!=null&&p.connected?"Online":"Offline"})]})}),y.jsx(ye,{className:"text-muted-foreground",children:On(d.createdAt)})]},d.id)}):y.jsx(Ve,{children:y.jsx(ye,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No bot bindings"})})})]})})]}),y.jsxs(Dn,{children:[y.jsx(Jn,{children:y.jsx(Wn,{children:"User Bindings"})}),y.jsx(Mn,{children:y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"Agent"}),y.jsx(Ne,{children:"Platform"}),y.jsx(Ne,{children:"External User ID"}),y.jsx(Ne,{children:"Display Name"}),y.jsx(Ne,{children:"Bound Via"}),y.jsx(Ne,{children:"Created"})]})}),y.jsx(ri,{children:c?y.jsx(Ve,{children:y.jsx(ye,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):a!=null&&a.length?a.map(d=>y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>e(`/agents/${d.agentId}`),children:[y.jsx(ye,{className:"font-mono text-sm",children:d.agentId}),y.jsx(ye,{children:y.jsx(Mt,{variant:"secondary",children:d.platform})}),y.jsx(ye,{className:"font-mono text-sm",children:d.externalUserId}),y.jsx(ye,{children:d.displayName??"—"}),y.jsx(ye,{children:y.jsx(Mt,{variant:"outline",children:d.boundVia??"—"})}),y.jsx(ye,{className:"text-muted-foreground",children:On(d.createdAt)})]},d.id)):y.jsx(Ve,{children:y.jsx(ye,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No user bindings"})})})]})})]})]})}function IU(e){const n=new URLSearchParams;n.set("limit",String(e.limit)),e!=null&&e.cursor&&n.set("cursor",e.cursor);const i=n.toString();return nt.get(`/admin/chats${i?`?${i}`:""}`)}function qU(e){return nt.get(`/admin/chats/${encodeURIComponent(e)}`)}function HU(e,n){const i=new URLSearchParams;i.set("limit",String(n.limit)),n!=null&&n.cursor&&i.set("cursor",n.cursor);const a=i.toString();return nt.get(`/admin/chats/${encodeURIComponent(e)}/messages${a?`?${a}`:""}`)}function ZU(){const[e,n]=w.useState(),[i,a]=w.useState(null);return i?y.jsx(FU,{chatId:i,onBack:()=>a(null)}):y.jsx(PU,{cursor:e,setCursor:n,onSelect:a})}function PU({cursor:e,setCursor:n,onSelect:i}){const{data:a,isLoading:o,error:u}=en({queryKey:["chats",e],queryFn:()=>IU({limit:20,cursor:e})});return y.jsxs("div",{children:[y.jsx("div",{className:"flex items-center justify-between mb-6",children:y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-semibold",children:"Chats"}),y.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Browse chat history (read-only)"})]})}),y.jsx("div",{className:"border rounded-lg",children:y.jsxs(ti,{children:[y.jsx(ni,{children:y.jsxs(Ve,{children:[y.jsx(Ne,{children:"ID"}),y.jsx(Ne,{children:"Type"}),y.jsx(Ne,{children:"Topic"}),y.jsx(Ne,{children:"Participants"}),y.jsx(Ne,{children:"Lifecycle"}),y.jsx(Ne,{children:"Created"})]})}),y.jsx(ri,{children:o?y.jsx(Ve,{children:y.jsx(ye,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):u?y.jsx(Ve,{children:y.jsxs(ye,{colSpan:6,className:"text-center py-8 text-destructive",children:["Failed to load chats: ",u instanceof Error?u.message:"Unknown error"]})}):(a==null?void 0:a.items.length)===0?y.jsx(Ve,{children:y.jsx(ye,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"No chats"})}):a==null?void 0:a.items.map(c=>y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>i(c.id),children:[y.jsx(ye,{className:"font-mono text-xs max-w-[200px] truncate",children:c.id}),y.jsx(ye,{children:y.jsx(Mt,{variant:"secondary",children:c.type})}),y.jsx(ye,{children:c.topic??"—"}),y.jsx(ye,{children:c.participantCount}),y.jsx(ye,{className:"text-muted-foreground text-xs",children:c.lifecyclePolicy??"—"}),y.jsx(ye,{className:"text-muted-foreground",children:On(c.createdAt)})]},c.id))})]})}),(a==null?void 0:a.nextCursor)&&y.jsx("div",{className:"flex justify-end mt-4",children:y.jsx($e,{variant:"outline",onClick:()=>n(a.nextCursor??void 0),children:"Next Page"})})]})}function FU({chatId:e,onBack:n}){const[i,a]=w.useState(),o=en({queryKey:["chat",e],queryFn:()=>qU(e)}),u=en({queryKey:["chat-messages",e,i],queryFn:()=>HU(e,{limit:50,cursor:i})}),c=o.data,d=u.data;return y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx($e,{variant:"ghost",size:"icon",onClick:n,children:y.jsx(d1,{className:"h-4 w-4"})}),y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-semibold",children:(c==null?void 0:c.topic)??"Chat"}),y.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:e})]})]}),c&&y.jsxs(Dn,{children:[y.jsx(Jn,{children:y.jsx(Wn,{children:"Participants"})}),y.jsx(Mn,{children:y.jsx("div",{className:"flex flex-wrap gap-2",children:c.participants.map(p=>y.jsxs(Mt,{variant:"outline",children:[p.agentId," (",p.role,")"]},p.agentId))})})]}),y.jsxs(Dn,{children:[y.jsx(Jn,{children:y.jsxs(Wn,{className:"flex items-center gap-2",children:[y.jsx(Mm,{className:"h-4 w-4"}),"Messages"]})}),y.jsxs(Mn,{children:[u.isLoading?y.jsx("div",{className:"text-muted-foreground py-4 text-center",children:"Loading messages..."}):(d==null?void 0:d.items.length)===0?y.jsx("div",{className:"text-muted-foreground py-4 text-center",children:"No messages"}):y.jsx("div",{className:"space-y-3",children:d==null?void 0:d.items.map(p=>y.jsxs("div",{className:"border rounded-md p-3",children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsx("span",{className:"font-mono text-sm font-medium",children:p.senderId}),y.jsx("span",{className:"text-xs text-muted-foreground",children:On(p.createdAt)})]}),y.jsx("div",{className:"text-sm",children:p.format==="text"?y.jsx("p",{className:"whitespace-pre-wrap",children:typeof p.content=="string"?p.content:JSON.stringify(p.content)}):y.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-auto max-h-40",children:JSON.stringify(p.content,null,2)})}),y.jsx("div",{className:"flex gap-2 mt-1",children:y.jsx(Mt,{variant:"outline",className:"text-xs",children:p.format})})]},p.id))}),(d==null?void 0:d.nextCursor)&&y.jsx("div",{className:"flex justify-center mt-4",children:y.jsx($e,{variant:"outline",size:"sm",onClick:()=>a(d.nextCursor??void 0),children:"Load More"})})]})]})]})}function $U(){const{isAuthenticated:e,login:n}=Dm(),[i,a]=w.useState(""),[o,u]=w.useState(""),[c,d]=w.useState(null),[p,m]=w.useState(!1);if(e)return y.jsx(J0,{to:"/",replace:!0});const g=async v=>{v.preventDefault(),d(null),m(!0);try{await n(i,o)}catch(x){d(x instanceof Error?x.message:"Login failed")}finally{m(!1)}};return y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:y.jsxs(Dn,{className:"w-full max-w-sm",children:[y.jsxs(Jn,{className:"text-center",children:[y.jsx(Wn,{className:"text-2xl",children:"First Tree"}),y.jsx(Uw,{children:"Sign in to admin console"})]}),y.jsx(Mn,{children:y.jsxs("form",{onSubmit:g,className:"space-y-4",children:[c&&y.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:c}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"username",children:"Username"}),y.jsx(Yt,{id:"username",value:i,onChange:v=>a(v.target.value),required:!0,autoFocus:!0})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:"password",children:"Password"}),y.jsx(Yt,{id:"password",type:"password",value:o,onChange:v=>u(v.target.value),required:!0})]}),y.jsx($e,{type:"submit",className:"w-full",disabled:p,children:p?"Signing in...":"Sign in"})]})})]})})}function VU(){return nt.get("/admin/overview")}function QU(){const{data:e,isLoading:n,error:i}=en({queryKey:["overview"],queryFn:VU,refetchInterval:3e4}),a=[{label:"Total Agents",value:e==null?void 0:e.agents,icon:h1},{label:"Online Agents",value:e==null?void 0:e.onlineAgents,icon:eT},{label:"Total Chats",value:e==null?void 0:e.chats,icon:Mm}];return y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-semibold mb-6",children:"Overview"}),i&&y.jsxs("div",{className:"mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:["Failed to load overview: ",i instanceof Error?i.message:"Unknown error"]}),y.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:a.map(o=>y.jsxs(Dn,{children:[y.jsxs(Jn,{className:"flex flex-row items-center justify-between pb-2",children:[y.jsx(Wn,{className:"text-sm font-medium text-muted-foreground",children:o.label}),y.jsx(o.icon,{className:"h-4 w-4 text-muted-foreground"})]}),y.jsx(Mn,{children:y.jsx("div",{className:"text-3xl font-bold",children:n?"...":o.value??"—"})})]},o.label))})]})}function YU(){return nt.get("/admin/system/config")}function GU(e){return nt.patch("/admin/system/config",e)}const XU={[ei.INBOX_TIMEOUT_SECONDS]:"Inbox Timeout (seconds)",[ei.MAX_RETRY_COUNT]:"Max Retry Count",[ei.POLLING_INTERVAL_SECONDS]:"Polling Interval (seconds)",[ei.PRESENCE_CLEANUP_SECONDS]:"Presence Cleanup (seconds)"},m0=Object.values(ei);function KU(){const e=Wl(),{data:n,isLoading:i}=en({queryKey:["system-config"],queryFn:YU}),[a,o]=w.useState({}),[u,c]=w.useState(!1);w.useEffect(()=>{if(!n)return;const m={};for(const g of m0){const v=n[g]??bh[g]??"";m[g]=String(v)}o(m)},[n]);const d=Ht({mutationFn:()=>{const m={};for(const[g,v]of Object.entries(a)){const x=v.trim();if(x==="")m[g]=bh[g]??0;else{const S=Number(x);m[g]=Number.isNaN(S)?x:S}}return GU(m)},onSuccess:()=>{e.invalidateQueries({queryKey:["system-config"]}),c(!0),setTimeout(()=>c(!1),2e3)}}),p=m=>{m.preventDefault(),d.mutate()};return i?y.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-semibold mb-6",children:"Settings"}),y.jsxs(Dn,{children:[y.jsx(Jn,{children:y.jsx(Wn,{children:"System Configuration"})}),y.jsx(Mn,{children:y.jsxs("form",{onSubmit:p,className:"space-y-4",children:[m0.map(m=>y.jsxs("div",{className:"space-y-2",children:[y.jsx(xt,{htmlFor:m,children:XU[m]??m}),y.jsx(Yt,{id:m,value:a[m]??"",onChange:g=>o({...a,[m]:g.target.value})}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["Default: ",String(bh[m]??"—")]})]},m)),d.error instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:d.error.message}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx($e,{type:"submit",disabled:d.isPending,children:d.isPending?"Saving...":"Save Changes"}),u&&y.jsx("span",{className:"text-sm text-green-600",children:"Saved!"})]})]})})]})]})}const JU=new RC({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});function WU(){return y.jsx(DC,{client:JU,children:y.jsx(A2,{children:y.jsx(p2,{children:y.jsxs($k,{children:[y.jsx(sr,{path:"/login",element:y.jsx($U,{})}),y.jsx(sr,{element:y.jsx(N2,{}),children:y.jsxs(sr,{element:y.jsx(JT,{}),children:[y.jsx(sr,{index:!0,element:y.jsx(QU,{})}),y.jsx(sr,{path:"agents",element:y.jsx(LU,{})}),y.jsx(sr,{path:"agents/:agentId",element:y.jsx(RU,{})}),y.jsx(sr,{path:"bindings",element:y.jsx(BU,{})}),y.jsx(sr,{path:"chats",element:y.jsx(ZU,{})}),y.jsx(sr,{path:"admin-users",element:y.jsx(XD,{})}),y.jsx(sr,{path:"settings",element:y.jsx(KU,{})})]})})]})})})})}const Lw=document.getElementById("root");if(!Lw)throw new Error("Root element not found");sC.createRoot(Lw).render(y.jsx(w.StrictMode,{children:y.jsx(WU,{})}));
|