@agent-team-foundation/first-tree-hub 0.4.0 → 0.5.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-uyPaaI05.mjs → bootstrap-BU_7B03u.mjs} +6 -6
- package/dist/cli/index.mjs +8 -8
- package/dist/{core-CMeOAZmx.mjs → core-jjk1xFW_.mjs} +228 -200
- package/dist/drizzle/0008_uuid_identity.sql +12 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/index.mjs +2 -2
- package/dist/web/assets/index-LFh6j4ki.js +280 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/index-C4J9gHaF.js +0 -280
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
var fb=e=>{throw TypeError(e)};var oh=(e,n,i)=>n.has(e)||fb("Cannot "+i);var O=(e,n,i)=>(oh(e,n,"read from private field"),i?i.call(e):n.get(e)),Se=(e,n,i)=>n.has(e)?fb("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i),fe=(e,n,i,a)=>(oh(e,n,"write to private field"),a?a.call(e,i):n.set(e,i),i),Re=(e,n,i)=>(oh(e,n,"access private method"),i);var Gu=(e,n,i,a)=>({set _(o){fe(e,n,o,i)},get _(){return O(e,n,a)}});function W_(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 sh={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 db;function eC(){if(db)return Jo;db=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 hb;function tC(){return hb||(hb=1,sh.exports=eC()),sh.exports}var y=tC(),uh={exports:{}},ze={};/**
|
|
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 mb;function nC(){if(mb)return ze;mb=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"),S=Symbol.iterator;function x(R){return R===null||typeof R!="object"?null:(R=S&&R[S]||R["@@iterator"],typeof R=="function"?R:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function N(R,Y,C){this.props=R,this.context=Y,this.refs=A,this.updater=C||z}N.prototype.isReactComponent={},N.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Y,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function q(){}q.prototype=N.prototype;function M(R,Y,C){this.props=R,this.context=Y,this.refs=A,this.updater=C||z}var B=M.prototype=new q;B.constructor=M,_(B,N.prototype),B.isPureReactComponent=!0;var F=Array.isArray;function T(){}var Q={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function re(R,Y,C){var oe=C.ref;return{$$typeof:e,type:R,key:Y,ref:oe!==void 0?oe:null,props:C}}function he(R,Y){return re(R.type,Y,R.props)}function ae(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function le(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(C){return Y[C]})}var Ce=/\/+/g;function ce(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?le(""+R.key):Y.toString(36)}function te(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(T,T):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function I(R,Y,C,oe,de){var ue=typeof R;(ue==="undefined"||ue==="boolean")&&(R=null);var Ne=!1;if(R===null)Ne=!0;else switch(ue){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(R.$$typeof){case e:case n:Ne=!0;break;case g:return Ne=R._init,I(Ne(R._payload),Y,C,oe,de)}}if(Ne)return de=de(R),Ne=oe===""?"."+ce(R,0):oe,F(de)?(C="",Ne!=null&&(C=Ne.replace(Ce,"$&/")+"/"),I(de,Y,C,"",function(ft){return ft})):de!=null&&(ae(de)&&(de=he(de,C+(de.key==null||R&&R.key===de.key?"":(""+de.key).replace(Ce,"$&/")+"/")+Ne)),Y.push(de)),1;Ne=0;var Fe=oe===""?".":oe+":";if(F(R))for(var se=0;se<R.length;se++)oe=R[se],ue=Fe+ce(oe,se),Ne+=I(oe,Y,C,ue,de);else if(se=x(R),typeof se=="function")for(R=se.call(R),se=0;!(oe=R.next()).done;)oe=oe.value,ue=Fe+ce(oe,se++),Ne+=I(oe,Y,C,ue,de);else if(ue==="object"){if(typeof R.then=="function")return I(te(R),Y,C,oe,de);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function ne(R,Y,C){if(R==null)return R;var oe=[],de=0;return I(R,oe,"","",function(ue){return Y.call(C,ue,de++)}),oe}function me(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(C){(R._status===0||R._status===-1)&&(R._status=1,R._result=C)},function(C){(R._status===0||R._status===-1)&&(R._status=2,R._result=C)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var Ae=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},k={map:ne,forEach:function(R,Y,C){ne(R,function(){Y.apply(this,arguments)},C)},count:function(R){var Y=0;return ne(R,function(){Y++}),Y},toArray:function(R){return ne(R,function(Y){return Y})||[]},only:function(R){if(!ae(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return ze.Activity=v,ze.Children=k,ze.Component=N,ze.Fragment=i,ze.Profiler=o,ze.PureComponent=M,ze.StrictMode=a,ze.Suspense=p,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,ze.__COMPILER_RUNTIME={__proto__:null,c:function(R){return Q.H.useMemoCache(R)}},ze.cache=function(R){return function(){return R.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(R,Y,C){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var oe=_({},R.props),de=R.key;if(Y!=null)for(ue in Y.key!==void 0&&(de=""+Y.key),Y)!V.call(Y,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&Y.ref===void 0||(oe[ue]=Y[ue]);var ue=arguments.length-2;if(ue===1)oe.children=C;else if(1<ue){for(var Ne=Array(ue),Fe=0;Fe<ue;Fe++)Ne[Fe]=arguments[Fe+2];oe.children=Ne}return re(R.type,de,oe)},ze.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},ze.createElement=function(R,Y,C){var oe,de={},ue=null;if(Y!=null)for(oe in Y.key!==void 0&&(ue=""+Y.key),Y)V.call(Y,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(de[oe]=Y[oe]);var Ne=arguments.length-2;if(Ne===1)de.children=C;else if(1<Ne){for(var Fe=Array(Ne),se=0;se<Ne;se++)Fe[se]=arguments[se+2];de.children=Fe}if(R&&R.defaultProps)for(oe in Ne=R.defaultProps,Ne)de[oe]===void 0&&(de[oe]=Ne[oe]);return re(R,ue,de)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(R){return{$$typeof:d,render:R}},ze.isValidElement=ae,ze.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:me}},ze.memo=function(R,Y){return{$$typeof:m,type:R,compare:Y===void 0?null:Y}},ze.startTransition=function(R){var Y=Q.T,C={};Q.T=C;try{var oe=R(),de=Q.S;de!==null&&de(C,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(T,Ae)}catch(ue){Ae(ue)}finally{Y!==null&&C.types!==null&&(Y.types=C.types),Q.T=Y}},ze.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},ze.use=function(R){return Q.H.use(R)},ze.useActionState=function(R,Y,C){return Q.H.useActionState(R,Y,C)},ze.useCallback=function(R,Y){return Q.H.useCallback(R,Y)},ze.useContext=function(R){return Q.H.useContext(R)},ze.useDebugValue=function(){},ze.useDeferredValue=function(R,Y){return Q.H.useDeferredValue(R,Y)},ze.useEffect=function(R,Y){return Q.H.useEffect(R,Y)},ze.useEffectEvent=function(R){return Q.H.useEffectEvent(R)},ze.useId=function(){return Q.H.useId()},ze.useImperativeHandle=function(R,Y,C){return Q.H.useImperativeHandle(R,Y,C)},ze.useInsertionEffect=function(R,Y){return Q.H.useInsertionEffect(R,Y)},ze.useLayoutEffect=function(R,Y){return Q.H.useLayoutEffect(R,Y)},ze.useMemo=function(R,Y){return Q.H.useMemo(R,Y)},ze.useOptimistic=function(R,Y){return Q.H.useOptimistic(R,Y)},ze.useReducer=function(R,Y,C){return Q.H.useReducer(R,Y,C)},ze.useRef=function(R){return Q.H.useRef(R)},ze.useState=function(R){return Q.H.useState(R)},ze.useSyncExternalStore=function(R,Y,C){return Q.H.useSyncExternalStore(R,Y,C)},ze.useTransition=function(){return Q.H.useTransition()},ze.version="19.2.4",ze}var pb;function Sm(){return pb||(pb=1,uh.exports=nC()),uh.exports}var w=Sm();const rC=Oc(w),wm=W_({__proto__:null,default:rC},[w]);var ch={exports:{}},Wo={},fh={exports:{}},dh={};/**
|
|
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 gb;function iC(){return gb||(gb=1,(function(e){function n(I,ne){var me=I.length;I.push(ne);e:for(;0<me;){var Ae=me-1>>>1,k=I[Ae];if(0<o(k,ne))I[Ae]=ne,I[me]=k,me=Ae;else break e}}function i(I){return I.length===0?null:I[0]}function a(I){if(I.length===0)return null;var ne=I[0],me=I.pop();if(me!==ne){I[0]=me;e:for(var Ae=0,k=I.length,R=k>>>1;Ae<R;){var Y=2*(Ae+1)-1,C=I[Y],oe=Y+1,de=I[oe];if(0>o(C,me))oe<k&&0>o(de,C)?(I[Ae]=de,I[oe]=me,Ae=oe):(I[Ae]=C,I[Y]=me,Ae=Y);else if(oe<k&&0>o(de,me))I[Ae]=de,I[oe]=me,Ae=oe;else break e}}return ne}function o(I,ne){var me=I.sortIndex-ne.sortIndex;return me!==0?me:I.id-ne.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,S=3,x=!1,z=!1,_=!1,A=!1,N=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function B(I){for(var ne=i(m);ne!==null;){if(ne.callback===null)a(m);else if(ne.startTime<=I)a(m),ne.sortIndex=ne.expirationTime,n(p,ne);else break;ne=i(m)}}function F(I){if(_=!1,B(I),!z)if(i(p)!==null)z=!0,T||(T=!0,le());else{var ne=i(m);ne!==null&&te(F,ne.startTime-I)}}var T=!1,Q=-1,V=5,re=-1;function he(){return A?!0:!(e.unstable_now()-re<V)}function ae(){if(A=!1,T){var I=e.unstable_now();re=I;var ne=!0;try{e:{z=!1,_&&(_=!1,q(Q),Q=-1),x=!0;var me=S;try{t:{for(B(I),v=i(p);v!==null&&!(v.expirationTime>I&&he());){var Ae=v.callback;if(typeof Ae=="function"){v.callback=null,S=v.priorityLevel;var k=Ae(v.expirationTime<=I);if(I=e.unstable_now(),typeof k=="function"){v.callback=k,B(I),ne=!0;break t}v===i(p)&&a(p),B(I)}else a(p);v=i(p)}if(v!==null)ne=!0;else{var R=i(m);R!==null&&te(F,R.startTime-I),ne=!1}}break e}finally{v=null,S=me,x=!1}ne=void 0}}finally{ne?le():T=!1}}}var le;if(typeof M=="function")le=function(){M(ae)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,ce=Ce.port2;Ce.port1.onmessage=ae,le=function(){ce.postMessage(null)}}else le=function(){N(ae,0)};function te(I,ne){Q=N(function(){I(e.unstable_now())},ne)}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"):V=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return S},e.unstable_next=function(I){switch(S){case 1:case 2:case 3:var ne=3;break;default:ne=S}var me=S;S=ne;try{return I()}finally{S=me}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(I,ne){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var me=S;S=I;try{return ne()}finally{S=me}},e.unstable_scheduleCallback=function(I,ne,me){var Ae=e.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?Ae+me:Ae):me=Ae,I){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=me+k,I={id:g++,callback:ne,priorityLevel:I,startTime:me,expirationTime:k,sortIndex:-1},me>Ae?(I.sortIndex=me,n(m,I),i(p)===null&&I===i(m)&&(_?(q(Q),Q=-1):_=!0,te(F,me-Ae))):(I.sortIndex=k,n(p,I),z||x||(z=!0,T||(T=!0,le()))),I},e.unstable_shouldYield=he,e.unstable_wrapCallback=function(I){var ne=S;return function(){var me=S;S=ne;try{return I.apply(this,arguments)}finally{S=me}}}})(dh)),dh}var yb;function aC(){return yb||(yb=1,fh.exports=iC()),fh.exports}var hh={exports:{}},Wt={};/**
|
|
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 vb;function lC(){if(vb)return Wt;vb=1;var e=Sm();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 Wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Wt.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)},Wt.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()}},Wt.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))},Wt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Wt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,v=d(g,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,x=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:S,fetchPriority:x}):g==="script"&&a.d.X(p,{crossOrigin:v,integrity:S,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Wt.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)},Wt.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})}},Wt.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)},Wt.requestFormReset=function(p){a.d.r(p)},Wt.unstable_batchedUpdates=function(p,m){return p(m)},Wt.useFormState=function(p,m,g){return c.H.useFormState(p,m,g)},Wt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Wt.version="19.2.4",Wt}var bb;function A0(){if(bb)return hh.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(),hh.exports=lC(),hh.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 xb;function oC(){if(xb)return Wo;xb=1;var e=aC(),n=Sm(),i=A0();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,S=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),M=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=ae&&t[ae]||t["@@iterator"],typeof t=="function"?t:null)}var Ce=Symbol.for("react.client.reference");function ce(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ce?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case N:return"Profiler";case A:return"StrictMode";case F:return"Suspense";case T:return"SuspenseList";case re:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case M:return t.displayName||"Context";case q:return(t._context.displayName||"Context")+".Consumer";case B:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return r=t.displayName||null,r!==null?r:ce(t.type)||"Memo";case V:r=t._payload,t=t._init;try{return ce(t(r))}catch{}}return null}var te=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},Ae=[],k=-1;function R(t){return{current:t}}function Y(t){0>k||(t.current=Ae[k],Ae[k]=null,k--)}function C(t,r){k++,Ae[k]=t.current,t.current=r}var oe=R(null),de=R(null),ue=R(null),Ne=R(null);function Fe(t,r){switch(C(ue,r),C(de,t),C(oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Dv(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Dv(r),t=Mv(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(oe),C(oe,t)}function se(){Y(oe),Y(de),Y(ue)}function ft(t){t.memoizedState!==null&&C(Ne,t);var r=oe.current,l=Mv(r,t.type);r!==l&&(C(de,t),C(oe,l))}function Ot(t){de.current===t&&(Y(oe),Y(de)),Ne.current===t&&(Y(Ne),Yo._currentValue=me)}var In,dr;function Jt(t){if(In===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);In=r&&r[1]||"",dr=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+In+t+dr}var oi=!1;function Cr(t,r){if(!t||oi)return"";oi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(r){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch($){var P=$}Reflect.construct(t,[],ee)}else{try{ee.call()}catch($){P=$}t.call(ee.prototype)}}else{try{throw Error()}catch($){P=$}(ee=t())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch($){if($&&P&&typeof $.stack=="string")return[$.stack,P.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 j=b.split(`
|
|
44
|
+
`),Z=E.split(`
|
|
45
|
+
`);for(f=s=0;s<j.length&&!j[s].includes("DetermineComponentFrameRoot");)s++;for(;f<Z.length&&!Z[f].includes("DetermineComponentFrameRoot");)f++;if(s===j.length||f===Z.length)for(s=j.length-1,f=Z.length-1;1<=s&&0<=f&&j[s]!==Z[f];)f--;for(;1<=s&&0<=f;s--,f--)if(j[s]!==Z[f]){if(s!==1||f!==1)do if(s--,f--,0>f||j[s]!==Z[f]){var G=`
|
|
46
|
+
`+j[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{oi=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Jt(l):""}function na(t,r){switch(t.tag){case 26:case 27:case 5:return Jt(t.type);case 16:return Jt("Lazy");case 13:return t.child!==r&&r!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return Cr(t.type,!1);case 11:return Cr(t.type.render,!1);case 1:return Cr(t.type,!0);case 31:return Jt("Activity");default:return""}}function si(t){try{var r="",l=null;do r+=na(t,l),l=t,t=t.return;while(t);return r}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var wn=Object.prototype.hasOwnProperty,kr=e.unstable_scheduleCallback,Tr=e.unstable_cancelCallback,Ba=e.unstable_shouldYield,Ia=e.unstable_requestPaint,Bt=e.unstable_now,qa=e.unstable_getCurrentPriorityLevel,X=e.unstable_ImmediatePriority,U=e.unstable_UserBlockingPriority,be=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Qe=e.unstable_IdlePriority,En=e.log,Ar=e.unstable_setDisableYieldValue,nn=null,Rt=null;function sn(t){if(typeof En=="function"&&Ar(t),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(nn,t)}catch{}}var lt=Math.clz32?Math.clz32:Iw,ui=Math.log,ir=Math.LN2;function Iw(t){return t>>>=0,t===0?32:31-(ui(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 qw(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 pp(){var t=Ms;return Ms<<=1,(Ms&62914560)===0&&(Ms=4194304),t}function Yc(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 Hw(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,j=t.expirationTimes,Z=t.hiddenUpdates;for(l=b&~l;0<l;){var G=31-lt(l),ee=1<<G;E[G]=0,j[G]=-1;var P=Z[G];if(P!==null)for(Z[G]=null,G=0;G<P.length;G++){var $=P[G];$!==null&&($.lane&=-536870913)}l&=~ee}s!==0&&gp(t,s,0),h!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=h&~(b&~r))}function gp(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 yp(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 vp(t,r){var l=r&-r;return l=(l&42)!==0?1:Gc(l),(l&(t.suspendedLanes|r))!==0?0:l}function Gc(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 Xc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function bp(){var t=ne.p;return t!==0?t:(t=window.event,t===void 0?32:ib(t.type))}function xp(t,r){var l=ne.p;try{return ne.p=t,r()}finally{ne.p=l}}var ci=Math.random().toString(36).slice(2),Ft="__reactFiber$"+ci,un="__reactProps$"+ci,Ha="__reactContainer$"+ci,Kc="__reactEvents$"+ci,Zw="__reactListeners$"+ci,Pw="__reactHandles$"+ci,Sp="__reactResources$"+ci,so="__reactMarker$"+ci;function Jc(t){delete t[Ft],delete t[un],delete t[Kc],delete t[Zw],delete t[Pw]}function Za(t){var r=t[Ft];if(r)return r;for(var l=t.parentNode;l;){if(r=l[Ha]||l[Ft]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=Zv(t);t!==null;){if(l=t[Ft])return l;t=Zv(t)}return r}t=l,l=t.parentNode}return null}function Pa(t){if(t=t[Ft]||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[Sp];return r||(r=t[Sp]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function It(t){t[so]=!0}var wp=new Set,Ep={};function ia(t,r){$a(t,r),$a(t+"Capture",r)}function $a(t,r){for(Ep[t]=r,t=0;t<r.length;t++)wp.add(r[t])}var Fw=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]*$"),_p={},Cp={};function $w(t){return wn.call(Cp,t)?!0:wn.call(_p,t)?!1:Fw.test(t)?Cp[t]=!0:(_p[t]=!0,!1)}function Ls(t,r,l){if($w(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 Nr(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 qn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function kp(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Vw(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 Wc(t){if(!t._valueTracker){var r=kp(t)?"checked":"value";t._valueTracker=Vw(t,r,""+t[r])}}function Tp(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),s="";return t&&(s=kp(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 Qw=/[\n"\\]/g;function Hn(t){return t.replace(Qw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function ef(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=""+qn(r)):t.value!==""+qn(r)&&(t.value=""+qn(r)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),r!=null?tf(t,b,qn(r)):l!=null?tf(t,b,qn(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=""+qn(E):t.removeAttribute("name")}function Ap(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)){Wc(t);return}l=l!=null?""+qn(l):"",r=r!=null?""+qn(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),Wc(t)}function tf(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=""+qn(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 Np(t,r,l){if(r!=null&&(r=""+qn(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+qn(l):""}function zp(t,r,l,s){if(r==null){if(s!=null){if(l!=null)throw Error(a(92));if(te(s)){if(1<s.length)throw Error(a(93));s=s[0]}l=s}l==null&&(l=""),r=l}l=qn(r),t.defaultValue=l,s=t.textContent,s===l&&s!==""&&s!==null&&(t.value=s),Wc(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 Yw=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 jp(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||Yw.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Op(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&&jp(t,f,s)}else for(var h in r)r.hasOwnProperty(h)&&jp(t,h,r[h])}function nf(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 Gw=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"]]),Xw=/^[\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 Xw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function zr(){}var rf=null;function af(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 Rp(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(ef(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="'+Hn(""+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));ef(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&&Tp(s)}break e;case"textarea":Np(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Va(t,!!l.multiple,r,!1)}}}var lf=!1;function Dp(t,r,l){if(lf)return t(r,l);lf=!0;try{var s=t(r);return s}finally{if(lf=!1,(Ya!==null||Ga!==null)&&(Tu(),Ya&&(r=Ya,t=Ga,Ga=Ya=null,Rp(r),t)))for(r=0;r<t.length;r++)Rp(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 jr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),of=!1;if(jr)try{var fo={};Object.defineProperty(fo,"passive",{get:function(){of=!0}}),window.addEventListener("test",fo,fo),window.removeEventListener("test",fo,fo)}catch{of=!1}var fi=null,sf=null,Hs=null;function Mp(){if(Hs)return Hs;var t,r=sf,l=r.length,s,f="value"in fi?fi.value:fi.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 Up(){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:Up,this.isPropagationStopped=Up,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}),Kw=cn(ho),uf,cf,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:df,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"?(uf=t.screenX-mo.screenX,cf=t.screenY-mo.screenY):cf=uf=0,mo=t),uf)},movementY:function(t){return"movementY"in t?t.movementY:cf}}),Lp=cn($s),Jw=v({},$s,{dataTransfer:0}),Ww=cn(Jw),eE=v({},ho,{relatedTarget:0}),ff=cn(eE),tE=v({},aa,{animationName:0,elapsedTime:0,pseudoElement:0}),nE=cn(tE),rE=v({},aa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),iE=cn(rE),aE=v({},aa,{data:0}),Bp=cn(aE),lE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oE={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"},sE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uE(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=sE[t])?!!r[t]:!1}function df(){return uE}var cE=v({},ho,{key:function(t){if(t.key){var r=lE[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"?oE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:df,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}}),fE=cn(cE),dE=v({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ip=cn(dE),hE=v({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:df}),mE=cn(hE),pE=v({},aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),gE=cn(pE),yE=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}),vE=cn(yE),bE=v({},aa,{newState:0,oldState:0}),xE=cn(bE),SE=[9,13,27,32],hf=jr&&"CompositionEvent"in window,po=null;jr&&"documentMode"in document&&(po=document.documentMode);var wE=jr&&"TextEvent"in window&&!po,qp=jr&&(!hf||po&&8<po&&11>=po),Hp=" ",Zp=!1;function Pp(t,r){switch(t){case"keyup":return SE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xa=!1;function EE(t,r){switch(t){case"compositionend":return Fp(r);case"keypress":return r.which!==32?null:(Zp=!0,Hp);case"textInput":return t=r.data,t===Hp&&Zp?null:t;default:return null}}function _E(t,r){if(Xa)return t==="compositionend"||!hf&&Pp(t,r)?(t=Mp(),Hs=sf=fi=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 qp&&r.locale!=="ko"?null:r.data;default:return null}}var CE={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 $p(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!CE[t.type]:r==="textarea"}function Vp(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 kE(t){Av(t,0)}function Vs(t){var r=uo(t);if(Tp(r))return t}function Qp(t,r){if(t==="change")return r}var Yp=!1;if(jr){var mf;if(jr){var pf="oninput"in document;if(!pf){var Gp=document.createElement("div");Gp.setAttribute("oninput","return;"),pf=typeof Gp.oninput=="function"}mf=pf}else mf=!1;Yp=mf&&(!document.documentMode||9<document.documentMode)}function Xp(){go&&(go.detachEvent("onpropertychange",Kp),yo=go=null)}function Kp(t){if(t.propertyName==="value"&&Vs(yo)){var r=[];Vp(r,yo,t,af(t)),Dp(kE,r)}}function TE(t,r,l){t==="focusin"?(Xp(),go=r,yo=l,go.attachEvent("onpropertychange",Kp)):t==="focusout"&&Xp()}function AE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Vs(yo)}function NE(t,r){if(t==="click")return Vs(r)}function zE(t,r){if(t==="input"||t==="change")return Vs(r)}function jE(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var _n=typeof Object.is=="function"?Object.is:jE;function vo(t,r){if(_n(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(!wn.call(r,f)||!_n(t[f],r[f]))return!1}return!0}function Jp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Wp(t,r){var l=Jp(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=Jp(l)}}function eg(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?eg(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function tg(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 gf(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 OE=jr&&"documentMode"in document&&11>=document.documentMode,Ka=null,yf=null,bo=null,vf=!1;function ng(t,r,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;vf||Ka==null||Ka!==Is(s)||(s=Ka,"selectionStart"in s&&gf(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(yf,"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")},bf={},rg={};jr&&(rg=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(bf[t])return bf[t];if(!Ja[t])return t;var r=Ja[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in rg)return bf[t]=r[l];return t}var ig=oa("animationend"),ag=oa("animationiteration"),lg=oa("animationstart"),RE=oa("transitionrun"),DE=oa("transitionstart"),ME=oa("transitioncancel"),og=oa("transitionend"),sg=new Map,xf="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(" ");xf.push("scrollEnd");function ar(t,r){sg.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)},Zn=[],Wa=0,Sf=0;function Ys(){for(var t=Wa,r=Sf=Wa=0;r<t;){var l=Zn[r];Zn[r++]=null;var s=Zn[r];Zn[r++]=null;var f=Zn[r];Zn[r++]=null;var h=Zn[r];if(Zn[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&&ug(l,f,h)}}function Gs(t,r,l,s){Zn[Wa++]=t,Zn[Wa++]=r,Zn[Wa++]=l,Zn[Wa++]=s,Sf|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function wf(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 ug(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,jd=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 UE(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 Cn(t,r,l,s){return new UE(t,r,l,s)}function Ef(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Or(t,r){var l=t.alternate;return l===null?(l=Cn(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 cg(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")Ef(t)&&(b=1);else if(typeof t=="string")b=H_(t,l,oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case re:return t=Cn(31,l,r,f),t.elementType=re,t.lanes=h,t;case _:return ua(l.children,f,h,r);case A:b=8,f|=24;break;case N:return t=Cn(12,l,r,f|2),t.elementType=N,t.lanes=h,t;case F:return t=Cn(13,l,r,f),t.elementType=F,t.lanes=h,t;case T:return t=Cn(19,l,r,f),t.elementType=T,t.lanes=h,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case M:b=10;break e;case q:b=9;break e;case B:b=11;break e;case Q:b=14;break e;case V:b=16,s=null;break e}b=29,l=Error(a(130,t===null?"null":typeof t,"")),s=null}return r=Cn(b,l,r,f),r.elementType=t,r.type=s,r.lanes=h,r}function ua(t,r,l,s){return t=Cn(7,t,s,r),t.lanes=l,t}function _f(t,r,l){return t=Cn(6,t,null,r),t.lanes=l,t}function fg(t){var r=Cn(18,null,null,0);return r.stateNode=t,r}function Cf(t,r,l){return r=Cn(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var dg=new WeakMap;function Pn(t,r){if(typeof t=="object"&&t!==null){var l=dg.get(t);return l!==void 0?l:(r={value:t,source:r,stack:si(r)},dg.set(t,r),r)}return{value:t,source:r,stack:si(r)}}var tl=[],nl=0,Js=null,xo=0,Fn=[],$n=0,di=null,hr=1,mr="";function Rr(t,r){tl[nl++]=xo,tl[nl++]=Js,Js=t,xo=r}function hg(t,r,l){Fn[$n++]=hr,Fn[$n++]=mr,Fn[$n++]=di,di=t;var s=hr;t=mr;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,hr=1<<32-lt(r)+f|l<<f|s,mr=h+t}else hr=1<<h|l<<f|s,mr=t}function kf(t){t.return!==null&&(Rr(t,1),hg(t,1,0))}function Tf(t){for(;t===Js;)Js=tl[--nl],tl[nl]=null,xo=tl[--nl],tl[nl]=null;for(;t===di;)di=Fn[--$n],Fn[$n]=null,mr=Fn[--$n],Fn[$n]=null,hr=Fn[--$n],Fn[$n]=null}function mg(t,r){Fn[$n++]=hr,Fn[$n++]=mr,Fn[$n++]=di,hr=r.id,mr=r.overflow,di=t}var $t=null,dt=null,He=!1,hi=null,Vn=!1,Af=Error(a(519));function mi(t){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw So(Pn(r,t)),Af}function pg(t){var r=t.stateNode,l=t.type,s=t.memoizedProps;switch(r[Ft]=t,r[un]=s,l){case"dialog":Be("cancel",r),Be("close",r);break;case"iframe":case"object":case"embed":Be("load",r);break;case"video":case"audio":for(l=0;l<Po.length;l++)Be(Po[l],r);break;case"source":Be("error",r);break;case"img":case"image":case"link":Be("error",r),Be("load",r);break;case"details":Be("toggle",r);break;case"input":Be("invalid",r),Ap(r,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Be("invalid",r);break;case"textarea":Be("invalid",r),zp(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||Ov(r.textContent,l)?(s.popover!=null&&(Be("beforetoggle",r),Be("toggle",r)),s.onScroll!=null&&Be("scroll",r),s.onScrollEnd!=null&&Be("scrollend",r),s.onClick!=null&&(r.onclick=zr),r=!0):r=!1,r||mi(t,!0)}function gg(t){for($t=t.return;$t;)switch($t.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:$t=$t.return}}function rl(t){if(t!==$t)return!1;if(!He)return gg(t),He=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Vd(t.type,t.memoizedProps)),l=!l),l&&dt&&mi(t),gg(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));dt=Hv(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));dt=Hv(t)}else r===27?(r=dt,Ai(t.type)?(t=Kd,Kd=null,dt=t):dt=r):dt=$t?Yn(t.stateNode.nextSibling):null;return!0}function ca(){dt=$t=null,He=!1}function Nf(){var t=hi;return t!==null&&(mn===null?mn=t:mn.push.apply(mn,t),hi=null),t}function So(t){hi===null?hi=[t]:hi.push(t)}var zf=R(null),fa=null,Dr=null;function pi(t,r,l){C(zf,r._currentValue),r._currentValue=l}function Mr(t){t._currentValue=zf.current,Y(zf)}function jf(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 Of(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 j=0;j<r.length;j++)if(E.context===r[j]){h.lanes|=l,E=h.alternate,E!==null&&(E.lanes|=l),jf(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),jf(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;_n(f.pendingProps.value,b.value)||(t!==null?t.push(E):t=[E])}}else if(f===Ne.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&&Of(r,t,l,s),r.flags|=262144}function Ws(t){for(t=t.firstContext;t!==null;){if(!_n(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function da(t){fa=t,Dr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Vt(t){return yg(fa,t)}function eu(t,r){return fa===null&&da(t),yg(t,r)}function yg(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Dr===null){if(t===null)throw Error(a(308));Dr=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Dr=Dr.next=r;return l}var LE=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()})}},BE=e.unstable_scheduleCallback,IE=e.unstable_NormalPriority,kt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rf(){return{controller:new LE,data:new Map,refCount:0}}function wo(t){t.refCount--,t.refCount===0&&BE(IE,function(){t.controller.abort()})}var Eo=null,Df=0,al=0,ll=null;function qE(t,r){if(Eo===null){var l=Eo=[];Df=0,al=Ld(),ll={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Df++,r.then(vg,vg),r}function vg(){if(--Df===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 HE(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 bg=I.S;I.S=function(t,r){nv=Bt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&qE(t,r),bg!==null&&bg(t,r)};var ha=R(null);function Mf(){var t=ha.current;return t!==null?t:ot.pooledCache}function tu(t,r){r===null?C(ha,ha.current):C(ha,r.pool)}function xg(){var t=Mf();return t===null?null:{parent:kt._currentValue,pool:t}}var ol=Error(a(460)),Uf=Error(a(474)),nu=Error(a(542)),ru={then:function(){}};function Sg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function wg(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(zr,zr),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,_g(t),t;default:if(typeof r.status=="string")r.then(zr,zr);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,_g(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 Eg(){if(pa===null)throw Error(a(459));var t=pa;return pa=null,t}function _g(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=[]),wg(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===S?Error(a(525)):(t=Object.prototype.toString.call(r),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Cg(t){function r(L,D){if(t){var H=L.deletions;H===null?(L.deletions=[D],L.flags|=16):H.push(D)}}function l(L,D){if(!t)return null;for(;D!==null;)r(L,D),D=D.sibling;return null}function s(L){for(var D=new Map;L!==null;)L.key!==null?D.set(L.key,L):D.set(L.index,L),L=L.sibling;return D}function f(L,D){return L=Or(L,D),L.index=0,L.sibling=null,L}function h(L,D,H){return L.index=H,t?(H=L.alternate,H!==null?(H=H.index,H<D?(L.flags|=67108866,D):H):(L.flags|=67108866,D)):(L.flags|=1048576,D)}function b(L){return t&&L.alternate===null&&(L.flags|=67108866),L}function E(L,D,H,J){return D===null||D.tag!==6?(D=_f(H,L.mode,J),D.return=L,D):(D=f(D,H),D.return=L,D)}function j(L,D,H,J){var Ee=H.type;return Ee===_?G(L,D,H.props.children,J,H.key):D!==null&&(D.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===V&&ma(Ee)===D.type)?(D=f(D,H.props),Co(D,H),D.return=L,D):(D=Ks(H.type,H.key,H.props,null,L.mode,J),Co(D,H),D.return=L,D)}function Z(L,D,H,J){return D===null||D.tag!==4||D.stateNode.containerInfo!==H.containerInfo||D.stateNode.implementation!==H.implementation?(D=Cf(H,L.mode,J),D.return=L,D):(D=f(D,H.children||[]),D.return=L,D)}function G(L,D,H,J,Ee){return D===null||D.tag!==7?(D=ua(H,L.mode,J,Ee),D.return=L,D):(D=f(D,H),D.return=L,D)}function ee(L,D,H){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=_f(""+D,L.mode,H),D.return=L,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case x:return H=Ks(D.type,D.key,D.props,null,L.mode,H),Co(H,D),H.return=L,H;case z:return D=Cf(D,L.mode,H),D.return=L,D;case V:return D=ma(D),ee(L,D,H)}if(te(D)||le(D))return D=ua(D,L.mode,H,null),D.return=L,D;if(typeof D.then=="function")return ee(L,iu(D),H);if(D.$$typeof===M)return ee(L,eu(L,D),H);au(L,D)}return null}function P(L,D,H,J){var Ee=D!==null?D.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return Ee!==null?null:E(L,D,""+H,J);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return H.key===Ee?j(L,D,H,J):null;case z:return H.key===Ee?Z(L,D,H,J):null;case V:return H=ma(H),P(L,D,H,J)}if(te(H)||le(H))return Ee!==null?null:G(L,D,H,J,null);if(typeof H.then=="function")return P(L,D,iu(H),J);if(H.$$typeof===M)return P(L,D,eu(L,H),J);au(L,H)}return null}function $(L,D,H,J,Ee){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return L=L.get(H)||null,E(D,L,""+J,Ee);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return L=L.get(J.key===null?H:J.key)||null,j(D,L,J,Ee);case z:return L=L.get(J.key===null?H:J.key)||null,Z(D,L,J,Ee);case V:return J=ma(J),$(L,D,H,J,Ee)}if(te(J)||le(J))return L=L.get(H)||null,G(D,L,J,Ee,null);if(typeof J.then=="function")return $(L,D,H,iu(J),Ee);if(J.$$typeof===M)return $(L,D,H,eu(D,J),Ee);au(D,J)}return null}function pe(L,D,H,J){for(var Ee=null,Ye=null,xe=D,Oe=D=0,qe=null;xe!==null&&Oe<H.length;Oe++){xe.index>Oe?(qe=xe,xe=null):qe=xe.sibling;var Ge=P(L,xe,H[Oe],J);if(Ge===null){xe===null&&(xe=qe);break}t&&xe&&Ge.alternate===null&&r(L,xe),D=h(Ge,D,Oe),Ye===null?Ee=Ge:Ye.sibling=Ge,Ye=Ge,xe=qe}if(Oe===H.length)return l(L,xe),He&&Rr(L,Oe),Ee;if(xe===null){for(;Oe<H.length;Oe++)xe=ee(L,H[Oe],J),xe!==null&&(D=h(xe,D,Oe),Ye===null?Ee=xe:Ye.sibling=xe,Ye=xe);return He&&Rr(L,Oe),Ee}for(xe=s(xe);Oe<H.length;Oe++)qe=$(xe,L,Oe,H[Oe],J),qe!==null&&(t&&qe.alternate!==null&&xe.delete(qe.key===null?Oe:qe.key),D=h(qe,D,Oe),Ye===null?Ee=qe:Ye.sibling=qe,Ye=qe);return t&&xe.forEach(function(Ri){return r(L,Ri)}),He&&Rr(L,Oe),Ee}function _e(L,D,H,J){if(H==null)throw Error(a(151));for(var Ee=null,Ye=null,xe=D,Oe=D=0,qe=null,Ge=H.next();xe!==null&&!Ge.done;Oe++,Ge=H.next()){xe.index>Oe?(qe=xe,xe=null):qe=xe.sibling;var Ri=P(L,xe,Ge.value,J);if(Ri===null){xe===null&&(xe=qe);break}t&&xe&&Ri.alternate===null&&r(L,xe),D=h(Ri,D,Oe),Ye===null?Ee=Ri:Ye.sibling=Ri,Ye=Ri,xe=qe}if(Ge.done)return l(L,xe),He&&Rr(L,Oe),Ee;if(xe===null){for(;!Ge.done;Oe++,Ge=H.next())Ge=ee(L,Ge.value,J),Ge!==null&&(D=h(Ge,D,Oe),Ye===null?Ee=Ge:Ye.sibling=Ge,Ye=Ge);return He&&Rr(L,Oe),Ee}for(xe=s(xe);!Ge.done;Oe++,Ge=H.next())Ge=$(xe,L,Oe,Ge.value,J),Ge!==null&&(t&&Ge.alternate!==null&&xe.delete(Ge.key===null?Oe:Ge.key),D=h(Ge,D,Oe),Ye===null?Ee=Ge:Ye.sibling=Ge,Ye=Ge);return t&&xe.forEach(function(J_){return r(L,J_)}),He&&Rr(L,Oe),Ee}function at(L,D,H,J){if(typeof H=="object"&&H!==null&&H.type===_&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case x:e:{for(var Ee=H.key;D!==null;){if(D.key===Ee){if(Ee=H.type,Ee===_){if(D.tag===7){l(L,D.sibling),J=f(D,H.props.children),J.return=L,L=J;break e}}else if(D.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===V&&ma(Ee)===D.type){l(L,D.sibling),J=f(D,H.props),Co(J,H),J.return=L,L=J;break e}l(L,D);break}else r(L,D);D=D.sibling}H.type===_?(J=ua(H.props.children,L.mode,J,H.key),J.return=L,L=J):(J=Ks(H.type,H.key,H.props,null,L.mode,J),Co(J,H),J.return=L,L=J)}return b(L);case z:e:{for(Ee=H.key;D!==null;){if(D.key===Ee)if(D.tag===4&&D.stateNode.containerInfo===H.containerInfo&&D.stateNode.implementation===H.implementation){l(L,D.sibling),J=f(D,H.children||[]),J.return=L,L=J;break e}else{l(L,D);break}else r(L,D);D=D.sibling}J=Cf(H,L.mode,J),J.return=L,L=J}return b(L);case V:return H=ma(H),at(L,D,H,J)}if(te(H))return pe(L,D,H,J);if(le(H)){if(Ee=le(H),typeof Ee!="function")throw Error(a(150));return H=Ee.call(H),_e(L,D,H,J)}if(typeof H.then=="function")return at(L,D,iu(H),J);if(H.$$typeof===M)return at(L,D,eu(L,H),J);au(L,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,D!==null&&D.tag===6?(l(L,D.sibling),J=f(D,H),J.return=L,L=J):(l(L,D),J=_f(H,L.mode,J),J.return=L,L=J),b(L)):l(L,D)}return function(L,D,H,J){try{_o=0;var Ee=at(L,D,H,J);return sl=null,Ee}catch(xe){if(xe===ol||xe===nu)throw xe;var Ye=Cn(29,xe,null,L.mode);return Ye.lanes=J,Ye.return=L,Ye}finally{}}}var ga=Cg(!0),kg=Cg(!1),gi=!1;function Lf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bf(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 yi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function vi(t,r,l){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Xe&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),ug(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,yp(t,l)}}function If(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 qf=!1;function To(){if(qf){var t=ll;if(t!==null)throw t}}function Ao(t,r,l,s){qf=!1;var f=t.updateQueue;gi=!1;var h=f.firstBaseUpdate,b=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var j=E,Z=j.next;j.next=null,b===null?h=Z:b.next=Z,b=j;var G=t.alternate;G!==null&&(G=G.updateQueue,E=G.lastBaseUpdate,E!==b&&(E===null?G.firstBaseUpdate=Z:E.next=Z,G.lastBaseUpdate=j))}if(h!==null){var ee=f.baseState;b=0,G=Z=j=null,E=h;do{var P=E.lane&-536870913,$=P!==E.lane;if($?(Ie&P)===P:(s&P)===P){P!==0&&P===al&&(qf=!0),G!==null&&(G=G.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var pe=t,_e=E;P=r;var at=l;switch(_e.tag){case 1:if(pe=_e.payload,typeof pe=="function"){ee=pe.call(at,ee,P);break e}ee=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=_e.payload,P=typeof pe=="function"?pe.call(at,ee,P):pe,P==null)break e;ee=v({},ee,P);break e;case 2:gi=!0}}P=E.callback,P!==null&&(t.flags|=64,$&&(t.flags|=8192),$=f.callbacks,$===null?f.callbacks=[P]:$.push(P))}else $={lane:P,tag:E.tag,payload:E.payload,callback:E.callback,next:null},G===null?(Z=G=$,j=ee):G=G.next=$,b|=P;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;$=E,E=$.next,$.next=null,f.lastBaseUpdate=$,f.shared.pending=null}}while(!0);G===null&&(j=ee),f.baseState=j,f.firstBaseUpdate=Z,f.lastBaseUpdate=G,h===null&&(f.shared.lanes=0),Ei|=b,t.lanes=b,t.memoizedState=ee}}function Tg(t,r){if(typeof t!="function")throw Error(a(191,t));t.call(r)}function Ag(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Tg(l[t],r)}var ul=R(null),lu=R(0);function Ng(t,r){t=Fr,C(lu,t),C(ul,r),Fr=t|r.baseLanes}function Hf(){C(lu,Fr),C(ul,ul.current)}function Zf(){Fr=lu.current,Y(ul),Y(lu)}var kn=R(null),Qn=null;function bi(t){var r=t.alternate;C(_t,_t.current&1),C(kn,t),Qn===null&&(r===null||ul.current!==null||r.memoizedState!==null)&&(Qn=t)}function Pf(t){C(_t,_t.current),C(kn,t),Qn===null&&(Qn=t)}function zg(t){t.tag===22?(C(_t,_t.current),C(kn,t),Qn===null&&(Qn=t)):xi()}function xi(){C(_t,_t.current),C(kn,kn.current)}function Tn(t){Y(kn),Qn===t&&(Qn=null),Y(_t)}var _t=R(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||Gd(l)||Xd(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 Ur=0,je=null,rt=null,Tt=null,su=!1,cl=!1,ya=!1,uu=0,No=0,fl=null,ZE=0;function vt(){throw Error(a(321))}function Ff(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!_n(t[l],r[l]))return!1;return!0}function $f(t,r,l,s,f,h){return Ur=h,je=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,I.H=t===null||t.memoizedState===null?hy:ld,ya=!1,h=l(s,f),ya=!1,cl&&(h=Og(r,l,s,f)),jg(t),h}function jg(t){I.H=Oo;var r=rt!==null&&rt.next!==null;if(Ur=0,Tt=rt=je=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 Og(t,r,l,s){je=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=my,h=r(l,s)}while(cl);return h}function PE(){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&&(je.flags|=1024),r}function Vf(){var t=uu!==0;return uu=0,t}function Qf(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function Yf(t){if(su){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}su=!1}Ur=0,Tt=rt=je=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?je.memoizedState=Tt=t:Tt=Tt.next=t,Tt}function Ct(){if(rt===null){var t=je.alternate;t=t!==null?t.memoizedState:null}else t=rt.next;var r=Tt===null?je.memoizedState:Tt.next;if(r!==null)Tt=r,rt=t;else{if(t===null)throw je.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?je.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=wg(fl,t,r),r=je,(Tt===null?r.memoizedState:Tt.next)===null&&(r=r.alternate,I.H=r===null||r.memoizedState===null?hy:ld),t}function fu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return zo(t);if(t.$$typeof===M)return Vt(t)}throw Error(a(438,String(t)))}function Gf(t){var r=null,l=je.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var s=je.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(),je.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]=he;return r.index++,l}function Lr(t,r){return typeof r=="function"?r(t):r}function du(t){var r=Ct();return Xf(r,rt,t)}function Xf(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,j=null,Z=r,G=!1;do{var ee=Z.lane&-536870913;if(ee!==Z.lane?(Ie&ee)===ee:(Ur&ee)===ee){var P=Z.revertLane;if(P===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),ee===al&&(G=!0);else if((Ur&P)===P){Z=Z.next,P===al&&(G=!0);continue}else ee={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},j===null?(E=j=ee,b=h):j=j.next=ee,je.lanes|=P,Ei|=P;ee=Z.action,ya&&l(h,ee),h=Z.hasEagerState?Z.eagerState:l(h,ee)}else P={lane:ee,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},j===null?(E=j=P,b=h):j=j.next=P,je.lanes|=ee,Ei|=ee;Z=Z.next}while(Z!==null&&Z!==r);if(j===null?b=h:j.next=E,!_n(h,t.memoizedState)&&(At=!0,G&&(l=ll,l!==null)))throw l;t.memoizedState=h,t.baseState=b,t.baseQueue=j,s.lastRenderedState=h}return f===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Kf(t){var r=Ct(),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);_n(h,r.memoizedState)||(At=!0),r.memoizedState=h,r.baseQueue===null&&(r.baseState=h),l.lastRenderedState=h}return[h,s]}function Rg(t,r,l){var s=je,f=Ct(),h=He;if(h){if(l===void 0)throw Error(a(407));l=l()}else l=r();var b=!_n((rt||f).memoizedState,l);if(b&&(f.memoizedState=l,At=!0),f=f.queue,ed(Ug.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},Mg.bind(null,s,f,l,r),null),ot===null)throw Error(a(349));h||(Ur&127)!==0||Dg(s,r,l)}return l}function Dg(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=je.updateQueue,r===null?(r=cu(),je.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Mg(t,r,l,s){r.value=l,r.getSnapshot=s,Lg(r)&&Bg(t)}function Ug(t,r,l){return l(function(){Lg(r)&&Bg(t)})}function Lg(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!_n(t,l)}catch{return!0}}function Bg(t){var r=sa(t,2);r!==null&&pn(r,t,2)}function Jf(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:Lr,lastRenderedState:t},r}function Ig(t,r,l,s){return t.baseState=l,Xf(t,rt,typeof s=="function"?s:Lr)}function FE(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,qg(r,h)):(h.next=l.next,r.pending=l.next=h)}}function qg(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),j=I.S;j!==null&&j(b,E),Hg(t,r,E)}catch(Z){Wf(t,r,Z)}finally{h!==null&&b.types!==null&&(h.types=b.types),I.T=h}}else try{h=l(f,s),Hg(t,r,h)}catch(Z){Wf(t,r,Z)}}function Hg(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){Zg(t,r,s)},function(s){return Wf(t,r,s)}):Zg(t,r,l)}function Zg(t,r,l){r.status="fulfilled",r.value=l,Pg(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,qg(t,l)))}function Wf(t,r,l){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do r.status="rejected",r.reason=l,Pg(r),r=r.next;while(r!==s)}t.action=null}function Pg(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Fg(t,r){return r}function $g(t,r){if(He){var l=ot.formState;if(l!==null){e:{var s=je;if(He){if(dt){t:{for(var f=dt,h=Vn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Yn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){dt=Yn(f.nextSibling),s=f.data==="F!";break e}}mi(s)}s=!1}s&&(r=l[0])}}return l=rn(),l.memoizedState=l.baseState=r,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fg,lastRenderedState:r},l.queue=s,l=cy.bind(null,je,s),s.dispatch=l,s=Jf(!1),h=ad.bind(null,je,!1,s.queue),s=rn(),f={state:r,dispatch:null,action:t,pending:null},s.queue=f,l=FE.bind(null,je,f,h,l),f.dispatch=l,s.memoizedState=t,[r,l,!1]}function Vg(t){var r=Ct();return Qg(r,rt,t)}function Qg(t,r,l){if(r=Xf(t,r,Fg)[0],t=du(Lr)[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=Ct();var f=r.queue,h=f.dispatch;return l!==r.memoizedState&&(je.flags|=2048,dl(9,{destroy:void 0},$E.bind(null,f,l),null)),[s,h,t]}function $E(t,r){t.action=r}function Yg(t){var r=Ct(),l=rt;if(l!==null)return Qg(r,l,t);Ct(),r=r.memoizedState,l=Ct();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=je.updateQueue,r===null&&(r=cu(),je.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 Gg(){return Ct().memoizedState}function hu(t,r,l,s){var f=rn();je.flags|=t,f.memoizedState=dl(1|r,{destroy:void 0},l,s===void 0?null:s)}function mu(t,r,l,s){var f=Ct();s=s===void 0?null:s;var h=f.memoizedState.inst;rt!==null&&s!==null&&Ff(s,rt.memoizedState.deps)?f.memoizedState=dl(r,h,l,s):(je.flags|=t,f.memoizedState=dl(1|r,h,l,s))}function Xg(t,r){hu(8390656,8,t,r)}function ed(t,r){mu(2048,8,t,r)}function VE(t){je.flags|=4;var r=je.updateQueue;if(r===null)r=cu(),je.updateQueue=r,r.events=[t];else{var l=r.events;l===null?r.events=[t]:l.push(t)}}function Kg(t){var r=Ct().memoizedState;return VE({ref:r,nextImpl:t}),function(){if((Xe&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Jg(t,r){return mu(4,2,t,r)}function Wg(t,r){return mu(4,4,t,r)}function ey(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 ty(t,r,l){l=l!=null?l.concat([t]):null,mu(4,4,ey.bind(null,r,t),l)}function td(){}function ny(t,r){var l=Ct();r=r===void 0?null:r;var s=l.memoizedState;return r!==null&&Ff(r,s[1])?s[0]:(l.memoizedState=[t,r],t)}function ry(t,r){var l=Ct();r=r===void 0?null:r;var s=l.memoizedState;if(r!==null&&Ff(r,s[1]))return s[0];if(s=t(),ya){sn(!0);try{t()}finally{sn(!1)}}return l.memoizedState=[s,r],s}function nd(t,r,l){return l===void 0||(Ur&1073741824)!==0&&(Ie&261930)===0?t.memoizedState=r:(t.memoizedState=l,t=iv(),je.lanes|=t,Ei|=t,l)}function iy(t,r,l,s){return _n(l,r)?l:ul.current!==null?(t=nd(t,l,s),_n(t,r)||(At=!0),t):(Ur&42)===0||(Ur&1073741824)!==0&&(Ie&261930)===0?(At=!0,t.memoizedState=l):(t=iv(),je.lanes|=t,Ei|=t,r)}function ay(t,r,l,s,f){var h=ne.p;ne.p=h!==0&&8>h?h:8;var b=I.T,E={};I.T=E,ad(t,!1,r,l);try{var j=f(),Z=I.S;if(Z!==null&&Z(E,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var G=HE(j,s);jo(t,r,G,zn(t))}else jo(t,r,s,zn(t))}catch(ee){jo(t,r,{then:function(){},status:"rejected",reason:ee},zn())}finally{ne.p=h,b!==null&&E.types!==null&&(b.types=E.types),I.T=b}}function QE(){}function rd(t,r,l,s){if(t.tag!==5)throw Error(a(476));var f=ly(t).queue;ay(t,f,r,me,l===null?QE:function(){return oy(t),l(s)})}function ly(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:me},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function oy(t){var r=ly(t);r.next===null&&(r=t.alternate.memoizedState),jo(t,r.next.queue,{},zn())}function id(){return Vt(Yo)}function sy(){return Ct().memoizedState}function uy(){return Ct().memoizedState}function YE(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=zn();t=yi(l);var s=vi(r,t,l);s!==null&&(pn(s,r,l),ko(s,r,l)),r={cache:Rf()},t.payload=r;return}r=r.return}}function GE(t,r,l){var s=zn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},pu(t)?fy(r,l):(l=wf(t,r,l,s),l!==null&&(pn(l,t,s),dy(l,r,s)))}function cy(t,r,l){var s=zn();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))fy(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,_n(E,b))return Gs(t,r,f,0),ot===null&&Ys(),!1}catch{}finally{}if(l=wf(t,r,f,s),l!==null)return pn(l,t,s),dy(l,r,s),!0}return!1}function ad(t,r,l,s){if(s={lane:2,revertLane:Ld(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},pu(t)){if(r)throw Error(a(479))}else r=wf(t,l,s,2),r!==null&&pn(r,t,2)}function pu(t){var r=t.alternate;return t===je||r!==null&&r===je}function fy(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 dy(t,r,l){if((l&4194048)!==0){var s=r.lanes;s&=t.pendingLanes,l|=s,r.lanes=l,yp(t,l)}}var Oo={readContext:Vt,use:fu,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};Oo.useEffectEvent=vt;var hy={readContext:Vt,use:fu,useCallback:function(t,r){return rn().memoizedState=[t,r===void 0?null:r],t},useContext:Vt,useEffect:Xg,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,hu(4194308,4,ey.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=GE.bind(null,je,t),[s.memoizedState,t]},useRef:function(t){var r=rn();return t={current:t},r.memoizedState=t},useState:function(t){t=Jf(t);var r=t.queue,l=cy.bind(null,je,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:td,useDeferredValue:function(t,r){var l=rn();return nd(l,t,r)},useTransition:function(){var t=Jf(!1);return t=ay.bind(null,je,t.queue,!0,!1),rn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var s=je,f=rn();if(He){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),ot===null)throw Error(a(349));(Ie&127)!==0||Dg(s,r,l)}f.memoizedState=l;var h={value:l,getSnapshot:r};return f.queue=h,Xg(Ug.bind(null,s,h,t),[t]),s.flags|=2048,dl(9,{destroy:void 0},Mg.bind(null,s,h,l,r),null),l},useId:function(){var t=rn(),r=ot.identifierPrefix;if(He){var l=mr,s=hr;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=ZE++,r="_"+r+"r_"+l.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:id,useFormState:$g,useActionState:$g,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=ad.bind(null,je,!0,l),l.dispatch=r,[t,r]},useMemoCache:Gf,useCacheRefresh:function(){return rn().memoizedState=YE.bind(null,je)},useEffectEvent:function(t){var r=rn(),l={impl:t};return r.memoizedState=l,function(){if((Xe&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},ld={readContext:Vt,use:fu,useCallback:ny,useContext:Vt,useEffect:ed,useImperativeHandle:ty,useInsertionEffect:Jg,useLayoutEffect:Wg,useMemo:ry,useReducer:du,useRef:Gg,useState:function(){return du(Lr)},useDebugValue:td,useDeferredValue:function(t,r){var l=Ct();return iy(l,rt.memoizedState,t,r)},useTransition:function(){var t=du(Lr)[0],r=Ct().memoizedState;return[typeof t=="boolean"?t:zo(t),r]},useSyncExternalStore:Rg,useId:sy,useHostTransitionStatus:id,useFormState:Vg,useActionState:Vg,useOptimistic:function(t,r){var l=Ct();return Ig(l,rt,t,r)},useMemoCache:Gf,useCacheRefresh:uy};ld.useEffectEvent=Kg;var my={readContext:Vt,use:fu,useCallback:ny,useContext:Vt,useEffect:ed,useImperativeHandle:ty,useInsertionEffect:Jg,useLayoutEffect:Wg,useMemo:ry,useReducer:Kf,useRef:Gg,useState:function(){return Kf(Lr)},useDebugValue:td,useDeferredValue:function(t,r){var l=Ct();return rt===null?nd(l,t,r):iy(l,rt.memoizedState,t,r)},useTransition:function(){var t=Kf(Lr)[0],r=Ct().memoizedState;return[typeof t=="boolean"?t:zo(t),r]},useSyncExternalStore:Rg,useId:sy,useHostTransitionStatus:id,useFormState:Yg,useActionState:Yg,useOptimistic:function(t,r){var l=Ct();return rt!==null?Ig(l,rt,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Gf,useCacheRefresh:uy};my.useEffectEvent=Kg;function od(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 sd={enqueueSetState:function(t,r,l){t=t._reactInternals;var s=zn(),f=yi(s);f.payload=r,l!=null&&(f.callback=l),r=vi(t,f,s),r!==null&&(pn(r,t,s),ko(r,t,s))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var s=zn(),f=yi(s);f.tag=1,f.payload=r,l!=null&&(f.callback=l),r=vi(t,f,s),r!==null&&(pn(r,t,s),ko(r,t,s))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=zn(),s=yi(l);s.tag=2,r!=null&&(s.callback=r),r=vi(t,s,l),r!==null&&(pn(r,t,l),ko(r,t,l))}};function py(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 gy(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&&sd.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 yy(t){Qs(t)}function vy(t){console.error(t)}function by(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 xy(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 ud(t,r,l){return l=yi(l),l.tag=3,l.payload={element:null},l.callback=function(){gu(t,r)},l}function Sy(t){return t=yi(t),t.tag=3,t}function wy(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(){xy(r,l,s)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){xy(r,l,s),typeof f!="function"&&(_i===null?_i=new Set([this]):_i.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})})}function XE(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=kn.current,l!==null){switch(l.tag){case 31:case 13:return Qn===null?Au():l.alternate===null&&bt===0&&(bt=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),Dd(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)),Dd(t,s,f)),!1}throw Error(a(435,l.tag))}return Dd(t,s,f),Au(),!1}if(He)return r=kn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,s!==Af&&(t=Error(a(422),{cause:s}),So(Pn(t,l)))):(s!==Af&&(r=Error(a(423),{cause:s}),So(Pn(r,l))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,s=Pn(s,l),f=ud(t.stateNode,s,f),If(t,f),bt!==4&&(bt=2)),!1;var h=Error(a(520),{cause:s});if(h=Pn(h,l),qo===null?qo=[h]:qo.push(h),bt!==4&&(bt=2),r===null)return!0;s=Pn(s,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=f&-f,l.lanes|=t,t=ud(l.stateNode,s,t),If(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"&&(_i===null||!_i.has(h))))return l.flags|=65536,f&=-f,l.lanes|=f,f=Sy(f),wy(f,t,l,s),If(l,f),!1}l=l.return}while(l!==null);return!1}var cd=Error(a(461)),At=!1;function Qt(t,r,l,s){r.child=t===null?kg(r,null,l,s):ga(r,t.child,l,s)}function Ey(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=$f(t,r,l,b,h,f),E=Vf(),t!==null&&!At?(Qf(t,r,f),Br(t,r,f)):(He&&E&&kf(r),r.flags|=1,Qt(t,r,s,f),r.child)}function _y(t,r,l,s,f){if(t===null){var h=l.type;return typeof h=="function"&&!Ef(h)&&h.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=h,Cy(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,!vd(t,f)){var b=h.memoizedProps;if(l=l.compare,l=l!==null?l:vo,l(b,s)&&t.ref===r.ref)return Br(t,r,f)}return r.flags|=1,t=Or(h,s),t.ref=r.ref,t.return=r,r.child=t}function Cy(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,vd(t,f))(t.flags&131072)!==0&&(At=!0);else return r.lanes=t.lanes,Br(t,r,f)}return fd(t,r,l,s,f)}function ky(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 Ty(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?Ng(r,h):Hf(),zg(r);else return s=r.lanes=536870912,Ty(t,r,h!==null?h.baseLanes|l:l,l,s)}else h!==null?(tu(r,h.cachePool),Ng(r,h),xi(),r.memoizedState=null):(t!==null&&tu(r,null),Hf(),xi());return Qt(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 Ty(t,r,l,s,f){var h=Mf();return h=h===null?null:{parent:kt._currentValue,pool:h},r.memoizedState={baseLanes:l,cachePool:h},t!==null&&tu(r,null),Hf(),zg(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 Ay(t,r,l){return ga(r,t.child,null,l),t=yu(r,r.pendingProps),t.flags|=2,Tn(r),r.memoizedState=null,t}function KE(t,r,l){var s=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(He){if(s.mode==="hidden")return t=yu(r,s),r.lanes=536870912,Ro(null,t);if(Pf(r),(t=dt)?(t=qv(t,Vn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:di!==null?{id:hr,overflow:mr}:null,retryLane:536870912,hydrationErrors:null},l=fg(t),l.return=r,r.child=l,$t=r,dt=null)):t=null,t===null)throw mi(r);return r.lanes=536870912,null}return yu(r,s)}var h=t.memoizedState;if(h!==null){var b=h.dehydrated;if(Pf(r),f)if(r.flags&256)r.flags&=-257,r=Ay(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=vp(s,l),b!==0&&b!==h.retryLane))throw h.retryLane=b,sa(t,b),pn(s,t,b),cd;Au(),r=Ay(t,r,l)}else t=h.treeContext,dt=Yn(b.nextSibling),$t=r,He=!0,hi=null,Vn=!1,t!==null&&mg(r,t),r=yu(r,s),r.flags|=4096;return r}return t=Or(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 fd(t,r,l,s,f){return da(r),l=$f(t,r,l,s,void 0,f),s=Vf(),t!==null&&!At?(Qf(t,r,f),Br(t,r,f)):(He&&s&&kf(r),r.flags|=1,Qt(t,r,l,f),r.child)}function Ny(t,r,l,s,f,h){return da(r),r.updateQueue=null,l=Og(r,s,l,f),jg(t),s=Vf(),t!==null&&!At?(Qf(t,r,h),Br(t,r,h)):(He&&s&&kf(r),r.flags|=1,Qt(t,r,l,h),r.child)}function zy(t,r,l,s,f){if(da(r),r.stateNode===null){var h=el,b=l.contextType;typeof b=="object"&&b!==null&&(h=Vt(b)),h=new l(s,h),r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=sd,r.stateNode=h,h._reactInternals=r,h=r.stateNode,h.props=s,h.state=r.memoizedState,h.refs={},Lf(r),b=l.contextType,h.context=typeof b=="object"&&b!==null?Vt(b):el,h.state=r.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(od(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&&sd.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,j=va(l,E);h.props=j;var Z=h.context,G=l.contextType;b=el,typeof G=="object"&&G!==null&&(b=Vt(G));var ee=l.getDerivedStateFromProps;G=typeof ee=="function"||typeof h.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,G||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(E||Z!==b)&&gy(r,h,s,b),gi=!1;var P=r.memoizedState;h.state=P,Ao(r,s,h,f),To(),Z=r.memoizedState,E||P!==Z||gi?(typeof ee=="function"&&(od(r,l,ee,s),Z=r.memoizedState),(j=gi||py(r,l,j,s,P,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=j):(typeof h.componentDidMount=="function"&&(r.flags|=4194308),s=!1)}else{h=r.stateNode,Bf(t,r),b=r.memoizedProps,G=va(l,b),h.props=G,ee=r.pendingProps,P=h.context,Z=l.contextType,j=el,typeof Z=="object"&&Z!==null&&(j=Vt(Z)),E=l.getDerivedStateFromProps,(Z=typeof E=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==ee||P!==j)&&gy(r,h,s,j),gi=!1,P=r.memoizedState,h.state=P,Ao(r,s,h,f),To();var $=r.memoizedState;b!==ee||P!==$||gi||t!==null&&t.dependencies!==null&&Ws(t.dependencies)?(typeof E=="function"&&(od(r,l,E,s),$=r.memoizedState),(G=gi||py(r,l,G,s,P,$,j)||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,$,j),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,$,j)),typeof h.componentDidUpdate=="function"&&(r.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===t.memoizedProps&&P===t.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&P===t.memoizedState||(r.flags|=1024),r.memoizedProps=s,r.memoizedState=$),h.props=s,h.state=$,h.context=j,s=G):(typeof h.componentDidUpdate!="function"||b===t.memoizedProps&&P===t.memoizedState||(r.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&P===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)):Qt(t,r,l,f),r.memoizedState=h.state,t=r.child):t=Br(t,r,f),t}function jy(t,r,l,s){return ca(),r.flags|=256,Qt(t,r,l,s),r.child}var dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hd(t){return{baseLanes:t,cachePool:xg()}}function md(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=Nn),t}function Oy(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:(_t.current&2)!==0),b&&(f=!0,r.flags&=-129),b=(r.flags&32)!==0,r.flags&=-33,t===null){if(He){if(f?bi(r):xi(),(t=dt)?(t=qv(t,Vn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:di!==null?{id:hr,overflow:mr}:null,retryLane:536870912,hydrationErrors:null},l=fg(t),l.return=r,r.child=l,$t=r,dt=null)):t=null,t===null)throw mi(r);return Xd(t)?r.lanes=32:r.lanes=536870912,null}var E=s.children;return s=s.fallback,f?(xi(),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=hd(l),s.childLanes=md(t,b,l),r.memoizedState=dd,Ro(null,s)):(bi(r),pd(r,E))}var j=t.memoizedState;if(j!==null&&(E=j.dehydrated,E!==null)){if(h)r.flags&256?(bi(r),r.flags&=-257,r=gd(t,r,l)):r.memoizedState!==null?(xi(),r.child=t.child,r.flags|=128,r=null):(xi(),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=hd(l),s.childLanes=md(t,b,l),r.memoizedState=dd,r=Ro(null,s));else if(bi(r),Xd(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=gd(t,r,l)}else if(At||il(t,r,l,!1),b=(l&t.childLanes)!==0,At||b){if(b=ot,b!==null&&(s=vp(b,l),s!==0&&s!==j.retryLane))throw j.retryLane=s,sa(t,s),pn(b,t,s),cd;Gd(E)||Au(),r=gd(t,r,l)}else Gd(E)?(r.flags|=192,r.child=t.child,r=null):(t=j.treeContext,dt=Yn(E.nextSibling),$t=r,He=!0,hi=null,Vn=!1,t!==null&&mg(r,t),r=pd(r,s.children),r.flags|=4096);return r}return f?(xi(),E=s.fallback,f=r.mode,j=t.child,Z=j.sibling,s=Or(j,{mode:"hidden",children:s.children}),s.subtreeFlags=j.subtreeFlags&65011712,Z!==null?E=Or(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=hd(l):(f=E.cachePool,f!==null?(j=kt._currentValue,f=f.parent!==j?{parent:j,pool:j}:f):f=xg(),E={baseLanes:E.baseLanes|l,cachePool:f}),s.memoizedState=E,s.childLanes=md(t,b,l),r.memoizedState=dd,Ro(t.child,s)):(bi(r),l=t.child,t=l.sibling,l=Or(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 pd(t,r){return r=bu({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function bu(t,r){return t=Cn(22,t,null,r),t.lanes=0,t}function gd(t,r,l){return ga(r,t.child,null,l),t=pd(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Ry(t,r,l){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r),jf(t.return,r,l)}function yd(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 Dy(t,r,l){var s=r.pendingProps,f=s.revealOrder,h=s.tail;s=s.children;var b=_t.current,E=(b&2)!==0;if(E?(b=b&1|2,r.flags|=128):b&=1,C(_t,b),Qt(t,r,s,l),s=He?xo:0,!E&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ry(t,l,r);else if(t.tag===19)Ry(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),yd(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}yd(r,!0,l,null,h,s);break;case"together":yd(r,!1,null,null,void 0,s);break;default:r.memoizedState=null}return r.child}function Br(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),Ei|=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=Or(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Or(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function vd(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Ws(t)))}function JE(t,r,l){switch(r.tag){case 3:Fe(r,r.stateNode.containerInfo),pi(r,kt,t.memoizedState.cache),ca();break;case 27:case 5:ft(r);break;case 4:Fe(r,r.stateNode.containerInfo);break;case 10:pi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Pf(r),null;break;case 13:var s=r.memoizedState;if(s!==null)return s.dehydrated!==null?(bi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Oy(t,r,l):(bi(r),t=Br(t,r,l),t!==null?t.sibling:null);bi(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 Dy(t,r,l);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),C(_t,_t.current),s)break;return null;case 22:return r.lanes=0,ky(t,r,l,r.pendingProps);case 24:pi(r,kt,t.memoizedState.cache)}return Br(t,r,l)}function My(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)At=!0;else{if(!vd(t,l)&&(r.flags&128)===0)return At=!1,JE(t,r,l);At=(t.flags&131072)!==0}else At=!1,He&&(r.flags&1048576)!==0&&hg(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")Ef(t)?(s=va(t,s),r.tag=1,r=zy(null,r,t,s,l)):(r.tag=0,r=fd(null,r,t,s,l));else{if(t!=null){var f=t.$$typeof;if(f===B){r.tag=11,r=Ey(null,r,t,s,l);break e}else if(f===Q){r.tag=14,r=_y(null,r,t,s,l);break e}}throw r=ce(t)||t,Error(a(306,r,""))}}return r;case 0:return fd(t,r,r.type,r.pendingProps,l);case 1:return s=r.type,f=va(s,r.pendingProps),zy(t,r,s,f,l);case 3:e:{if(Fe(r,r.stateNode.containerInfo),t===null)throw Error(a(387));s=r.pendingProps;var h=r.memoizedState;f=h.element,Bf(t,r),Ao(r,s,null,l);var b=r.memoizedState;if(s=b.cache,pi(r,kt,s),s!==h.cache&&Of(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=jy(t,r,s,l);break e}else if(s!==f){f=Pn(Error(a(424)),r),So(f),r=jy(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(dt=Yn(t.firstChild),$t=r,He=!0,hi=null,Vn=!0,l=kg(r,null,s,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ca(),s===f){r=Br(t,r,l);break e}Qt(t,r,s,l)}r=r.child}return r;case 26:return vu(t,r),t===null?(l=Vv(r.type,null,r.pendingProps,null))?r.memoizedState=l:He||(l=r.type,t=r.pendingProps,s=Mu(ue.current).createElement(l),s[Ft]=r,s[un]=t,Yt(s,l,t),It(s),r.stateNode=s):r.memoizedState=Vv(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return ft(r),t===null&&He&&(s=r.stateNode=Pv(r.type,r.pendingProps,ue.current),$t=r,Vn=!0,f=dt,Ai(r.type)?(Kd=f,dt=Yn(s.firstChild)):dt=f),Qt(t,r,r.pendingProps.children,l),vu(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&He&&((f=s=dt)&&(s=A_(s,r.type,r.pendingProps,Vn),s!==null?(r.stateNode=s,$t=r,dt=Yn(s.firstChild),Vn=!1,f=!0):f=!1),f||mi(r)),ft(r),f=r.type,h=r.pendingProps,b=t!==null?t.memoizedProps:null,s=h.children,Vd(f,h)?s=null:b!==null&&Vd(f,b)&&(r.flags|=32),r.memoizedState!==null&&(f=$f(t,r,PE,null,null,l),Yo._currentValue=f),vu(t,r),Qt(t,r,s,l),r.child;case 6:return t===null&&He&&((t=l=dt)&&(l=N_(l,r.pendingProps,Vn),l!==null?(r.stateNode=l,$t=r,dt=null,t=!0):t=!1),t||mi(r)),null;case 13:return Oy(t,r,l);case 4:return Fe(r,r.stateNode.containerInfo),s=r.pendingProps,t===null?r.child=ga(r,null,s,l):Qt(t,r,s,l),r.child;case 11:return Ey(t,r,r.type,r.pendingProps,l);case 7:return Qt(t,r,r.pendingProps,l),r.child;case 8:return Qt(t,r,r.pendingProps.children,l),r.child;case 12:return Qt(t,r,r.pendingProps.children,l),r.child;case 10:return s=r.pendingProps,pi(r,r.type,s.value),Qt(t,r,s.children,l),r.child;case 9:return f=r.type._context,s=r.pendingProps.children,da(r),f=Vt(f),s=s(f),r.flags|=1,Qt(t,r,s,l),r.child;case 14:return _y(t,r,r.type,r.pendingProps,l);case 15:return Cy(t,r,r.type,r.pendingProps,l);case 19:return Dy(t,r,l);case 31:return KE(t,r,l);case 22:return ky(t,r,l,r.pendingProps);case 24:return da(r),s=Vt(kt),t===null?(f=Mf(),f===null&&(f=ot,h=Rf(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=l),f=h),r.memoizedState={parent:s,cache:f},Lf(r),pi(r,kt,f)):((t.lanes&l)!==0&&(Bf(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),pi(r,kt,s)):(s=h.cache,pi(r,kt,s),s!==f.cache&&Of(r,[kt],l,!0))),Qt(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Ir(t){t.flags|=4}function bd(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(sv())t.flags|=8192;else throw pa=ru,Uf}else t.flags&=-16777217}function Uy(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Kv(r))if(sv())t.flags|=8192;else throw pa=ru,Uf}function xu(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?pp():536870912,t.lanes|=r,gl|=r)}function Do(t,r){if(!He)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 ht(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 WE(t,r,l){var s=r.pendingProps;switch(Tf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(r),null;case 1:return ht(r),null;case 3:return l=r.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),Mr(kt),se(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(rl(r)?Ir(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Nf())),ht(r),null;case 26:var f=r.type,h=r.memoizedState;return t===null?(Ir(r),h!==null?(ht(r),Uy(r,h)):(ht(r),bd(r,f,null,s,l))):h?h!==t.memoizedState?(Ir(r),ht(r),Uy(r,h)):(ht(r),r.flags&=-16777217):(t=t.memoizedProps,t!==s&&Ir(r),ht(r),bd(r,f,t,s,l)),null;case 27:if(Ot(r),l=ue.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&Ir(r);else{if(!s){if(r.stateNode===null)throw Error(a(166));return ht(r),null}t=oe.current,rl(r)?pg(r):(t=Pv(f,s,l),r.stateNode=t,Ir(r))}return ht(r),null;case 5:if(Ot(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==s&&Ir(r);else{if(!s){if(r.stateNode===null)throw Error(a(166));return ht(r),null}if(h=oe.current,rl(r))pg(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[Ft]=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(Yt(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&&Ir(r)}}return ht(r),bd(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,l),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==s&&Ir(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=$t,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}t[Ft]=r,t=!!(t.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||Ov(t.nodeValue,l)),t||mi(r,!0)}else t=Mu(t).createTextNode(s),t[Ft]=r,r.stateNode=t}return ht(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[Ft]=r}else ca(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ht(r),t=!1}else l=Nf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return r.flags&256?(Tn(r),r):(Tn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return ht(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[Ft]=r}else ca(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ht(r),f=!1}else f=Nf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(Tn(r),r):(Tn(r),null)}return Tn(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),ht(r),null);case 4:return se(),t===null&&Hd(r.stateNode.containerInfo),ht(r),null;case 10:return Mr(r.type),ht(r),null;case 19:if(Y(_t),s=r.memoizedState,s===null)return ht(r),null;if(f=(r.flags&128)!==0,h=s.rendering,h===null)if(f)Do(s,!1);else{if(bt!==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;)cg(l,t),l=l.sibling;return C(_t,_t.current&1|2),He&&Rr(r,s.treeForkCount),r.child}t=t.sibling}s.tail!==null&&Bt()>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&&!He)return ht(r),null}else 2*Bt()-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=Bt(),t.sibling=null,l=_t.current,C(_t,f?l&1|2:l&1),He&&Rr(r,s.treeForkCount),t):(ht(r),null);case 22:case 23:return Tn(r),Zf(),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&&(ht(r),r.subtreeFlags&6&&(r.flags|=8192)):ht(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&&Y(ha),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Mr(kt),ht(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function e_(t,r){switch(Tf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Mr(kt),se(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Ot(r),null;case 31:if(r.memoizedState!==null){if(Tn(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(Tn(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 Y(_t),null;case 4:return se(),null;case 10:return Mr(r.type),null;case 22:case 23:return Tn(r),Zf(),t!==null&&Y(ha),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Mr(kt),null;case 25:return null;default:return null}}function Ly(t,r){switch(Tf(r),r.tag){case 3:Mr(kt),se();break;case 26:case 27:case 5:Ot(r);break;case 4:se();break;case 31:r.memoizedState!==null&&Tn(r);break;case 13:Tn(r);break;case 19:Y(_t);break;case 10:Mr(r.type);break;case 22:case 23:Tn(r),Zf(),t!==null&&Y(ha);break;case 24:Mr(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 Si(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 j=l,Z=E;try{Z()}catch(G){et(f,j,G)}}}s=s.next}while(s!==h)}}catch(G){et(r,r.return,G)}}function By(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Ag(r,l)}catch(s){et(t,t.return,s)}}}function Iy(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 pr(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 qy(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 xd(t,r,l){try{var s=t.stateNode;w_(s,t.type,l,r),s[un]=r}catch(f){et(t,t.return,f)}}function Hy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ai(t.type)||t.tag===4}function Sd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Hy(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&&Ai(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 wd(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=zr));else if(s!==4&&(s===27&&Ai(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(wd(t,r,l),t=t.sibling;t!==null;)wd(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&&Ai(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 Zy(t){var r=t.stateNode,l=t.memoizedProps;try{for(var s=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);Yt(r,s,l),r[Ft]=t,r[un]=l}catch(h){et(t,t.return,h)}}var qr=!1,Nt=!1,Ed=!1,Py=typeof WeakSet=="function"?WeakSet:Set,qt=null;function t_(t,r){if(t=t.containerInfo,Fd=Zu,t=tg(t),gf(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,j=-1,Z=0,G=0,ee=t,P=null;t:for(;;){for(var $;ee!==l||f!==0&&ee.nodeType!==3||(E=b+f),ee!==h||s!==0&&ee.nodeType!==3||(j=b+s),ee.nodeType===3&&(b+=ee.nodeValue.length),($=ee.firstChild)!==null;)P=ee,ee=$;for(;;){if(ee===t)break t;if(P===l&&++Z===f&&(E=b),P===h&&++G===s&&(j=b),($=ee.nextSibling)!==null)break;ee=P,P=ee.parentNode}ee=$}l=E===-1||j===-1?null:{start:E,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for($d={focusedElem:t,selectionRange:l},Zu=!1,qt=r;qt!==null;)if(r=qt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,qt=t;else for(;qt!==null;){switch(r=qt,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 pe=va(l.type,f);t=s.getSnapshotBeforeUpdate(pe,h),s.__reactInternalSnapshotBeforeUpdate=t}catch(_e){et(l,l.return,_e)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)Yd(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Yd(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,qt=t;break}qt=r.return}}function Fy(t,r,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:Zr(t,l),s&4&&Mo(5,l);break;case 1:if(Zr(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&&By(l),s&512&&Uo(l,l.return);break;case 3:if(Zr(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{Ag(t,r)}catch(b){et(l,l.return,b)}}break;case 27:r===null&&s&4&&Zy(l);case 26:case 5:Zr(t,l),r===null&&s&4&&qy(l),s&512&&Uo(l,l.return);break;case 12:Zr(t,l);break;case 31:Zr(t,l),s&4&&Qy(t,l);break;case 13:Zr(t,l),s&4&&Yy(t,l),s&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=c_.bind(null,l),z_(t,l))));break;case 22:if(s=l.memoizedState!==null||qr,!s){r=r!==null&&r.memoizedState!==null||Nt,f=qr;var h=Nt;qr=s,(Nt=r)&&!h?Pr(t,l,(l.subtreeFlags&8772)!==0):Zr(t,l),qr=f,Nt=h}break;case 30:break;default:Zr(t,l)}}function $y(t){var r=t.alternate;r!==null&&(t.alternate=null,$y(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Jc(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 mt=null,fn=!1;function Hr(t,r,l){for(l=l.child;l!==null;)Vy(t,r,l),l=l.sibling}function Vy(t,r,l){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(nn,l)}catch{}switch(l.tag){case 26:Nt||pr(l,r),Hr(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Nt||pr(l,r);var s=mt,f=fn;Ai(l.type)&&(mt=l.stateNode,fn=!1),Hr(t,r,l),$o(l.stateNode),mt=s,fn=f;break;case 5:Nt||pr(l,r);case 6:if(s=mt,f=fn,mt=null,Hr(t,r,l),mt=s,fn=f,mt!==null)if(fn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(l.stateNode)}catch(h){et(l,r,h)}else try{mt.removeChild(l.stateNode)}catch(h){et(l,r,h)}break;case 18:mt!==null&&(fn?(t=mt,Bv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),_l(t)):Bv(mt,l.stateNode));break;case 4:s=mt,f=fn,mt=l.stateNode.containerInfo,fn=!0,Hr(t,r,l),mt=s,fn=f;break;case 0:case 11:case 14:case 15:Si(2,l,r),Nt||Si(4,l,r),Hr(t,r,l);break;case 1:Nt||(pr(l,r),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Iy(l,r,s)),Hr(t,r,l);break;case 21:Hr(t,r,l);break;case 22:Nt=(s=Nt)||l.memoizedState!==null,Hr(t,r,l),Nt=s;break;default:Hr(t,r,l)}}function Qy(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 Yy(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 n_(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Py),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Py),r;default:throw Error(a(435,t.tag))}}function wu(t,r){var l=n_(t);r.forEach(function(s){if(!l.has(s)){l.add(s);var f=f_.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(Ai(E.type)){mt=E.stateNode,fn=!1;break e}break;case 5:mt=E.stateNode,fn=!1;break e;case 3:case 4:mt=E.stateNode.containerInfo,fn=!0;break e}E=E.return}if(mt===null)throw Error(a(160));Vy(h,b,f),mt=null,fn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Gy(r,t),r=r.sibling}var lr=null;function Gy(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&&(Si(3,t,t.return),Mo(3,t),Si(5,t,t.return));break;case 1:dn(r,t),hn(t),s&512&&(Nt||l===null||pr(l,l.return)),s&64&&qr&&(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||pr(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[Ft]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(s),f.head.insertBefore(h,f.querySelector("head > title"))),Yt(h,s,l),h[Ft]=t,It(h),s=h;break e;case"link":var b=Gv("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),Yt(h,s,l),f.head.appendChild(h);break;case"meta":if(b=Gv("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),Yt(h,s,l),f.head.appendChild(h);break;default:throw Error(a(468,s))}h[Ft]=t,It(h),s=h}t.stateNode=s}else Xv(f,t.type,t.stateNode);else t.stateNode=Yv(f,s,t.memoizedProps);else h!==s?(h===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):h.count--,s===null?Xv(f,t.type,t.stateNode):Yv(f,s,t.memoizedProps)):s===null&&t.stateNode!==null&&xd(t,t.memoizedProps,l.memoizedProps)}break;case 27:dn(r,t),hn(t),s&512&&(Nt||l===null||pr(l,l.return)),l!==null&&s&4&&xd(t,t.memoizedProps,l.memoizedProps);break;case 5:if(dn(r,t),hn(t),s&512&&(Nt||l===null||pr(l,l.return)),t.flags&32){f=t.stateNode;try{Qa(f,"")}catch(pe){et(t,t.return,pe)}}s&4&&t.stateNode!=null&&(f=t.memoizedProps,xd(t,f,l!==null?l.memoizedProps:f)),s&1024&&(Ed=!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(pe){et(t,t.return,pe)}}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(pe){et(t,t.return,pe)}Ed&&(Ed=!1,Xy(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=Bt()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,wu(t,s)));break;case 22:f=t.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,Z=qr,G=Nt;if(qr=Z||f,Nt=G||j,dn(r,t),Nt=G,qr=Z,hn(t),s&8192)e:for(r=t.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(l===null||j||qr||Nt||ba(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){j=l=r;try{if(h=j.stateNode,f)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=j.stateNode;var ee=j.memoizedProps.style,P=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;E.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(pe){et(j,j.return,pe)}}}else if(r.tag===6){if(l===null){j=r;try{j.stateNode.nodeValue=f?"":j.memoizedProps}catch(pe){et(j,j.return,pe)}}}else if(r.tag===18){if(l===null){j=r;try{var $=j.stateNode;f?Iv($,!0):Iv(j.stateNode,!1)}catch(pe){et(j,j.return,pe)}}}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(Hy(s)){l=s;break}s=s.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,h=Sd(t);Su(t,h,f);break;case 5:var b=l.stateNode;l.flags&32&&(Qa(b,""),l.flags&=-33);var E=Sd(t);Su(t,E,b);break;case 3:case 4:var j=l.stateNode.containerInfo,Z=Sd(t);wd(t,Z,j);break;default:throw Error(a(161))}}catch(G){et(t,t.return,G)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function Xy(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;Xy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Zr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Fy(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:Si(4,r,r.return),ba(r);break;case 1:pr(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Iy(r,r.return,l),ba(r);break;case 27:$o(r.stateNode);case 26:case 5:pr(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 Pr(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:Pr(f,h,l),Mo(4,h);break;case 1:if(Pr(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 j=f.shared.hiddenCallbacks;if(j!==null)for(f.shared.hiddenCallbacks=null,f=0;f<j.length;f++)Tg(j[f],E)}catch(Z){et(s,s.return,Z)}}l&&b&64&&By(h),Uo(h,h.return);break;case 27:Zy(h);case 26:case 5:Pr(f,h,l),l&&s===null&&b&4&&qy(h),Uo(h,h.return);break;case 12:Pr(f,h,l);break;case 31:Pr(f,h,l),l&&b&4&&Qy(f,h);break;case 13:Pr(f,h,l),l&&b&4&&Yy(f,h);break;case 22:h.memoizedState===null&&Pr(f,h,l),Uo(h,h.return);break;case 30:break;default:Pr(f,h,l)}r=r.sibling}}function _d(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 Cd(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;)Ky(t,r,l,s),r=r.sibling}function Ky(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(j){et(r,r.return,j)}}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&&_d(b,r);break;case 24:or(t,r,l,s),f&2048&&Cd(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,j=s,Z=b.flags;switch(b.tag){case 0:case 11:case 15:hl(h,b,E,j,f),Mo(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?hl(h,b,E,j,f):Lo(h,b):(G._visibility|=2,hl(h,b,E,j,f)),f&&Z&2048&&_d(b.alternate,b);break;case 24:hl(h,b,E,j,f),f&&Z&2048&&Cd(b.alternate,b);break;default:hl(h,b,E,j,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&&_d(s.alternate,s);break;case 24:Lo(l,s),f&2048&&Cd(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;)Jy(t,r,l),t=t.sibling}function Jy(t,r,l){switch(t.tag){case 26:ml(t,r,l),t.flags&Bo&&t.memoizedState!==null&&Z_(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 Wy(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];qt=s,tv(s,t)}Wy(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ev(t),t=t.sibling}function ev(t){switch(t.tag){case 0:case 11:case 15:Io(t),t.flags&2048&&Si(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];qt=s,tv(s,t)}Wy(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Si(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 tv(t,r){for(;qt!==null;){var l=qt;switch(l.tag){case 0:case 11:case 15:Si(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,qt=s;else e:for(l=t;qt!==null;){s=qt;var f=s.sibling,h=s.return;if($y(s),s===l){qt=null;break e}if(f!==null){f.return=h,qt=f;break e}qt=h}}}var r_={getCacheForType:function(t){var r=Vt(kt),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l},cacheSignal:function(){return Vt(kt).controller.signal}},i_=typeof WeakMap=="function"?WeakMap:Map,Xe=0,ot=null,Le=null,Ie=0,We=0,An=null,wi=!1,pl=!1,kd=!1,Fr=0,bt=0,Ei=0,xa=0,Td=0,Nn=0,gl=0,qo=null,mn=null,Ad=!1,_u=0,nv=0,Cu=1/0,ku=null,_i=null,Dt=0,Ci=null,yl=null,$r=0,Nd=0,zd=null,rv=null,Ho=0,jd=null;function zn(){return(Xe&2)!==0&&Ie!==0?Ie&-Ie:I.T!==null?Ld():bp()}function iv(){if(Nn===0)if((Ie&536870912)===0||He){var t=Ds;Ds<<=1,(Ds&3932160)===0&&(Ds=262144),Nn=t}else Nn=536870912;return t=kn.current,t!==null&&(t.flags|=32),Nn}function pn(t,r,l){(t===ot&&(We===2||We===9)||t.cancelPendingCommit!==null)&&(vl(t,0),ki(t,Ie,Nn,!1)),oo(t,l),((Xe&2)===0||t!==ot)&&(t===ot&&((Xe&2)===0&&(xa|=l),bt===4&&ki(t,Ie,Nn,!1)),gr(t))}function av(t,r,l){if((Xe&6)!==0)throw Error(a(327));var s=!l&&(r&127)===0&&(r&t.expiredLanes)===0||lo(t,r),f=s?o_(t,r):Rd(t,r,!0),h=s;do{if(f===0){pl&&!s&&ki(t,r,0,!1);break}else{if(l=t.current.alternate,h&&!a_(l)){f=Rd(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 j=E.current.memoizedState.isDehydrated;if(j&&(vl(E,b).flags|=256),b=Rd(E,b,!1),b!==2){if(kd&&!j){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),ki(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:ki(s,r,Nn,!wi);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(f=_u+300-Bt(),10<f)){if(ki(s,r,Nn,!wi),Us(s,0,!0)!==0)break e;$r=r,s.timeoutHandle=Uv(lv.bind(null,s,l,mn,ku,Ad,r,Nn,xa,gl,wi,h,"Throttled",-0,0),f);break e}lv(s,l,mn,ku,Ad,r,Nn,xa,gl,wi,h,null,-0,0)}}break}while(!0);gr(t)}function lv(t,r,l,s,f,h,b,E,j,Z,G,ee,P,$){if(t.timeoutHandle=-1,ee=r.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zr},Jy(r,h,ee);var pe=(h&62914560)===h?_u-Bt():(h&4194048)===h?nv-Bt():0;if(pe=P_(ee,pe),pe!==null){$r=h,t.cancelPendingCommit=pe(mv.bind(null,t,r,h,l,s,f,b,E,j,G,ee,null,P,$)),ki(t,h,b,!Z);return}}mv(t,r,h,l,s,f,b,E,j)}function a_(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(!_n(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 ki(t,r,l,s){r&=~Td,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&&gp(t,l,r)}function Tu(){return(Xe&6)===0?(Zo(0),!1):!0}function Od(){if(Le!==null){if(We===0)var t=Le.return;else t=Le,Dr=fa=null,Yf(t),sl=null,_o=0,t=Le;for(;t!==null;)Ly(t.alternate,t),t=t.return;Le=null}}function vl(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,C_(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),$r=0,Od(),ot=t,Le=l=Or(t.current,null),Ie=r,We=0,An=null,wi=!1,pl=lo(t,r),kd=!1,gl=Nn=Td=xa=Ei=bt=0,mn=qo=null,Ad=!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 Fr=r,Ys(),l}function ov(t,r){je=null,I.H=Oo,r===ol||r===nu?(r=Eg(),We=3):r===Uf?(r=Eg(),We=4):We=r===cd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,An=r,Le===null&&(bt=1,gu(t,Pn(r,t.current)))}function sv(){var t=kn.current;return t===null?!0:(Ie&4194048)===Ie?Qn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?t===Qn:!1}function uv(){var t=I.H;return I.H=Oo,t===null?Oo:t}function cv(){var t=I.A;return I.A=r_,t}function Au(){bt=4,wi||(Ie&4194048)!==Ie&&kn.current!==null||(pl=!0),(Ei&134217727)===0&&(xa&134217727)===0||ot===null||ki(ot,Ie,Nn,!1)}function Rd(t,r,l){var s=Xe;Xe|=2;var f=uv(),h=cv();(ot!==t||Ie!==r)&&(ku=null,vl(t,r)),r=!1;var b=bt;e:do try{if(We!==0&&Le!==null){var E=Le,j=An;switch(We){case 8:Od(),b=6;break e;case 3:case 2:case 9:case 6:kn.current===null&&(r=!0);var Z=We;if(We=0,An=null,bl(t,E,j,Z),l&&pl){b=0;break e}break;default:Z=We,We=0,An=null,bl(t,E,j,Z)}}l_(),b=bt;break}catch(G){ov(t,G)}while(!0);return r&&t.shellSuspendCounter++,Dr=fa=null,Xe=s,I.H=f,I.A=h,Le===null&&(ot=null,Ie=0,Ys()),b}function l_(){for(;Le!==null;)fv(Le)}function o_(t,r){var l=Xe;Xe|=2;var s=uv(),f=cv();ot!==t||Ie!==r?(ku=null,Cu=Bt()+500,vl(t,r)):pl=lo(t,r);e:do try{if(We!==0&&Le!==null){r=Le;var h=An;t:switch(We){case 1:We=0,An=null,bl(t,r,h,1);break;case 2:case 9:if(Sg(h)){We=0,An=null,dv(r);break}r=function(){We!==2&&We!==9||ot!==t||(We=7),gr(t)},h.then(r,r);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Sg(h)?(We=0,An=null,dv(r)):(We=0,An=null,bl(t,r,h,7));break;case 5:var b=null;switch(Le.tag){case 26:b=Le.memoizedState;case 5:case 27:var E=Le;if(b?Kv(b):E.stateNode.complete){We=0,An=null;var j=E.sibling;if(j!==null)Le=j;else{var Z=E.return;Z!==null?(Le=Z,Nu(Z)):Le=null}break t}}We=0,An=null,bl(t,r,h,5);break;case 6:We=0,An=null,bl(t,r,h,6);break;case 8:Od(),bt=6;break e;default:throw Error(a(462))}}s_();break}catch(G){ov(t,G)}while(!0);return Dr=fa=null,I.H=s,I.A=f,Xe=l,Le!==null?0:(ot=null,Ie=0,Ys(),bt)}function s_(){for(;Le!==null&&!Ba();)fv(Le)}function fv(t){var r=My(t.alternate,t,Fr);t.memoizedProps=t.pendingProps,r===null?Nu(t):Le=r}function dv(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Ny(l,r,r.pendingProps,r.type,void 0,Ie);break;case 11:r=Ny(l,r,r.pendingProps,r.type.render,r.ref,Ie);break;case 5:Yf(r);default:Ly(l,r),r=Le=cg(r,Fr),r=My(l,r,Fr)}t.memoizedProps=t.pendingProps,r===null?Nu(t):Le=r}function bl(t,r,l,s){Dr=fa=null,Yf(r),sl=null,_o=0;var f=r.return;try{if(XE(t,f,r,l,Ie)){bt=1,gu(t,Pn(l,t.current)),Le=null;return}}catch(h){if(f!==null)throw Le=f,h;bt=1,gu(t,Pn(l,t.current)),Le=null;return}r.flags&32768?(He||s===1?t=!0:pl||(Ie&536870912)!==0?t=!1:(wi=t=!0,(s===2||s===9||s===3||s===6)&&(s=kn.current,s!==null&&s.tag===13&&(s.flags|=16384))),hv(r,t)):Nu(r)}function Nu(t){var r=t;do{if((r.flags&32768)!==0){hv(r,wi);return}t=r.return;var l=WE(r.alternate,r,Fr);if(l!==null){Le=l;return}if(r=r.sibling,r!==null){Le=r;return}Le=r=t}while(r!==null);bt===0&&(bt=5)}function hv(t,r){do{var l=e_(t.alternate,t);if(l!==null){l.flags&=32767,Le=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){Le=t;return}Le=t=l}while(t!==null);bt=6,Le=null}function mv(t,r,l,s,f,h,b,E,j){t.cancelPendingCommit=null;do zu();while(Dt!==0);if((Xe&6)!==0)throw Error(a(327));if(r!==null){if(r===t.current)throw Error(a(177));if(h=r.lanes|r.childLanes,h|=Sf,Hw(t,l,h,b,E,j),t===ot&&(Le=ot=null,Ie=0),yl=r,Ci=t,$r=l,Nd=h,zd=f,rv=s,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,d_(be,function(){return bv(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,f=ne.p,ne.p=2,b=Xe,Xe|=4;try{t_(t,r,l)}finally{Xe=b,ne.p=f,I.T=s}}Dt=1,pv(),gv(),yv()}}function pv(){if(Dt===1){Dt=0;var t=Ci,r=yl,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=I.T,I.T=null;var s=ne.p;ne.p=2;var f=Xe;Xe|=4;try{Gy(r,t);var h=$d,b=tg(t.containerInfo),E=h.focusedElem,j=h.selectionRange;if(b!==E&&E&&E.ownerDocument&&eg(E.ownerDocument.documentElement,E)){if(j!==null&&gf(E)){var Z=j.start,G=j.end;if(G===void 0&&(G=Z),"selectionStart"in E)E.selectionStart=Z,E.selectionEnd=Math.min(G,E.value.length);else{var ee=E.ownerDocument||document,P=ee&&ee.defaultView||window;if(P.getSelection){var $=P.getSelection(),pe=E.textContent.length,_e=Math.min(j.start,pe),at=j.end===void 0?_e:Math.min(j.end,pe);!$.extend&&_e>at&&(b=at,at=_e,_e=b);var L=Wp(E,_e),D=Wp(E,at);if(L&&D&&($.rangeCount!==1||$.anchorNode!==L.node||$.anchorOffset!==L.offset||$.focusNode!==D.node||$.focusOffset!==D.offset)){var H=ee.createRange();H.setStart(L.node,L.offset),$.removeAllRanges(),_e>at?($.addRange(H),$.extend(D.node,D.offset)):(H.setEnd(D.node,D.offset),$.addRange(H))}}}}for(ee=[],$=E;$=$.parentNode;)$.nodeType===1&&ee.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ee.length;E++){var J=ee[E];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Zu=!!Fd,$d=Fd=null}finally{Xe=f,ne.p=s,I.T=l}}t.current=r,Dt=2}}function gv(){if(Dt===2){Dt=0;var t=Ci,r=yl,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=I.T,I.T=null;var s=ne.p;ne.p=2;var f=Xe;Xe|=4;try{Fy(t,r.alternate,r)}finally{Xe=f,ne.p=s,I.T=l}}Dt=3}}function yv(){if(Dt===4||Dt===3){Dt=0,Ia();var t=Ci,r=yl,l=$r,s=rv;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Dt=5:(Dt=0,yl=Ci=null,vv(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(_i=null),Xc(l),r=r.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(nn,r,void 0,(r.current.flags&128)===128)}catch{}if(s!==null){r=I.T,f=ne.p,ne.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,ne.p=f}}($r&3)!==0&&zu(),gr(t),f=t.pendingLanes,(l&261930)!==0&&(f&42)!==0?t===jd?Ho++:(Ho=0,jd=t):Ho=0,Zo(0)}}function vv(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,wo(r)))}function zu(){return pv(),gv(),yv(),bv()}function bv(){if(Dt!==5)return!1;var t=Ci,r=Nd;Nd=0;var l=Xc($r),s=I.T,f=ne.p;try{ne.p=32>l?32:l,I.T=null,l=zd,zd=null;var h=Ci,b=$r;if(Dt=0,yl=Ci=null,$r=0,(Xe&6)!==0)throw Error(a(331));var E=Xe;if(Xe|=4,ev(h.current),Ky(h,h.current,b,l),Xe=E,Zo(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(nn,h)}catch{}return!0}finally{ne.p=f,I.T=s,vv(t,r)}}function xv(t,r,l){r=Pn(l,r),r=ud(t.stateNode,r,2),t=vi(t,r,2),t!==null&&(oo(t,2),gr(t))}function et(t,r,l){if(t.tag===3)xv(t,t,l);else for(;r!==null;){if(r.tag===3){xv(r,t,l);break}else if(r.tag===1){var s=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(_i===null||!_i.has(s))){t=Pn(l,t),l=Sy(2),s=vi(r,l,2),s!==null&&(wy(l,s,r,t),oo(s,2),gr(s));break}}r=r.return}}function Dd(t,r,l){var s=t.pingCache;if(s===null){s=t.pingCache=new i_;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)||(kd=!0,f.add(l),t=u_.bind(null,t,r,l),r.then(t,t))}function u_(t,r,l){var s=t.pingCache;s!==null&&s.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,ot===t&&(Ie&l)===l&&(bt===4||bt===3&&(Ie&62914560)===Ie&&300>Bt()-_u?(Xe&2)===0&&vl(t,0):Td|=l,gl===Ie&&(gl=0)),gr(t)}function Sv(t,r){r===0&&(r=pp()),t=sa(t,r),t!==null&&(oo(t,r),gr(t))}function c_(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Sv(t,l)}function f_(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),Sv(t,l)}function d_(t,r){return kr(t,r)}var ju=null,xl=null,Md=!1,Ou=!1,Ud=!1,Ti=0;function gr(t){t!==xl&&t.next===null&&(xl===null?ju=xl=t:xl=xl.next=t),Ou=!0,Md||(Md=!0,m_())}function Zo(t,r){if(!Ud&&Ou){Ud=!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,Cv(s,h))}else h=Ie,h=Us(s,s===ot?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||lo(s,h)||(l=!0,Cv(s,h));s=s.next}while(l);Ud=!1}}function h_(){wv()}function wv(){Ou=Md=!1;var t=0;Ti!==0&&__()&&(t=Ti);for(var r=Bt(),l=null,s=ju;s!==null;){var f=s.next,h=Ev(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}Dt!==0&&Dt!==5||Zo(t),Ti!==0&&(Ti=0)}function Ev(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,j=f[b];j===-1?((E&l)===0||(E&s)!==0)&&(f[b]=qw(E,r)):j<=r&&(t.expiredLanes|=E),h&=~E}if(r=ot,l=Ie,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&&Tr(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&&Tr(s),Xc(l)){case 2:case 8:l=U;break;case 32:l=be;break;case 268435456:l=Qe;break;default:l=be}return s=_v.bind(null,t),l=kr(l,s),t.callbackPriority=r,t.callbackNode=l,r}return s!==null&&s!==null&&Tr(s),t.callbackPriority=2,t.callbackNode=null,2}function _v(t,r){if(Dt!==0&&Dt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(zu()&&t.callbackNode!==l)return null;var s=Ie;return s=Us(t,t===ot?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(av(t,s,r),Ev(t,Bt()),t.callbackNode!=null&&t.callbackNode===l?_v.bind(null,t):null)}function Cv(t,r){if(zu())return null;av(t,r,!0)}function m_(){k_(function(){(Xe&6)!==0?kr(X,h_):wv()})}function Ld(){if(Ti===0){var t=al;t===0&&(t=Rs,Rs<<=1,(Rs&261888)===0&&(Rs=256)),Ti=t}return Ti}function kv(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:qs(""+t)}function Tv(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 p_(t,r,l,s,f){if(r==="submit"&&l&&l.stateNode===f){var h=kv((f[un]||null).action),b=s.submitter;b&&(r=(r=b[un]||null)?kv(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(Ti!==0){var j=b?Tv(f,b):new FormData(f);rd(l,{pending:!0,data:j,method:f.method,action:h},null,j)}}else typeof h=="function"&&(E.preventDefault(),j=b?Tv(f,b):new FormData(f),rd(l,{pending:!0,data:j,method:f.method,action:h},h,j))},currentTarget:f}]})}}for(var Bd=0;Bd<xf.length;Bd++){var Id=xf[Bd],g_=Id.toLowerCase(),y_=Id[0].toUpperCase()+Id.slice(1);ar(g_,"on"+y_)}ar(ig,"onAnimationEnd"),ar(ag,"onAnimationIteration"),ar(lg,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(RE,"onTransitionRun"),ar(DE,"onTransitionStart"),ar(ME,"onTransitionCancel"),ar(og,"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(" "),v_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Po));function Av(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],j=E.instance,Z=E.currentTarget;if(E=E.listener,j!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=Z;try{h(f)}catch(G){Qs(G)}f.currentTarget=null,h=j}else for(b=0;b<s.length;b++){if(E=s[b],j=E.instance,Z=E.currentTarget,E=E.listener,j!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=Z;try{h(f)}catch(G){Qs(G)}f.currentTarget=null,h=j}}}}function Be(t,r){var l=r[Kc];l===void 0&&(l=r[Kc]=new Set);var s=t+"__bubble";l.has(s)||(Nv(r,t,2,!1),l.add(s))}function qd(t,r,l){var s=0;r&&(s|=4),Nv(l,t,s,r)}var Ru="_reactListening"+Math.random().toString(36).slice(2);function Hd(t){if(!t[Ru]){t[Ru]=!0,wp.forEach(function(l){l!=="selectionchange"&&(v_.has(l)||qd(l,!1,t),qd(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Ru]||(r[Ru]=!0,qd("selectionchange",!1,r))}}function Nv(t,r,l,s){switch(ib(r)){case 2:var f=V_;break;case 8:f=Q_;break;default:f=nh}l=f.bind(null,r,l,t),f=void 0,!of||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 Zd(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 j=b.tag;if((j===3||j===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;E!==null;){if(b=Za(E),b===null)return;if(j=b.tag,j===5||j===6||j===26||j===27){s=h=b;continue e}E=E.parentNode}}s=s.return}Dp(function(){var Z=h,G=af(l),ee=[];e:{var P=sg.get(t);if(P!==void 0){var $=Fs,pe=t;switch(t){case"keypress":if(Zs(l)===0)break e;case"keydown":case"keyup":$=fE;break;case"focusin":pe="focus",$=ff;break;case"focusout":pe="blur",$=ff;break;case"beforeblur":case"afterblur":$=ff;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":$=Lp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Ww;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=mE;break;case ig:case ag:case lg:$=nE;break;case og:$=gE;break;case"scroll":case"scrollend":$=Kw;break;case"wheel":$=vE;break;case"copy":case"cut":case"paste":$=iE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Ip;break;case"toggle":case"beforetoggle":$=xE}var _e=(r&4)!==0,at=!_e&&(t==="scroll"||t==="scrollend"),L=_e?P!==null?P+"Capture":null:P;_e=[];for(var D=Z,H;D!==null;){var J=D;if(H=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||H===null||L===null||(J=co(D,L),J!=null&&_e.push(Fo(D,J,H))),at)break;D=D.return}0<_e.length&&(P=new $(P,pe,null,l,G),ee.push({event:P,listeners:_e}))}}if((r&7)===0){e:{if(P=t==="mouseover"||t==="pointerover",$=t==="mouseout"||t==="pointerout",P&&l!==rf&&(pe=l.relatedTarget||l.fromElement)&&(Za(pe)||pe[Ha]))break e;if(($||P)&&(P=G.window===G?G:(P=G.ownerDocument)?P.defaultView||P.parentWindow:window,$?(pe=l.relatedTarget||l.toElement,$=Z,pe=pe?Za(pe):null,pe!==null&&(at=u(pe),_e=pe.tag,pe!==at||_e!==5&&_e!==27&&_e!==6)&&(pe=null)):($=null,pe=Z),$!==pe)){if(_e=Lp,J="onMouseLeave",L="onMouseEnter",D="mouse",(t==="pointerout"||t==="pointerover")&&(_e=Ip,J="onPointerLeave",L="onPointerEnter",D="pointer"),at=$==null?P:uo($),H=pe==null?P:uo(pe),P=new _e(J,D+"leave",$,l,G),P.target=at,P.relatedTarget=H,J=null,Za(G)===Z&&(_e=new _e(L,D+"enter",pe,l,G),_e.target=H,_e.relatedTarget=at,J=_e),at=J,$&&pe)t:{for(_e=b_,L=$,D=pe,H=0,J=L;J;J=_e(J))H++;J=0;for(var Ee=D;Ee;Ee=_e(Ee))J++;for(;0<H-J;)L=_e(L),H--;for(;0<J-H;)D=_e(D),J--;for(;H--;){if(L===D||D!==null&&L===D.alternate){_e=L;break t}L=_e(L),D=_e(D)}_e=null}else _e=null;$!==null&&zv(ee,P,$,_e,!1),pe!==null&&at!==null&&zv(ee,at,pe,_e,!0)}}e:{if(P=Z?uo(Z):window,$=P.nodeName&&P.nodeName.toLowerCase(),$==="select"||$==="input"&&P.type==="file")var Ye=Qp;else if($p(P))if(Yp)Ye=zE;else{Ye=AE;var xe=TE}else $=P.nodeName,!$||$.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?Z&&nf(Z.elementType)&&(Ye=Qp):Ye=NE;if(Ye&&(Ye=Ye(t,Z))){Vp(ee,Ye,l,G);break e}xe&&xe(t,P,Z),t==="focusout"&&Z&&P.type==="number"&&Z.memoizedProps.value!=null&&tf(P,"number",P.value)}switch(xe=Z?uo(Z):window,t){case"focusin":($p(xe)||xe.contentEditable==="true")&&(Ka=xe,yf=Z,bo=null);break;case"focusout":bo=yf=Ka=null;break;case"mousedown":vf=!0;break;case"contextmenu":case"mouseup":case"dragend":vf=!1,ng(ee,l,G);break;case"selectionchange":if(OE)break;case"keydown":case"keyup":ng(ee,l,G)}var Oe;if(hf)e:{switch(t){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Xa?Pp(t,l)&&(qe="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(qp&&l.locale!=="ko"&&(Xa||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Xa&&(Oe=Mp()):(fi=G,sf="value"in fi?fi.value:fi.textContent,Xa=!0)),xe=Du(Z,qe),0<xe.length&&(qe=new Bp(qe,t,null,l,G),ee.push({event:qe,listeners:xe}),Oe?qe.data=Oe:(Oe=Fp(l),Oe!==null&&(qe.data=Oe)))),(Oe=wE?EE(t,l):_E(t,l))&&(qe=Du(Z,"onBeforeInput"),0<qe.length&&(xe=new Bp("onBeforeInput","beforeinput",null,l,G),ee.push({event:xe,listeners:qe}),xe.data=Oe)),p_(ee,t,Z,l,G)}Av(ee,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 b_(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function zv(t,r,l,s,f){for(var h=r._reactName,b=[];l!==null&&l!==s;){var E=l,j=E.alternate,Z=E.stateNode;if(E=E.tag,j!==null&&j===s)break;E!==5&&E!==26&&E!==27||Z===null||(j=Z,f?(Z=co(l,h),Z!=null&&b.unshift(Fo(l,Z,j))):f||(Z=co(l,h),Z!=null&&b.push(Fo(l,Z,j)))),l=l.return}b.length!==0&&t.push({event:r,listeners:b})}var x_=/\r\n?/g,S_=/\u0000|\uFFFD/g;function jv(t){return(typeof t=="string"?t:""+t).replace(x_,`
|
|
49
|
+
`).replace(S_,"")}function Ov(t,r){return r=jv(r),jv(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":Op(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=zr);break;case"onScroll":s!=null&&Be("scroll",t);break;case"onScrollEnd":s!=null&&Be("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":Be("beforetoggle",t),Be("toggle",t),Ls(t,"popover",s);break;case"xlinkActuate":Nr(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Nr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Nr(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Nr(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Nr(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Nr(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Nr(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Nr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Nr(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=Gw.get(l)||l,Ls(t,l,s))}}function Pd(t,r,l,s,f,h){switch(l){case"style":Op(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&&Be("scroll",t);break;case"onScrollEnd":s!=null&&Be("scrollend",t);break;case"onClick":s!=null&&(t.onclick=zr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ep.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 Yt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",t),Be("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":Be("invalid",t);var E=h=b=f=null,j=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":j=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)}}Ap(t,h,E,j,Z,b,f,!1);return;case"select":Be("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":Be("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)}zp(t,s,f,h);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(s=l[j],s!=null))switch(j){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:it(t,r,j,s,l,null)}return;case"dialog":Be("beforetoggle",t),Be("toggle",t),Be("cancel",t),Be("close",t);break;case"iframe":case"object":Be("load",t);break;case"video":case"audio":for(s=0;s<Po.length;s++)Be(Po[s],t);break;case"image":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"embed":case"source":case"link":Be("error",t),Be("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(nf(r)){for(G in l)l.hasOwnProperty(G)&&(s=l[G],s!==void 0&&Pd(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 w_(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,j=null,Z=null,G=null;for($ in l){var ee=l[$];if(l.hasOwnProperty($)&&ee!=null)switch($){case"checked":break;case"value":break;case"defaultValue":j=ee;default:s.hasOwnProperty($)||it(t,r,$,null,s,ee)}}for(var P in s){var $=s[P];if(ee=l[P],s.hasOwnProperty(P)&&($!=null||ee!=null))switch(P){case"type":h=$;break;case"name":f=$;break;case"checked":Z=$;break;case"defaultChecked":G=$;break;case"value":b=$;break;case"defaultValue":E=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,r));break;default:$!==ee&&it(t,r,P,$,s,ee)}}ef(t,b,E,j,Z,G,h,f);return;case"select":$=b=E=P=null;for(h in l)if(j=l[h],l.hasOwnProperty(h)&&j!=null)switch(h){case"value":break;case"multiple":$=j;default:s.hasOwnProperty(h)||it(t,r,h,null,s,j)}for(f in s)if(h=s[f],j=l[f],s.hasOwnProperty(f)&&(h!=null||j!=null))switch(f){case"value":P=h;break;case"defaultValue":E=h;break;case"multiple":b=h;default:h!==j&&it(t,r,f,h,s,j)}r=E,l=b,s=$,P!=null?Va(t,!!l,P,!1):!!s!=!!l&&(r!=null?Va(t,!!l,r,!0):Va(t,!!l,l?[]:"",!1));return;case"textarea":$=P=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":P=f;break;case"defaultValue":$=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)}Np(t,P,$);return;case"option":for(var pe in l)if(P=l[pe],l.hasOwnProperty(pe)&&P!=null&&!s.hasOwnProperty(pe))switch(pe){case"selected":t.selected=!1;break;default:it(t,r,pe,null,s,P)}for(j in s)if(P=s[j],$=l[j],s.hasOwnProperty(j)&&P!==$&&(P!=null||$!=null))switch(j){case"selected":t.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:it(t,r,j,P,s,$)}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 _e in l)P=l[_e],l.hasOwnProperty(_e)&&P!=null&&!s.hasOwnProperty(_e)&&it(t,r,_e,null,s,P);for(Z in s)if(P=s[Z],$=l[Z],s.hasOwnProperty(Z)&&P!==$&&(P!=null||$!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,r));break;default:it(t,r,Z,P,s,$)}return;default:if(nf(r)){for(var at in l)P=l[at],l.hasOwnProperty(at)&&P!==void 0&&!s.hasOwnProperty(at)&&Pd(t,r,at,void 0,s,P);for(G in s)P=s[G],$=l[G],!s.hasOwnProperty(G)||P===$||P===void 0&&$===void 0||Pd(t,r,G,P,s,$);return}}for(var L in l)P=l[L],l.hasOwnProperty(L)&&P!=null&&!s.hasOwnProperty(L)&&it(t,r,L,null,s,P);for(ee in s)P=s[ee],$=l[ee],!s.hasOwnProperty(ee)||P===$||P==null&&$==null||it(t,r,ee,P,s,$)}function Rv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function E_(){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&&Rv(b)){for(b=0,E=f.responseEnd,s+=1;s<l.length;s++){var j=l[s],Z=j.startTime;if(Z>E)break;var G=j.transferSize,ee=j.initiatorType;G&&Rv(ee)&&(j=j.responseEnd,b+=G*(j<E?1:(E-Z)/(j-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 Fd=null,$d=null;function Mu(t){return t.nodeType===9?t:t.ownerDocument}function Dv(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 Mv(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 Vd(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 Qd=null;function __(){var t=window.event;return t&&t.type==="popstate"?t===Qd?!1:(Qd=t,!0):(Qd=null,!1)}var Uv=typeof setTimeout=="function"?setTimeout:void 0,C_=typeof clearTimeout=="function"?clearTimeout:void 0,Lv=typeof Promise=="function"?Promise:void 0,k_=typeof queueMicrotask=="function"?queueMicrotask:typeof Lv<"u"?function(t){return Lv.resolve(null).then(t).catch(T_)}:Uv;function T_(t){setTimeout(function(){throw t})}function Ai(t){return t==="head"}function Bv(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 Iv(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 Yd(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":Yd(l),Jc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function A_(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=Yn(t.nextSibling),t===null)break}return null}function N_(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Yn(t.nextSibling),t===null))return null;return t}function qv(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Yn(t.nextSibling),t===null))return null;return t}function Gd(t){return t.data==="$?"||t.data==="$~"}function Xd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function z_(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 Yn(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 Kd=null;function Hv(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(r===0)return Yn(t.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}t=t.nextSibling}return null}function Zv(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 Pv(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]);Jc(t)}var Gn=new Map,Fv=new Set;function Uu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Vr=ne.d;ne.d={f:j_,r:O_,D:R_,C:D_,L:M_,m:U_,X:B_,S:L_,M:I_};function j_(){var t=Vr.f(),r=Tu();return t||r}function O_(t){var r=Pa(t);r!==null&&r.tag===5&&r.type==="form"?oy(r):Vr.r(t)}var Sl=typeof document>"u"?null:document;function $v(t,r,l){var s=Sl;if(s&&typeof r=="string"&&r){var f=Hn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),Fv.has(f)||(Fv.add(f),t={rel:t,crossOrigin:l,href:r},s.querySelector(f)===null&&(r=s.createElement("link"),Yt(r,"link",t),It(r),s.head.appendChild(r)))}}function R_(t){Vr.D(t),$v("dns-prefetch",t,null)}function D_(t,r){Vr.C(t,r),$v("preconnect",t,r)}function M_(t,r,l){Vr.L(t,r,l);var s=Sl;if(s&&t&&r){var f='link[rel="preload"][as="'+Hn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Hn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Hn(l.imageSizes)+'"]')):f+='[href="'+Hn(t)+'"]';var h=f;switch(r){case"style":h=wl(t);break;case"script":h=El(t)}Gn.has(h)||(t=v({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),Gn.set(h,t),s.querySelector(f)!==null||r==="style"&&s.querySelector(Vo(h))||r==="script"&&s.querySelector(Qo(h))||(r=s.createElement("link"),Yt(r,"link",t),It(r),s.head.appendChild(r)))}}function U_(t,r){Vr.m(t,r);var l=Sl;if(l&&t){var s=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+Hn(s)+'"][href="'+Hn(t)+'"]',h=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=El(t)}if(!Gn.has(h)&&(t=v({rel:"modulepreload",href:t},r),Gn.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"),Yt(s,"link",t),It(s),l.head.appendChild(s)}}}function L_(t,r,l){Vr.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=Gn.get(h))&&Jd(t,l);var j=b=s.createElement("link");It(j),Yt(j,"link",t),j._p=new Promise(function(Z,G){j.onload=Z,j.onerror=G}),j.addEventListener("load",function(){E.loading|=1}),j.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 B_(t,r){Vr.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=Gn.get(f))&&Wd(t,r),h=l.createElement("script"),It(h),Yt(h,"link",t),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function I_(t,r){Vr.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=Gn.get(f))&&Wd(t,r),h=l.createElement("script"),It(h),Yt(h,"link",t),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function Vv(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),Gn.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},Gn.set(t,l),h||q_(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="'+Hn(t)+'"'}function Vo(t){return'link[rel="stylesheet"]['+t+"]"}function Qv(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function q_(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}),Yt(r,"link",l),It(r),t.head.appendChild(r))}function El(t){return'[src="'+Hn(t)+'"]'}function Qo(t){return"script[async]"+t}function Yv(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var s=t.querySelector('style[data-href~="'+Hn(l.href)+'"]');if(s)return r.instance=s,It(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"),It(s),Yt(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,It(h),h;s=Qv(l),(f=Gn.get(f))&&Jd(s,f),h=(t.ownerDocument||t).createElement("link"),It(h);var b=h;return b._p=new Promise(function(E,j){b.onload=E,b.onerror=j}),Yt(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,It(f),f):(s=l,(f=Gn.get(h))&&(s=v({},l),Wd(s,f)),t=t.ownerDocument||t,f=t.createElement("script"),It(f),Yt(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 Jd(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Wd(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 Gv(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[Ft]||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 Xv(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function H_(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 Kv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Z_(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,It(h);return}h=r.ownerDocument||r,s=Qv(s),(f=Gn.get(f))&&Jd(s,f),h=h.createElement("link"),It(h);var b=h;b._p=new Promise(function(E,j){b.onload=E,b.onerror=j}),Yt(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 eh=0;function P_(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&&eh===0&&(eh=62500*E_());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>eh?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(F_,t),qu=null,Iu.call(t))}function F_(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:M,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function $_(t,r,l,s,f,h,b,E,j){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=Yc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yc(0),this.hiddenUpdates=Yc(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Jv(t,r,l,s,f,h,b,E,j,Z,G,ee){return t=new $_(t,r,l,b,j,Z,G,ee,E),r=1,h===!0&&(r|=24),h=Cn(3,null,null,r),t.current=h,h.stateNode=t,r=Rf(),r.refCount++,t.pooledCache=r,r.refCount++,h.memoizedState={element:s,isDehydrated:l,cache:r},Lf(h),t}function Wv(t){return t?(t=el,t):el}function eb(t,r,l,s,f,h){f=Wv(f),s.context===null?s.context=f:s.pendingContext=f,s=yi(r),s.payload={element:l},h=h===void 0?null:h,h!==null&&(s.callback=h),l=vi(t,s,r),l!==null&&(pn(l,t,r),ko(l,t,r))}function tb(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function th(t,r){tb(t,r),(t=t.alternate)&&tb(t,r)}function nb(t){if(t.tag===13||t.tag===31){var r=sa(t,67108864);r!==null&&pn(r,t,67108864),th(t,67108864)}}function rb(t){if(t.tag===13||t.tag===31){var r=zn();r=Gc(r);var l=sa(t,r);l!==null&&pn(l,t,r),th(t,r)}}var Zu=!0;function V_(t,r,l,s){var f=I.T;I.T=null;var h=ne.p;try{ne.p=2,nh(t,r,l,s)}finally{ne.p=h,I.T=f}}function Q_(t,r,l,s){var f=I.T;I.T=null;var h=ne.p;try{ne.p=8,nh(t,r,l,s)}finally{ne.p=h,I.T=f}}function nh(t,r,l,s){if(Zu){var f=rh(s);if(f===null)Zd(t,r,s,Pu,l),ab(t,s);else if(G_(f,t,r,l,s))s.stopPropagation();else if(ab(t,s),r&4&&-1<Y_.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 j=1<<31-lt(b);E.entanglements[1]|=j,b&=~j}gr(h),(Xe&6)===0&&(Cu=Bt()+500,Zo(0))}}break;case 31:case 13:E=sa(h,2),E!==null&&pn(E,h,2),Tu(),th(h,2)}if(h=rh(s),h===null&&Zd(t,r,s,Pu,l),h===f)break;f=h}f!==null&&s.stopPropagation()}else Zd(t,r,s,null,l)}}function rh(t){return t=af(t),ih(t)}var Pu=null;function ih(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 ib(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 X:return 2;case U:return 8;case be:case Me:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var ah=!1,Ni=null,zi=null,ji=null,Go=new Map,Xo=new Map,Oi=[],Y_="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 ab(t,r){switch(t){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":ji=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&&nb(r)),t):(t.eventSystemFlags|=s,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function G_(t,r,l,s,f){switch(r){case"focusin":return Ni=Ko(Ni,t,r,l,s,f),!0;case"dragenter":return zi=Ko(zi,t,r,l,s,f),!0;case"mouseover":return ji=Ko(ji,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 lb(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,xp(t.priority,function(){rb(l)});return}}else if(r===31){if(r=d(l),r!==null){t.blockedOn=r,xp(t.priority,function(){rb(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=rh(t.nativeEvent);if(l===null){l=t.nativeEvent;var s=new l.constructor(l.type,l);rf=s,l.target.dispatchEvent(s),rf=null}else return r=Pa(l),r!==null&&nb(r),t.blockedOn=l,!1;r.shift()}return!0}function ob(t,r,l){Fu(t)&&l.delete(r)}function X_(){ah=!1,Ni!==null&&Fu(Ni)&&(Ni=null),zi!==null&&Fu(zi)&&(zi=null),ji!==null&&Fu(ji)&&(ji=null),Go.forEach(ob),Xo.forEach(ob)}function $u(t,r){t.blockedOn===r&&(t.blockedOn=null,ah||(ah=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,X_)))}var Vu=null;function sb(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(ih(s||l)===null)continue;break}var h=Pa(l);h!==null&&(t.splice(r,3),r-=3,rd(h,{pending:!0,data:f,method:l.method,action:s},s,f))}}))}function _l(t){function r(j){return $u(j,t)}Ni!==null&&$u(Ni,t),zi!==null&&$u(zi,t),ji!==null&&$u(ji,t),Go.forEach(r),Xo.forEach(r);for(var l=0;l<Oi.length;l++){var s=Oi[l];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Oi.length&&(l=Oi[0],l.blockedOn===null);)lb(l),l.blockedOn===null&&Oi.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||sb(l);else if(b){var E=null;if(h&&h.hasAttribute("formAction")){if(f=h,b=h[un]||null)E=b.formAction;else if(ih(f)!==null)continue}else E=b.action;typeof E=="function"?l[s+1]=E:(l.splice(s,3),s-=3),sb(l)}}}function ub(){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 lh(t){this._internalRoot=t}Qu.prototype.render=lh.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,s=zn();eb(l,s,t,r,null,null)},Qu.prototype.unmount=lh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;eb(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=bp();t={blockedOn:null,target:t,priority:r};for(var l=0;l<Oi.length&&r!==0&&r<Oi[l].priority;l++);Oi.splice(l,0,t),l===0&&lb(t)}};var cb=n.version;if(cb!=="19.2.4")throw Error(a(527,cb,"19.2.4"));ne.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 K_={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(K_),Rt=Yu}catch{}}return Wo.createRoot=function(t,r){if(!o(t))throw Error(a(299));var l=!1,s="",f=yy,h=vy,b=by;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=Jv(t,1,!1,null,null,l,s,null,f,h,b,ub),t[Ha]=r.current,Hd(t),new lh(r)},Wo.hydrateRoot=function(t,r,l){if(!o(t))throw Error(a(299));var s=!1,f="",h=yy,b=vy,E=by,j=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&&(j=l.formState)),r=Jv(t,1,!0,r,l??null,s,f,j,h,b,E,ub),r.context=Wv(null),l=r.current,s=zn(),s=Gc(s),f=yi(s),f.callback=null,vi(l,f,s),l=s,r.current.lanes=l,oo(r,l),gr(r),t[Ha]=r.current,Hd(t),new Qu(r)},Wo.version="19.2.4",Wo}var Sb;function sC(){if(Sb)return ch.exports;Sb=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(),ch.exports=oC(),ch.exports}var uC=sC(),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,Ii,Il,y0,cC=(y0=class extends Jl{constructor(){super();Se(this,Ea);Se(this,Ii);Se(this,Il);fe(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,Ii)||this.setEventListener(O(this,Il))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,Ii))==null||n.call(this),fe(this,Ii,void 0))}setEventListener(n){var i;fe(this,Il,n),(i=O(this,Ii))==null||i.call(this),fe(this,Ii,n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(n){O(this,Ea)!==n&&(fe(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,Ii=new WeakMap,Il=new WeakMap,y0),Em=new cC,fC={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},qi,xm,v0,dC=(v0=class{constructor(){Se(this,qi,fC);Se(this,xm,!1)}setTimeoutProvider(e){fe(this,qi,e)}setTimeout(e,n){return O(this,qi).setTimeout(e,n)}clearTimeout(e){O(this,qi).clearTimeout(e)}setInterval(e,n){return O(this,qi).setInterval(e,n)}clearInterval(e){O(this,qi).clearInterval(e)}},qi=new WeakMap,xm=new WeakMap,v0),wa=new dC;function hC(e){setTimeout(e,0)}var mC=typeof window>"u"||"Deno"in globalThis;function on(){}function pC(e,n){return typeof e=="function"?e(n):e}function Zh(e){return typeof e=="number"&&e>=0&&e!==1/0}function N0(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Yi(e,n){return typeof e=="function"?e(n):e}function Kn(e,n){return typeof e=="function"?e(n):e}function wb(e,n){const{type:i="all",exact:a,fetchStatus:o,predicate:u,queryKey:c,stale:d}=e;if(c){if(a){if(n.queryHash!==_m(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 Eb(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 _m(e,n){return((n==null?void 0:n.queryKeyHashFn)||Oa)(e)}function Oa(e){return JSON.stringify(e,(n,i)=>Ph(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 gC=Object.prototype.hasOwnProperty;function z0(e,n,i=0){if(e===n)return e;if(i>500)return n;const a=_b(e)&&_b(n);if(!a&&!(Ph(e)&&Ph(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],S=e[v],x=n[v];if(S===x){p[v]=S,(a?g<u:gC.call(e,v))&&m++;continue}if(S===null||x===null||typeof S!="object"||typeof x!="object"){p[v]=x;continue}const z=z0(S,x,i+1);p[v]=z,z===S&&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 _b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ph(e){if(!Cb(e))return!1;const n=e.constructor;if(n===void 0)return!0;const i=n.prototype;return!(!Cb(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cb(e){return Object.prototype.toString.call(e)==="[object Object]"}function yC(e){return new Promise(n=>{wa.setTimeout(n,e)})}function Fh(e,n,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,n):i.structuralSharing!==!1?z0(e,n):n}function vC(e,n,i=0){const a=[...e,n];return i&&a.length>i?a.slice(1):a}function bC(e,n,i=0){const a=[n,...e];return i&&a.length>i?a.slice(0,-1):a}var Cm=Symbol();function j0(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Cm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function km(e,n){return typeof e=="function"?e(...n):!!e}function xC(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=()=>mC;return{isServer(){return e()},setIsServer(n){e=n}}})();function $h(){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 SC=hC;function wC(){let e=[],n=0,i=d=>{d()},a=d=>{d()},o=SC;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 Lt=wC(),ql,Hi,Hl,b0,EC=(b0=class extends Jl{constructor(){super();Se(this,ql,!0);Se(this,Hi);Se(this,Hl);fe(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,Hi)||this.setEventListener(O(this,Hl))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,Hi))==null||n.call(this),fe(this,Hi,void 0))}setEventListener(n){var i;fe(this,Hl,n),(i=O(this,Hi))==null||i.call(this),fe(this,Hi,n(this.setOnline.bind(this)))}setOnline(n){O(this,ql)!==n&&(fe(this,ql,n),this.listeners.forEach(a=>{a(n)}))}isOnline(){return O(this,ql)}},ql=new WeakMap,Hi=new WeakMap,Hl=new WeakMap,b0),xc=new EC;function _C(e){return Math.min(1e3*2**e,3e4)}function O0(e){return(e??"online")==="online"?xc.isOnline():!0}var Vh=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function R0(e){let n=!1,i=0,a;const o=$h(),u=()=>o.status!=="pending",c=_=>{var A;if(!u()){const N=new Vh(_);S(N),(A=e.onCancel)==null||A.call(e,N)}},d=()=>{n=!0},p=()=>{n=!1},m=()=>Em.isFocused()&&(e.networkMode==="always"||xc.isOnline())&&e.canRun(),g=()=>O0(e.networkMode)&&e.canRun(),v=_=>{u()||(a==null||a(),o.resolve(_))},S=_=>{u()||(a==null||a(),o.reject(_))},x=()=>new Promise(_=>{var A;a=N=>{(u()||m())&&_(N)},(A=e.onPause)==null||A.call(e)}).then(()=>{var _;a=void 0,u()||(_=e.onContinue)==null||_.call(e)}),z=()=>{if(u())return;let _;const A=i===0?e.initialPromise:void 0;try{_=A??e.fn()}catch(N){_=Promise.reject(N)}Promise.resolve(_).then(v).catch(N=>{var T;if(u())return;const q=e.retry??(gs.isServer()?0:3),M=e.retryDelay??_C,B=typeof M=="function"?M(i,N):M,F=q===!0||typeof q=="number"&&i<q||typeof q=="function"&&q(i,N);if(n||!F){S(N);return}i++,(T=e.onFail)==null||T.call(e,i,N),yC(B).then(()=>m()?void 0:x()).then(()=>{n?S(N):z()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(a==null||a(),o),cancelRetry:d,continueRetry:p,canStart:g,start:()=>(g()?z():x().then(z),o)}}var _a,x0,D0=(x0=class{constructor(){Se(this,_a)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zh(this.gcTime)&&fe(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)),fe(this,_a,void 0))}},_a=new WeakMap,x0),Ca,Zl,Xn,ka,Ht,Es,Ta,On,M0,Yr,S0,CC=(S0=class extends D0{constructor(n){super();Se(this,On);Se(this,Ca);Se(this,Zl);Se(this,Xn);Se(this,ka);Se(this,Ht);Se(this,Es);Se(this,Ta);fe(this,Ta,!1),fe(this,Es,n.defaultOptions),this.setOptions(n.options),this.observers=[],fe(this,ka,n.client),fe(this,Xn,O(this,ka).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,fe(this,Ca,Tb(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,Ht))==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=Tb(this.options);i.data!==void 0&&(this.setState(kb(i.data,i.dataUpdatedAt)),fe(this,Ca,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Xn).remove(this)}setData(n,i){const a=Fh(this.state.data,n,this.options);return Re(this,On,Yr).call(this,{data:a,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),a}setState(n,i){Re(this,On,Yr).call(this,{type:"setState",state:n,setStateOptions:i})}cancel(n){var a,o;const i=(a=O(this,Ht))==null?void 0:a.promise;return(o=O(this,Ht))==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=>Kn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Yi(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:!N0(this.state.dataUpdatedAt,n)}onFocus(){var i;const n=this.observers.find(a=>a.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(i=O(this,Ht))==null||i.continue()}onOnline(){var i;const n=this.observers.find(a=>a.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(i=O(this,Ht))==null||i.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),O(this,Xn).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,Ht)&&(O(this,Ta)||Re(this,On,M0).call(this)?O(this,Ht).cancel({revert:!0}):O(this,Ht).cancelRetry()),this.scheduleGc()),O(this,Xn).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,On,Yr).call(this,{type:"invalidate"})}async fetch(n,i){var p,m,g,v,S,x,z,_,A,N,q,M;if(this.state.fetchStatus!=="idle"&&((p=O(this,Ht))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(O(this,Ht))return O(this,Ht).continueRetry(),O(this,Ht).promise}if(n&&this.setOptions(n),!this.options.queryFn){const B=this.observers.find(F=>F.options.queryFn);B&&this.setOptions(B.options)}const a=new AbortController,o=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(fe(this,Ta,!0),a.signal)})},u=()=>{const B=j0(this.options,i),T=(()=>{const Q={client:O(this,ka),queryKey:this.queryKey,meta:this.meta};return o(Q),Q})();return fe(this,Ta,!1),this.options.persister?this.options.persister(B,T,this):B(T)},d=(()=>{const B={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:O(this,ka),state:this.state,fetchFn:u};return o(B),B})();(m=this.options.behavior)==null||m.onFetch(d,this),fe(this,Zl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Re(this,On,Yr).call(this,{type:"fetch",meta:(v=d.fetchOptions)==null?void 0:v.meta}),fe(this,Ht,R0({initialPromise:i==null?void 0:i.initialPromise,fn:d.fetchFn,onCancel:B=>{B instanceof Vh&&B.revert&&this.setState({...O(this,Zl),fetchStatus:"idle"}),a.abort()},onFail:(B,F)=>{Re(this,On,Yr).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{Re(this,On,Yr).call(this,{type:"pause"})},onContinue:()=>{Re(this,On,Yr).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const B=await O(this,Ht).start();if(B===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(B),(x=(S=O(this,Xn).config).onSuccess)==null||x.call(S,B,this),(_=(z=O(this,Xn).config).onSettled)==null||_.call(z,B,this.state.error,this),B}catch(B){if(B instanceof Vh){if(B.silent)return O(this,Ht).promise;if(B.revert){if(this.state.data===void 0)throw B;return this.state.data}}throw Re(this,On,Yr).call(this,{type:"error",error:B}),(N=(A=O(this,Xn).config).onError)==null||N.call(A,B,this),(M=(q=O(this,Xn).config).onSettled)==null||M.call(q,this.state.data,B,this),B}finally{this.scheduleGc()}}},Ca=new WeakMap,Zl=new WeakMap,Xn=new WeakMap,ka=new WeakMap,Ht=new WeakMap,Es=new WeakMap,Ta=new WeakMap,On=new WeakSet,M0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Yr=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,...U0(a.data,this.options),fetchMeta:n.meta??null};case"success":const o={...a,...kb(n.data,n.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(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),Lt.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),O(this,Xn).notify({query:this,type:"updated",action:n})})},S0);function U0(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:O0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kb(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tb(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,Ze,_s,ln,Aa,Pl,Gr,Zi,Cs,Fl,$l,Na,za,Pi,Vl,Je,os,Qh,Yh,Gh,Xh,Kh,Jh,Wh,L0,w0,kC=(w0=class extends Jl{constructor(n,i){super();Se(this,Je);Se(this,yn);Se(this,Ze);Se(this,_s);Se(this,ln);Se(this,Aa);Se(this,Pl);Se(this,Gr);Se(this,Zi);Se(this,Cs);Se(this,Fl);Se(this,$l);Se(this,Na);Se(this,za);Se(this,Pi);Se(this,Vl,new Set);this.options=i,fe(this,yn,n),fe(this,Zi,null),fe(this,Gr,$h()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Ze).addObserver(this),Ab(O(this,Ze),this.options)?Re(this,Je,os).call(this):this.updateResult(),Re(this,Je,Xh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return em(O(this,Ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return em(O(this,Ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,Je,Kh).call(this),Re(this,Je,Jh).call(this),O(this,Ze).removeObserver(this)}setOptions(n){const i=this.options,a=O(this,Ze);if(this.options=O(this,yn).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kn(this.options.enabled,O(this,Ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,Je,Wh).call(this),O(this,Ze).setOptions(this.options),i._defaulted&&!bc(this.options,i)&&O(this,yn).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Ze),observer:this});const o=this.hasListeners();o&&Nb(O(this,Ze),a,this.options,i)&&Re(this,Je,os).call(this),this.updateResult(),o&&(O(this,Ze)!==a||Kn(this.options.enabled,O(this,Ze))!==Kn(i.enabled,O(this,Ze))||Yi(this.options.staleTime,O(this,Ze))!==Yi(i.staleTime,O(this,Ze)))&&Re(this,Je,Qh).call(this);const u=Re(this,Je,Yh).call(this);o&&(O(this,Ze)!==a||Kn(this.options.enabled,O(this,Ze))!==Kn(i.enabled,O(this,Ze))||u!==O(this,Pi))&&Re(this,Je,Gh).call(this,u)}getOptimisticResult(n){const i=O(this,yn).getQueryCache().build(O(this,yn),n),a=this.createResult(i,n);return AC(this,a)&&(fe(this,ln,a),fe(this,Pl,this.options),fe(this,Aa,O(this,Ze).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,Gr).status==="pending"&&O(this,Gr).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,Ze)}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 Re(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,Ze),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},S=!1,x;if(i._optimisticResults){const he=this.hasListeners(),ae=!he&&Ab(n,i),le=he&&Nb(n,a,i,o);(ae||le)&&(v={...v,...U0(g.data,n.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:z,errorUpdatedAt:_,status:A}=v;x=v.data;let N=!1;if(i.placeholderData!==void 0&&x===void 0&&A==="pending"){let he;u!=null&&u.isPlaceholderData&&i.placeholderData===(d==null?void 0:d.placeholderData)?(he=u.data,N=!0):he=typeof i.placeholderData=="function"?i.placeholderData((re=O(this,$l))==null?void 0:re.state.data,O(this,$l)):i.placeholderData,he!==void 0&&(A="success",x=Fh(u==null?void 0:u.data,he,i),S=!0)}if(i.select&&x!==void 0&&!N)if(u&&x===(c==null?void 0:c.data)&&i.select===O(this,Cs))x=O(this,Fl);else try{fe(this,Cs,i.select),x=i.select(x),x=Fh(u==null?void 0:u.data,x,i),fe(this,Fl,x),fe(this,Zi,null)}catch(he){fe(this,Zi,he)}O(this,Zi)&&(z=O(this,Zi),x=O(this,Fl),_=Date.now(),A="error");const q=v.fetchStatus==="fetching",M=A==="pending",B=A==="error",F=M&&q,T=x!==void 0,V={status:A,fetchStatus:v.fetchStatus,isPending:M,isSuccess:A==="success",isError:B,isInitialLoading:F,isLoading:F,data:x,dataUpdatedAt:v.dataUpdatedAt,error:z,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&&!M,isLoadingError:B&&!T,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:B&&T,isStale:Tm(n,i),refetch:this.refetch,promise:O(this,Gr),isEnabled:Kn(i.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const he=V.data!==void 0,ae=V.status==="error"&&!he,le=te=>{ae?te.reject(V.error):he&&te.resolve(V.data)},Ce=()=>{const te=fe(this,Gr,V.promise=$h());le(te)},ce=O(this,Gr);switch(ce.status){case"pending":n.queryHash===a.queryHash&&le(ce);break;case"fulfilled":(ae||V.data!==ce.value)&&Ce();break;case"rejected":(!ae||V.error!==ce.reason)&&Ce();break}}return V}updateResult(){const n=O(this,ln),i=this.createResult(O(this,Ze),this.options);if(fe(this,Aa,O(this,Ze).state),fe(this,Pl,this.options),O(this,Aa).data!==void 0&&fe(this,$l,O(this,Ze)),bc(i,n))return;fe(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)})};Re(this,Je,L0).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,Je,Xh).call(this)}},yn=new WeakMap,Ze=new WeakMap,_s=new WeakMap,ln=new WeakMap,Aa=new WeakMap,Pl=new WeakMap,Gr=new WeakMap,Zi=new WeakMap,Cs=new WeakMap,Fl=new WeakMap,$l=new WeakMap,Na=new WeakMap,za=new WeakMap,Pi=new WeakMap,Vl=new WeakMap,Je=new WeakSet,os=function(n){Re(this,Je,Wh).call(this);let i=O(this,Ze).fetch(this.options,n);return n!=null&&n.throwOnError||(i=i.catch(on)),i},Qh=function(){Re(this,Je,Kh).call(this);const n=Yi(this.options.staleTime,O(this,Ze));if(gs.isServer()||O(this,ln).isStale||!Zh(n))return;const a=N0(O(this,ln).dataUpdatedAt,n)+1;fe(this,Na,wa.setTimeout(()=>{O(this,ln).isStale||this.updateResult()},a))},Yh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Ze)):this.options.refetchInterval)??!1},Gh=function(n){Re(this,Je,Jh).call(this),fe(this,Pi,n),!(gs.isServer()||Kn(this.options.enabled,O(this,Ze))===!1||!Zh(O(this,Pi))||O(this,Pi)===0)&&fe(this,za,wa.setInterval(()=>{(this.options.refetchIntervalInBackground||Em.isFocused())&&Re(this,Je,os).call(this)},O(this,Pi)))},Xh=function(){Re(this,Je,Qh).call(this),Re(this,Je,Gh).call(this,Re(this,Je,Yh).call(this))},Kh=function(){O(this,Na)&&(wa.clearTimeout(O(this,Na)),fe(this,Na,void 0))},Jh=function(){O(this,za)&&(wa.clearInterval(O(this,za)),fe(this,za,void 0))},Wh=function(){const n=O(this,yn).getQueryCache().build(O(this,yn),this.options);if(n===O(this,Ze))return;const i=O(this,Ze);fe(this,Ze,n),fe(this,_s,n.state),this.hasListeners()&&(i==null||i.removeObserver(this),n.addObserver(this))},L0=function(n){Lt.batch(()=>{n.listeners&&this.listeners.forEach(i=>{i(O(this,ln))}),O(this,yn).getQueryCache().notify({query:O(this,Ze),type:"observerResultsUpdated"})})},w0);function TC(e,n){return Kn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Ab(e,n){return TC(e,n)||e.state.data!==void 0&&em(e,n,n.refetchOnMount)}function em(e,n,i){if(Kn(n.enabled,e)!==!1&&Yi(n.staleTime,e)!=="static"){const a=typeof i=="function"?i(e):i;return a==="always"||a!==!1&&Tm(e,n)}return!1}function Nb(e,n,i,a){return(e!==n||Kn(a.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Tm(e,i)}function Tm(e,n){return Kn(n.enabled,e)!==!1&&e.isStaleByTime(Yi(n.staleTime,e))}function AC(e,n){return!bc(e.getCurrentResult(),n)}function zb(e){return{onFetch:(n,i)=>{var g,v,S,x,z;const a=n.options,o=(S=(v=(g=n.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,u=((x=n.state.data)==null?void 0:x.pages)||[],c=((z=n.state.data)==null?void 0:z.pageParams)||[];let d={pages:[],pageParams:[]},p=0;const m=async()=>{let _=!1;const A=M=>{xC(M,()=>n.signal,()=>_=!0)},N=j0(n.options,n.fetchOptions),q=async(M,B,F)=>{if(_)return Promise.reject();if(B==null&&M.pages.length)return Promise.resolve(M);const Q=(()=>{const ae={client:n.client,queryKey:n.queryKey,pageParam:B,direction:F?"backward":"forward",meta:n.options.meta};return A(ae),ae})(),V=await N(Q),{maxPages:re}=n.options,he=F?bC:vC;return{pages:he(M.pages,V,re),pageParams:he(M.pageParams,B,re)}};if(o&&u.length){const M=o==="backward",B=M?NC:jb,F={pages:u,pageParams:c},T=B(a,F);d=await q(F,T,M)}else{const M=e??u.length;do{const B=p===0?c[0]??a.initialPageParam:jb(a,d);if(p>0&&B==null)break;d=await q(d,B),p++}while(p<M)}return d};n.options.persister?n.fetchFn=()=>{var _,A;return(A=(_=n.options).persister)==null?void 0:A.call(_,m,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},i)}:n.fetchFn=m}}}function jb(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 NC(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,vr,en,ja,br,Li,E0,zC=(E0=class extends D0{constructor(n){super();Se(this,br);Se(this,ks);Se(this,vr);Se(this,en);Se(this,ja);fe(this,ks,n.client),this.mutationId=n.mutationId,fe(this,en,n.mutationCache),fe(this,vr,[]),this.state=n.state||B0(),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,vr).includes(n)||(O(this,vr).push(n),this.clearGcTimeout(),O(this,en).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){fe(this,vr,O(this,vr).filter(i=>i!==n)),this.scheduleGc(),O(this,en).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){O(this,vr).length||(this.state.status==="pending"?this.scheduleGc():O(this,en).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,S,x,z,_,A,N,q,M,B,F,T,Q;const i=()=>{Re(this,br,Li).call(this,{type:"continue"})},a={client:O(this,ks),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,ja,R0({fn:()=>this.options.mutationFn?this.options.mutationFn(n,a):Promise.reject(new Error("No mutationFn found")),onFail:(V,re)=>{Re(this,br,Li).call(this,{type:"failed",failureCount:V,error:re})},onPause:()=>{Re(this,br,Li).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,en).canRun(this)}));const o=this.state.status==="pending",u=!O(this,ja).canStart();try{if(o)i();else{Re(this,br,Li).call(this,{type:"pending",variables:n,isPaused:u}),O(this,en).config.onMutate&&await O(this,en).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&&Re(this,br,Li).call(this,{type:"pending",context:re,variables:n,isPaused:u})}const V=await O(this,ja).start();return await((m=(p=O(this,en).config).onSuccess)==null?void 0:m.call(p,V,n,this.state.context,this,a)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,V,n,this.state.context,a)),await((x=(S=O(this,en).config).onSettled)==null?void 0:x.call(S,V,null,this.state.variables,this.state.context,this,a)),await((_=(z=this.options).onSettled)==null?void 0:_.call(z,V,null,n,this.state.context,a)),Re(this,br,Li).call(this,{type:"success",data:V}),V}catch(V){try{await((N=(A=O(this,en).config).onError)==null?void 0:N.call(A,V,n,this.state.context,this,a))}catch(re){Promise.reject(re)}try{await((M=(q=this.options).onError)==null?void 0:M.call(q,V,n,this.state.context,a))}catch(re){Promise.reject(re)}try{await((F=(B=O(this,en).config).onSettled)==null?void 0:F.call(B,void 0,V,this.state.variables,this.state.context,this,a))}catch(re){Promise.reject(re)}try{await((Q=(T=this.options).onSettled)==null?void 0:Q.call(T,void 0,V,n,this.state.context,a))}catch(re){Promise.reject(re)}throw Re(this,br,Li).call(this,{type:"error",error:V}),V}finally{O(this,en).runNext(this)}}},ks=new WeakMap,vr=new WeakMap,en=new WeakMap,ja=new WeakMap,br=new WeakSet,Li=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),Lt.batch(()=>{O(this,vr).forEach(a=>{a.onMutationUpdate(n)}),O(this,en).notify({mutation:this,type:"updated",action:n})})},E0);function B0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xr,ur,Ts,_0,jC=(_0=class extends Jl{constructor(n={}){super();Se(this,Xr);Se(this,ur);Se(this,Ts);this.config=n,fe(this,Xr,new Set),fe(this,ur,new Map),fe(this,Ts,0)}build(n,i,a){const o=new zC({client:n,mutationCache:this,mutationId:++Gu(this,Ts)._,options:n.defaultMutationOptions(i),state:a});return this.add(o),o}add(n){O(this,Xr).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,Xr).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(){Lt.batch(()=>{O(this,Xr).forEach(n=>{this.notify({type:"removed",mutation:n})}),O(this,Xr).clear(),O(this,ur).clear()})}getAll(){return Array.from(O(this,Xr))}find(n){const i={exact:!0,...n};return this.getAll().find(a=>Eb(i,a))}findAll(n={}){return this.getAll().filter(i=>Eb(n,i))}notify(n){Lt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return Lt.batch(()=>Promise.all(n.map(i=>i.continue().catch(on))))}},Xr=new WeakMap,ur=new WeakMap,Ts=new WeakMap,_0);function Xu(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Kr,Fi,vn,Jr,ri,dc,tm,C0,OC=(C0=class extends Jl{constructor(i,a){super();Se(this,ri);Se(this,Kr);Se(this,Fi);Se(this,vn);Se(this,Jr);fe(this,Kr,i),this.setOptions(a),this.bindMethods(),Re(this,ri,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,Kr).defaultMutationOptions(i),bc(this.options,a)||O(this,Kr).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){Re(this,ri,dc).call(this),Re(this,ri,tm).call(this,i)}getCurrentResult(){return O(this,Fi)}reset(){var i;(i=O(this,vn))==null||i.removeObserver(this),fe(this,vn,void 0),Re(this,ri,dc).call(this),Re(this,ri,tm).call(this)}mutate(i,a){var o;return fe(this,Jr,a),(o=O(this,vn))==null||o.removeObserver(this),fe(this,vn,O(this,Kr).getMutationCache().build(O(this,Kr),this.options)),O(this,vn).addObserver(this),O(this,vn).execute(i)}},Kr=new WeakMap,Fi=new WeakMap,vn=new WeakMap,Jr=new WeakMap,ri=new WeakSet,dc=function(){var a;const i=((a=O(this,vn))==null?void 0:a.state)??B0();fe(this,Fi,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},tm=function(i){Lt.batch(()=>{var a,o,u,c,d,p,m,g;if(O(this,Jr)&&this.hasListeners()){const v=O(this,Fi).variables,S=O(this,Fi).context,x={client:O(this,Kr),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(o=(a=O(this,Jr)).onSuccess)==null||o.call(a,i.data,v,S,x)}catch(z){Promise.reject(z)}try{(c=(u=O(this,Jr)).onSettled)==null||c.call(u,i.data,null,v,S,x)}catch(z){Promise.reject(z)}}else if((i==null?void 0:i.type)==="error"){try{(p=(d=O(this,Jr)).onError)==null||p.call(d,i.error,v,S,x)}catch(z){Promise.reject(z)}try{(g=(m=O(this,Jr)).onSettled)==null||g.call(m,void 0,i.error,v,S,x)}catch(z){Promise.reject(z)}}}this.listeners.forEach(v=>{v(O(this,Fi))})})},C0),xr,k0,RC=(k0=class extends Jl{constructor(n={}){super();Se(this,xr);this.config=n,fe(this,xr,new Map)}build(n,i,a){const o=i.queryKey,u=i.queryHash??_m(o,i);let c=this.get(u);return c||(c=new CC({client:n,queryKey:o,queryHash:u,options:n.defaultQueryOptions(i),state:a,defaultOptions:n.getQueryDefaults(o)}),this.add(c)),c}add(n){O(this,xr).has(n.queryHash)||(O(this,xr).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const i=O(this,xr).get(n.queryHash);i&&(n.destroy(),i===n&&O(this,xr).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Lt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return O(this,xr).get(n)}getAll(){return[...O(this,xr).values()]}find(n){const i={exact:!0,...n};return this.getAll().find(a=>wb(i,a))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(a=>wb(n,a)):i}notify(n){Lt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},xr=new WeakMap,k0),xt,$i,Vi,Ql,Yl,Qi,Gl,Xl,T0,DC=(T0=class{constructor(e={}){Se(this,xt);Se(this,$i);Se(this,Vi);Se(this,Ql);Se(this,Yl);Se(this,Qi);Se(this,Gl);Se(this,Xl);fe(this,xt,e.queryCache||new RC),fe(this,$i,e.mutationCache||new jC),fe(this,Vi,e.defaultOptions||{}),fe(this,Ql,new Map),fe(this,Yl,new Map),fe(this,Qi,0)}mount(){Gu(this,Qi)._++,O(this,Qi)===1&&(fe(this,Gl,Em.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,xt).onFocus())})),fe(this,Xl,xc.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,xt).onOnline())})))}unmount(){var e,n;Gu(this,Qi)._--,O(this,Qi)===0&&((e=O(this,Gl))==null||e.call(this),fe(this,Gl,void 0),(n=O(this,Xl))==null||n.call(this),fe(this,Xl,void 0))}isFetching(e){return O(this,xt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,$i).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=O(this,xt).get(n.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),i=O(this,xt).build(this,n),a=i.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Yi(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return O(this,xt).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,xt).get(a.queryHash),u=o==null?void 0:o.state.data,c=pC(n,u);if(c!==void 0)return O(this,xt).build(this,a).setData(c,{...i,manual:!0})}setQueriesData(e,n,i){return Lt.batch(()=>O(this,xt).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,xt).get(n.queryHash))==null?void 0:i.state}removeQueries(e){const n=O(this,xt);Lt.batch(()=>{n.findAll(e).forEach(i=>{n.remove(i)})})}resetQueries(e,n){const i=O(this,xt);return Lt.batch(()=>(i.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const i={revert:!0,...n},a=Lt.batch(()=>O(this,xt).findAll(e).map(o=>o.cancel(i)));return Promise.all(a).then(on).catch(on)}invalidateQueries(e,n={}){return Lt.batch(()=>(O(this,xt).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=Lt.batch(()=>O(this,xt).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,xt).build(this,n);return i.isStaleByTime(Yi(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=zb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(on).catch(on)}ensureInfiniteQueryData(e){return e.behavior=zb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xc.isOnline()?O(this,$i).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,xt)}getMutationCache(){return O(this,$i)}getDefaultOptions(){return O(this,Vi)}setDefaultOptions(e){fe(this,Vi,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,Vi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=_m(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===Cm&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,Vi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,xt).clear(),O(this,$i).clear()}},xt=new WeakMap,$i=new WeakMap,Vi=new WeakMap,Ql=new WeakMap,Yl=new WeakMap,Qi=new WeakMap,Gl=new WeakMap,Xl=new WeakMap,T0),I0=w.createContext(void 0),Wl=e=>{const n=w.useContext(I0);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},MC=({client:e,children:n})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(I0.Provider,{value:e,children:n})),q0=w.createContext(!1),UC=()=>w.useContext(q0);q0.Provider;function LC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var BC=w.createContext(LC()),IC=()=>w.useContext(BC),qC=(e,n,i)=>{const a=i!=null&&i.state.error&&typeof e.throwOnError=="function"?km(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},HC=e=>{w.useEffect(()=>{e.clearReset()},[e])},ZC=({result:e,errorResetBoundary:n,throwOnError:i,query:a,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||km(i,[e.error,a])),PC=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))}},FC=(e,n)=>e.isLoading&&e.isFetching&&!n,$C=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Ob=(e,n,i)=>n.fetchOptimistic(e).catch(()=>{i.clearReset()});function VC(e,n,i){var S,x,z,_;const a=UC(),o=IC(),u=Wl(),c=u.defaultQueryOptions(e);(x=(S=u.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||x.call(S,c);const d=u.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",PC(c),qC(c,o,d),HC(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(A=>{const N=v?m.subscribe(Lt.batchCalls(A)):on;return m.updateResult(),N},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),w.useEffect(()=>{m.setOptions(c)},[c,m]),$C(c,g))throw Ob(c,m,o);if(ZC({result:g,errorResetBoundary:o,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;if((_=(z=u.getDefaultOptions().queries)==null?void 0:z._experimental_afterQuery)==null||_.call(z,c,g),c.experimental_prefetchInRender&&!gs.isServer()&&FC(g,a)){const A=p?Ob(c,m,o):d==null?void 0:d.promise;A==null||A.catch(on).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?g:m.trackResult(g)}function Xt(e,n){return VC(e,kC)}function Zt(e,n){const i=Wl(),[a]=w.useState(()=>new OC(i,e));w.useEffect(()=>{a.setOptions(e)},[a,e]);const o=w.useSyncExternalStore(w.useCallback(c=>a.subscribe(Lt.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=w.useCallback((c,d)=>{a.mutate(c,d).catch(on)},[a]);if(o.error&&km(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 Rb="popstate";function Db(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function QC(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 nm("",{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 GC(n,i,null,e)}function pt(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 YC(){return Math.random().toString(36).substring(2,10)}function Mb(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 nm(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||YC(),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 GC(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 A=g(),N=A==null?null:A-m;m=A,p&&p({action:d,location:_.location,delta:N})}function S(A,N){d="PUSH";let q=Db(A)?A:nm(_.location,A,N);m=g()+1;let M=Mb(q,m),B=_.createHref(q.unstable_mask||q);try{c.pushState(M,"",B)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;o.location.assign(B)}u&&p&&p({action:d,location:_.location,delta:1})}function x(A,N){d="REPLACE";let q=Db(A)?A:nm(_.location,A,N);m=g();let M=Mb(q,m),B=_.createHref(q.unstable_mask||q);c.replaceState(M,"",B),u&&p&&p({action:d,location:_.location,delta:0})}function z(A){return XC(A)}let _={get action(){return d},get location(){return e(o,c)},listen(A){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Rb,v),p=A,()=>{o.removeEventListener(Rb,v),p=null}},createHref(A){return n(o,A)},createURL:z,encodeLocation(A){let N=z(A);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:S,replace:x,go(A){return c.go(A)}};return _}function XC(e,n=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),pt(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 H0(e,n,i="/"){return KC(e,n,i,!1)}function KC(e,n,i,a){let o=typeof n=="string"?eo(n):n,u=ii(o.pathname||"/",i);if(u==null)return null;let c=Z0(e);JC(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=uk(u);d=ok(c[p],m,a)}return d}function Z0(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;pt(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=Er([a,g.relativePath]),S=i.concat(g);c.children&&c.children.length>0&&(pt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Z0(c.children,n,S,v,p)),!(c.path==null&&!c.index)&&n.push({path:v,score:ak(v,c.index),routesMeta:S})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))u(c,d);else for(let m of P0(c.path))u(c,d,!0,m)}),n}function P0(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=P0(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 JC(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:lk(n.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var WC=/^:[\w-]+$/,ek=3,tk=2,nk=1,rk=10,ik=-2,Ub=e=>e==="*";function ak(e,n){let i=e.split("/"),a=i.length;return i.some(Ub)&&(a+=ik),n&&(a+=tk),i.filter(o=>!Ub(o)).reduce((o,u)=>o+(WC.test(u)?ek:u===""?nk:rk),a)}function lk(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 ok(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),S=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:Er([u,v.pathname]),pathnameBase:hk(Er([u,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(u=Er([u,v.pathnameBase]))}return c}function Sc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=sk(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},S)=>{if(g==="*"){let z=d[S]||"";c=u.slice(0,u.length-z.length).replace(/(.)\/+$/,"$1")}const x=d[S];return v&&!x?m[g]=void 0:m[g]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:c,pattern:e}}function sk(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 uk(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 ii(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 ck=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fk(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=Lb(i.substring(1),"/"):u=Lb(i,n)):u=n,{pathname:u,search:mk(a),hash:pk(o)}}function Lb(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 mh(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 dk(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function Am(e){let n=dk(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},pt(!o.pathname||!o.pathname.includes("?"),mh("?","pathname","search",o)),pt(!o.pathname||!o.pathname.includes("#"),mh("#","pathname","hash",o)),pt(!o.search||!o.search.includes("#"),mh("#","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 S=c.split("/");for(;S[0]==="..";)S.shift(),v-=1;o.pathname=S.join("/")}d=v>=0?n[v]:"/"}let p=fk(o,d),m=c&&c!=="/"&&c.endsWith("/"),g=(u||c===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var Er=e=>e.join("/").replace(/\/\/+/g,"/"),hk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gk=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 yk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vk(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var F0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $0(e,n){let i=e;if(typeof i!="string"||!ck.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,o=!1;if(F0)try{let u=new URL(window.location.href),c=i.startsWith("//")?new URL(u.protocol+i):new URL(i),d=ii(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 V0=["POST","PUT","PATCH","DELETE"];new Set(V0);var bk=["GET",...V0];new Set(bk);var to=w.createContext(null);to.displayName="DataRouter";var Dc=w.createContext(null);Dc.displayName="DataRouterState";var xk=w.createContext(!1),Q0=w.createContext({isTransitioning:!1});Q0.displayName="ViewTransition";var Sk=w.createContext(new Map);Sk.displayName="Fetchers";var wk=w.createContext(null);wk.displayName="Await";var Ln=w.createContext(null);Ln.displayName="Navigation";var As=w.createContext(null);As.displayName="Location";var tr=w.createContext({outlet:null,matches:[],isDataRoute:!1});tr.displayName="Route";var Nm=w.createContext(null);Nm.displayName="RouteError";var Y0="REACT_ROUTER_ERROR",Ek="REDIRECT",_k="ROUTE_ERROR_RESPONSE";function Ck(e){if(e.startsWith(`${Y0}:${Ek}:{`))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 kk(e){if(e.startsWith(`${Y0}:${_k}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new gk(n.status,n.statusText,n.data)}catch{}}function Tk(e,{relative:n}={}){pt(no(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=w.useContext(Ln),{hash:o,pathname:u,search:c}=zs(e,{relative:n}),d=u;return i!=="/"&&(d=u==="/"?i:Er([i,u])),a.createHref({pathname:d,search:c,hash:o})}function no(){return w.useContext(As)!=null}function ai(){return pt(no(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(As).location}var G0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function X0(e){w.useContext(Ln).static||w.useLayoutEffect(e)}function Ns(){let{isDataRoute:e}=w.useContext(tr);return e?Pk():Ak()}function Ak(){pt(no(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(to),{basename:n,navigator:i}=w.useContext(Ln),{matches:a}=w.useContext(tr),{pathname:o}=ai(),u=JSON.stringify(Am(a)),c=w.useRef(!1);return X0(()=>{c.current=!0}),w.useCallback((p,m={})=>{if(cr(c.current,G0),!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:Er([n,g.pathname])),(m.replace?i.replace:i.push)(g,m.state,m)},[n,i,u,o,e])}var Nk=w.createContext(null);function zk(e){let n=w.useContext(tr).outlet;return w.useMemo(()=>n&&w.createElement(Nk.Provider,{value:e},n),[n,e])}function jk(){let{matches:e}=w.useContext(tr),n=e[e.length-1];return n?n.params:{}}function zs(e,{relative:n}={}){let{matches:i}=w.useContext(tr),{pathname:a}=ai(),o=JSON.stringify(Am(i));return w.useMemo(()=>Rc(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function Ok(e,n){return K0(e,n)}function K0(e,n,i){var A;pt(no(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=w.useContext(Ln),{matches:o}=w.useContext(tr),u=o[o.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",m=u&&u.route;{let N=m&&m.path||"";W0(d,!m||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${N}">) 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="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let g=ai(),v;if(n){let N=typeof n=="string"?eo(n):n;pt(p==="/"||((A=N.pathname)==null?void 0:A.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 "${N.pathname}" was given in the \`location\` prop.`),v=N}else v=g;let S=v.pathname||"/",x=S;if(p!=="/"){let N=p.replace(/^\//,"").split("/");x="/"+S.replace(/^\//,"").split("/").slice(N.length).join("/")}let z=H0(e,{pathname:x});cr(m||z!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),cr(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.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 _=Lk(z&&z.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:Er([p,a.encodeLocation?a.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?p:Er([p,a.encodeLocation?a.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.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 Rk(){let e=Zk(),n=yk(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 Dk=w.createElement(Rk,null),J0=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=kk(e.digest);i&&(e=i)}let n=e!==void 0?w.createElement(tr.Provider,{value:this.props.routeContext},w.createElement(Nm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(Mk,{error:e},n):n}};J0.contextType=xk;var ph=new WeakMap;function Mk({children:e,error:n}){let{basename:i}=w.useContext(Ln);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=Ck(n.digest);if(a){let o=ph.get(n);if(o)throw o;let u=$0(a.location,i);if(F0&&!ph.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 ph.set(n,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function Uk({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(tr.Provider,{value:e},i)}function Lk(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);pt(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:S,errors:x}=a,z=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!x||x[v.route.id]===void 0);if(v.route.lazy||z){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 S,x;p(g,{location:a.location,params:((x=(S=a.matches)==null?void 0:S[0])==null?void 0:x.params)??{},unstable_pattern:vk(a.matches),errorInfo:v})}:void 0;return o.reduceRight((g,v,S)=>{let x,z=!1,_=null,A=null;a&&(x=u&&v.route.id?u[v.route.id]:void 0,_=v.route.errorElement||Dk,c&&(d<0&&S===0?(W0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,A=null):d===S&&(z=!0,A=v.route.hydrateFallbackElement||null)));let N=n.concat(o.slice(0,S+1)),q=()=>{let M;return x?M=_:z?M=A:v.route.Component?M=w.createElement(v.route.Component,null):v.route.element?M=v.route.element:M=g,w.createElement(Uk,{match:v,routeContext:{outlet:g,matches:N,isDataRoute:a!=null},children:M})};return a&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?w.createElement(J0,{location:a.location,revalidation:a.revalidation,component:_,error:x,children:q(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):q()},null)}function zm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bk(e){let n=w.useContext(to);return pt(n,zm(e)),n}function Ik(e){let n=w.useContext(Dc);return pt(n,zm(e)),n}function qk(e){let n=w.useContext(tr);return pt(n,zm(e)),n}function jm(e){let n=qk(e),i=n.matches[n.matches.length-1];return pt(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function Hk(){return jm("useRouteId")}function Zk(){var a;let e=w.useContext(Nm),n=Ik("useRouteError"),i=jm("useRouteError");return e!==void 0?e:(a=n.errors)==null?void 0:a[i]}function Pk(){let{router:e}=Bk("useNavigate"),n=jm("useNavigate"),i=w.useRef(!1);return X0(()=>{i.current=!0}),w.useCallback(async(o,u={})=>{cr(i.current,G0),i.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...u}))},[e,n])}var Bb={};function W0(e,n,i){!n&&!Bb[e]&&(Bb[e]=!0,cr(!1,i))}w.memo(Fk);function Fk({routes:e,future:n,state:i,isStatic:a,onError:o}){return K0(e,void 0,{state:i,isStatic:a,onError:o})}function e1({to:e,replace:n,state:i,relative:a}){pt(no(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=w.useContext(Ln);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(tr),{pathname:c}=ai(),d=Ns(),p=Rc(e,Am(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 t1(e){return zk(e.context)}function sr(e){pt(!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 $k({basename:e="/",children:n=null,location:i,navigationType:a="POP",navigator:o,static:u=!1,unstable_useTransitions:c}){pt(!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:S=null,key:x="default",unstable_mask:z}=i,_=w.useMemo(()=>{let A=ii(m,d);return A==null?null:{location:{pathname:A,search:g,hash:v,state:S,key:x,unstable_mask:z},navigationType:a}},[d,m,g,v,S,x,a,z]);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(Ln.Provider,{value:p},w.createElement(As.Provider,{children:n,value:_}))}function Vk({children:e,location:n}){return Ok(rm(e),n)}function rm(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,rm(a.props.children,u));return}pt(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>`),pt(!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=rm(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 Qk(e){return Mc(e)&&e.tagName.toLowerCase()==="button"}function Yk(e){return Mc(e)&&e.tagName.toLowerCase()==="form"}function Gk(e){return Mc(e)&&e.tagName.toLowerCase()==="input"}function Xk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kk(e,n){return e.button===0&&(!n||n==="_self")&&!Xk(e)}var Ku=null;function Jk(){if(Ku===null)try{new FormData(document.createElement("form"),0),Ku=!1}catch{Ku=!0}return Ku}var Wk=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gh(e){return e!=null&&!Wk.has(e)?(cr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mc}"`),null):e}function e2(e,n){let i,a,o,u,c;if(Yk(e)){let d=e.getAttribute("action");a=d?ii(d,n):null,i=e.getAttribute("method")||hc,o=gh(e.getAttribute("enctype"))||mc,u=new FormData(e)}else if(Qk(e)||Gk(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?ii(p,n):null,i=e.getAttribute("formmethod")||d.getAttribute("method")||hc,o=gh(e.getAttribute("formenctype"))||gh(d.getAttribute("enctype"))||mc,u=new FormData(d,e),!Jk()){let{name:m,type:g,value:v}=e;if(g==="image"){let S=m?`${m}.`:"";u.append(`${S}x`,"0"),u.append(`${S}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 Om(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function t2(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&&ii(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function n2(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 r2(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 i2(e,n,i){let a=await Promise.all(e.map(async o=>{let u=n.routes[o.route.id];if(u){let c=await n2(u,i);return c.links?c.links():[]}return[]}));return s2(a.flat(1).filter(r2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ib(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 S=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 S=="boolean")return S}return!0}):[]}function a2(e,n,{includeHydrateFallback:i}={}){return l2(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 l2(e){return[...new Set(e)]}function o2(e){let n={},i=Object.keys(e).sort();for(let a of i)n[a]=e[a];return n}function s2(e,n){let i=new Set;return new Set(n),e.reduce((a,o)=>{let u=JSON.stringify(o2(o));return i.has(u)||(i.add(u),a.push({key:u,link:o})),a},[])}function n1(){let e=w.useContext(to);return Om(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function u2(){let e=w.useContext(Dc);return Om(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Rm=w.createContext(void 0);Rm.displayName="FrameworkContext";function r1(){let e=w.useContext(Rm);return Om(e,"You must render this element inside a <HydratedRouter> element"),e}function c2(e,n){let i=w.useContext(Rm),[a,o]=w.useState(!1),[u,c]=w.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:v}=n,S=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let _=N=>{N.forEach(q=>{c(q.isIntersecting)})},A=new IntersectionObserver(_,{threshold:.5});return S.current&&A.observe(S.current),()=>{A.disconnect()}}},[e]),w.useEffect(()=>{if(a){let _=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(_)}}},[a]);let x=()=>{o(!0)},z=()=>{o(!1),c(!1)};return i?e!=="intent"?[u,S,{}]:[u,S,{onFocus:es(d,x),onBlur:es(p,z),onMouseEnter:es(m,x),onMouseLeave:es(g,z),onTouchStart:es(v,x)}]:[!1,S,{}]}function es(e,n){return i=>{e&&e(i),i.defaultPrevented||n(i)}}function f2({page:e,...n}){let{router:i}=n1(),a=w.useMemo(()=>H0(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?w.createElement(h2,{page:e,matches:a,...n}):null}function d2(e){let{manifest:n,routeModules:i}=r1(),[a,o]=w.useState([]);return w.useEffect(()=>{let u=!1;return i2(e,n,i).then(c=>{u||o(c)}),()=>{u=!0}},[e,n,i]),a}function h2({page:e,matches:n,...i}){let a=ai(),{future:o,manifest:u,routeModules:c}=r1(),{basename:d}=n1(),{loaderData:p,matches:m}=u2(),g=w.useMemo(()=>Ib(e,n,m,u,a,"data"),[e,n,m,u,a]),v=w.useMemo(()=>Ib(e,n,m,u,a,"assets"),[e,n,m,u,a]),S=w.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let _=new Set,A=!1;if(n.forEach(q=>{var B;let M=u.routes[q.route.id];!M||!M.hasLoader||(!g.some(F=>F.route.id===q.route.id)&&q.route.id in p&&((B=c[q.route.id])!=null&&B.shouldRevalidate)||M.hasClientLoader?A=!0:_.add(q.route.id))}),_.size===0)return[];let N=t2(e,d,o.unstable_trailingSlashAwareDataRequests,"data");return A&&_.size>0&&N.searchParams.set("_routes",n.filter(q=>_.has(q.route.id)).map(q=>q.route.id).join(",")),[N.pathname+N.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,a,u,g,n,e,c]),x=w.useMemo(()=>a2(v,u),[v,u]),z=d2(v);return w.createElement(w.Fragment,null,S.map(_=>w.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...i})),x.map(_=>w.createElement("link",{key:_,rel:"modulepreload",href:_,...i})),z.map(({key:_,link:A})=>w.createElement("link",{key:_,nonce:i.nonce,...A,crossOrigin:A.crossOrigin??i.crossOrigin})))}function m2(...e){return n=>{e.forEach(i=>{typeof i=="function"?i(n):i!=null&&(i.current=n)})}}var p2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{p2&&(window.__reactRouterVersion="7.13.1")}catch{}function g2({basename:e,children:n,unstable_useTransitions:i,window:a}){let o=w.useRef();o.current==null&&(o.current=QC({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($k,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:u,unstable_useTransitions:i})}var i1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,a1=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:S,unstable_defaultShouldRevalidate:x,...z},_){let{basename:A,navigator:N,unstable_useTransitions:q}=w.useContext(Ln),M=typeof g=="string"&&i1.test(g),B=$0(g,A);g=B.to;let F=Tk(g,{relative:o}),T=ai(),Q=null;if(d){let te=Rc(d,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);A!=="/"&&(te.pathname=te.pathname==="/"?A:Er([A,te.pathname])),Q=N.createHref(te)}let[V,re,he]=c2(a,z),ae=b2(g,{replace:c,unstable_mask:d,state:p,target:m,preventScrollReset:v,relative:o,viewTransition:S,unstable_defaultShouldRevalidate:x,unstable_useTransitions:q});function le(te){n&&n(te),te.defaultPrevented||ae(te)}let Ce=!(B.isExternal||u),ce=w.createElement("a",{...z,...he,href:(Ce?Q:void 0)||B.absoluteURL||F,onClick:Ce?le:n,ref:m2(_,re),target:m,"data-discover":!M&&i==="render"?"true":void 0});return V&&!M?w.createElement(w.Fragment,null,ce,w.createElement(f2,{page:F})):ce});a1.displayName="Link";var l1=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}),S=ai(),x=w.useContext(Dc),{navigator:z,basename:_}=w.useContext(Ln),A=x!=null&&_2(v)&&d===!0,N=z.encodeLocation?z.encodeLocation(v).pathname:v.pathname,q=S.pathname,M=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(q=q.toLowerCase(),M=M?M.toLowerCase():null,N=N.toLowerCase()),M&&_&&(M=ii(M,_)||M);const B=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let F=q===N||!o&&q.startsWith(N)&&q.charAt(B)==="/",T=M!=null&&(M===N||!o&&M.startsWith(N)&&M.charAt(N.length)==="/"),Q={isActive:F,isPending:T,isTransitioning:A},V=F?n:void 0,re;typeof a=="function"?re=a(Q):re=[a,F?"active":null,T?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let he=typeof u=="function"?u(Q):u;return w.createElement(a1,{...m,"aria-current":V,className:re,ref:g,style:he,to:c,viewTransition:d},typeof p=="function"?p(Q):p)});l1.displayName="NavLink";var y2=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:S,...x},z)=>{let{unstable_useTransitions:_}=w.useContext(Ln),A=w2(),N=E2(d,{relative:m}),q=c.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&i1.test(d),B=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let T=F.nativeEvent.submitter,Q=(T==null?void 0:T.getAttribute("formmethod"))||c,V=()=>A(T||F.currentTarget,{fetcherKey:n,method:Q,navigate:i,replace:o,state:u,relative:m,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S});_&&i!==!1?w.startTransition(()=>V()):V()};return w.createElement("form",{ref:z,method:q,action:N,onSubmit:a?p:B,...x,"data-discover":!M&&e==="render"?"true":void 0})});y2.displayName="Form";function v2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function o1(e){let n=w.useContext(to);return pt(n,v2(e)),n}function b2(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=ai(),S=zs(e,{relative:c});return w.useCallback(x=>{if(Kk(x,n)){x.preventDefault();let z=i!==void 0?i:ys(v)===ys(S),_=()=>g(e,{replace:z,unstable_mask:a,state:o,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});m?w.startTransition(()=>_()):_()}},[v,g,S,i,a,o,n,e,u,c,d,p,m])}var x2=0,S2=()=>`__${String(++x2)}__`;function w2(){let{router:e}=o1("useSubmit"),{basename:n}=w.useContext(Ln),i=Hk(),a=e.fetch,o=e.navigate;return w.useCallback(async(u,c={})=>{let{action:d,method:p,encType:m,formData:g,body:v}=e2(u,n);if(c.navigate===!1){let S=c.fetcherKey||S2();await a(S,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 E2(e,{relative:n}={}){let{basename:i}=w.useContext(Ln),a=w.useContext(tr);pt(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),u={...zs(e||".",{relative:n})},c=ai();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:Er([i,u.pathname])),ys(u)}function _2(e,{relative:n}={}){let i=w.useContext(Q0);pt(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=o1("useViewTransitionState"),o=zs(e,{relative:n});if(!i.isTransitioning)return!1;let u=ii(i.currentLocation.pathname,a)||i.currentLocation.pathname,c=ii(i.nextLocation.pathname,a)||i.nextLocation.pathname;return Sc(o.pathname,c)!=null||Sc(o.pathname,u)!=null}const C2="/api/v1";async function k2(e,n){const i=await fetch(`${C2}/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 s1="/api/v1",Dm="first-tree-hub:tokens";function u1(){const e=localStorage.getItem(Dm);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function c1(e){localStorage.setItem(Dm,JSON.stringify(e))}function f1(){localStorage.removeItem(Dm)}class T2 extends Error{constructor(n,i){super(i),this.status=n,this.name="ApiError"}}let ts=null;async function A2(e){return ts||(ts=(async()=>{try{const n=await fetch(`${s1}/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 c1(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(`${s1}${e}`,{method:i,headers:p,body:a!==void 0?JSON.stringify(a):void 0})},u=u1();let c=await o(u==null?void 0:u.accessToken);if(c.status===401&&(u!=null&&u.refreshToken)){const d=await A2(u.refreshToken);d&&(c=await o(d.accessToken))}if(!c.ok){c.status===401&&(f1(),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 T2(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"})},d1=w.createContext(null);function N2({children:e}){const[n,i]=w.useState(()=>!!u1()),a=w.useCallback(()=>{f1(),i(!1)},[]),o=w.useCallback(async(u,c)=>{const d=await k2(u,c);c1({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(d1.Provider,{value:{isAuthenticated:n,login:o,logout:a},children:e})}function Mm(){const e=w.useContext(d1);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function z2(){const{isAuthenticated:e}=Mm();return e?y.jsx(t1,{}):y.jsx(e1,{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 h1=(...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 j2=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 O2=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 qb=e=>{const n=O2(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 R2={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 D2=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 M2=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,...R2,width:n,height:n,stroke:e,strokeWidth:a?Number(i)*24/Number(n):i,className:h1("lucide",o),...!u&&!D2(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 Kt=(e,n)=>{const i=w.forwardRef(({className:a,...o},u)=>w.createElement(M2,{ref:u,iconNode:n,className:h1(`lucide-${j2(qb(e))}`,`lucide-${e}`,a),...o}));return i.displayName=qb(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 U2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],m1=Kt("arrow-left",U2);/**
|
|
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 L2=[["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"}]],p1=Kt("bot",L2);/**
|
|
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 B2=[["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"}]],g1=Kt("cable",B2);/**
|
|
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 I2=[["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"}]],q2=Kt("copy",I2);/**
|
|
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 H2=[["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"}]],Z2=Kt("key",H2);/**
|
|
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 P2=[["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"}]],F2=Kt("layout-dashboard",P2);/**
|
|
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 $2=[["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"}]],V2=Kt("link-2",$2);/**
|
|
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 Q2=[["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"}]],Y2=Kt("log-out",Q2);/**
|
|
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 G2=[["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"}]],Um=Kt("message-square",G2);/**
|
|
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 X2=[["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=Kt("pencil",X2);/**
|
|
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 K2=[["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"}]],J2=Kt("play",K2);/**
|
|
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 W2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wc=Kt("plus",W2);/**
|
|
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 eT=[["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"}]],tT=Kt("radio",eT);/**
|
|
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 nT=[["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"}]],rT=Kt("settings",nT);/**
|
|
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 iT=[["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"}]],aT=Kt("shield",iT);/**
|
|
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 lT=[["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=Kt("trash-2",lT);/**
|
|
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 oT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sT=Kt("x",oT);function y1(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=y1(e[n]))&&(a&&(a+=" "),a+=i)}else for(i in e)e[i]&&(a&&(a+=" "),a+=i);return a}function v1(){for(var e,n,i=0,a="",o=arguments.length;i<o;i++)(e=arguments[i])&&(n=y1(e))&&(a&&(a+=" "),a+=n);return a}const uT=(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},cT=(e,n)=>({classGroupId:e,validator:n}),b1=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),Ec="-",Hb=[],fT="arbitrary..",dT=e=>{const n=mT(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return hT(c);const d=c.split(Ec),p=d[0]===""&&d.length>1?1:0;return x1(d,p,n)},getConflictingClassGroupIds:(c,d)=>{if(d){const p=a[c],m=i[c];return p?m?uT(m,p):p:m||Hb}return i[c]||Hb}}},x1=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const o=e[n],u=i.nextPart.get(o);if(u){const m=x1(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}},hT=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?fT+a:void 0})(),mT=e=>{const{theme:n,classGroups:i}=e;return pT(i,n)},pT=(e,n)=>{const i=b1();for(const a in e){const o=e[a];Lm(o,i,a,n)}return i},Lm=(e,n,i,a)=>{const o=e.length;for(let u=0;u<o;u++){const c=e[u];gT(c,n,i,a)}},gT=(e,n,i,a)=>{if(typeof e=="string"){yT(e,n,i);return}if(typeof e=="function"){vT(e,n,i,a);return}bT(e,n,i,a)},yT=(e,n,i)=>{const a=e===""?n:S1(n,e);a.classGroupId=i},vT=(e,n,i,a)=>{if(xT(e)){Lm(e(a),n,i,a);return}n.validators===null&&(n.validators=[]),n.validators.push(cT(i,e))},bT=(e,n,i,a)=>{const o=Object.entries(e),u=o.length;for(let c=0;c<u;c++){const[d,p]=o[c];Lm(p,S1(n,d),i,a)}},S1=(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=b1(),i.nextPart.set(c,d)),i=d}return i},xT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ST=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)}}},im="!",Zb=":",wT=[],Pb=(e,n,i,a,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:a,isExternal:o}),ET=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 A=o[_];if(c===0&&d===0){if(A===Zb){u.push(o.slice(p,_)),p=_+1;continue}if(A==="/"){m=_;continue}}A==="["?c++:A==="]"?c--:A==="("?d++:A===")"&&d--}const v=u.length===0?o:o.slice(p);let S=v,x=!1;v.endsWith(im)?(S=v.slice(0,-1),x=!0):v.startsWith(im)&&(S=v.slice(1),x=!0);const z=m&&m>p?m-p:void 0;return Pb(u,x,S,z)};if(n){const o=n+Zb,u=a;a=c=>c.startsWith(o)?u(c.slice(o.length)):Pb(wT,!1,c,void 0,!0)}if(i){const o=a;a=u=>i({className:u,parseClassName:o})}return a},_T=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}},CT=e=>({cache:ST(e.cacheSize),parseClassName:ET(e),sortModifiers:_T(e),...dT(e)}),kT=/\s+/,TT=(e,n)=>{const{parseClassName:i,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:u}=n,c=[],d=e.trim().split(kT);let p="";for(let m=d.length-1;m>=0;m-=1){const g=d[m],{isExternal:v,modifiers:S,hasImportantModifier:x,baseClassName:z,maybePostfixModifierPosition:_}=i(g);if(v){p=g+(p.length>0?" "+p:p);continue}let A=!!_,N=a(A?z.substring(0,_):z);if(!N){if(!A){p=g+(p.length>0?" "+p:p);continue}if(N=a(z),!N){p=g+(p.length>0?" "+p:p);continue}A=!1}const q=S.length===0?"":S.length===1?S[0]:u(S).join(":"),M=x?q+im:q,B=M+N;if(c.indexOf(B)>-1)continue;c.push(B);const F=o(N,A);for(let T=0;T<F.length;++T){const Q=F[T];c.push(M+Q)}p=g+(p.length>0?" "+p:p)}return p},AT=(...e)=>{let n=0,i,a,o="";for(;n<e.length;)(i=e[n++])&&(a=w1(i))&&(o&&(o+=" "),o+=a);return o},w1=e=>{if(typeof e=="string")return e;let n,i="";for(let a=0;a<e.length;a++)e[a]&&(n=w1(e[a]))&&(i&&(i+=" "),i+=n);return i},NT=(e,...n)=>{let i,a,o,u;const c=p=>{const m=n.reduce((g,v)=>v(g),e());return i=CT(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=TT(p,i);return o(p,g),g};return u=c,(...p)=>u(AT(...p))},zT=[],Mt=e=>{const n=i=>i[e]||zT;return n.isThemeGetter=!0,n},E1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RT=/\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$/,DT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Di=e=>jT.test(e),Ue=e=>!!e&&!Number.isNaN(Number(e)),Mi=e=>!!e&&Number.isInteger(Number(e)),yh=e=>e.endsWith("%")&&Ue(e.slice(0,-1)),Qr=e=>OT.test(e),C1=()=>!0,LT=e=>RT.test(e)&&!DT.test(e),Bm=()=>!1,BT=e=>MT.test(e),IT=e=>UT.test(e),qT=e=>!ge(e)&&!ye(e),HT=e=>Ji(e,A1,Bm),ge=e=>E1.test(e),Sa=e=>Ji(e,N1,LT),Fb=e=>Ji(e,GT,Ue),ZT=e=>Ji(e,j1,C1),PT=e=>Ji(e,z1,Bm),$b=e=>Ji(e,k1,Bm),FT=e=>Ji(e,T1,IT),Wu=e=>Ji(e,O1,BT),ye=e=>_1.test(e),ns=e=>Da(e,N1),$T=e=>Da(e,z1),Vb=e=>Da(e,k1),VT=e=>Da(e,A1),QT=e=>Da(e,T1),ec=e=>Da(e,O1,!0),YT=e=>Da(e,j1,!0),Ji=(e,n,i)=>{const a=E1.exec(e);return a?a[1]?n(a[1]):i(a[2]):!1},Da=(e,n,i=!1)=>{const a=_1.exec(e);return a?a[1]?n(a[1]):i:!1},k1=e=>e==="position"||e==="percentage",T1=e=>e==="image"||e==="url",A1=e=>e==="length"||e==="size"||e==="bg-size",N1=e=>e==="length",GT=e=>e==="number",z1=e=>e==="family-name",j1=e=>e==="number"||e==="weight",O1=e=>e==="shadow",XT=()=>{const e=Mt("color"),n=Mt("font"),i=Mt("text"),a=Mt("font-weight"),o=Mt("tracking"),u=Mt("leading"),c=Mt("breakpoint"),d=Mt("container"),p=Mt("spacing"),m=Mt("radius"),g=Mt("shadow"),v=Mt("inset-shadow"),S=Mt("text-shadow"),x=Mt("drop-shadow"),z=Mt("blur"),_=Mt("perspective"),A=Mt("aspect"),N=Mt("ease"),q=Mt("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...B(),ye,ge],T=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],V=()=>[ye,ge,p],re=()=>[Di,"full","auto",...V()],he=()=>[Mi,"none","subgrid",ye,ge],ae=()=>["auto",{span:["full",Mi,ye,ge]},Mi,ye,ge],le=()=>[Mi,"auto",ye,ge],Ce=()=>["auto","min","max","fr",ye,ge],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...V()],ne=()=>[Di,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],me=()=>[Di,"screen","full","dvw","lvw","svw","min","max","fit",...V()],Ae=()=>[Di,"screen","full","lh","dvh","lvh","svh","min","max","fit",...V()],k=()=>[e,ye,ge],R=()=>[...B(),Vb,$b,{position:[ye,ge]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",VT,HT,{size:[ye,ge]}],oe=()=>[yh,ns,Sa],de=()=>["","none","full",m,ye,ge],ue=()=>["",Ue,ns,Sa],Ne=()=>["solid","dashed","dotted","double"],Fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Ue,yh,Vb,$b],ft=()=>["","none",z,ye,ge],Ot=()=>["none",Ue,ye,ge],In=()=>["none",Ue,ye,ge],dr=()=>[Ue,ye,ge],Jt=()=>[Di,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qr],breakpoint:[Qr],color:[C1],container:[Qr],"drop-shadow":[Qr],ease:["in","out","in-out"],font:[qT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qr],shadow:[Qr],spacing:["px",Ue],text:[Qr],"text-shadow":[Qr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Di,ge,ye,A]}],container:["container"],columns:[{columns:[Ue,ge,ye,d]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:F()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],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:[Mi,"auto",ye,ge]}],basis:[{basis:[Di,"full","auto",d,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,Di,"auto","initial","none",ge]}],grow:[{grow:["",Ue,ye,ge]}],shrink:[{shrink:["",Ue,ye,ge]}],order:[{order:[Mi,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":he()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":he()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ce()}],"auto-rows":[{"auto-rows":Ce()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pbs:[{pbs:V()}],pbe:[{pbe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],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":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...me()]}],"min-inline-size":[{"min-inline":["auto",...me()]}],"max-inline-size":[{"max-inline":["none",...me()]}],"block-size":[{block:["auto",...Ae()]}],"min-block-size":[{"min-block":["auto",...Ae()]}],"max-block-size":[{"max-block":["none",...Ae()]}],w:[{w:[d,"screen",...ne()]}],"min-w":[{"min-w":[d,"screen","none",...ne()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",i,ns,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,YT,ZT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yh,ge]}],"font-family":[{font:[$T,PT,n]}],"font-features":[{"font-features":[ge]}],"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,ye,ge]}],"line-clamp":[{"line-clamp":[Ue,"none",ye,Fb]}],leading:[{leading:[u,...V()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",ye,Sa]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Ue,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],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",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mi,ye,ge],radial:["",ye,ge],conic:[Mi,ye,ge]},QT,FT]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"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:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,ye,ge]}],"outline-w":[{outline:["",Ue,ns,Sa]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",g,ec,Wu]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",v,ec,Wu]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Ue,Sa]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",S,ec,Wu]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Ue,ye,ge]}],"mix-blend":[{"mix-blend":[...Fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Fe()}],"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":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":B()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:ft()}],brightness:[{brightness:[Ue,ye,ge]}],contrast:[{contrast:[Ue,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",x,ec,Wu]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",Ue,ye,ge]}],"hue-rotate":[{"hue-rotate":[Ue,ye,ge]}],invert:[{invert:["",Ue,ye,ge]}],saturate:[{saturate:[Ue,ye,ge]}],sepia:[{sepia:["",Ue,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Ue,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",ye,ge]}],ease:[{ease:["linear","initial",N,ye,ge]}],delay:[{delay:[Ue,ye,ge]}],animate:[{animate:["none",q,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,ye,ge]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Ot()}],"rotate-x":[{"rotate-x":Ot()}],"rotate-y":[{"rotate-y":Ot()}],"rotate-z":[{"rotate-z":Ot()}],scale:[{scale:In()}],"scale-x":[{"scale-x":In()}],"scale-y":[{"scale-y":In()}],"scale-z":[{"scale-z":In()}],"scale-3d":["scale-3d"],skew:[{skew:dr()}],"skew-x":[{"skew-x":dr()}],"skew-y":[{"skew-y":dr()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Jt()}],"translate-x":[{"translate-x":Jt()}],"translate-y":[{"translate-y":Jt()}],"translate-z":[{"translate-z":Jt()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",ye,ge]}],"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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mbs":[{"scroll-mbs":V()}],"scroll-mbe":[{"scroll-mbe":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pbs":[{"scroll-pbs":V()}],"scroll-pbe":[{"scroll-pbe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",ye,ge]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[Ue,ns,Sa,Fb]}],stroke:[{stroke:["none",...k()]}],"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"]}},KT=NT(XT);function st(...e){return KT(v1(e))}function Rn(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 JT=[{to:"/",icon:F2,label:"Overview"},{to:"/agents",icon:p1,label:"Agents"},{to:"/bindings",icon:g1,label:"Bindings"},{to:"/chats",icon:Um,label:"Chats"},{to:"/admin-users",icon:aT,label:"Admin Users"},{to:"/settings",icon:rT,label:"Settings"}];function WT(){const{logout:e}=Mm();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:JT.map(n=>y.jsxs(l1,{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(Y2,{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(t1,{})})})]})}function W(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 S=g[v];S in d||(d[S]=m[S].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 R1 extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const D1={};function Xi(e){return D1}function M1(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 am(e,n){return typeof n=="bigint"?n.toString():n}function Im(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function qm(e){return e==null}function Hm(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function eA(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 Qb=Symbol("evaluating");function tt(e,n,i){let a;Object.defineProperty(e,n,{get(){if(a!==Qb)return a===void 0&&(a=Qb,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 Wi(...e){const n={};for(const i of e){const a=Object.getOwnPropertyDescriptors(i);Object.assign(n,a)}return Object.defineProperties({},n)}function Yb(e){return JSON.stringify(e)}function tA(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const U1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const nA=Im(()=>{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 L1(e){return Kl(e)?{...e}:Array.isArray(e)?[...e]:e}const rA=new Set(["string","number","symbol"]);function Uc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ea(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 we(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 iA(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const aA={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 lA(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=Wi(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 ea(e,u)}function oA(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=Wi(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 ea(e,u)}function sA(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=Wi(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Ma(this,"shape",u),u}});return ea(e,o)}function uA(e,n){if(!Kl(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Wi(e._zod.def,{get shape(){const a={...e._zod.def.shape,...n};return Ma(this,"shape",a),a}});return ea(e,i)}function cA(e,n){const i=Wi(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 ea(e,i)}function fA(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=Wi(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 ea(n,c)}function dA(e,n,i){const a=Wi(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 ea(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 Ki(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 Zm(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 B1=(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,am,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},I1=W("$ZodError",B1),q1=W("$ZodError",B1,{Parent:Error});function hA(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 mA(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 Pm=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=>Ki(p,u,Xi())));throw U1(d,o==null?void 0:o.callee),d}return c.value},Fm=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=>Ki(p,u,Xi())));throw U1(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??I1)(u.issues.map(c=>Ki(c,o,Xi())))}:{success:!0,data:u.value}},pA=Lc(q1),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=>Ki(c,o,Xi())))}:{success:!0,data:u.value}},gA=Bc(q1),yA=e=>(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Pm(e)(n,i,o)},vA=e=>(n,i,a)=>Pm(e)(n,i,a),bA=e=>async(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Fm(e)(n,i,o)},xA=e=>async(n,i,a)=>Fm(e)(n,i,a),SA=e=>(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Lc(e)(n,i,o)},wA=e=>(n,i,a)=>Lc(e)(n,i,a),EA=e=>async(n,i,a)=>{const o=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Bc(e)(n,i,o)},_A=e=>async(n,i,a)=>Bc(e)(n,i,a),CA=/^[cC][^\s-]{8,}$/,kA=/^[0-9a-z]+$/,TA=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,AA=/^[0-9a-vA-V]{20}$/,NA=/^[A-Za-z0-9]{27}$/,zA=/^[a-zA-Z0-9_-]{21}$/,jA=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OA=/^([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})$/,Gb=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)$/,RA=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function MA(){return new RegExp(DA,"u")}const UA=/^(?:(?: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])$/,LA=/^(([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}|:))$/,BA=/^((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])$/,IA=/^(([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])$/,qA=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,H1=/^[A-Za-z0-9_-]*$/,HA=/^\+[1-9]\d{6,14}$/,Z1="(?:(?:\\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])))",ZA=new RegExp(`^${Z1}$`);function P1(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 PA(e){return new RegExp(`^${P1(e)}$`)}function FA(e){const n=P1({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(`^${Z1}T(?:${a})$`)}const $A=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}$`)},VA=/^-?\d+$/,F1=/^-?\d+(?:\.\d+)?$/,QA=/^(?:true|false)$/i,YA=/^[^A-Z]*$/,GA=/^[^a-z]*$/,xn=W("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),$1={number:"number",bigint:"bigint",object:"date"},V1=W("$ZodCheckLessThan",(e,n)=>{xn.init(e,n);const i=$1[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})}}),Q1=W("$ZodCheckGreaterThan",(e,n)=>{xn.init(e,n);const i=$1[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})}}),XA=W("$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):eA(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})}}),KA=W("$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]=aA[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=VA)}),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})}}),JA=W("$ZodCheckMaxLength",(e,n)=>{var i;xn.init(e,n),(i=e._zod.def).when??(i.when=a=>{const o=a.value;return!qm(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=Zm(o);a.issues.push({origin:c,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),WA=W("$ZodCheckMinLength",(e,n)=>{var i;xn.init(e,n),(i=e._zod.def).when??(i.when=a=>{const o=a.value;return!qm(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=Zm(o);a.issues.push({origin:c,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),eN=W("$ZodCheckLengthEquals",(e,n)=>{var i;xn.init(e,n),(i=e._zod.def).when??(i.when=a=>{const o=a.value;return!qm(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=Zm(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=W("$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=()=>{})}),tN=W("$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})}}),nN=W("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=YA),Ic.init(e,n)}),rN=W("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=GA),Ic.init(e,n)}),iN=W("$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})}}),aN=W("$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})}}),lN=W("$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})}}),oN=W("$ZodCheckOverwrite",(e,n)=>{xn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class sN{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 uN={major:4,minor:3,patch:6},wt=W("$ZodType",(e,n)=>{var o;var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=uN;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 S of p){if(S._zod.def.when){if(!S._zod.def.when(d))continue}else if(g)continue;const x=d.issues.length,z=S._zod.check(d);if(z instanceof Promise&&(m==null?void 0:m.async)===!1)throw new Rl;if(v||z instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await z,d.issues.length!==x&&(g||(g=zl(d,x)))});else{if(d.issues.length===x)continue;g||(g=zl(d,x))}}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=pA(e,u);return d.success?{value:d.data}:{issues:(c=d.error)==null?void 0:c.issues}}catch{return gA(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}))}),$m=W("$ZodString",(e,n)=>{var i;wt.init(e,n),e._zod.pattern=[...((i=e==null?void 0:e._zod.bag)==null?void 0:i.patterns)??[]].pop()??$A(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}}),gt=W("$ZodStringFormat",(e,n)=>{Ic.init(e,n),$m.init(e,n)}),cN=W("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=OA),gt.init(e,n)}),fN=W("$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=Gb(a))}else n.pattern??(n.pattern=Gb());gt.init(e,n)}),dN=W("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=RA),gt.init(e,n)}),hN=W("$ZodURL",(e,n)=>{gt.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})}}}),mN=W("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=MA()),gt.init(e,n)}),pN=W("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=zA),gt.init(e,n)}),gN=W("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=CA),gt.init(e,n)}),yN=W("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=kA),gt.init(e,n)}),vN=W("$ZodULID",(e,n)=>{n.pattern??(n.pattern=TA),gt.init(e,n)}),bN=W("$ZodXID",(e,n)=>{n.pattern??(n.pattern=AA),gt.init(e,n)}),xN=W("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=NA),gt.init(e,n)}),SN=W("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=FA(n)),gt.init(e,n)}),wN=W("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=ZA),gt.init(e,n)}),EN=W("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=PA(n)),gt.init(e,n)}),_N=W("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=jA),gt.init(e,n)}),CN=W("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=UA),gt.init(e,n),e._zod.bag.format="ipv4"}),kN=W("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=LA),gt.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})}}}),TN=W("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=BA),gt.init(e,n)}),AN=W("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=IA),gt.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 Y1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const NN=W("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=qA),gt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Y1(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function zN(e){if(!H1.test(e))return!1;const n=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return Y1(i)}const jN=W("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=H1),gt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{zN(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),ON=W("$ZodE164",(e,n)=>{n.pattern??(n.pattern=HA),gt.init(e,n)});function RN(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 DN=W("$ZodJWT",(e,n)=>{gt.init(e,n),e._zod.check=i=>{RN(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),G1=W("$ZodNumber",(e,n)=>{wt.init(e,n),e._zod.pattern=e._zod.bag.pattern??F1,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}}),MN=W("$ZodNumberFormat",(e,n)=>{KA.init(e,n),G1.init(e,n)}),UN=W("$ZodBoolean",(e,n)=>{wt.init(e,n),e._zod.pattern=QA,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}}),LN=W("$ZodUnknown",(e,n)=>{wt.init(e,n),e._zod.parse=i=>i}),BN=W("$ZodNever",(e,n)=>{wt.init(e,n),e._zod.parse=(i,a)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function Xb(e,n,i){e.issues.length&&n.issues.push(...jl(i,e.issues)),n.value[i]=e.value}const IN=W("$ZodArray",(e,n)=>{wt.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=>Xb(m,i,c))):Xb(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 X1(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=iA(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function K1(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 S=p.run({value:n[v],issues:[]},a);S instanceof Promise?e.push(S.then(x=>Cc(x,i,v,n,g))):Cc(S,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 qN=W("$ZodObject",(e,n)=>{wt.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=Im(()=>X1(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 S of c.keys){const x=v[S],z=x._zod.optout==="optional",_=x._zod.run({value:m[S],issues:[]},p);_ instanceof Promise?g.push(_.then(A=>Cc(A,d,S,m,z))):Cc(_,d,S,m,z)}return u?K1(g,m,d,p,a.value,e):g.length?Promise.all(g).then(()=>d):d}}),HN=W("$ZodObjectJIT",(e,n)=>{qN.init(e,n);const i=e._zod.parse,a=Im(()=>X1(n)),o=S=>{var M;const x=new sN(["shape","payload","ctx"]),z=a.value,_=B=>{const F=Yb(B);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};x.write("const input = payload.value;");const A=Object.create(null);let N=0;for(const B of z.keys)A[B]=`key_${N++}`;x.write("const newResult = {};");for(const B of z.keys){const F=A[B],T=Yb(B),Q=S[B],V=((M=Q==null?void 0:Q._zod)==null?void 0:M.optout)==="optional";x.write(`const ${F} = ${_(B)};`),V?x.write(`
|
|
188
|
+
if (${F}.issues.length) {
|
|
189
|
+
if (${T} in input) {
|
|
190
|
+
payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
|
|
191
|
+
...iss,
|
|
192
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
193
|
+
})));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (${F}.value === undefined) {
|
|
198
|
+
if (${T} in input) {
|
|
199
|
+
newResult[${T}] = undefined;
|
|
200
|
+
}
|
|
201
|
+
} else {
|
|
202
|
+
newResult[${T}] = ${F}.value;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
`):x.write(`
|
|
206
|
+
if (${F}.issues.length) {
|
|
207
|
+
payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
|
|
208
|
+
...iss,
|
|
209
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
210
|
+
})));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (${F}.value === undefined) {
|
|
214
|
+
if (${T} in input) {
|
|
215
|
+
newResult[${T}] = undefined;
|
|
216
|
+
}
|
|
217
|
+
} else {
|
|
218
|
+
newResult[${T}] = ${F}.value;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
`)}x.write("payload.value = newResult;"),x.write("return payload;");const q=x.compile();return(B,F)=>q(S,B,F)};let u;const c=_c,d=!D1.jitless,m=d&&nA.value,g=n.catchall;let v;e._zod.parse=(S,x)=>{v??(v=a.value);const z=S.value;return c(z)?d&&m&&(x==null?void 0:x.async)===!1&&x.jitless!==!0?(u||(u=o(n.shape)),S=u(S,x),g?K1([],z,S,x,v,e):S):i(S,x):(S.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),S)}});function Kb(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=>Ki(c,a,Xi())))}),n)}const ZN=W("$ZodUnion",(e,n)=>{wt.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=>Hm(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=>Kb(p,o,e,u)):Kb(d,o,e,u)}}),PN=W("$ZodIntersection",(e,n)=>{wt.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])=>Jb(i,p,m)):Jb(i,u,c)}});function lm(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=lm(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=lm(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 Jb(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=lm(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 FN=W("$ZodRecord",(e,n)=>{wt.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"&&F1.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=>Ki(v,a,Xi())),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}}),$N=W("$ZodEnum",(e,n)=>{wt.init(e,n);const i=M1(n.entries),a=new Set(i);e._zod.values=a,e._zod.pattern=new RegExp(`^(${i.filter(o=>rA.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}}),VN=W("$ZodTransform",(e,n)=>{wt.init(e,n),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new R1(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 Wb(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const J1=W("$ZodOptional",(e,n)=>{wt.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(`^(${Hm(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=>Wb(u,i.value)):Wb(o,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,a)}}),QN=W("$ZodExactOptional",(e,n)=>{J1.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)}),YN=W("$ZodNullable",(e,n)=>{wt.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(`^(${Hm(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)}),GN=W("$ZodDefault",(e,n)=>{wt.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=>ex(u,n)):ex(o,n)}});function ex(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const XN=W("$ZodPrefault",(e,n)=>{wt.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))}),KN=W("$ZodNonOptional",(e,n)=>{wt.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=>tx(u,e)):tx(o,e)}});function tx(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 JN=W("$ZodCatch",(e,n)=>{wt.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=>Ki(c,a,Xi()))},input:i.value}),i.issues=[]),i)):(i.value=o.value,o.issues.length&&(i.value=n.catchValue({...i,error:{issues:o.issues.map(u=>Ki(u,a,Xi()))},input:i.value}),i.issues=[]),i)}}),WN=W("$ZodPipe",(e,n)=>{wt.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 ez=W("$ZodReadonly",(e,n)=>{wt.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(nx):nx(o)}});function nx(e){return e.value=Object.freeze(e.value),e}const tz=W("$ZodCustom",(e,n)=>{xn.init(e,n),wt.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=>rx(u,i,a,e));rx(o,i,a,e)}});function rx(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 ix;class nz{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 rz(){return new nz}(ix=globalThis).__zod_globalRegistry??(ix.__zod_globalRegistry=rz());const us=globalThis.__zod_globalRegistry;function iz(e,n){return new e({type:"string",...we(n)})}function az(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(n)})}function ax(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(n)})}function lz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(n)})}function oz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(n)})}function sz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(n)})}function uz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(n)})}function cz(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(n)})}function fz(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(n)})}function dz(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(n)})}function hz(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(n)})}function mz(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(n)})}function pz(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(n)})}function gz(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(n)})}function yz(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(n)})}function vz(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(n)})}function bz(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(n)})}function xz(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(n)})}function Sz(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(n)})}function wz(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(n)})}function Ez(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(n)})}function _z(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(n)})}function Cz(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(n)})}function kz(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(n)})}function Tz(e,n){return new e({type:"string",format:"date",check:"string_format",...we(n)})}function Az(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(n)})}function Nz(e,n){return new e({type:"string",format:"duration",check:"string_format",...we(n)})}function zz(e,n){return new e({type:"number",checks:[],...we(n)})}function jz(e,n){return new e({type:"number",coerce:!0,checks:[],...we(n)})}function Oz(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...we(n)})}function Rz(e,n){return new e({type:"boolean",...we(n)})}function Dz(e){return new e({type:"unknown"})}function Mz(e,n){return new e({type:"never",...we(n)})}function lx(e,n){return new V1({check:"less_than",...we(n),value:e,inclusive:!1})}function vh(e,n){return new V1({check:"less_than",...we(n),value:e,inclusive:!0})}function ox(e,n){return new Q1({check:"greater_than",...we(n),value:e,inclusive:!1})}function bh(e,n){return new Q1({check:"greater_than",...we(n),value:e,inclusive:!0})}function sx(e,n){return new XA({check:"multiple_of",...we(n),value:e})}function W1(e,n){return new JA({check:"max_length",...we(n),maximum:e})}function kc(e,n){return new WA({check:"min_length",...we(n),minimum:e})}function eS(e,n){return new eN({check:"length_equals",...we(n),length:e})}function Uz(e,n){return new tN({check:"string_format",format:"regex",...we(n),pattern:e})}function Lz(e){return new nN({check:"string_format",format:"lowercase",...we(e)})}function Bz(e){return new rN({check:"string_format",format:"uppercase",...we(e)})}function Iz(e,n){return new iN({check:"string_format",format:"includes",...we(n),includes:e})}function qz(e,n){return new aN({check:"string_format",format:"starts_with",...we(n),prefix:e})}function Hz(e,n){return new lN({check:"string_format",format:"ends_with",...we(n),suffix:e})}function ro(e){return new oN({check:"overwrite",tx:e})}function Zz(e){return ro(n=>n.normalize(e))}function Pz(){return ro(e=>e.trim())}function Fz(){return ro(e=>e.toLowerCase())}function $z(){return ro(e=>e.toUpperCase())}function Vz(){return ro(e=>tA(e))}function Qz(e,n,i){return new e({type:"array",element:n,...we(i)})}function Yz(e,n,i){return new e({type:"custom",check:"custom",fn:n,...we(i)})}function Gz(e){const n=Xz(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 Xz(e,n){const i=new xn({check:"custom",...we(n)});return i._zod.check=e,i}function tS(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 S={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,c.schema,S);else{const z=c.schema,_=n.processors[o.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);_(e,n,z,S)}const x=e._zod.parent;x&&(c.ref||(c.ref=x),jt(x,n,S),n.seen.get(x).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 nS(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 S=a.get(v);if(S&&S!==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 A=(_=e.external.registry.get(g[0]))==null?void 0:_.id,N=e.external.uri??(M=>M);if(A)return{ref:N(A)};const q=g[1].defId??g[1].schema.id??`schema${e.counter++}`;return g[1].defId=q,{defId:q,ref:`${N("__shared")}#/${v}/${q}`}}if(g[1]===i)return{ref:"#"};const x=`#/${v}/`,z=g[1].schema.id??`__schema${e.counter++}`;return{defId:z,ref:x+z}},u=g=>{if(g[1].schema.$ref)return;const v=g[1],{ref:S,defId:x}=o(g);v.def={...v.schema},x&&(v.defId=x);const z=v.schema;for(const _ in z)delete z[_];z.$ref=S};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 x=(p=e.external.registry.get(g[0]))==null?void 0:p.id;if(n!==g[0]&&x){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 rS(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,S={...v},x=g.ref;if(g.ref=null,x){a(x);const _=e.seen.get(x),A=_.schema;if(A.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(A)):Object.assign(v,A),Object.assign(v,S),m._zod.parent===x)for(const q in v)q==="$ref"||q==="allOf"||q in S||delete v[q];if(A.$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 z=m._zod.parent;if(z&&z!==x){a(z);const _=e.seen.get(z);if(_!=null&&_.schema.$ref&&(v.$ref=_.schema.$ref,_.def))for(const A in v)A==="$ref"||A==="allOf"||A in _.def&&JSON.stringify(v[A])===JSON.stringify(_.def[A])&&delete v[A]}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 Kz=(e,n={})=>i=>{const a=tS({...i,processors:n});return jt(e,a),nS(a,e),rS(a,e)},Tc=(e,n,i={})=>a=>{const{libraryOptions:o,target:u}=a??{},c=tS({...o??{},target:u,io:n,processors:i});return jt(e,c),nS(c,e),rS(c,e)},Jz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Wz=(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=Jz[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}))])}},ej=(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)},tj=(e,n,i,a)=>{i.type="boolean"},nj=(e,n,i,a)=>{i.not={}},rj=(e,n,i,a)=>{},ij=(e,n,i,a)=>{const o=e._zod.def,u=M1(o.entries);u.every(c=>typeof c=="number")&&(i.type="number"),u.every(c=>typeof c=="string")&&(i.type="string"),i.enum=u},aj=(e,n,i,a)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},lj=(e,n,i,a)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},oj=(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"]})},sj=(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)},uj=(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},cj=(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},fj=(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)}},dj=(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"}]},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},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,i.default=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,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},gj=(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},yj=(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},vj=(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},iS=(e,n,i,a)=>{const o=e._zod.def;jt(o.innerType,n,a);const u=n.seen.get(e);u.ref=o.innerType},bj=W("ZodISODateTime",(e,n)=>{SN.init(e,n),yt.init(e,n)});function xj(e){return kz(bj,e)}const Sj=W("ZodISODate",(e,n)=>{wN.init(e,n),yt.init(e,n)});function wj(e){return Tz(Sj,e)}const Ej=W("ZodISOTime",(e,n)=>{EN.init(e,n),yt.init(e,n)});function _j(e){return Az(Ej,e)}const Cj=W("ZodISODuration",(e,n)=>{_N.init(e,n),yt.init(e,n)});function kj(e){return Nz(Cj,e)}const Tj=(e,n)=>{I1.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>mA(e,i)},flatten:{value:i=>hA(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,am,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,am,2)}},isEmpty:{get(){return e.issues.length===0}}})},nr=W("ZodError",Tj,{Parent:Error}),Aj=Pm(nr),Nj=Fm(nr),zj=Lc(nr),jj=Bc(nr),Oj=yA(nr),Rj=vA(nr),Dj=bA(nr),Mj=xA(nr),Uj=SA(nr),Lj=wA(nr),Bj=EA(nr),Ij=_A(nr),Et=W("ZodType",(e,n)=>(wt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Tc(e,"input"),output:Tc(e,"output")}}),e.toJSONSchema=Kz(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(Wi(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)=>ea(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.parse=(i,a)=>Aj(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>zj(e,i,a),e.parseAsync=async(i,a)=>Nj(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>jj(e,i,a),e.spa=e.safeParseAsync,e.encode=(i,a)=>Oj(e,i,a),e.decode=(i,a)=>Rj(e,i,a),e.encodeAsync=async(i,a)=>Dj(e,i,a),e.decodeAsync=async(i,a)=>Mj(e,i,a),e.safeEncode=(i,a)=>Uj(e,i,a),e.safeDecode=(i,a)=>Lj(e,i,a),e.safeEncodeAsync=async(i,a)=>Bj(e,i,a),e.safeDecodeAsync=async(i,a)=>Ij(e,i,a),e.refine=(i,a)=>e.check(OO(i,a)),e.superRefine=i=>e.check(RO(i)),e.overwrite=i=>e.check(ro(i)),e.optional=()=>fx(e),e.exactOptional=()=>bO(e),e.nullable=()=>dx(e),e.nullish=()=>fx(dx(e)),e.nonoptional=i=>CO(e,i),e.array=()=>Ym(e),e.or=i=>dO([e,i]),e.and=i=>mO(e,i),e.transform=i=>hx(e,yO(i)),e.default=i=>wO(e,i),e.prefault=i=>_O(e,i),e.catch=i=>TO(e,i),e.pipe=i=>hx(e,i),e.readonly=()=>zO(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)),aS=W("_ZodString",(e,n)=>{$m.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(a,o,u)=>Wz(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(Uz(...a)),e.includes=(...a)=>e.check(Iz(...a)),e.startsWith=(...a)=>e.check(qz(...a)),e.endsWith=(...a)=>e.check(Hz(...a)),e.min=(...a)=>e.check(kc(...a)),e.max=(...a)=>e.check(W1(...a)),e.length=(...a)=>e.check(eS(...a)),e.nonempty=(...a)=>e.check(kc(1,...a)),e.lowercase=a=>e.check(Lz(a)),e.uppercase=a=>e.check(Bz(a)),e.trim=()=>e.check(Pz()),e.normalize=(...a)=>e.check(Zz(...a)),e.toLowerCase=()=>e.check(Fz()),e.toUpperCase=()=>e.check($z()),e.slugify=()=>e.check(Vz())}),qj=W("ZodString",(e,n)=>{$m.init(e,n),aS.init(e,n),e.email=i=>e.check(az(Hj,i)),e.url=i=>e.check(cz(Zj,i)),e.jwt=i=>e.check(Cz(rO,i)),e.emoji=i=>e.check(fz(Pj,i)),e.guid=i=>e.check(ax(ux,i)),e.uuid=i=>e.check(lz(rc,i)),e.uuidv4=i=>e.check(oz(rc,i)),e.uuidv6=i=>e.check(sz(rc,i)),e.uuidv7=i=>e.check(uz(rc,i)),e.nanoid=i=>e.check(dz(Fj,i)),e.guid=i=>e.check(ax(ux,i)),e.cuid=i=>e.check(hz($j,i)),e.cuid2=i=>e.check(mz(Vj,i)),e.ulid=i=>e.check(pz(Qj,i)),e.base64=i=>e.check(wz(eO,i)),e.base64url=i=>e.check(Ez(tO,i)),e.xid=i=>e.check(gz(Yj,i)),e.ksuid=i=>e.check(yz(Gj,i)),e.ipv4=i=>e.check(vz(Xj,i)),e.ipv6=i=>e.check(bz(Kj,i)),e.cidrv4=i=>e.check(xz(Jj,i)),e.cidrv6=i=>e.check(Sz(Wj,i)),e.e164=i=>e.check(_z(nO,i)),e.datetime=i=>e.check(xj(i)),e.date=i=>e.check(wj(i)),e.time=i=>e.check(_j(i)),e.duration=i=>e.check(kj(i))});function K(e){return iz(qj,e)}const yt=W("ZodStringFormat",(e,n)=>{gt.init(e,n),aS.init(e,n)}),Hj=W("ZodEmail",(e,n)=>{dN.init(e,n),yt.init(e,n)}),ux=W("ZodGUID",(e,n)=>{cN.init(e,n),yt.init(e,n)}),rc=W("ZodUUID",(e,n)=>{fN.init(e,n),yt.init(e,n)}),Zj=W("ZodURL",(e,n)=>{hN.init(e,n),yt.init(e,n)}),Pj=W("ZodEmoji",(e,n)=>{mN.init(e,n),yt.init(e,n)}),Fj=W("ZodNanoID",(e,n)=>{pN.init(e,n),yt.init(e,n)}),$j=W("ZodCUID",(e,n)=>{gN.init(e,n),yt.init(e,n)}),Vj=W("ZodCUID2",(e,n)=>{yN.init(e,n),yt.init(e,n)}),Qj=W("ZodULID",(e,n)=>{vN.init(e,n),yt.init(e,n)}),Yj=W("ZodXID",(e,n)=>{bN.init(e,n),yt.init(e,n)}),Gj=W("ZodKSUID",(e,n)=>{xN.init(e,n),yt.init(e,n)}),Xj=W("ZodIPv4",(e,n)=>{CN.init(e,n),yt.init(e,n)}),Kj=W("ZodIPv6",(e,n)=>{kN.init(e,n),yt.init(e,n)}),Jj=W("ZodCIDRv4",(e,n)=>{TN.init(e,n),yt.init(e,n)}),Wj=W("ZodCIDRv6",(e,n)=>{AN.init(e,n),yt.init(e,n)}),eO=W("ZodBase64",(e,n)=>{NN.init(e,n),yt.init(e,n)}),tO=W("ZodBase64URL",(e,n)=>{jN.init(e,n),yt.init(e,n)}),nO=W("ZodE164",(e,n)=>{ON.init(e,n),yt.init(e,n)}),rO=W("ZodJWT",(e,n)=>{DN.init(e,n),yt.init(e,n)}),Vm=W("ZodNumber",(e,n)=>{G1.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(a,o,u)=>ej(e,a,o),e.gt=(a,o)=>e.check(ox(a,o)),e.gte=(a,o)=>e.check(bh(a,o)),e.min=(a,o)=>e.check(bh(a,o)),e.lt=(a,o)=>e.check(lx(a,o)),e.lte=(a,o)=>e.check(vh(a,o)),e.max=(a,o)=>e.check(vh(a,o)),e.int=a=>e.check(cx(a)),e.safe=a=>e.check(cx(a)),e.positive=a=>e.check(ox(0,a)),e.nonnegative=a=>e.check(bh(0,a)),e.negative=a=>e.check(lx(0,a)),e.nonpositive=a=>e.check(vh(0,a)),e.multipleOf=(a,o)=>e.check(sx(a,o)),e.step=(a,o)=>e.check(sx(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 zz(Vm,e)}const iO=W("ZodNumberFormat",(e,n)=>{MN.init(e,n),Vm.init(e,n)});function cx(e){return Oz(iO,e)}const aO=W("ZodBoolean",(e,n)=>{UN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>tj(e,i,a)});function Qm(e){return Rz(aO,e)}const lO=W("ZodUnknown",(e,n)=>{LN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>rj()});function Pt(){return Dz(lO)}const oO=W("ZodNever",(e,n)=>{BN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>nj(e,i,a)});function sO(e){return Mz(oO,e)}const uO=W("ZodArray",(e,n)=>{IN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>oj(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(W1(i,a)),e.length=(i,a)=>e.check(eS(i,a)),e.unwrap=()=>e.element});function Ym(e,n){return Qz(uO,e,n)}const cO=W("ZodObject",(e,n)=>{HN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>sj(e,i,a,o),tt(e,"shape",()=>n.shape),e.keyof=()=>Bn(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pt()}),e.strict=()=>e.clone({...e._zod.def,catchall:sO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>sA(e,i),e.safeExtend=i=>uA(e,i),e.merge=i=>cA(e,i),e.pick=i=>lA(e,i),e.omit=i=>oA(e,i),e.partial=(...i)=>fA(lS,e,i[0]),e.required=(...i)=>dA(oS,e,i[0])});function Pe(e,n){const i={type:"object",shape:e??{},...we(n)};return new cO(i)}const fO=W("ZodUnion",(e,n)=>{ZN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>uj(e,i,a,o),e.options=n.options});function dO(e,n){return new fO({type:"union",options:e,...we(n)})}const hO=W("ZodIntersection",(e,n)=>{PN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>cj(e,i,a,o)});function mO(e,n){return new hO({type:"intersection",left:e,right:n})}const pO=W("ZodRecord",(e,n)=>{FN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>fj(e,i,a,o),e.keyType=n.keyType,e.valueType=n.valueType});function rr(e,n,i){return new pO({type:"record",keyType:e,valueType:n,...we(i)})}const om=W("ZodEnum",(e,n)=>{$N.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(a,o,u)=>ij(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 om({...n,checks:[],...we(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 om({...n,checks:[],...we(o),entries:u})}});function Bn(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new om({type:"enum",entries:i,...we(n)})}const gO=W("ZodTransform",(e,n)=>{VN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>lj(e,i),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new R1(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 yO(e){return new gO({type:"transform",transform:e})}const lS=W("ZodOptional",(e,n)=>{J1.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>iS(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function fx(e){return new lS({type:"optional",innerType:e})}const vO=W("ZodExactOptional",(e,n)=>{QN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>iS(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function bO(e){return new vO({type:"optional",innerType:e})}const xO=W("ZodNullable",(e,n)=>{YN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>dj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function dx(e){return new xO({type:"nullable",innerType:e})}const SO=W("ZodDefault",(e,n)=>{GN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>mj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wO(e,n){return new SO({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():L1(n)}})}const EO=W("ZodPrefault",(e,n)=>{XN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>pj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function _O(e,n){return new EO({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():L1(n)}})}const oS=W("ZodNonOptional",(e,n)=>{KN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>hj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function CO(e,n){return new oS({type:"nonoptional",innerType:e,...we(n)})}const kO=W("ZodCatch",(e,n)=>{JN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>gj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function TO(e,n){return new kO({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const AO=W("ZodPipe",(e,n)=>{WN.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>yj(e,i,a,o),e.in=n.in,e.out=n.out});function hx(e,n){return new AO({type:"pipe",in:e,out:n})}const NO=W("ZodReadonly",(e,n)=>{ez.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>vj(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function zO(e){return new NO({type:"readonly",innerType:e})}const jO=W("ZodCustom",(e,n)=>{tz.init(e,n),Et.init(e,n),e._zod.processJSONSchema=(i,a,o)=>aj(e,i)});function OO(e,n={}){return Yz(jO,e,n)}function RO(e){return Gz(e)}function sS(e){return jz(Vm,e)}const DO={FEISHU:"feishu",SLACK:"slack",KAEL:"kael"},uS=Bn(["feishu","slack","kael"]),cS=Bn(["active","inactive"]);Pe({platform:uS,agentId:K().min(1),credentials:rr(K(),Pt()),status:cS.default("active")});Pe({agentId:K().min(1).optional(),credentials:rr(K(),Pt()).optional(),status:cS.optional()});Pe({id:bs(),platform:K(),agentId:K(),hasCredentials:Qm(),status:K(),createdAt:K(),updatedAt:K()});const MO=Bn(["code","reverse_token","oauth","manual"]);Pe({appId:K().min(1),appSecret:K().min(1)});Pe({platform:uS,externalUserId:K().min(1),agentId:K().min(1),boundVia:MO.default("manual"),displayName:K().max(200).optional()});Pe({id:bs(),platform:K(),externalUserId:K(),agentId:K(),boundVia:K().nullable(),displayName:K().nullable(),createdAt:K()});Pe({feishuUserId:K().min(1),displayName:K().max(200).optional()});Pe({configId:bs(),platform:K(),agentId:K(),appId:K(),connected:Qm(),lastActiveAt:K().nullable()});Pe({username:K().min(1),password:K().min(1)});Pe({accessToken:K(),refreshToken:K()});Pe({refreshToken:K().min(1)});const UO={SUPER_ADMIN:"super_admin",ADMIN:"admin"},Gm=Bn(["super_admin","admin"]);Pe({id:K(),username:K(),role:Gm,createdAt:K(),lastLoginAt:K().nullable()});Pe({username:K().min(1).max(100),password:K().min(8).max(200),role:Gm.default("admin")});Pe({role:Gm.optional(),password:K().min(8).max(200).optional()});const fS=Bn(["online","offline"]);Pe({agentId:K(),status:fS,connectedAt:K().nullable(),lastSeenAt:K()});const dS={HUMAN:"human",PERSONAL_ASSISTANT:"personal_assistant",AUTONOMOUS_AGENT:"autonomous_agent"},qc=Bn(["human","personal_assistant","autonomous_agent"]);Bn(["active","suspended"]);Pe({name:K().min(1).max(100).regex(/^[a-z0-9_-]+$/,"Only lowercase alphanumeric, hyphens, and underscores").optional(),type:qc,displayName:K().max(200).optional(),delegateMention:K().max(100).optional(),profile:K().optional(),organizationId:K().max(100).optional(),metadata:rr(K(),Pt()).optional()});Pe({type:qc.optional(),displayName:K().max(200).nullable().optional(),delegateMention:K().max(100).nullable().optional(),profile:K().nullable().optional(),metadata:rr(K(),Pt()).optional()});Pe({uuid:K(),name:K().nullable(),organizationId:K(),type:qc,displayName:K().nullable(),delegateMention:K().nullable(),profile:K().nullable(),inboxId:K(),status:K(),metadata:rr(K(),Pt()),presenceStatus:fS.optional(),createdAt:K(),updatedAt:K()});Pe({name:K().max(100).optional(),type:qc.optional(),displayName:K().max(200).optional(),delegateMention:K().max(100).optional(),profile:K().optional(),metadata:rr(K(),Pt()).optional()});Pe({exists:Qm(),status:Bn(["active","suspended"]).nullable()});Pe({repo:K().nullable(),branch:K().nullable()});Pe({name:K().max(100).optional(),expiresAt:K().datetime().optional()});const LO=Pe({id:K(),agentId:K(),name:K().nullable(),expiresAt:K().nullable(),revokedAt:K().nullable(),createdAt:K(),lastUsedAt:K().nullable()});LO.extend({token:K()});const BO=Bn(["direct","group","thread"]);Pe({type:BO,topic:K().max(500).optional(),participantIds:Ym(K()).min(1),metadata:rr(K(),Pt()).optional()});const IO=Pe({agentId:K(),role:K(),mode:K(),joinedAt:K()}),qO=Pe({id:K(),organizationId:K(),type:K(),topic:K().nullable(),lifecyclePolicy:K().nullable().optional(),metadata:rr(K(),Pt()),createdAt:K(),updatedAt:K()});qO.extend({participants:Ym(IO)});Pe({agentId:K().min(1),mode:Bn(["full","mention_only"]).default("full")});Pe({agentId:K().min(1)});Pe({limit:sS().int().min(1).max(100).default(20),cursor:K().optional()});const hS=Bn(["text","markdown","card","reference","file"]);Pe({format:hS.default("text"),content:Pt(),metadata:rr(K(),Pt()).optional(),inReplyTo:K().optional(),replyToInbox:K().optional(),replyToChat:K().optional()});Pe({format:hS.default("text"),content:Pt(),metadata:rr(K(),Pt()).optional(),replyToInbox:K().optional(),replyToChat:K().optional()});const HO=Pe({id:K(),chatId:K(),senderId:K(),format:K(),content:Pt(),metadata:rr(K(),Pt()),replyToInbox:K().nullable(),replyToChat:K().nullable(),inReplyTo:K().nullable(),createdAt:K()});Bn(["pending","delivered","acked","failed"]);const ZO=Pe({id:bs(),inboxId:K(),messageId:K(),chatId:K().nullable(),status:K(),retryCount:bs(),createdAt:K(),deliveredAt:K().nullable(),ackedAt:K().nullable()});ZO.extend({message:HO});Pe({limit:sS().int().min(1).max(50).default(10)});Pe({key:K(),value:Pt(),updatedAt:K()});rr(K(),Pt());const Wr={INBOX_TIMEOUT_SECONDS:"inbox_timeout_seconds",MAX_RETRY_COUNT:"max_retry_count",POLLING_INTERVAL_SECONDS:"polling_interval_seconds",PRESENCE_CLEANUP_SECONDS:"presence_cleanup_seconds"},xh={[Wr.INBOX_TIMEOUT_SECONDS]:300,[Wr.MAX_RETRY_COUNT]:3,[Wr.POLLING_INTERVAL_SECONDS]:5,[Wr.PRESENCE_CLEANUP_SECONDS]:60};function PO(){return nt.get("/admin/users")}function FO(e){return nt.post("/admin/users",e)}function $O(e,n){return nt.patch(`/admin/users/${encodeURIComponent(e)}`,n)}function VO(e){return nt.delete(`/admin/users/${encodeURIComponent(e)}`)}const mx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,px=v1,mS=(e,n)=>i=>{var a;if((n==null?void 0:n.variants)==null)return px(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 S=mx(g)||mx(v);return o[m][S]}),d=i&&Object.entries(i).reduce((m,g)=>{let[v,S]=g;return S===void 0||(m[v]=S),m},{}),p=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((m,g)=>{let{class:v,className:S,...x}=g;return Object.entries(x).every(z=>{let[_,A]=z;return Array.isArray(A)?A.includes({...u,...d}[_]):{...u,...d}[_]===A})?[...m,v,S]:m},[]);return px(e,c,p,i==null?void 0:i.class,i==null?void 0:i.className)},QO=mS("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 Ut({className:e,variant:n,...i}){return y.jsx("div",{className:st(QO({variant:n}),e),...i})}function gx(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Xm(...e){return n=>{let i=!1;const a=e.map(o=>{const u=gx(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():gx(e[o],null)}}}}function Ua(...e){return w.useCallback(Xm(...e),e)}var YO=Symbol.for("react.lazy"),Ac=wm[" use ".trim().toString()];function GO(e){return typeof e=="object"&&e!==null&&"then"in e}function pS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===YO&&"_payload"in e&&GO(e._payload)}function gS(e){const n=KO(e),i=w.forwardRef((a,o)=>{let{children:u,...c}=a;pS(u)&&typeof Ac=="function"&&(u=Ac(u._payload));const d=w.Children.toArray(u),p=d.find(WO);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 XO=gS("Slot");function KO(e){const n=w.forwardRef((i,a)=>{let{children:o,...u}=i;if(pS(o)&&typeof Ac=="function"&&(o=Ac(o._payload)),w.isValidElement(o)){const c=tR(o),d=eR(u,o.props);return o.type!==w.Fragment&&(d.ref=a?Xm(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 JO=Symbol("radix.slottable");function WO(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JO}function eR(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 tR(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 nR=mS("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?XO:"button";return y.jsx(c,{className:st(nR({variant:n,size:i,className:e})),ref:u,...o})});$e.displayName="Button";function Gi(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 rR(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 iR(e,n=[]){let i=[];function a(u,c){const d=w.createContext(c),p=i.length;i=[...i,c];const m=v=>{var N;const{scope:S,children:x,...z}=v,_=((N=S==null?void 0:S[e])==null?void 0:N[p])||d,A=w.useMemo(()=>z,Object.values(z));return y.jsx(_.Provider,{value:A,children:x})};m.displayName=u+"Provider";function g(v,S){var _;const x=((_=S==null?void 0:S[e])==null?void 0:_[p])||d,z=w.useContext(x);if(z)return z;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,aR(o,...n)]}function aR(...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:()=>{},lR=wm[" useId ".trim().toString()]||(()=>{}),oR=0;function Sh(e){const[n,i]=w.useState(lR());return xs(()=>{i(a=>a??String(oR++))},[e]),e||(n?`radix-${n}`:"")}var sR=wm[" useInsertionEffect ".trim().toString()]||xs;function uR({prop:e,defaultProp:n,onChange:i=()=>{},caller:a}){const[o,u,c]=cR({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 S=fR(g)?g(e):g;S!==e&&((v=c.current)==null||v.call(c,S))}else u(g)},[d,e,u,c]);return[p,m]}function cR({defaultProp:e,onChange:n}){const[i,a]=w.useState(e),o=w.useRef(i),u=w.useRef(n);return sR(()=>{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 fR(e){return typeof e=="function"}var yS=A0();const dR=Oc(yS);function vS(e){const n=hR(e),i=w.forwardRef((a,o)=>{const{children:u,...c}=a,d=w.Children.toArray(u),p=d.find(pR);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 hR(e){const n=w.forwardRef((i,a)=>{const{children:o,...u}=i;if(w.isValidElement(o)){const c=yR(o),d=gR(u,o.props);return o.type!==w.Fragment&&(d.ref=a?Xm(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 mR=Symbol("radix.slottable");function pR(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mR}function gR(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 yR(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 vR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],li=vR.reduce((e,n)=>{const i=vS(`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 bR(e,n){e&&yS.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 xR(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 SR="DismissableLayer",sm="dismissableLayer.update",wR="dismissableLayer.pointerDownOutside",ER="dismissableLayer.focusOutside",yx,bS=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xS=w.forwardRef((e,n)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...p}=e,m=w.useContext(bS),[g,v]=w.useState(null),S=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=w.useState({}),z=Ua(n,Q=>v(Q)),_=Array.from(m.layers),[A]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=_.indexOf(A),q=g?_.indexOf(g):-1,M=m.layersWithOutsidePointerEventsDisabled.size>0,B=q>=N,F=kR(Q=>{const V=Q.target,re=[...m.branches].some(he=>he.contains(V));!B||re||(o==null||o(Q),c==null||c(Q),Q.defaultPrevented||d==null||d())},S),T=TR(Q=>{const V=Q.target;[...m.branches].some(he=>he.contains(V))||(u==null||u(Q),c==null||c(Q),Q.defaultPrevented||d==null||d())},S);return xR(Q=>{q===m.layers.size-1&&(a==null||a(Q),!Q.defaultPrevented&&d&&(Q.preventDefault(),d()))},S),w.useEffect(()=>{if(g)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(yx=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),vx(),()=>{i&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=yx)}},[g,S,i,m]),w.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),vx())},[g,m]),w.useEffect(()=>{const Q=()=>x({});return document.addEventListener(sm,Q),()=>document.removeEventListener(sm,Q)},[]),y.jsx(li.div,{...p,ref:z,style:{pointerEvents:M?B?"auto":"none":void 0,...e.style},onFocusCapture:Gi(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Gi(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Gi(e.onPointerDownCapture,F.onPointerDownCapture)})});xS.displayName=SR;var _R="DismissableLayerBranch",CR=w.forwardRef((e,n)=>{const i=w.useContext(bS),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(li.div,{...e,ref:o})});CR.displayName=_R;function kR(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(){SS(wR,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 TR(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&&SS(ER,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 vx(){const e=new CustomEvent(sm);document.dispatchEvent(e)}function SS(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?bR(o,u):o.dispatchEvent(u)}var wh="focusScope.autoFocusOnMount",Eh="focusScope.autoFocusOnUnmount",bx={bubbles:!1,cancelable:!0},AR="FocusScope",wS=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),S=Ua(n,_=>p(_)),x=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(a){let _=function(M){if(x.paused||!d)return;const B=M.target;d.contains(B)?v.current=B:Bi(v.current,{select:!0})},A=function(M){if(x.paused||!d)return;const B=M.relatedTarget;B!==null&&(d.contains(B)||Bi(v.current,{select:!0}))},N=function(M){if(document.activeElement===document.body)for(const F of M)F.removedNodes.length>0&&Bi(d)};document.addEventListener("focusin",_),document.addEventListener("focusout",A);const q=new MutationObserver(N);return d&&q.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",A),q.disconnect()}}},[a,d,x.paused]),w.useEffect(()=>{if(d){Sx.add(x);const _=document.activeElement;if(!d.contains(_)){const N=new CustomEvent(wh,bx);d.addEventListener(wh,m),d.dispatchEvent(N),N.defaultPrevented||(NR(DR(ES(d)),{select:!0}),document.activeElement===_&&Bi(d))}return()=>{d.removeEventListener(wh,m),setTimeout(()=>{const N=new CustomEvent(Eh,bx);d.addEventListener(Eh,g),d.dispatchEvent(N),N.defaultPrevented||Bi(_??document.body,{select:!0}),d.removeEventListener(Eh,g),Sx.remove(x)},0)}}},[d,m,g,x]);const z=w.useCallback(_=>{if(!i&&!a||x.paused)return;const A=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,N=document.activeElement;if(A&&N){const q=_.currentTarget,[M,B]=zR(q);M&&B?!_.shiftKey&&N===B?(_.preventDefault(),i&&Bi(M,{select:!0})):_.shiftKey&&N===M&&(_.preventDefault(),i&&Bi(B,{select:!0})):N===q&&_.preventDefault()}},[i,a,x.paused]);return y.jsx(li.div,{tabIndex:-1,...c,ref:S,onKeyDown:z})});wS.displayName=AR;function NR(e,{select:n=!1}={}){const i=document.activeElement;for(const a of e)if(Bi(a,{select:n}),document.activeElement!==i)return}function zR(e){const n=ES(e),i=xx(n,e),a=xx(n.reverse(),e);return[i,a]}function ES(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 xx(e,n){for(const i of e)if(!jR(i,{upTo:n}))return i}function jR(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 OR(e){return e instanceof HTMLInputElement&&"select"in e}function Bi(e,{select:n=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&OR(e)&&n&&e.select()}}var Sx=RR();function RR(){let e=[];return{add(n){const i=e[0];n!==i&&(i==null||i.pause()),e=wx(e,n),e.unshift(n)},remove(n){var i;e=wx(e,n),(i=e[0])==null||i.resume()}}}function wx(e,n){const i=[...e],a=i.indexOf(n);return a!==-1&&i.splice(a,1),i}function DR(e){return e.filter(n=>n.tagName!=="A")}var MR="Portal",_S=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?dR.createPortal(y.jsx(li.div,{...a,ref:n}),c):null});_S.displayName=MR;function UR(e,n){return w.useReducer((i,a)=>n[i][a]??i,e)}var Hc=e=>{const{present:n,children:i}=e,a=LR(n),o=typeof i=="function"?i({present:a.isPresent}):w.Children.only(i),u=Ua(a.ref,BR(o));return typeof i=="function"||a.isPresent?w.cloneElement(o,{ref:u}):null};Hc.displayName="Presence";function LR(e){const[n,i]=w.useState(),a=w.useRef(null),o=w.useRef(e),u=w.useRef("none"),c=e?"mounted":"unmounted",[d,p]=UR(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 S=u.current,x=ic(m);e?p("MOUNT"):x==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(g&&S!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,p]),xs(()=>{if(n){let m;const g=n.ownerDocument.defaultView??window,v=x=>{const _=ic(a.current).includes(CSS.escape(x.animationName));if(x.target===n&&_&&(p("ANIMATION_END"),!o.current)){const A=n.style.animationFillMode;n.style.animationFillMode="forwards",m=g.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=A)})}},S=x=>{x.target===n&&(u.current=ic(a.current))};return n.addEventListener("animationstart",S),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{g.clearTimeout(m),n.removeEventListener("animationstart",S),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 BR(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 _h=0;function IR(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ex()),document.body.insertAdjacentElement("beforeend",e[1]??Ex()),_h++,()=>{_h===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),_h--}},[])}function Ex(){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 Sr=function(){return Sr=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},Sr.apply(this,arguments)};function CS(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 qR(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",HR="with-scroll-bars-hidden",ZR="--removed-body-scroll-bar-size";function Ch(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function PR(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 FR=typeof window<"u"?w.useLayoutEffect:w.useEffect,_x=new WeakMap;function $R(e,n){var i=PR(null,function(a){return e.forEach(function(o){return Ch(o,a)})});return FR(function(){var a=_x.get(i);if(a){var o=new Set(a),u=new Set(e),c=i.current;o.forEach(function(d){u.has(d)||Ch(d,null)}),u.forEach(function(d){o.has(d)||Ch(d,c)})}_x.set(i,e)},[e]),i}function VR(e){return e}function QR(e,n){n===void 0&&(n=VR);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 YR(e){e===void 0&&(e={});var n=QR(null);return n.options=Sr({async:!0,ssr:!1},e),n}var kS=function(e){var n=e.sideCar,i=CS(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,Sr({},i))};kS.isSideCarExport=!0;function GR(e,n){return e.useMedium(n),kS}var TS=YR(),kh=function(){},Zc=w.forwardRef(function(e,n){var i=w.useRef(null),a=w.useState({onScrollCapture:kh,onWheelCapture:kh,onTouchMoveCapture:kh}),o=a[0],u=a[1],c=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,g=e.enabled,v=e.shards,S=e.sideCar,x=e.noRelative,z=e.noIsolation,_=e.inert,A=e.allowPinchZoom,N=e.as,q=N===void 0?"div":N,M=e.gapMode,B=CS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=S,T=$R([i,n]),Q=Sr(Sr({},B),o);return w.createElement(w.Fragment,null,g&&w.createElement(F,{sideCar:TS,removeScrollBar:m,shards:v,noRelative:x,noIsolation:z,inert:_,setCallbacks:u,allowPinchZoom:!!A,lockRef:i,gapMode:M}),c?w.cloneElement(w.Children.only(d),Sr(Sr({},Q),{ref:T})):w.createElement(q,Sr({},Q,{className:p,ref:T}),d))});Zc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zc.classNames={fullWidth:yc,zeroRight:gc};var XR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=XR();return n&&e.setAttribute("nonce",n),e}function JR(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function WR(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var eD=function(){var e=0,n=null;return{add:function(i){e==0&&(n=KR())&&(JR(n,i),WR(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},tD=function(){var e=eD();return function(n,i){w.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&i])}},AS=function(){var e=tD(),n=function(i){var a=i.styles,o=i.dynamic;return e(a,o),null};return n},nD={left:0,top:0,right:0,gap:0},Th=function(e){return parseInt(e||"",10)||0},rD=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[Th(i),Th(a),Th(o)]},iD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return nD;var n=rD(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])}},aD=AS(),Dl="data-scroll-locked",lD=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(HR,` {
|
|
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(ZR,": ").concat(d,`px;
|
|
259
|
+
}
|
|
260
|
+
`)},Cx=function(){var e=parseInt(document.body.getAttribute(Dl)||"0",10);return isFinite(e)?e:0},oD=function(){w.useEffect(function(){return document.body.setAttribute(Dl,(Cx()+1).toString()),function(){var e=Cx()-1;e<=0?document.body.removeAttribute(Dl):document.body.setAttribute(Dl,e.toString())}},[])},sD=function(e){var n=e.noRelative,i=e.noImportant,a=e.gapMode,o=a===void 0?"margin":a;oD();var u=w.useMemo(function(){return iD(o)},[o]);return w.createElement(aD,{styles:lD(u,!n,o,i?"":"!important")})},um=!1;if(typeof window<"u")try{var ac=Object.defineProperty({},"passive",{get:function(){return um=!0,!0}});window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{um=!1}var Cl=um?{passive:!1}:!1,uD=function(e){return e.tagName==="TEXTAREA"},NS=function(e,n){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[n]!=="hidden"&&!(i.overflowY===i.overflowX&&!uD(e)&&i[n]==="visible")},cD=function(e){return NS(e,"overflowY")},fD=function(e){return NS(e,"overflowX")},kx=function(e,n){var i=n.ownerDocument,a=n;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var o=zS(e,a);if(o){var u=jS(e,a),c=u[1],d=u[2];if(c>d)return!0}a=a.parentNode}while(a&&a!==i.body);return!1},dD=function(e){var n=e.scrollTop,i=e.scrollHeight,a=e.clientHeight;return[n,i,a]},hD=function(e){var n=e.scrollLeft,i=e.scrollWidth,a=e.clientWidth;return[n,i,a]},zS=function(e,n){return e==="v"?cD(n):fD(n)},jS=function(e,n){return e==="v"?dD(n):hD(n)},mD=function(e,n){return e==="h"&&n==="rtl"?-1:1},pD=function(e,n,i,a,o){var u=mD(e,window.getComputedStyle(n).direction),c=u*a,d=i.target,p=n.contains(d),m=!1,g=c>0,v=0,S=0;do{if(!d)break;var x=jS(e,d),z=x[0],_=x[1],A=x[2],N=_-A-u*z;(z||N)&&zS(e,d)&&(v+=N,S+=z);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(S)<1)&&(m=!0),m},lc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tx=function(e){return[e.deltaX,e.deltaY]},Ax=function(e){return e&&"current"in e?e.current:e},gD=function(e,n){return e[0]===n[0]&&e[1]===n[1]},yD=function(e){return`
|
|
261
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
262
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
263
|
+
`)},vD=0,kl=[];function bD(e){var n=w.useRef([]),i=w.useRef([0,0]),a=w.useRef(),o=w.useState(vD++)[0],u=w.useState(AS)[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 _=qR([e.lockRef.current],(e.shards||[]).map(Ax),!0).filter(Boolean);return _.forEach(function(A){return A.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var d=w.useCallback(function(_,A){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!c.current.allowPinchZoom;var N=lc(_),q=i.current,M="deltaX"in _?_.deltaX:q[0]-N[0],B="deltaY"in _?_.deltaY:q[1]-N[1],F,T=_.target,Q=Math.abs(M)>Math.abs(B)?"h":"v";if("touches"in _&&Q==="h"&&T.type==="range")return!1;var V=window.getSelection(),re=V&&V.anchorNode,he=re?re===T||re.contains(T):!1;if(he)return!1;var ae=kx(Q,T);if(!ae)return!0;if(ae?F=Q:(F=Q==="v"?"h":"v",ae=kx(Q,T)),!ae)return!1;if(!a.current&&"changedTouches"in _&&(M||B)&&(a.current=F),!F)return!0;var le=a.current||F;return pD(le,A,_,le==="h"?M:B)},[]),p=w.useCallback(function(_){var A=_;if(!(!kl.length||kl[kl.length-1]!==u)){var N="deltaY"in A?Tx(A):lc(A),q=n.current.filter(function(F){return F.name===A.type&&(F.target===A.target||A.target===F.shadowParent)&&gD(F.delta,N)})[0];if(q&&q.should){A.cancelable&&A.preventDefault();return}if(!q){var M=(c.current.shards||[]).map(Ax).filter(Boolean).filter(function(F){return F.contains(A.target)}),B=M.length>0?d(A,M[0]):!c.current.noIsolation;B&&A.cancelable&&A.preventDefault()}}},[]),m=w.useCallback(function(_,A,N,q){var M={name:_,delta:A,target:N,should:q,shadowParent:xD(N)};n.current.push(M),setTimeout(function(){n.current=n.current.filter(function(B){return B!==M})},1)},[]),g=w.useCallback(function(_){i.current=lc(_),a.current=void 0},[]),v=w.useCallback(function(_){m(_.type,Tx(_),_.target,d(_,e.lockRef.current))},[]),S=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:S}),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 x=e.removeScrollBar,z=e.inert;return w.createElement(w.Fragment,null,z?w.createElement(u,{styles:yD(o)}):null,x?w.createElement(sD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xD(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const SD=GR(TS,bD);var OS=w.forwardRef(function(e,n){return w.createElement(Zc,Sr({},e,{ref:n,sideCar:SD}))});OS.classNames=Zc.classNames;var wD=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={},Ah=0,RS=function(e){return e&&(e.host||RS(e.parentNode))},ED=function(e,n){return n.map(function(i){if(e.contains(i))return i;var a=RS(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})},_D=function(e,n,i,a){var o=ED(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(S){if(d.has(S))g(S);else try{var x=S.getAttribute(a),z=x!==null&&x!=="false",_=(Tl.get(S)||0)+1,A=(u.get(S)||0)+1;Tl.set(S,_),u.set(S,A),c.push(S),_===1&&z&&oc.set(S,!0),A===1&&S.setAttribute(i,"true"),z||S.setAttribute(a,"true")}catch(N){console.error("aria-hidden: cannot operate on ",S,N)}})};return g(n),d.clear(),Ah++,function(){c.forEach(function(v){var S=Tl.get(v)-1,x=u.get(v)-1;Tl.set(v,S),u.set(v,x),S||(oc.has(v)||v.removeAttribute(a),oc.delete(v)),x||v.removeAttribute(i)}),Ah--,Ah||(Tl=new WeakMap,Tl=new WeakMap,oc=new WeakMap,sc={})}},CD=function(e,n,i){i===void 0&&(i="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=wD(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),_D(a,o,i,"aria-hidden")):function(){return null}},Pc="Dialog",[DS]=iR(Pc),[kD,fr]=DS(Pc),MS=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]=uR({prop:a,defaultProp:o??!1,onChange:u,caller:Pc});return y.jsx(kD,{scope:n,triggerRef:d,contentRef:p,contentId:Sh(),titleId:Sh(),descriptionId:Sh(),open:m,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(v=>!v),[g]),modal:c,children:i})};MS.displayName=Pc;var US="DialogTrigger",LS=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(US,i),u=Ua(n,o.triggerRef);return y.jsx(li.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wm(o.open),...a,ref:u,onClick:Gi(e.onClick,o.onOpenToggle)})});LS.displayName=US;var Km="DialogPortal",[TD,BS]=DS(Km,{forceMount:void 0}),IS=e=>{const{__scopeDialog:n,forceMount:i,children:a,container:o}=e,u=fr(Km,n);return y.jsx(TD,{scope:n,forceMount:i,children:w.Children.map(a,c=>y.jsx(Hc,{present:i||u.open,children:y.jsx(_S,{asChild:!0,container:o,children:c})}))})};IS.displayName=Km;var Nc="DialogOverlay",qS=w.forwardRef((e,n)=>{const i=BS(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(ND,{...o,ref:n})}):null});qS.displayName=Nc;var AD=vS("DialogOverlay.RemoveScroll"),ND=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(Nc,i);return y.jsx(OS,{as:AD,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(li.div,{"data-state":Wm(o.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),Ra="DialogContent",HS=w.forwardRef((e,n)=>{const i=BS(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(zD,{...o,ref:n}):y.jsx(jD,{...o,ref:n})})});HS.displayName=Ra;var zD=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 CD(u)},[]),y.jsx(ZS,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gi(e.onCloseAutoFocus,u=>{var c;u.preventDefault(),(c=i.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Gi(e.onPointerDownOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&u.preventDefault()}),onFocusOutside:Gi(e.onFocusOutside,u=>u.preventDefault())})}),jD=w.forwardRef((e,n)=>{const i=fr(Ra,e.__scopeDialog),a=w.useRef(!1),o=w.useRef(!1);return y.jsx(ZS,{...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()}})}),ZS=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 IR(),y.jsxs(y.Fragment,{children:[y.jsx(wS,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:u,children:y.jsx(xS,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Wm(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(OD,{titleId:d.titleId}),y.jsx(DD,{contentRef:p,descriptionId:d.descriptionId})]})]})}),Jm="DialogTitle",PS=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(Jm,i);return y.jsx(li.h2,{id:o.titleId,...a,ref:n})});PS.displayName=Jm;var FS="DialogDescription",$S=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(FS,i);return y.jsx(li.p,{id:o.descriptionId,...a,ref:n})});$S.displayName=FS;var VS="DialogClose",QS=w.forwardRef((e,n)=>{const{__scopeDialog:i,...a}=e,o=fr(VS,i);return y.jsx(li.button,{type:"button",...a,ref:n,onClick:Gi(e.onClick,()=>o.onOpenChange(!1))})});QS.displayName=VS;function Wm(e){return e?"open":"closed"}var YS="DialogTitleWarning",[rL,GS]=rR(YS,{contentName:Ra,titleName:Jm,docsSlug:"dialog"}),OD=({titleId:e})=>{const n=GS(YS),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},RD="DialogDescriptionWarning",DD=({contentRef:e,descriptionId:n})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${GS(RD).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},MD=MS,UD=LS,LD=IS,BD=qS,ID=HS,qD=PS,HD=$S,ZD=QS;const cs=MD,PD=UD,FD=LD,XS=w.forwardRef(({className:e,...n},i)=>y.jsx(BD,{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}));XS.displayName="DialogOverlay";const Ml=w.forwardRef(({className:e,children:n,...i},a)=>y.jsxs(FD,{children:[y.jsx(XS,{}),y.jsxs(ID,{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(ZD,{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(sT,{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(qD,{ref:i,className:st("text-lg font-semibold leading-none tracking-tight",e),...n}));Ul.displayName="DialogTitle";const $D=w.forwardRef(({className:e,...n},i)=>y.jsx(HD,{ref:i,className:st("text-sm text-muted-foreground",e),...n}));$D.displayName="DialogDescription";const Gt=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}));Gt.displayName="Input";var VD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],QD=VD.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}},{}),YD="Label",KS=w.forwardRef((e,n)=>y.jsx(QD.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())}}));KS.displayName=YD;var GD=KS;const St=w.forwardRef(({className:e,...n},i)=>y.jsx(GD,{ref:i,className:st("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...n}));St.displayName="Label";const ei=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})}));ei.displayName="Table";const ti=w.forwardRef(({className:e,...n},i)=>y.jsx("thead",{ref:i,className:st("[&_tr]:border-b",e),...n}));ti.displayName="TableHeader";const ni=w.forwardRef(({className:e,...n},i)=>y.jsx("tbody",{ref:i,className:st("[&_tr:last-child]:border-0",e),...n}));ni.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 Te=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}));Te.displayName="TableHead";const ve=w.forwardRef(({className:e,...n},i)=>y.jsx("td",{ref:i,className:st("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n}));ve.displayName="TableCell";const XD=Object.values(UO);function KD(){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}=Xt({queryKey:["admin-users"],queryFn:PO}),S=Zt({mutationFn:()=>FO({username:d.username,password:d.password,role:d.role}),onSuccess:()=>{e.invalidateQueries({queryKey:["admin-users"]}),_()}}),x=Zt({mutationFn:()=>{if(!u)throw new Error("No user selected");const T={};return a==="edit"&&(T.role=d.role),a==="reset-password"&&(T.password=d.password),$O(u,T)},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-users"]}),_()}}),z=Zt({mutationFn:VO,onSuccess:()=>e.invalidateQueries({queryKey:["admin-users"]})});function _(){i(!1),o("create"),c(null),p({username:"",password:"",role:"admin"})}function A(T){c(T.id),o("edit"),p({username:"",password:"",role:T.role}),i(!0)}function N(T){c(T),o("reset-password"),p({username:"",password:"",role:"admin"}),i(!0)}function q(T){T.preventDefault(),a==="create"?S.mutate():x.mutate()}function M(T){window.confirm("Delete this admin user?")&&z.mutate(T)}const B=S.error??x.error,F=S.isPending||x.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:T=>T?i(!0):_(),children:[y.jsx(PD,{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(St,{htmlFor:"admin-username",children:"Username"}),y.jsx(Gt,{id:"admin-username",value:d.username,onChange:T=>p({...d,username:T.target.value}),required:!0})]}),(a==="create"||a==="reset-password")&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"admin-password",children:"Password"}),y.jsx(Gt,{id:"admin-password",type:"password",autoComplete:"new-password",value:d.password,onChange:T=>p({...d,password:T.target.value}),required:!0,minLength:8})]}),(a==="create"||a==="edit")&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"admin-role",children:"Role"}),y.jsx("select",{id:"admin-role",value:d.role,onChange:T=>p({...d,role:T.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:XD.map(T=>y.jsx("option",{value:T,children:T},T))})]}),B instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:B.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:F,children:F?"Saving...":"Save"})})]})]})]})]}),y.jsx("div",{className:"border rounded-lg",children:y.jsxs(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Username"}),y.jsx(Te,{children:"Role"}),y.jsx(Te,{children:"Created"}),y.jsx(Te,{children:"Last Login"}),y.jsx(Te,{className:"w-32"})]})}),y.jsx(ni,{children:g?y.jsx(Ve,{children:y.jsx(ve,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):v?y.jsx(Ve,{children:y.jsxs(ve,{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(ve,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"No admin users"})}):m==null?void 0:m.map(T=>y.jsxs(Ve,{children:[y.jsx(ve,{className:"font-medium",children:T.username}),y.jsx(ve,{children:y.jsx(Ut,{variant:T.role==="super_admin"?"default":"secondary",children:T.role})}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(T.createdAt)}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(T.lastLoginAt)}),y.jsx(ve,{children:y.jsxs("div",{className:"flex gap-1",children:[y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>A(T),title:"Edit role",children:y.jsx(pc,{className:"h-4 w-4"})}),y.jsx($e,{variant:"ghost",size:"sm",onClick:()=>N(T.id),title:"Reset password",children:"Reset PW"}),T.role!=="super_admin"&&y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>M(T.id),disabled:z.isPending,title:"Delete",children:y.jsx(ss,{className:"h-4 w-4"})})]})})]},T.id))})]})})]})}function JD(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const WD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,t4={};function Nx(e,n){return(t4.jsx?e4:WD).test(e)}const n4=/[ \t\n\f\r]/g;function r4(e){return typeof e=="object"?e.type==="text"?zx(e.value):!1:zx(e)}function zx(e){return e.replace(n4,"")===""}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 JS(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 cm(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 i4=0;const De=La(),zt=La(),fm=La(),ie=La(),ut=La(),Ll=La(),jn=La();function La(){return 2**++i4}const dm=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:zt,commaOrSpaceSeparated:jn,commaSeparated:Ll,number:ie,overloadedBoolean:fm,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Nh=Object.keys(dm);class ep extends Sn{constructor(n,i,a,o){let u=-1;if(super(n,i),jx(this,"space",o),typeof a=="number")for(;++u<Nh.length;){const c=Nh[u];jx(this,Nh[u],(a&dm[c])===dm[c])}}}ep.prototype.defined=!0;function jx(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 ep(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),n[a]=u,i[cm(a)]=a,i[cm(u.attribute)]=a}return new js(n,i,e.space)}const WS=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 ew(e,n){return n in e?e[n]:n}function tw(e,n){return ew(e,n.toLowerCase())}const a4=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:De,allowPaymentRequest:De,allowUserMedia:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:ut,autoFocus:De,autoPlay:De,blocking:ut,capture:null,charSet:null,checked:De,cite:null,className:ut,cols:ie,colSpan:null,content:null,contentEditable:zt,controls:De,controlsList:ut,coords:ie|Ll,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:fm,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:ut,height:ie,hidden:fm,high:ie,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:ut,itemRef:ut,itemScope:De,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,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:De,optimum:ie,pattern:null,ping:ut,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:ut,required:De,reversed:De,rows:ie,rowSpan:ie,sandbox:ut,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootDelegatesFocus:De,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:De,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:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:De,noHref:De,noShade:De,noWrap:De,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:De,disableRemotePlayback:De,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:tw}),l4=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:jn,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:De,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:jn,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:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,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:jn,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:jn,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:jn,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:ew}),nw=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()}}),rw=io({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tw}),iw=io({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),o4={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"},s4=/[A-Z]/g,Ox=/-[a-z]/g,u4=/^data[-\w.:]+$/i;function c4(e,n){const i=cm(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"&&u4.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(Ox,d4);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!Ox.test(u)){let c=u.replace(s4,f4);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=ep}return new o(a,n)}function f4(e){return"-"+e.toLowerCase()}function d4(e){return e.charAt(1).toUpperCase()}const h4=JS([WS,a4,nw,rw,iw],"html"),tp=JS([WS,l4,nw,rw,iw],"svg");function m4(e){return e.join(" ").trim()}var Al={},zh,Rx;function p4(){if(Rx)return zh;Rx=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="",S="comment",x="declaration";function z(A,N){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];N=N||{};var q=1,M=1;function B(ce){var te=ce.match(n);te&&(q+=te.length);var I=ce.lastIndexOf(p);M=~I?ce.length-I:M+ce.length}function F(){var ce={line:q,column:M};return function(te){return te.position=new T(ce),re(),te}}function T(ce){this.start=ce,this.end={line:q,column:M},this.source=N.source}T.prototype.content=A;function Q(ce){var te=new Error(N.source+":"+q+":"+M+": "+ce);if(te.reason=ce,te.filename=N.source,te.line=q,te.column=M,te.source=A,!N.silent)throw te}function V(ce){var te=ce.exec(A);if(te){var I=te[0];return B(I),A=A.slice(I.length),te}}function re(){V(i)}function he(ce){var te;for(ce=ce||[];te=ae();)te!==!1&&ce.push(te);return ce}function ae(){var ce=F();if(!(m!=A.charAt(0)||g!=A.charAt(1))){for(var te=2;v!=A.charAt(te)&&(g!=A.charAt(te)||m!=A.charAt(te+1));)++te;if(te+=2,v===A.charAt(te-1))return Q("End of comment missing");var I=A.slice(2,te-2);return M+=2,B(I),A=A.slice(te),M+=2,ce({type:S,comment:I})}}function le(){var ce=F(),te=V(a);if(te){if(ae(),!V(o))return Q("property missing ':'");var I=V(u),ne=ce({type:x,property:_(te[0].replace(e,v)),value:I?_(I[0].replace(e,v)):v});return V(c),ne}}function Ce(){var ce=[];he(ce);for(var te;te=le();)te!==!1&&(ce.push(te),he(ce));return ce}return re(),Ce()}function _(A){return A?A.replace(d,v):v}return zh=z,zh}var Dx;function g4(){if(Dx)return Al;Dx=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(p4());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={},Mx;function y4(){if(Mx)return rs;Mx=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,Ux;function v4(){if(Ux)return is;Ux=1;var e=is&&is.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(g4()),i=y4();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 b4=v4();const x4=Oc(b4),aw=lw("end"),np=lw("start");function lw(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 S4(e){const n=np(e),i=aw(e);if(n&&i)return{start:n,end:i}}function ds(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lx(e.position):"start"in e||"end"in e?Lx(e):"line"in e||"column"in e?hm(e):""}function hm(e){return Bx(e&&e.line)+":"+Bx(e&&e.column)}function Lx(e){return hm(e&&e.start)+"-"+hm(e&&e.end)}function Bx(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 rp={}.hasOwnProperty,w4=new Map,E4=/[A-Z]/g,_4=new Set(["table","tbody","thead","tfoot","tr"]),C4=new Set(["td","th"]),ow="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function k4(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=D4(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=R4(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"?tp:h4,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},u=sw(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function sw(e,n,i){if(n.type==="element")return T4(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return A4(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return z4(e,n,i);if(n.type==="mdxjsEsm")return N4(e,n);if(n.type==="root")return j4(e,n,i);if(n.type==="text")return O4(e,n)}function T4(e,n,i){const a=e.schema;let o=a;n.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=tp,e.schema=o),e.ancestors.push(n);const u=cw(e,n.tagName,!1),c=M4(e,n);let d=ap(e,n);return _4.has(n.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!r4(p):!0})),uw(e,c,u,n),ip(c,d),e.ancestors.pop(),e.schema=a,e.create(n,u,c,i)}function A4(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 N4(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);ws(e,n.position)}function z4(e,n,i){const a=e.schema;let o=a;n.name==="svg"&&a.space==="html"&&(o=tp,e.schema=o),e.ancestors.push(n);const u=n.name===null?e.Fragment:cw(e,n.name,!0),c=U4(e,n),d=ap(e,n);return uw(e,c,u,n),ip(c,d),e.ancestors.pop(),e.schema=a,e.create(n,u,c,i)}function j4(e,n,i){const a={};return ip(a,ap(e,n)),e.create(n,e.Fragment,a,i)}function O4(e,n){return n.value}function uw(e,n,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=a)}function ip(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function R4(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 D4(e,n){return i;function i(a,o,u,c){const d=Array.isArray(u.children),p=np(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 M4(e,n){const i={};let a,o;for(o in n.properties)if(o!=="children"&&rp.call(n.properties,o)){const u=L4(e,o,n.properties[o]);if(u){const[c,d]=u;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&C4.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 U4(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 ap(e,n){const i=[];let a=-1;const o=e.passKeys?new Map:w4;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=sw(e,u,c);d!==void 0&&i.push(d)}return i}function L4(e,n,i){const a=c4(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?JD(i):m4(i)),a.property==="style"){let o=typeof i=="object"?i:B4(e,String(i));return e.stylePropertyNameCase==="css"&&(o=I4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?o4[a.property]||a.property:a.attribute,i]}}function B4(e,n){try{return x4(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=ow+"#cannot-parse-style-attribute",o}}function cw(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=Nx(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=Nx(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(a.type==="Literal"){const o=a.value;return rp.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=ow+"#cannot-handle-mdx-estrees-without-createevaluater",i}function I4(e){const n={};let i;for(i in e)rp.call(e,i)&&(n[q4(i)]=e[i]);return n}function q4(e){let n=e.replace(E4,H4);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function H4(e){return"-"+e.toLowerCase()}const jh={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"]},Z4={};function P4(e,n){const i=Z4,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return fw(e,a,o)}function fw(e,n,i){if(F4(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 Ix(e.children,n,i)}return Array.isArray(e)?Ix(e,n,i):""}function Ix(e,n,i){const a=[];let o=-1;for(;++o<e.length;)a[o]=fw(e[o],n,i);return a.join("")}function F4(e){return!!(e&&typeof e=="object")}const qx=document.createElement("i");function lp(e){const n="&"+e+";";qx.innerHTML=n;const i=qx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function _r(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 Jn(e,n){return e.length>0?(_r(e,e.length,0,n),e):n}const Hx={}.hasOwnProperty;function $4(e){const n={};let i=-1;for(;++i<e.length;)V4(n,e[i]);return n}function V4(e,n){let i;for(i in n){const o=(Hx.call(e,i)?e[i]:void 0)||(e[i]={}),u=n[i];let c;if(u)for(c in u){Hx.call(o,c)||(o[c]=[]);const d=u[c];Q4(o[c],Array.isArray(d)?d:d?[d]:[])}}}function Q4(e,n){let i=-1;const a=[];for(;++i<n.length;)(n[i].add==="after"?e:a).push(n[i]);_r(e,0,0,a)}function dw(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 wr=ta(/[A-Za-z]/),Dn=ta(/[\dA-Za-z]/),Y4=ta(/[#-'*+\--9=?A-Z^-~]/);function mm(e){return e!==null&&(e<32||e===127)}const pm=ta(/\d/),G4=ta(/[\dA-Fa-f]/),X4=ta(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function bn(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const K4=ta(new RegExp("\\p{P}|\\p{S}","u")),J4=ta(/\s/);function ta(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&&Dn(e.charCodeAt(i+1))&&Dn(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 Ke(p)?(e.enter(i),d(p)):n(p)}function d(p){return Ke(p)&&u++<o?(e.consume(p),d):(e.exit(i),n(p))}}const W4={tokenize:eM};function eM(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 ke(d)?(e.consume(d),e.exit("chunkText"),u):(e.consume(d),c)}}const tM={tokenize:nM},Zx={tokenize:rM};function nM(e){const n=this,i=[];let a=0,o,u,c;return d;function d(M){if(a<i.length){const B=i[a];return n.containerState=B[1],e.attempt(B[0].continuation,p,m)(M)}return m(M)}function p(M){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&q();const B=n.events.length;let F=B,T;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){T=n.events[F][1].end;break}N(a);let Q=B;for(;Q<n.events.length;)n.events[Q][1].end={...T},Q++;return _r(n.events,F+1,0,n.events.slice(B)),n.events.length=Q,m(M)}return d(M)}function m(M){if(a===i.length){if(!o)return S(M);if(o.currentConstruct&&o.currentConstruct.concrete)return z(M);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Zx,g,v)(M)}function g(M){return o&&q(),N(a),S(M)}function v(M){return n.parser.lazy[n.now().line]=a!==i.length,c=n.now().offset,z(M)}function S(M){return n.containerState={},e.attempt(Zx,x,z)(M)}function x(M){return a++,i.push([n.currentConstruct,n.containerState]),S(M)}function z(M){if(M===null){o&&q(),N(0),e.consume(M);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),_(M)}function _(M){if(M===null){A(e.exit("chunkFlow"),!0),N(0),e.consume(M);return}return ke(M)?(e.consume(M),A(e.exit("chunkFlow")),a=0,n.interrupt=void 0,d):(e.consume(M),_)}function A(M,B){const F=n.sliceStream(M);if(B&&F.push(null),M.previous=u,u&&(u.next=M),u=M,o.defineSkip(M.start),o.write(F),n.parser.lazy[M.start.line]){let T=o.events.length;for(;T--;)if(o.events[T][1].start.offset<c&&(!o.events[T][1].end||o.events[T][1].end.offset>c))return;const Q=n.events.length;let V=Q,re,he;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(re){he=n.events[V][1].end;break}re=!0}for(N(a),T=Q;T<n.events.length;)n.events[T][1].end={...he},T++;_r(n.events,V+1,0,n.events.slice(Q)),n.events.length=T}}function N(M){let B=i.length;for(;B-- >M;){const F=i[B];n.containerState=F[1],F[0].exit.call(n,e)}i.length=M}function q(){o.write([null]),u=void 0,o=void 0,n.containerState._closeFlow=void 0}}function rM(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 Px(e){if(e===null||bn(e)||J4(e))return 1;if(K4(e))return 2}function op(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 gm={name:"attention",resolveAll:iM,tokenize:aM};function iM(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},S={...e[i][1].start};Fx(v,-p),Fx(S,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:S},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=Jn(m,[["enter",e[a][1],n],["exit",e[a][1],n]])),m=Jn(m,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",u,n]]),m=Jn(m,op(n.parser.constructs.insideSpan.null,e.slice(a+1,i),n)),m=Jn(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=Jn(m,[["enter",e[i][1],n],["exit",e[i][1],n]])):g=0,_r(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 aM(e,n){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,o=Px(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=Px(p),v=!g||g===2&&o||i.includes(p),S=!o||o===2&&g||i.includes(a);return m._open=!!(u===42?v:v&&(o||!S)),m._close=!!(u===42?S:S&&(g||!v)),n(p)}}function Fx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const lM={name:"autolink",tokenize:oM};function oM(e,n,i){let a=0;return o;function o(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return wr(x)?(e.consume(x),c):x===64?i(x):m(x)}function c(x){return x===43||x===45||x===46||Dn(x)?(a=1,d(x)):m(x)}function d(x){return x===58?(e.consume(x),a=0,p):(x===43||x===45||x===46||Dn(x))&&a++<32?(e.consume(x),d):(a=0,m(x))}function p(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),n):x===null||x===32||x===60||mm(x)?i(x):(e.consume(x),p)}function m(x){return x===64?(e.consume(x),g):Y4(x)?(e.consume(x),m):i(x)}function g(x){return Dn(x)?v(x):i(x)}function v(x){return x===46?(e.consume(x),a=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),n):S(x)}function S(x){if((x===45||Dn(x))&&a++<63){const z=x===45?S:v;return e.consume(x),z}return i(x)}}const Fc={partial:!0,tokenize:sM};function sM(e,n,i){return a;function a(u){return Ke(u)?ct(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||ke(u)?n(u):i(u)}}const hw={continuation:{tokenize:cM},exit:fM,name:"blockQuote",tokenize:uM};function uM(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 Ke(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function cM(e,n,i){const a=this;return o;function o(c){return Ke(c)?ct(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(hw,n,i)(c)}}function fM(e){e.exit("blockQuote")}const mw={name:"characterEscape",tokenize:dM};function dM(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 X4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(u)}}const pw={name:"characterReference",tokenize:hM};function hM(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=Dn,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=G4,g):(e.enter("characterReferenceValue"),u=7,c=pm,g(v))}function g(v){if(v===59&&o){const S=e.exit("characterReferenceValue");return c===Dn&&!lp(a.sliceSerialize(S))?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 $x={partial:!0,tokenize:pM},Vx={concrete:!0,name:"codeFenced",tokenize:mM};function mM(e,n,i){const a=this,o={partial:!0,tokenize:F};let u=0,c=0,d;return p;function p(T){return m(T)}function m(T){const Q=a.events[a.events.length-1];return u=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,d=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(T)}function g(T){return T===d?(c++,e.consume(T),g):c<3?i(T):(e.exit("codeFencedFenceSequence"),Ke(T)?ct(e,v,"whitespace")(T):v(T))}function v(T){return T===null||ke(T)?(e.exit("codeFencedFence"),a.interrupt?n(T):e.check($x,_,B)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),S(T))}function S(T){return T===null||ke(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),v(T)):Ke(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,x,"whitespace")(T)):T===96&&T===d?i(T):(e.consume(T),S)}function x(T){return T===null||ke(T)?v(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),z(T))}function z(T){return T===null||ke(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(T)):T===96&&T===d?i(T):(e.consume(T),z)}function _(T){return e.attempt(o,B,A)(T)}function A(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),N}function N(T){return u>0&&Ke(T)?ct(e,q,"linePrefix",u+1)(T):q(T)}function q(T){return T===null||ke(T)?e.check($x,_,B)(T):(e.enter("codeFlowValue"),M(T))}function M(T){return T===null||ke(T)?(e.exit("codeFlowValue"),q(T)):(e.consume(T),M)}function B(T){return e.exit("codeFenced"),n(T)}function F(T,Q,V){let re=0;return he;function he(te){return T.enter("lineEnding"),T.consume(te),T.exit("lineEnding"),ae}function ae(te){return T.enter("codeFencedFence"),Ke(te)?ct(T,le,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):le(te)}function le(te){return te===d?(T.enter("codeFencedFenceSequence"),Ce(te)):V(te)}function Ce(te){return te===d?(re++,T.consume(te),Ce):re>=c?(T.exit("codeFencedFenceSequence"),Ke(te)?ct(T,ce,"whitespace")(te):ce(te)):V(te)}function ce(te){return te===null||ke(te)?(T.exit("codeFencedFence"),Q(te)):V(te)}}}function pM(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 Oh={name:"codeIndented",tokenize:yM},gM={partial:!0,tokenize:vM};function yM(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):ke(m)?e.attempt(gM,c,p)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||ke(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function p(m){return e.exit("codeIndented"),n(m)}}function vM(e,n,i){const a=this;return o;function o(c){return a.parser.lazy[a.now().line]?i(c):ke(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):ke(c)?o(c):i(c)}}const bM={name:"codeText",previous:SM,resolve:xM,tokenize:wM};function xM(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 SM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wM(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)):ke(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||ke(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 EM{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 gw(e){const n={};let i=-1,a,o,u,c,d,p,m;const g=new EM(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,_M(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 _r(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function _M(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,S=-1,x=i,z=0,_=0;const A=[_];for(;x;){for(;e.get(++o)[1]!==x;);u.push(o),x._tokenizer||(g=a.sliceStream(x),x.next||g.push(null),v&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),v=x,x=x.next}for(x=i;++S<d.length;)d[S][0]==="exit"&&d[S-1][0]==="enter"&&d[S][1].type===d[S-1][1].type&&d[S][1].start.line!==d[S][1].end.line&&(_=S+1,A.push(_),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):A.pop(),S=A.length;S--;){const N=d.slice(A[S],A[S+1]),q=u.pop();p.push([q,q+N.length-1]),e.splice(q,2,N)}for(p.reverse(),S=-1;++S<p.length;)m[z+p[S][0]]=z+p[S][1],z+=p[S][1]-p[S][0]-1;return m}const CM={resolve:TM,tokenize:AM},kM={partial:!0,tokenize:NM};function TM(e){return gw(e),e}function AM(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):ke(d)?e.check(kM,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 NM(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||ke(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 yw(e,n,i,a,o,u,c,d,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return v;function v(N){return N===60?(e.enter(a),e.enter(o),e.enter(u),e.consume(N),e.exit(u),S):N===null||N===32||N===41||mm(N)?i(N):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),_(N))}function S(N){return N===62?(e.enter(u),e.consume(N),e.exit(u),e.exit(o),e.exit(a),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(N))}function x(N){return N===62?(e.exit("chunkString"),e.exit(d),S(N)):N===null||N===60||ke(N)?i(N):(e.consume(N),N===92?z:x)}function z(N){return N===60||N===62||N===92?(e.consume(N),x):x(N)}function _(N){return!g&&(N===null||N===41||bn(N))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),n(N)):g<m&&N===40?(e.consume(N),g++,_):N===41?(e.consume(N),g--,_):N===null||N===32||N===40||mm(N)?i(N):(e.consume(N),N===92?A:_)}function A(N){return N===40||N===41||N===92?(e.consume(N),_):_(N)}}function vw(e,n,i,a,o,u){const c=this;let d=0,p;return m;function m(x){return e.enter(a),e.enter(o),e.consume(x),e.exit(o),e.enter(u),g}function g(x){return d>999||x===null||x===91||x===93&&!p||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(u),e.enter(o),e.consume(x),e.exit(o),e.exit(a),n):ke(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),v(x))}function v(x){return x===null||x===91||x===93||ke(x)||d++>999?(e.exit("chunkString"),g(x)):(e.consume(x),p||(p=!Ke(x)),x===92?S:v)}function S(x){return x===91||x===92||x===93?(e.consume(x),d++,v):v(x)}}function bw(e,n,i,a,o,u){let c;return d;function d(S){return S===34||S===39||S===40?(e.enter(a),e.enter(o),e.consume(S),e.exit(o),c=S===40?41:S,p):i(S)}function p(S){return S===c?(e.enter(o),e.consume(S),e.exit(o),e.exit(a),n):(e.enter(u),m(S))}function m(S){return S===c?(e.exit(u),p(c)):S===null?i(S):ke(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),ct(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===c||S===null||ke(S)?(e.exit("chunkString"),m(S)):(e.consume(S),S===92?v:g)}function v(S){return S===c||S===92?(e.consume(S),g):g(S)}}function hs(e,n){let i;return a;function a(o){return ke(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,a):Ke(o)?ct(e,a,i?"linePrefix":"lineSuffix")(o):n(o)}}const zM={name:"definition",tokenize:OM},jM={partial:!0,tokenize:RM};function OM(e,n,i){const a=this;let o;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return vw.call(a,e,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return o=Bl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),p):i(x)}function p(x){return bn(x)?hs(e,m)(x):m(x)}function m(x){return yw(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(jM,v,v)(x)}function v(x){return Ke(x)?ct(e,S,"whitespace")(x):S(x)}function S(x){return x===null||ke(x)?(e.exit("definition"),a.parser.defined.push(o),n(x)):i(x)}}function RM(e,n,i){return a;function a(d){return bn(d)?hs(e,o)(d):i(d)}function o(d){return bw(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return Ke(d)?ct(e,c,"whitespace")(d):c(d)}function c(d){return d===null||ke(d)?n(d):i(d)}}const DM={name:"hardBreakEscape",tokenize:MM};function MM(e,n,i){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return ke(u)?(e.exit("hardBreakEscape"),n(u)):i(u)}}const UM={name:"headingAtx",resolve:LM,tokenize:BM};function LM(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"},_r(e,a,i-a+1,[["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n]])),e}function BM(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||ke(g)?(e.exit("atxHeading"),n(g)):Ke(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 IM=["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"],Qx=["pre","script","style","textarea"],qM={concrete:!0,name:"htmlFlow",resolveTo:PM,tokenize:FM},HM={partial:!0,tokenize:VM},ZM={partial:!0,tokenize:$M};function PM(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 FM(e,n,i){const a=this;let o,u,c,d,p;return m;function m(C){return g(C)}function g(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),v}function v(C){return C===33?(e.consume(C),S):C===47?(e.consume(C),u=!0,_):C===63?(e.consume(C),o=3,a.interrupt?n:k):wr(C)?(e.consume(C),c=String.fromCharCode(C),A):i(C)}function S(C){return C===45?(e.consume(C),o=2,x):C===91?(e.consume(C),o=5,d=0,z):wr(C)?(e.consume(C),o=4,a.interrupt?n:k):i(C)}function x(C){return C===45?(e.consume(C),a.interrupt?n:k):i(C)}function z(C){const oe="CDATA[";return C===oe.charCodeAt(d++)?(e.consume(C),d===oe.length?a.interrupt?n:le:z):i(C)}function _(C){return wr(C)?(e.consume(C),c=String.fromCharCode(C),A):i(C)}function A(C){if(C===null||C===47||C===62||bn(C)){const oe=C===47,de=c.toLowerCase();return!oe&&!u&&Qx.includes(de)?(o=1,a.interrupt?n(C):le(C)):IM.includes(c.toLowerCase())?(o=6,oe?(e.consume(C),N):a.interrupt?n(C):le(C)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(C):u?q(C):M(C))}return C===45||Dn(C)?(e.consume(C),c+=String.fromCharCode(C),A):i(C)}function N(C){return C===62?(e.consume(C),a.interrupt?n:le):i(C)}function q(C){return Ke(C)?(e.consume(C),q):he(C)}function M(C){return C===47?(e.consume(C),he):C===58||C===95||wr(C)?(e.consume(C),B):Ke(C)?(e.consume(C),M):he(C)}function B(C){return C===45||C===46||C===58||C===95||Dn(C)?(e.consume(C),B):F(C)}function F(C){return C===61?(e.consume(C),T):Ke(C)?(e.consume(C),F):M(C)}function T(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),p=C,Q):Ke(C)?(e.consume(C),T):V(C)}function Q(C){return C===p?(e.consume(C),p=null,re):C===null||ke(C)?i(C):(e.consume(C),Q)}function V(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||bn(C)?F(C):(e.consume(C),V)}function re(C){return C===47||C===62||Ke(C)?M(C):i(C)}function he(C){return C===62?(e.consume(C),ae):i(C)}function ae(C){return C===null||ke(C)?le(C):Ke(C)?(e.consume(C),ae):i(C)}function le(C){return C===45&&o===2?(e.consume(C),I):C===60&&o===1?(e.consume(C),ne):C===62&&o===4?(e.consume(C),R):C===63&&o===3?(e.consume(C),k):C===93&&o===5?(e.consume(C),Ae):ke(C)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(HM,Y,Ce)(C)):C===null||ke(C)?(e.exit("htmlFlowData"),Ce(C)):(e.consume(C),le)}function Ce(C){return e.check(ZM,ce,Y)(C)}function ce(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),te}function te(C){return C===null||ke(C)?Ce(C):(e.enter("htmlFlowData"),le(C))}function I(C){return C===45?(e.consume(C),k):le(C)}function ne(C){return C===47?(e.consume(C),c="",me):le(C)}function me(C){if(C===62){const oe=c.toLowerCase();return Qx.includes(oe)?(e.consume(C),R):le(C)}return wr(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),me):le(C)}function Ae(C){return C===93?(e.consume(C),k):le(C)}function k(C){return C===62?(e.consume(C),R):C===45&&o===2?(e.consume(C),k):le(C)}function R(C){return C===null||ke(C)?(e.exit("htmlFlowData"),Y(C)):(e.consume(C),R)}function Y(C){return e.exit("htmlFlow"),n(C)}}function $M(e,n,i){const a=this;return o;function o(c){return ke(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 VM(e,n,i){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Fc,n,i)}}const QM={name:"htmlText",tokenize:YM};function YM(e,n,i){const a=this;let o,u,c;return d;function d(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),p}function p(k){return k===33?(e.consume(k),m):k===47?(e.consume(k),F):k===63?(e.consume(k),M):wr(k)?(e.consume(k),V):i(k)}function m(k){return k===45?(e.consume(k),g):k===91?(e.consume(k),u=0,z):wr(k)?(e.consume(k),q):i(k)}function g(k){return k===45?(e.consume(k),x):i(k)}function v(k){return k===null?i(k):k===45?(e.consume(k),S):ke(k)?(c=v,ne(k)):(e.consume(k),v)}function S(k){return k===45?(e.consume(k),x):v(k)}function x(k){return k===62?I(k):k===45?S(k):v(k)}function z(k){const R="CDATA[";return k===R.charCodeAt(u++)?(e.consume(k),u===R.length?_:z):i(k)}function _(k){return k===null?i(k):k===93?(e.consume(k),A):ke(k)?(c=_,ne(k)):(e.consume(k),_)}function A(k){return k===93?(e.consume(k),N):_(k)}function N(k){return k===62?I(k):k===93?(e.consume(k),N):_(k)}function q(k){return k===null||k===62?I(k):ke(k)?(c=q,ne(k)):(e.consume(k),q)}function M(k){return k===null?i(k):k===63?(e.consume(k),B):ke(k)?(c=M,ne(k)):(e.consume(k),M)}function B(k){return k===62?I(k):M(k)}function F(k){return wr(k)?(e.consume(k),T):i(k)}function T(k){return k===45||Dn(k)?(e.consume(k),T):Q(k)}function Q(k){return ke(k)?(c=Q,ne(k)):Ke(k)?(e.consume(k),Q):I(k)}function V(k){return k===45||Dn(k)?(e.consume(k),V):k===47||k===62||bn(k)?re(k):i(k)}function re(k){return k===47?(e.consume(k),I):k===58||k===95||wr(k)?(e.consume(k),he):ke(k)?(c=re,ne(k)):Ke(k)?(e.consume(k),re):I(k)}function he(k){return k===45||k===46||k===58||k===95||Dn(k)?(e.consume(k),he):ae(k)}function ae(k){return k===61?(e.consume(k),le):ke(k)?(c=ae,ne(k)):Ke(k)?(e.consume(k),ae):re(k)}function le(k){return k===null||k===60||k===61||k===62||k===96?i(k):k===34||k===39?(e.consume(k),o=k,Ce):ke(k)?(c=le,ne(k)):Ke(k)?(e.consume(k),le):(e.consume(k),ce)}function Ce(k){return k===o?(e.consume(k),o=void 0,te):k===null?i(k):ke(k)?(c=Ce,ne(k)):(e.consume(k),Ce)}function ce(k){return k===null||k===34||k===39||k===60||k===61||k===96?i(k):k===47||k===62||bn(k)?re(k):(e.consume(k),ce)}function te(k){return k===47||k===62||bn(k)?re(k):i(k)}function I(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),n):i(k)}function ne(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),me}function me(k){return Ke(k)?ct(e,Ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):Ae(k)}function Ae(k){return e.enter("htmlTextData"),c(k)}}const sp={name:"labelEnd",resolveAll:JM,resolveTo:WM,tokenize:e3},GM={tokenize:t3},XM={tokenize:n3},KM={tokenize:r3};function JM(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&&_r(e,0,e.length,i),e}function WM(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=Jn(d,e.slice(u+1,u+a+3)),d=Jn(d,[["enter",g,n]]),d=Jn(d,op(n.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),n)),d=Jn(d,[["exit",g,n],e[c-2],e[c-1],["exit",m,n]]),d=Jn(d,e.slice(c+1)),d=Jn(d,[["exit",p,n]]),_r(e,u,e.length,d),e}function e3(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(S){return u?u._inactive?v(S):(c=a.parser.defined.includes(Bl(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(S),e.exit("labelMarker"),e.exit("labelEnd"),p):i(S)}function p(S){return S===40?e.attempt(GM,g,c?g:v)(S):S===91?e.attempt(XM,g,c?m:v)(S):c?g(S):v(S)}function m(S){return e.attempt(KM,g,v)(S)}function g(S){return n(S)}function v(S){return u._balanced=!0,i(S)}}function t3(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):yw(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?bw(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 n3(e,n,i){const a=this;return o;function o(d){return vw.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 r3(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 i3={name:"labelStartImage",resolveAll:sp.resolveAll,tokenize:a3};function a3(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 l3={name:"labelStartLink",resolveAll:sp.resolveAll,tokenize:o3};function o3(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 Rh={name:"lineEnding",tokenize:s3};function s3(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:u3};function u3(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||ke(m))?(e.exit("thematicBreak"),n(m)):i(m)}function p(m){return m===o?(e.consume(m),a++,p):(e.exit("thematicBreakSequence"),Ke(m)?ct(e,d,"whitespace")(m):d(m))}}const gn={continuation:{tokenize:h3},exit:p3,name:"list",tokenize:d3},c3={partial:!0,tokenize:g3},f3={partial:!0,tokenize:m3};function d3(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(x){const z=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(z==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:pm(x)){if(a.containerState.type||(a.containerState.type=z,e.enter(z,{_container:!0})),z==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(vc,i,m)(x):m(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(x)}return i(x)}function p(x){return pm(x)&&++c<10?(e.consume(x),p):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),m(x)):i(x)}function m(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Fc,a.interrupt?i:g,e.attempt(c3,S,v))}function g(x){return a.containerState.initialBlankLine=!0,u++,S(x)}function v(x){return Ke(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),S):i(x)}function S(x){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(x)}}function h3(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||!Ke(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(f3,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 m3(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 p3(e){e.exit(this.containerState.type)}function g3(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!Ke(u)&&c&&c[1].type==="listItemPrefixWhitespace"?n(u):i(u)}}const Yx={name:"setextUnderline",resolveTo:y3,tokenize:v3};function y3(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 v3(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"),Ke(m)?ct(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||ke(m)?(e.exit("setextHeadingLine"),n(m)):i(m)}}const b3={tokenize:x3};function x3(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(CM,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 S3={resolveAll:Sw()},w3=xw("string"),E3=xw("text");function xw(e){return{resolveAll:Sw(e==="text"?_3: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 S=-1;if(v)for(;++S<v.length;){const x=v[S];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function Sw(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 _3(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 C3={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:hw},k3={91:zM},T3={[-2]:Oh,[-1]:Oh,32:Oh},A3={35:UM,42:vc,45:[Yx,vc],60:qM,61:Yx,95:vc,96:Vx,126:Vx},N3={38:pw,92:mw},z3={[-5]:Rh,[-4]:Rh,[-3]:Rh,33:i3,38:pw,42:gm,60:[lM,QM],91:l3,92:[DM,mw],93:sp,95:gm,96:bM},j3={null:[gm,S3]},O3={null:[42,95]},R3={null:[]},D3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:O3,contentInitial:k3,disable:R3,document:C3,flow:A3,flowInitial:T3,insideSpan:j3,string:N3,text:z3},Symbol.toStringTag,{value:"Module"}));function M3(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:Q(F),check:Q(T),consume:q,enter:M,exit:B,interrupt:Q(T,{interrupt:!0})},m={code:null,containerState:{},defineSkip:_,events:[],now:z,parser:e,previous:null,sliceSerialize:S,sliceStream:x,write:v};let g=n.tokenize.call(m,p);return n.resolveAll&&u.push(n),m;function v(ae){return c=Jn(c,ae),A(),c[c.length-1]!==null?[]:(V(n,0),m.events=op(u,m.events,m),m.events)}function S(ae,le){return L3(x(ae),le)}function x(ae){return U3(c,ae)}function z(){const{_bufferIndex:ae,_index:le,line:Ce,column:ce,offset:te}=a;return{_bufferIndex:ae,_index:le,line:Ce,column:ce,offset:te}}function _(ae){o[ae.line]=ae.column,he()}function A(){let ae;for(;a._index<c.length;){const le=c[a._index];if(typeof le=="string")for(ae=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ae&&a._bufferIndex<le.length;)N(le.charCodeAt(a._bufferIndex));else N(le)}}function N(ae){g=g(ae)}function q(ae){ke(ae)?(a.line++,a.column=1,a.offset+=ae===-3?2:1,he()):ae!==-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=ae}function M(ae,le){const Ce=le||{};return Ce.type=ae,Ce.start=z(),m.events.push(["enter",Ce,m]),d.push(Ce),Ce}function B(ae){const le=d.pop();return le.end=z(),m.events.push(["exit",le,m]),le}function F(ae,le){V(ae,le.from)}function T(ae,le){le.restore()}function Q(ae,le){return Ce;function Ce(ce,te,I){let ne,me,Ae,k;return Array.isArray(ce)?Y(ce):"tokenize"in ce?Y([ce]):R(ce);function R(ue){return Ne;function Ne(Fe){const se=Fe!==null&&ue[Fe],ft=Fe!==null&&ue.null,Ot=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return Y(Ot)(Fe)}}function Y(ue){return ne=ue,me=0,ue.length===0?I:C(ue[me])}function C(ue){return Ne;function Ne(Fe){return k=re(),Ae=ue,ue.partial||(m.currentConstruct=ue),ue.name&&m.parser.constructs.disable.null.includes(ue.name)?de():ue.tokenize.call(le?Object.assign(Object.create(m),le):m,p,oe,de)(Fe)}}function oe(ue){return ae(Ae,k),te}function de(ue){return k.restore(),++me<ne.length?C(ne[me]):I}}}function V(ae,le){ae.resolveAll&&!u.includes(ae)&&u.push(ae),ae.resolve&&_r(m.events,le,m.events.length-le,ae.resolve(m.events.slice(le),m)),ae.resolveTo&&(m.events=ae.resolveTo(m.events,m))}function re(){const ae=z(),le=m.previous,Ce=m.currentConstruct,ce=m.events.length,te=Array.from(d);return{from:ce,restore:I};function I(){a=ae,m.previous=le,m.currentConstruct=Ce,m.events.length=ce,d=te,he()}}function he(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function U3(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 L3(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 B3(e){const a={constructs:$4([D3,...(e||{}).extensions||[]]),content:o(W4),defined:[],document:o(tM),flow:o(b3),lazy:{},string:o(w3),text:o(E3)};return a;function o(u){return c;function c(d){return M3(a,u,d)}}}function I3(e){for(;!gw(e););return e}const Gx=/[\0\t\n\r]/g;function q3(){let e=1,n="",i=!0,a;return o;function o(u,c,d){const p=[];let m,g,v,S,x;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(Gx.lastIndex=v,m=Gx.exec(u),S=m&&m.index!==void 0?m.index:u.length,x=u.charCodeAt(S),!m){n=u.slice(v);break}if(x===10&&v===S&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),v<S&&(p.push(u.slice(v,S)),e+=S-v),x){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=S+1}return d&&(a&&p.push(-5),n&&p.push(n),p.push(null)),p}}const H3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Z3(e){return e.replace(H3,P3)}function P3(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return dw(i.slice(u?2:1),u?16:10)}return lp(i)||e}const ww={}.hasOwnProperty;function F3(e,n,i){return n&&typeof n=="object"&&(i=n,n=void 0),$3(i)(I3(B3(i).document().write(q3()(e,n,!0))))}function $3(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(wn),autolinkProtocol:re,autolinkEmail:re,atxHeading:u(oi),blockQuote:u(ft),characterEscape:re,characterReference:re,codeFenced:u(Ot),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Ot,c),codeText:u(In,c),codeTextData:re,data:re,codeFlowValue:re,definition:u(dr),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Jt),hardBreakEscape:u(Cr),hardBreakTrailing:u(Cr),htmlFlow:u(na,c),htmlFlowData:re,htmlText:u(na,c),htmlTextData:re,image:u(si),label:c,link:u(wn),listItem:u(Tr),listItemValue:S,listOrdered:u(kr,v),listUnordered:u(kr),paragraph:u(Ba),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(oi),strong:u(Ia),thematicBreak:u(qa)},exit:{atxHeading:p(),atxHeadingSequence:F,autolink:p(),autolinkEmail:se,autolinkProtocol:Fe,blockQuote:p(),characterEscapeValue:he,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ue,characterReference:Ne,codeFenced:p(A),codeFencedFence:_,codeFencedFenceInfo:x,codeFencedFenceMeta:z,codeFlowValue:he,codeIndented:p(N),codeText:p(te),codeTextData:he,data:he,definition:p(),definitionDestinationString:B,definitionLabelString:q,definitionTitleString:M,emphasis:p(),hardBreakEscape:p(le),hardBreakTrailing:p(le),htmlFlow:p(Ce),htmlFlowData:he,htmlText:p(ce),htmlTextData:he,image:p(ne),label:Ae,labelText:me,lineEnding:ae,link:p(I),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:oe,resourceDestinationString:k,resourceTitleString:R,resource:Y,setextHeading:p(V),setextHeadingLineSequence:Q,setextHeadingText:T,strong:p(),thematicBreak:p()}};Ew(n,(e||{}).mdastExtensions||[]);const i={};return a;function a(X){let U={type:"root",children:[]};const be={stack:[U],tokenStack:[],config:n,enter:d,exit:m,buffer:c,resume:g,data:i},Me=[];let Qe=-1;for(;++Qe<X.length;)if(X[Qe][1].type==="listOrdered"||X[Qe][1].type==="listUnordered")if(X[Qe][0]==="enter")Me.push(Qe);else{const En=Me.pop();Qe=o(X,En,Qe)}for(Qe=-1;++Qe<X.length;){const En=n[X[Qe][0]];ww.call(En,X[Qe][1].type)&&En[X[Qe][1].type].call(Object.assign({sliceSerialize:X[Qe][2].sliceSerialize},be),X[Qe][1])}if(be.tokenStack.length>0){const En=be.tokenStack[be.tokenStack.length-1];(En[1]||Xx).call(be,void 0,En[0])}for(U.position={start:Ui(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Ui(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},Qe=-1;++Qe<n.transforms.length;)U=n.transforms[Qe](U)||U;return U}function o(X,U,be){let Me=U-1,Qe=-1,En=!1,Ar,nn,Rt,sn;for(;++Me<=be;){const lt=X[Me];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?Qe++:Qe--,sn=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(Ar&&!sn&&!Qe&&!Rt&&(Rt=Me),sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:sn=void 0}if(!Qe&<[0]==="enter"&<[1].type==="listItemPrefix"||Qe===-1&<[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(Ar){let ui=Me;for(nn=void 0;ui--;){const ir=X[ui];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;nn&&(X[nn][1].type="lineEndingBlank",En=!0),ir[1].type="lineEnding",nn=ui}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}Rt&&(!nn||Rt<nn)&&(Ar._spread=!0),Ar.end=Object.assign({},nn?X[nn][1].start:lt[1].end),X.splice(nn||Me,0,["exit",Ar,lt[2]]),Me++,be++}if(lt[1].type==="listItemPrefix"){const ui={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};Ar=ui,X.splice(Me,0,["enter",ui,lt[2]]),Me++,be++,Rt=void 0,sn=!0}}}return X[U][1]._spread=En,be}function u(X,U){return be;function be(Me){d.call(this,X(Me),Me),U&&U.call(this,Me)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(X,U,be){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([U,be||void 0]),X.position={start:Ui(U.start),end:void 0}}function p(X){return U;function U(be){X&&X.call(this,be),m.call(this,be)}}function m(X,U){const be=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==X.type&&(U?U.call(this,X,Me[0]):(Me[1]||Xx).call(this,X,Me[0]));else throw new Error("Cannot close `"+X.type+"` ("+ds({start:X.start,end:X.end})+"): it’s not open");be.position.end=Ui(X.end)}function g(){return P4(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function S(X){if(this.data.expectingFirstListItemValue){const U=this.stack[this.stack.length-2];U.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function x(){const X=this.resume(),U=this.stack[this.stack.length-1];U.lang=X}function z(){const X=this.resume(),U=this.stack[this.stack.length-1];U.meta=X}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const X=this.resume(),U=this.stack[this.stack.length-1];U.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const X=this.resume(),U=this.stack[this.stack.length-1];U.value=X.replace(/(\r?\n|\r)$/g,"")}function q(X){const U=this.resume(),be=this.stack[this.stack.length-1];be.label=U,be.identifier=Bl(this.sliceSerialize(X)).toLowerCase()}function M(){const X=this.resume(),U=this.stack[this.stack.length-1];U.title=X}function B(){const X=this.resume(),U=this.stack[this.stack.length-1];U.url=X}function F(X){const U=this.stack[this.stack.length-1];if(!U.depth){const be=this.sliceSerialize(X).length;U.depth=be}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function Q(X){const U=this.stack[this.stack.length-1];U.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function re(X){const be=this.stack[this.stack.length-1].children;let Me=be[be.length-1];(!Me||Me.type!=="text")&&(Me=Bt(),Me.position={start:Ui(X.start),end:void 0},be.push(Me)),this.stack.push(Me)}function he(X){const U=this.stack.pop();U.value+=this.sliceSerialize(X),U.position.end=Ui(X.end)}function ae(X){const U=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=U.children[U.children.length-1];be.position.end=Ui(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(U.type)&&(re.call(this,X),he.call(this,X))}function le(){this.data.atHardBreak=!0}function Ce(){const X=this.resume(),U=this.stack[this.stack.length-1];U.value=X}function ce(){const X=this.resume(),U=this.stack[this.stack.length-1];U.value=X}function te(){const X=this.resume(),U=this.stack[this.stack.length-1];U.value=X}function I(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=U,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ne(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=U,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function me(X){const U=this.sliceSerialize(X),be=this.stack[this.stack.length-2];be.label=Z3(U),be.identifier=Bl(U).toLowerCase()}function Ae(){const X=this.stack[this.stack.length-1],U=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Me=X.children;be.children=Me}else be.alt=U}function k(){const X=this.resume(),U=this.stack[this.stack.length-1];U.url=X}function R(){const X=this.resume(),U=this.stack[this.stack.length-1];U.title=X}function Y(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function oe(X){const U=this.resume(),be=this.stack[this.stack.length-1];be.label=U,be.identifier=Bl(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function de(X){this.data.characterReferenceType=X.type}function ue(X){const U=this.sliceSerialize(X),be=this.data.characterReferenceType;let Me;be?(Me=dw(U,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=lp(U);const Qe=this.stack[this.stack.length-1];Qe.value+=Me}function Ne(X){const U=this.stack.pop();U.position.end=Ui(X.end)}function Fe(X){he.call(this,X);const U=this.stack[this.stack.length-1];U.url=this.sliceSerialize(X)}function se(X){he.call(this,X);const U=this.stack[this.stack.length-1];U.url="mailto:"+this.sliceSerialize(X)}function ft(){return{type:"blockquote",children:[]}}function Ot(){return{type:"code",lang:null,meta:null,value:""}}function In(){return{type:"inlineCode",value:""}}function dr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Jt(){return{type:"emphasis",children:[]}}function oi(){return{type:"heading",depth:0,children:[]}}function Cr(){return{type:"break"}}function na(){return{type:"html",value:""}}function si(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function kr(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Tr(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Ba(){return{type:"paragraph",children:[]}}function Ia(){return{type:"strong",children:[]}}function Bt(){return{type:"text",value:""}}function qa(){return{type:"thematicBreak"}}}function Ui(e){return{line:e.line,column:e.column,offset:e.offset}}function Ew(e,n){let i=-1;for(;++i<n.length;){const a=n[i];Array.isArray(a)?Ew(e,a):V3(e,a)}}function V3(e,n){let i;for(i in n)if(ww.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 Xx(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 Q3(e){const n=this;n.parser=i;function i(a){return F3(a,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Y3(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 G3(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
|
|
271
|
+
`}]}function X3(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 K3(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function J3(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function W3(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 e6(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 t6(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function _w(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 n6(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return _w(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 r6(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 i6(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 a6(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return _w(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 l6(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 o6(e,n,i){const a=e.all(n),o=i?s6(i):Cw(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 s6(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=Cw(i[a])}return n}function Cw(e){const n=e.spread;return n??e.children.length>1}function u6(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 c6(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function f6(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function d6(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function h6(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=np(n.children[1]),p=aw(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 m6(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],S={},x=c?c[p]:void 0;x&&(S.align=x);let z={type:"element",tagName:u,properties:S,children:[]};v&&(z.children=e.all(v),e.patch(v,z),z=e.applyData(v,z)),m.push(z)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(n,g),e.applyData(n,g)}function p6(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const Kx=9,Jx=32;function g6(e){const n=String(e),i=/\r?\n|\r/g;let a=i.exec(n),o=0;const u=[];for(;a;)u.push(Wx(n.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=i.exec(n);return u.push(Wx(n.slice(o),o>0,!1)),u.join("")}function Wx(e,n,i){let a=0,o=e.length;if(n){let u=e.codePointAt(a);for(;u===Kx||u===Jx;)a++,u=e.codePointAt(a)}if(i){let u=e.codePointAt(o-1);for(;u===Kx||u===Jx;)o--,u=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function y6(e,n){const i={type:"text",value:g6(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function v6(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const b6={blockquote:Y3,break:G3,code:X3,delete:K3,emphasis:J3,footnoteReference:W3,heading:e6,html:t6,imageReference:n6,image:r6,inlineCode:i6,linkReference:a6,link:l6,listItem:o6,list:u6,paragraph:c6,root:f6,strong:d6,table:h6,tableCell:p6,tableRow:m6,text:y6,thematicBreak:v6,toml:uc,yaml:uc,definition:uc,footnoteDefinition:uc};function uc(){}const kw=-1,$c=0,ms=1,zc=2,up=3,cp=4,fp=5,dp=6,Tw=7,Aw=8,e0=typeof self=="object"?self:globalThis,x6=(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 kw: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 up:return i(new Date(c),o);case cp:{const{source:d,flags:p}=c;return i(new RegExp(d,p),o)}case fp:{const d=i(new Map,o);for(const[p,m]of c)d.set(a(p),a(m));return d}case dp:{const d=i(new Set,o);for(const p of c)d.add(a(p));return d}case Tw:{const{name:d,message:p}=c;return i(new e0[d](p),o)}case Aw: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 e0[u](c),o)};return a},t0=e=>x6(new Map,e)(0),Nl="",{toString:S6}={},{keys:w6}=Object,ls=e=>{const n=typeof e;if(n!=="object"||!e)return[$c,n];const i=S6.call(e).slice(8,-1);switch(i){case"Array":return[ms,Nl];case"Object":return[zc,Nl];case"Date":return[up,Nl];case"RegExp":return[cp,Nl];case"Map":return[fp,Nl];case"Set":return[dp,Nl];case"DataView":return[ms,i]}return i.includes("Array")?[ms,i]:i.includes("Error")?[Tw,i]:[zc,i]},cc=([e,n])=>e===$c&&(n==="function"||n==="symbol"),E6=(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=Aw,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return o([kw],c)}return o([d,g],c)}case ms:{if(p){let S=c;return p==="DataView"?S=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(S=new Uint8Array(c)),o([p,[...S]],c)}const g=[],v=o([d,g],c);for(const S of c)g.push(u(S));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 S of w6(c))(e||!cc(ls(c[S])))&&g.push([u(S),u(c[S])]);return v}case up:return o([d,c.toISOString()],c);case cp:{const{source:g,flags:v}=c;return o([d,{source:g,flags:v}],c)}case fp:{const g=[],v=o([d,g],c);for(const[S,x]of c)(e||!(cc(ls(S))||cc(ls(x))))&&g.push([u(S),u(x)]);return v}case dp:{const g=[],v=o([d,g],c);for(const S of c)(e||!cc(ls(S)))&&g.push(u(S));return v}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return u},n0=(e,{json:n,lossy:i}={})=>{const a=[];return E6(!(n||i),!!n,new Map,a)(e),a},jc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?t0(n0(e,n)):structuredClone(e):(e,n)=>t0(n0(e,n));function _6(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 C6(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function k6(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||_6,a=e.options.footnoteBackLabel||C6,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(),S=ao(v.toLowerCase());let x=0;const z=[],_=e.footnoteCounts.get(v);for(;_!==void 0&&++x<=_;){z.length>0&&z.push({type:"text",value:" "});let q=typeof i=="string"?i:i(p,x);typeof q=="string"&&(q={type:"text",value:q}),z.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+S+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,x),className:["data-footnote-backref"]},children:Array.isArray(q)?q:[q]})}const A=g[g.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const q=A.children[A.children.length-1];q&&q.type==="text"?q.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...z)}else g.push(...z);const N={type:"element",tagName:"li",properties:{id:n+"fn-"+S},children:e.wrap(g,!0)};e.patch(m,N),d.push(N)}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 Nw=(function(e){if(e==null)return z6;if(typeof e=="function")return Vc(e);if(typeof e=="object")return Array.isArray(e)?T6(e):A6(e);if(typeof e=="string")return N6(e);throw new Error("Expected function, string, or object as test")});function T6(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=Nw(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 A6(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 N6(e){return Vc(n);function n(i){return i&&i.type===e}}function Vc(e){return n;function n(i,a,o){return!!(j6(i)&&e.call(this,i,typeof a=="number"?a:void 0,o||void 0))}}function z6(){return!0}function j6(e){return e!==null&&typeof e=="object"&&"type"in e}const zw=[],O6=!0,r0=!1,R6="skip";function D6(e,n,i,a){let o;typeof n=="function"&&typeof i!="function"?(a=i,i=n):o=n;const u=Nw(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 x=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return S;function S(){let x=zw,z,_,A;if((!n||u(p,m,g[g.length-1]||void 0))&&(x=M6(i(p,g)),x[0]===r0))return x;if("children"in p&&p.children){const N=p;if(N.children&&x[0]!==R6)for(_=(a?N.children.length:-1)+c,A=g.concat(N);_>-1&&_<N.children.length;){const q=N.children[_];if(z=d(q,_,A)(),z[0]===r0)return z;_=typeof z[1]=="number"?z[1]:_+c}}return x}}}function M6(e){return Array.isArray(e)?e:typeof e=="number"?[O6,e]:e==null?zw:[e]}function jw(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),D6(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 ym={}.hasOwnProperty,U6={};function L6(e,n){const i=n||U6,a=new Map,o=new Map,u=new Map,c={...b6,...i.handlers},d={all:m,applyData:I6,definitionById:a,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:B6,wrap:H6};return jw(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const v=g.type==="definition"?a:o,S=String(g.identifier).toUpperCase();v.has(S)||v.set(S,g)}}),d;function p(g,v){const S=g.type,x=d.handlers[S];if(ym.call(d.handlers,S)&&x)return x(d,g,v);if(d.options.passThrough&&d.options.passThrough.includes(S)){if("children"in g){const{children:_,...A}=g,N=jc(A);return N.children=d.all(g),N}return jc(g)}return(d.options.unknownHandler||q6)(d,g,v)}function m(g){const v=[];if("children"in g){const S=g.children;let x=-1;for(;++x<S.length;){const z=d.one(S[x],g);if(z){if(x&&S[x-1].type==="break"&&(!Array.isArray(z)&&z.type==="text"&&(z.value=i0(z.value)),!Array.isArray(z)&&z.type==="element")){const _=z.children[0];_&&_.type==="text"&&(_.value=i0(_.value))}Array.isArray(z)?v.push(...z):v.push(z)}}}return v}}function B6(e,n){e.position&&(n.position=S4(e))}function I6(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 q6(e,n){const i=n.data||{},a="value"in n&&!(ym.call(i,"hProperties")||ym.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 H6(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 i0(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function a0(e,n){const i=L6(e,n),a=i.one(e,void 0),o=k6(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 Z6(e,n){return e&&"run"in e?async function(i,a){const o=a0(i,{file:a,...n});await e.run(o,a)}:function(i,a){return a0(i,{file:a,...e||n})}}function l0(e){if(e)throw e}var Dh,o0;function P6(){if(o0)return Dh;o0=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 S;for(S in m);return typeof S>"u"||e.call(m,S)},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 Dh=function p(){var m,g,v,S,x,z,_=arguments[0],A=1,N=arguments.length,q=!1;for(typeof _=="boolean"&&(q=_,_=arguments[1]||{},A=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});A<N;++A)if(m=arguments[A],m!=null)for(g in m)v=d(_,g),S=d(m,g),_!==S&&(q&&S&&(u(S)||(x=o(S)))?(x?(x=!1,z=v&&o(v)?v:[]):z=v&&u(v)?v:{},c(_,{name:g,newValue:p(q,z,S)})):typeof S<"u"&&c(_,{name:g,newValue:S}));return _},Dh}var F6=P6();const Mh=Oc(F6);function vm(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 $6(){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?V6(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 V6(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 yr={basename:Q6,dirname:Y6,extname:G6,join:X6,sep:"/"};function Q6(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 Y6(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 G6(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 X6(...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?".":K6(i)}function K6(e){Os(e);const n=e.codePointAt(0)===47;let i=J6(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function J6(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 W6={cwd:eU};function eU(){return"/"}function bm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tU(e){if(typeof e=="string")e=new URL(e);else if(!bm(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 nU(e)}function nU(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 Uh=["history","path","basename","stem","extname","dirname"];class Ow{constructor(n){let i;n?bm(n)?i={path:n}:typeof n=="string"||rU(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":W6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Uh.length;){const u=Uh[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)Uh.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?yr.basename(this.path):void 0}set basename(n){Bh(n,"basename"),Lh(n,"basename"),this.path=yr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?yr.dirname(this.path):void 0}set dirname(n){s0(this.basename,"dirname"),this.path=yr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?yr.extname(this.path):void 0}set extname(n){if(Lh(n,"extname"),s0(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=yr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){bm(n)&&(n=tU(n)),Bh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?yr.basename(this.path,this.extname):void 0}set stem(n){Bh(n,"stem"),Lh(n,"stem"),this.path=yr.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 Lh(e,n){if(e&&e.includes(yr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+yr.sep+"`")}function Bh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function s0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function rU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iU=(function(e){const a=this.constructor.prototype,o=a[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),aU={}.hasOwnProperty;class hp extends iU{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=$6()}copy(){const n=new hp;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];n.use(...a)}return n.data(Mh(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(Hh("data",this.frozen),this.namespace[n]=i,this):aU.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Hh("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 Ih("parse",a),a(String(i),i)}process(n,i){const a=this;return this.freeze(),Ih("process",this.parser||this.Parser),qh("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,S){if(g||!v||!S)return m(g);const x=v,z=a.stringify(x,S);sU(z)?S.value=z:S.result=z,m(g,S)});function m(g,v){g||!v?c(g):u?u(v):i(void 0,v)}}}processSync(n){let i=!1,a;return this.freeze(),Ih("processSync",this.parser||this.Parser),qh("processSync",this.compiler||this.Compiler),this.process(n,o),c0("processSync","process",i),a;function o(u,c){i=!0,l0(u),a=c}}run(n,i,a){u0(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,S){const x=v||n;g?d(g):c?c(x):a(void 0,x,S)}}}runSync(n,i){let a=!1,o;return this.run(n,i,u),c0("runSync","run",a),o;function u(c,d){l0(c),o=d,a=!0}}stringify(n,i){this.freeze();const a=fc(i),o=this.compiler||this.Compiler;return qh("stringify",o),u0(n),o(n,a)}use(n,...i){const a=this.attachers,o=this.namespace;if(Hh("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=Mh(!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,S=-1;for(;++v<a.length;)if(a[v][0]===m){S=v;break}if(S===-1)a.push([m,...g]);else if(g.length>0){let[x,...z]=g;const _=a[S][1];vm(_)&&vm(x)&&(x=Mh(!0,_,x)),a[S]=[m,x,...z]}}}}const lU=new hp().freeze();function Ih(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Hh(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 u0(e){if(!vm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function c0(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function fc(e){return oU(e)?e:new Ow(e)}function oU(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function sU(e){return typeof e=="string"||uU(e)}function uU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cU="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",f0=[],d0={allowDangerousHtml:!0},fU=/^(https?|ircs?|mailto|xmpp)$/i,dU=[{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 hU(e){const n=mU(e),i=pU(e);return gU(n.runSync(n.parse(i),i),e)}function mU(e){const n=e.rehypePlugins||f0,i=e.remarkPlugins||f0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...d0}:d0;return lU().use(Q3).use(i).use(Z6,a).use(n)}function pU(e){const n=e.children||"",i=new Ow;return typeof n=="string"&&(i.value=n),i}function gU(e,n){const i=n.allowedElements,a=n.allowElement,o=n.components,u=n.disallowedElements,c=n.skipHtml,d=n.unwrapDisallowed,p=n.urlTransform||yU;for(const g of dU)Object.hasOwn(n,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+cU+g.id,void 0);return jw(e,m),k4(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function m(g,v,S){if(g.type==="raw"&&S&&typeof v=="number")return c?S.children.splice(v,1):S.children[v]={type:"text",value:g.value},v;if(g.type==="element"){let x;for(x in jh)if(Object.hasOwn(jh,x)&&Object.hasOwn(g.properties,x)){const z=g.properties[x],_=jh[x];(_===null||_.includes(g.tagName))&&(g.properties[x]=p(String(z||""),x,g))}}if(g.type==="element"){let x=i?!i.includes(g.tagName):u?u.includes(g.tagName):!1;if(!x&&a&&typeof v=="number"&&(x=!a(g,v,S)),x&&S&&typeof v=="number")return d&&g.children?S.children.splice(v,1,...g.children):S.children.splice(v,1),v}}}function yU(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||fU.test(e.slice(0,n))?e:""}function Rw(){return nt.get("/admin/adapter-mappings")}function vU(e){return nt.post("/admin/adapter-mappings",e)}function bU(e){return nt.delete(`/admin/adapter-mappings/${e}`)}function Dw(){return nt.get("/admin/adapters/status")}function Mw(){return nt.get("/admin/adapters")}function xU(e){return nt.post("/admin/adapters",e)}function SU(e,n){return nt.patch(`/admin/adapters/${e}`,n)}function wU(e){return nt.delete(`/admin/adapters/${e}`)}function mp(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 EU(e){return nt.get(`/admin/agents/${encodeURIComponent(e)}`)}function _U(e){return nt.post("/admin/agents",e)}function h0(e,n){return nt.patch(`/admin/agents/${encodeURIComponent(e)}`,n)}function CU(e){return nt.delete(`/admin/agents/${encodeURIComponent(e)}`)}function kU(e){return nt.post(`/admin/agents/${encodeURIComponent(e)}/suspend`,{})}function TU(e){return nt.post(`/admin/agents/${encodeURIComponent(e)}/reactivate`,{})}function AU(e){return nt.post(`/admin/agents/${encodeURIComponent(e)}/test`,{})}function NU(e){return nt.get(`/admin/agents/${encodeURIComponent(e)}/tokens`)}function m0(e,n){return nt.post(`/admin/agents/${encodeURIComponent(e)}/tokens`,n)}function zU(e,n){return nt.delete(`/admin/agents/${encodeURIComponent(e)}/tokens/${encodeURIComponent(n)}`)}const jU=Object.values(dS);function Uw(e){var B;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"),[S,x]=w.useState(""),[z,_]=w.useState(""),A=g==="human",N=Xt({queryKey:["agents-for-delegate"],queryFn:async()=>(await mp({limit:100})).items.filter(T=>T.type==="personal_assistant"&&T.status==="active"),enabled:n&&A});w.useEffect(()=>{n&&(d?(m(d.name??""),v(d.type),x(d.displayName??""),_(d.delegateMention??"")):(m(""),v("personal_assistant"),x(""),_("")))},[n,d]);const q=F=>{F.preventDefault(),a({name:c==="create"&&p?p:void 0,type:g,displayName:S||null,delegateMention:z||null})},M=c==="edit";return y.jsx(cs,{open:n,onOpenChange:i,children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:M?"Edit Agent":"New Agent"})}),y.jsxs("form",{onSubmit:q,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"agent-name",children:"Name"}),M?y.jsx(Gt,{id:"agent-name",value:p,disabled:!0,className:"font-mono"}):y.jsx(Gt,{id:"agent-name",value:p,onChange:F=>m(F.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(St,{htmlFor:"agent-type",children:"Type"}),y.jsx("select",{id:"agent-type",value:g,onChange:F=>{const T=F.target.value;v(T),T!=="human"&&_("")},disabled:M,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:jU.map(F=>y.jsx("option",{value:F,children:F},F))})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"agent-display-name",children:"Display Name"}),y.jsx(Gt,{id:"agent-display-name",value:S,onChange:F=>x(F.target.value),placeholder:"Optional",maxLength:200})]}),A&&y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"agent-delegate",children:"Delegate Mention"}),y.jsxs("select",{id:"agent-delegate",value:z,onChange:F=>_(F.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"}),(B=N.data)==null?void 0:B.map(F=>y.jsx("option",{value:F.uuid,children:F.displayName?`${F.displayName} (${F.name??F.uuid})`:F.name??F.uuid},F.uuid))]}),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...":M?"Save":"Create"})})]})]})})}const Mn=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}));Mn.displayName="Card";const Wn=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("flex flex-col space-y-1.5 p-6",e),...n}));Wn.displayName="CardHeader";const er=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("font-semibold leading-none tracking-tight",e),...n}));er.displayName="CardTitle";const Lw=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("text-sm text-muted-foreground",e),...n}));Lw.displayName="CardDescription";const Un=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("p-6 pt-0",e),...n}));Un.displayName="CardContent";const OU=w.forwardRef(({className:e,...n},i)=>y.jsx("div",{ref:i,className:st("flex items-center p-6 pt-0",e),...n}));OU.displayName="CardFooter";function Qc(){const{data:e}=Xt({queryKey:["agents","name-map"],queryFn:()=>mp({limit:100}),staleTime:3e4});return w.useMemo(()=>{const n=new Map;if(e!=null&&e.items)for(const i of e.items)n.set(i.uuid,i.name??i.displayName??i.uuid);return i=>i?n.get(i)??i:"—"},[e])}const RU=Object.values(DO);function DU(){var Ba,Ia,Bt,qa,X;const n=jk().uuid??"",i=Ns(),a=Wl(),o=Qc(),u=Xt({queryKey:["agent",n],queryFn:()=>EU(n),enabled:!!n}),c=Xt({queryKey:["tokens",n],queryFn:()=>NU(n),enabled:!!n&&u.isSuccess&&((Ba=u.data)==null?void 0:Ba.type)!=="human"}),d=Xt({queryKey:["adapters"],queryFn:Mw}),p=Xt({queryKey:["adapter-mappings"],queryFn:Rw}),{data:m}=Xt({queryKey:["adapter-statuses"],queryFn:Dw,refetchInterval:15e3}),g=((Ia=d.data)==null?void 0:Ia.filter(U=>U.agentId===n))??[],v=((Bt=p.data)==null?void 0:Bt.filter(U=>U.agentId===n))??[],[S,x]=w.useState(!1),[z,_]=w.useState(""),[A,N]=w.useState(null),[q,M]=w.useState(!1),[B,F]=w.useState(null),[T,Q]=w.useState({platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),[V,re]=w.useState(""),he=Zt({mutationFn:()=>kU(n),onSuccess:()=>a.invalidateQueries({queryKey:["agent",n]})}),ae=Zt({mutationFn:()=>TU(n),onSuccess:()=>a.invalidateQueries({queryKey:["agent",n]})}),le=Zt({mutationFn:()=>CU(n),onSuccess:()=>i("/agents")}),Ce=Zt({mutationFn:U=>m0(n,{name:U||void 0}),onSuccess:U=>{N(U.token),_(""),a.invalidateQueries({queryKey:["tokens",n]})}}),ce=Zt({mutationFn:U=>zU(n,U),onSuccess:()=>a.invalidateQueries({queryKey:["tokens",n]})}),te=Zt({mutationFn:async()=>{let U=p0(T);if(!U)throw new Error("Credentials are required");if(T.platform==="kael"&&!U.agentToken){const be=await m0(n,{name:"kael-hub-binding"});U={...U,agentToken:be.token}}return xU({platform:T.platform,agentId:n,credentials:U,status:T.status})},onSuccess:()=>{a.invalidateQueries({queryKey:["adapters"]}),a.invalidateQueries({queryKey:["tokens",n]}),Ot()}}),I=Zt({mutationFn:()=>{if(!B)throw new Error("No adapter selected");const U={status:T.status},be=p0(T);return be&&(U.credentials=be),SU(B,U)},onSuccess:()=>{a.invalidateQueries({queryKey:["adapters"]}),Ot()}}),ne=Zt({mutationFn:wU,onSuccess:()=>a.invalidateQueries({queryKey:["adapters"]})}),me=Zt({mutationFn:()=>vU({platform:T.platform,externalUserId:T.externalUserId,agentId:n,boundVia:"manual",displayName:T.displayName||void 0}),onSuccess:()=>{a.invalidateQueries({queryKey:["adapter-mappings"]}),Ot()}}),Ae=Zt({mutationFn:bU,onSuccess:()=>a.invalidateQueries({queryKey:["adapter-mappings"]})}),[k,R]=w.useState(!1),Y=Zt({mutationFn:U=>h0(n,{displayName:U.displayName,delegateMention:U.delegateMention}),onSuccess:()=>{R(!1),a.invalidateQueries({queryKey:["agent",n]}),a.invalidateQueries({queryKey:["agents"]})}}),C=Zt({mutationFn:()=>AU(n)}),[oe,de]=w.useState(!1),[ue,Ne]=w.useState(""),Fe=Zt({mutationFn:U=>h0(n,{profile:U||null}),onSuccess:()=>{de(!1),a.invalidateQueries({queryKey:["agent",n]})}}),se=u.data,ft=(se==null?void 0:se.type)==="human";function Ot(){M(!1),F(null),Q({platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),re("")}function In(U){F(U.id),Q({platform:U.platform,feishuAppId:"",feishuAppSecret:"",credentialsJson:"",status:U.status,externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),M(!0)}function dr(U){if(U.preventDefault(),re(""),ft){if(!T.externalUserId)return;me.mutate();return}if(T.platform==="feishu"){if(!B&&(!T.feishuAppId||!T.feishuAppSecret)){re("App ID and App Secret are required");return}}else if(T.platform==="kael"){if(!B&&(!T.kaelUserId||!T.kaelProjectId)){re("User ID and Project ID are required");return}}else{const be=T.credentialsJson.trim();if(!B&&!be){re("Credentials are required");return}if(be)try{JSON.parse(be)}catch{re("Invalid JSON");return}}B?I.mutate():te.mutate()}if(u.isLoading)return y.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(u.error)return y.jsxs("div",{className:"text-destructive",children:["Failed to load agent: ",u.error instanceof Error?u.error.message:"Unknown error"]});if(!se)return y.jsx("div",{className:"text-muted-foreground",children:"Agent not found"});const Jt=()=>{window.confirm("Are you sure you want to delete this agent? This cannot be undone.")&&le.mutate()},oi=U=>{U.preventDefault(),Ce.mutate(z)},Cr=te.error??I.error??me.error,na=te.isPending||I.isPending||me.isPending,si=se.metadata,wn=si==null?void 0:si.tree,kr=wn==null?void 0:wn.role,Tr=wn==null?void 0:wn.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(m1,{className:"h-4 w-4"})}),y.jsxs("div",{className:"flex-1",children:[y.jsx("h1",{className:"text-2xl font-semibold",children:se.displayName??se.name}),y.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:se.name})]}),se.status==="active"&&y.jsxs($e,{variant:"outline",size:"sm",onClick:()=>R(!0),children:[y.jsx(pc,{className:"h-4 w-4 mr-2"}),"Edit"]}),!ft&&se.status==="active"&&y.jsxs($e,{variant:"outline",size:"sm",onClick:()=>{C.reset(),C.mutate()},disabled:C.isPending,children:[y.jsx(J2,{className:"h-4 w-4 mr-2"}),C.isPending?"Testing...":"Test Connection"]}),se.status==="active"&&y.jsx($e,{variant:"outline",size:"sm",onClick:()=>{window.confirm("Suspend this agent? All tokens will be revoked.")&&he.mutate()},disabled:he.isPending,children:he.isPending?"Suspending...":"Suspend"}),se.status==="suspended"&&y.jsxs(y.Fragment,{children:[y.jsx($e,{variant:"outline",size:"sm",onClick:()=>ae.mutate(),disabled:ae.isPending,children:ae.isPending?"Reactivating...":"Reactivate"}),y.jsxs($e,{variant:"destructive",size:"sm",onClick:Jt,children:[y.jsx(ss,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]}),(C.data||C.error)&&y.jsx(UU,{result:C.data??{status:"error",message:"Failed to reach server"},onDismiss:()=>C.reset()}),y.jsxs(Mn,{children:[y.jsx(Wn,{children:y.jsx(er,{children:"Agent Info"})}),y.jsx(Un,{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:se.displayName??"—"})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Type"}),y.jsx("dd",{children:y.jsx(Ut,{variant:"secondary",children:se.type})})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Status"}),y.jsx("dd",{children:y.jsx(Ut,{variant:se.status==="active"?"default":"destructive",children:se.status})})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Inbox ID"}),y.jsx("dd",{className:"font-mono",children:se.inboxId})]}),se.delegateMention&&y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Delegate Mention"}),y.jsx("dd",{className:"font-mono",children:o(se.delegateMention)})]}),kr&&y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Role"}),y.jsx("dd",{children:kr})]}),Tr&&Tr.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:Tr.map(U=>y.jsx(Ut,{variant:"outline",children:U},U))})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Organization"}),y.jsx("dd",{className:"font-mono",children:se.organizationId})]}),y.jsxs("div",{children:[y.jsx("dt",{className:"text-muted-foreground mb-1",children:"Created"}),y.jsx("dd",{children:Rn(se.createdAt)})]})]})})]}),y.jsxs(Mn,{children:[y.jsxs(Wn,{className:"flex flex-row items-center justify-between",children:[y.jsx(er,{children:"Profile"}),se.status==="active"&&y.jsxs($e,{variant:"outline",size:"sm",onClick:()=>{Ne(se.profile??""),de(!0)},children:[y.jsx(pc,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),y.jsx(Un,{children:se.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(hU,{children:se.profile})}):y.jsx("p",{className:"text-sm text-muted-foreground",children:"No profile"})})]}),y.jsx(cs,{open:oe,onOpenChange:de,children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:"Edit Profile"})}),y.jsxs("form",{onSubmit:U=>{U.preventDefault(),Fe.mutate(ue)},className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"profile-editor",children:"Markdown"}),y.jsx("textarea",{id:"profile-editor",value:ue,onChange:U=>Ne(U.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..."})]}),Fe.error instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:Fe.error.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:Fe.isPending,children:Fe.isPending?"Saving...":"Save"})})]})]})}),y.jsxs(Mn,{children:[y.jsxs(Wn,{className:"flex flex-row items-center justify-between",children:[y.jsxs(er,{className:"flex items-center gap-2",children:[ft?y.jsx(V2,{className:"h-4 w-4"}):y.jsx(g1,{className:"h-4 w-4"}),"Platform Bindings"]}),y.jsxs($e,{size:"sm",onClick:()=>M(!0),children:[y.jsx(wc,{className:"h-4 w-4 mr-2"}),ft?"Bind User":"Bind Bot"]})]}),y.jsx(Un,{children:ft?y.jsxs(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Platform"}),y.jsx(Te,{children:"External User ID"}),y.jsx(Te,{children:"Display Name"}),y.jsx(Te,{children:"Bound Via"}),y.jsx(Te,{children:"Created"}),y.jsx(Te,{className:"w-16"})]})}),y.jsx(ni,{children:v.length===0?y.jsx(Ve,{children:y.jsx(ve,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):v.map(U=>y.jsxs(Ve,{children:[y.jsx(ve,{children:y.jsx(Ut,{variant:"secondary",children:U.platform})}),y.jsx(ve,{className:"font-mono text-sm",children:U.externalUserId}),y.jsx(ve,{children:U.displayName??"—"}),y.jsx(ve,{children:y.jsx(Ut,{variant:"outline",children:U.boundVia??"—"})}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(U.createdAt)}),y.jsx(ve,{children:y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>{window.confirm("Remove this binding?")&&Ae.mutate(U.id)},disabled:Ae.isPending,children:y.jsx(ss,{className:"h-4 w-4"})})})]},U.id))})]}):y.jsxs(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Platform"}),y.jsx(Te,{children:"Status"}),y.jsx(Te,{children:"Connection"}),y.jsx(Te,{children:"Created"}),y.jsx(Te,{className:"w-24"})]})}),y.jsx(ni,{children:g.length===0?y.jsx(Ve,{children:y.jsx(ve,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):g.map(U=>{const be=m==null?void 0:m.find(Qe=>Qe.configId===U.id),Me=U.platform==="kael"?U.status==="active":!!(be!=null&&be.connected);return y.jsxs(Ve,{children:[y.jsx(ve,{children:y.jsx(Ut,{variant:"secondary",children:U.platform})}),y.jsx(ve,{children:y.jsx(Ut,{variant:U.status==="active"?"default":"destructive",children:U.status})}),y.jsx(ve,{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",Me?"bg-green-500":"bg-gray-300")}),y.jsx("span",{className:"text-xs text-muted-foreground",children:Me?"Online":"Offline"})]})}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(U.createdAt)}),y.jsx(ve,{children:y.jsxs("div",{className:"flex gap-1",children:[y.jsx($e,{variant:"ghost",size:"icon",onClick:()=>In(U),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?")&&ne.mutate(U.id)},disabled:ne.isPending,title:"Delete",children:y.jsx(ss,{className:"h-4 w-4"})})]})})]},U.id)})})]})})]}),!ft&&y.jsxs(Mn,{children:[y.jsxs(Wn,{className:"flex flex-row items-center justify-between",children:[y.jsxs(er,{className:"flex items-center gap-2",children:[y.jsx(Z2,{className:"h-4 w-4"}),"Tokens"]}),y.jsxs($e,{size:"sm",onClick:()=>{N(null),_(""),x(!0)},children:[y.jsx(wc,{className:"h-4 w-4 mr-2"}),"Create Token"]})]}),y.jsx(Un,{children:y.jsxs(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Name"}),y.jsx(Te,{children:"Created"}),y.jsx(Te,{children:"Last Used"}),y.jsx(Te,{children:"Expires"}),y.jsx(Te,{className:"w-20"})]})}),y.jsx(ni,{children:((qa=c.data)==null?void 0:qa.length)===0?y.jsx(Ve,{children:y.jsx(ve,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No tokens"})}):(X=c.data)==null?void 0:X.map(U=>y.jsxs(Ve,{children:[y.jsx(ve,{children:U.name??"—"}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(U.createdAt)}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(U.lastUsedAt)}),y.jsx(ve,{className:"text-muted-foreground",children:U.revokedAt?y.jsx(Ut,{variant:"destructive",children:"Revoked"}):U.expiresAt?Rn(U.expiresAt):"Never"}),y.jsx(ve,{children:!U.revokedAt&&y.jsx($e,{variant:"ghost",size:"sm",onClick:()=>ce.mutate(U.id),disabled:ce.isPending,children:y.jsx(ss,{className:"h-4 w-4"})})})]},U.id))})]})})]}),y.jsx(cs,{open:q,onOpenChange:U=>U?M(!0):Ot(),children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:ft?"Bind External User":B?"Edit Bot Binding":"Bind Bot"})}),y.jsxs("form",{onSubmit:dr,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"binding-platform",children:"Platform"}),y.jsx("select",{id:"binding-platform",value:T.platform,onChange:U=>Q({...T,platform:U.target.value}),disabled:!!B,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:RU.map(U=>y.jsx("option",{value:U,children:U},U))})]}),ft?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"binding-ext-id",children:"External User ID"}),y.jsx(Gt,{id:"binding-ext-id",value:T.externalUserId,onChange:U=>Q({...T,externalUserId:U.target.value}),placeholder:"ou_xxxxxxxx...",className:"font-mono",required:!0})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"binding-name",children:"Display Name (optional)"}),y.jsx(Gt,{id:"binding-name",value:T.displayName,onChange:U=>Q({...T,displayName:U.target.value})})]})]}):y.jsxs(y.Fragment,{children:[T.platform==="feishu"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(St,{htmlFor:"feishu-app-id",children:["App ID",B?" — leave empty to keep existing":""]}),y.jsx(Gt,{id:"feishu-app-id",value:T.feishuAppId,onChange:U=>Q({...T,feishuAppId:U.target.value}),placeholder:"cli_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(St,{htmlFor:"feishu-app-secret",children:["App Secret",B?" — leave empty to keep existing":""]}),y.jsx(Gt,{id:"feishu-app-secret",type:"password",autoComplete:"new-password",value:T.feishuAppSecret,onChange:U=>Q({...T,feishuAppSecret:U.target.value}),placeholder:"••••••••"})]})]}):T.platform==="kael"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsxs(St,{htmlFor:"kael-user-id",children:["User ID",B?" — leave empty to keep existing":""]}),y.jsx(Gt,{id:"kael-user-id",value:T.kaelUserId,onChange:U=>Q({...T,kaelUserId:U.target.value}),placeholder:"user_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs(St,{htmlFor:"kael-project-id",children:["Project ID",B?" — leave empty to keep existing":""]}),y.jsx(Gt,{id:"kael-project-id",value:T.kaelProjectId,onChange:U=>Q({...T,kaelProjectId:U.target.value}),placeholder:"proj_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),!B&&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(St,{htmlFor:"binding-creds",children:["Credentials (JSON)",B?" — leave empty to keep existing":""]}),y.jsx("textarea",{id:"binding-creds",value:T.credentialsJson,onChange:U=>Q({...T,credentialsJson:U.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": "..."}'})]}),V&&y.jsx("p",{className:"text-sm text-destructive",children:V}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"binding-status",children:"Status"}),y.jsxs("select",{id:"binding-status",value:T.status,onChange:U=>Q({...T,status:U.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"})]})]})]}),Cr instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:Cr.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:na,children:na?"Saving...":B?"Update":"Create"})})]})]})}),se.status==="active"&&y.jsx(Uw,{mode:"edit",agent:se,open:k,onOpenChange:R,onSubmit:U=>Y.mutate(U),isPending:Y.isPending,error:Y.error instanceof Error?Y.error:null}),!ft&&y.jsx(cs,{open:S,onOpenChange:U=>{x(U),U||N(null)},children:y.jsxs(Ml,{children:[y.jsx(fs,{children:y.jsx(Ul,{children:A?"Token Created":"Create Token"})}),A?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(Gt,{value:A,readOnly:!0,className:"font-mono text-xs"}),y.jsx($e,{variant:"outline",size:"icon",onClick:()=>navigator.clipboard.writeText(A),children:y.jsx(q2,{className:"h-4 w-4"})})]}),y.jsx(Ol,{children:y.jsx($e,{onClick:()=>x(!1),children:"Done"})})]}):y.jsxs("form",{onSubmit:oi,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{children:"Name (optional)"}),y.jsx(Gt,{value:z,onChange:U=>_(U.target.value),placeholder:"e.g. production"})]}),Ce.error instanceof Error&&y.jsx("div",{className:"text-sm text-destructive",children:Ce.error.message}),y.jsx(Ol,{children:y.jsx($e,{type:"submit",disabled:Ce.isPending,children:Ce.isPending?"Creating...":"Create"})})]})]})})]})}const MU={success:"Connected",timeout:"Timed out",offline:"Offline",error:"Error"};function UU({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(Mn,{className:st("border-l-4",i),children:y.jsx(Un,{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(Ut,{variant:a,children:MU[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 p0(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 LU=Object.values(dS);function BU(){const e=Ns(),n=Wl(),[i,a]=w.useState(),[o,u]=w.useState(""),[c,d]=w.useState(!1),p=Qc(),{data:m,isLoading:g,error:v}=Xt({queryKey:["agents",i,o],queryFn:()=>mp({limit:20,cursor:i,type:o||void 0})}),S=Zt({mutationFn:x=>_U({name:x.name,type:x.type,displayName:x.displayName??void 0,delegateMention:x.delegateMention??void 0}),onSuccess:x=>{d(!1),n.invalidateQueries({queryKey:["agents"]}),e(`/agents/${x.uuid}`)}});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"}),LU.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(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Name"}),y.jsx(Te,{children:"Display Name"}),y.jsx(Te,{children:"Type"}),y.jsx(Te,{children:"Delegate"}),y.jsx(Te,{children:"Online"}),y.jsx(Te,{children:"Status"}),y.jsx(Te,{children:"Created"})]})}),y.jsx(ni,{children:g?y.jsx(Ve,{children:y.jsx(ve,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):v?y.jsx(Ve,{children:y.jsxs(ve,{colSpan:7,className:"text-center py-8 text-destructive",children:["Failed to load agents: ",v instanceof Error?v.message:"Unknown error"]})}):m!=null&&m.items.length?m.items.map(x=>y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>e(`/agents/${x.uuid}`),children:[y.jsx(ve,{className:"font-mono text-sm",children:x.name}),y.jsx(ve,{children:x.displayName??"—"}),y.jsx(ve,{children:y.jsx(Ut,{variant:"secondary",children:x.type})}),y.jsx(ve,{className:"font-mono text-sm text-muted-foreground",children:x.delegateMention?p(x.delegateMention):"—"}),y.jsx(ve,{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(ve,{children:y.jsx(Ut,{variant:x.status==="active"?"default":"destructive",children:x.status})}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(x.createdAt)})]},x.uuid)):y.jsx(Ve,{children:y.jsx(ve,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:o?`No ${o} agents`:"No agents yet"})})})]})}),(m==null?void 0:m.nextCursor)&&y.jsx("div",{className:"flex justify-end mt-4",children:y.jsx($e,{variant:"outline",onClick:()=>a(m.nextCursor??void 0),children:"Next Page"})}),y.jsx(Uw,{mode:"create",open:c,onOpenChange:d,onSubmit:x=>S.mutate(x),isPending:S.isPending,error:S.error instanceof Error?S.error:null})]})}function IU(){const e=Ns(),n=Qc(),{data:i,isLoading:a}=Xt({queryKey:["adapters"],queryFn:Mw}),{data:o,isLoading:u}=Xt({queryKey:["adapter-mappings"],queryFn:Rw}),{data:c}=Xt({queryKey:["adapter-statuses"],queryFn:Dw,refetchInterval:15e3}),d=a||u;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(Mn,{children:[y.jsx(Wn,{children:y.jsx(er,{children:"Bot Bindings"})}),y.jsx(Un,{children:y.jsxs(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Agent"}),y.jsx(Te,{children:"Platform"}),y.jsx(Te,{children:"Status"}),y.jsx(Te,{children:"Connection"}),y.jsx(Te,{children:"Created"})]})}),y.jsx(ni,{children:d?y.jsx(Ve,{children:y.jsx(ve,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):i!=null&&i.length?i.map(p=>{const m=c==null?void 0:c.find(g=>g.configId===p.id);return y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>e(`/agents/${p.agentId}`),children:[y.jsx(ve,{className:"font-mono text-sm",children:n(p.agentId)}),y.jsx(ve,{children:y.jsx(Ut,{variant:"secondary",children:p.platform})}),y.jsx(ve,{children:y.jsx(Ut,{variant:p.status==="active"?"default":"destructive",children:p.status})}),y.jsx(ve,{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",m!=null&&m.connected?"bg-green-500":"bg-gray-300")}),y.jsx("span",{className:"text-xs text-muted-foreground",children:m!=null&&m.connected?"Online":"Offline"})]})}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(p.createdAt)})]},p.id)}):y.jsx(Ve,{children:y.jsx(ve,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No bot bindings"})})})]})})]}),y.jsxs(Mn,{children:[y.jsx(Wn,{children:y.jsx(er,{children:"User Bindings"})}),y.jsx(Un,{children:y.jsxs(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"Agent"}),y.jsx(Te,{children:"Platform"}),y.jsx(Te,{children:"External User ID"}),y.jsx(Te,{children:"Display Name"}),y.jsx(Te,{children:"Bound Via"}),y.jsx(Te,{children:"Created"})]})}),y.jsx(ni,{children:d?y.jsx(Ve,{children:y.jsx(ve,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):o!=null&&o.length?o.map(p=>y.jsxs(Ve,{className:"cursor-pointer",onClick:()=>e(`/agents/${p.agentId}`),children:[y.jsx(ve,{className:"font-mono text-sm",children:n(p.agentId)}),y.jsx(ve,{children:y.jsx(Ut,{variant:"secondary",children:p.platform})}),y.jsx(ve,{className:"font-mono text-sm",children:p.externalUserId}),y.jsx(ve,{children:p.displayName??"—"}),y.jsx(ve,{children:y.jsx(Ut,{variant:"outline",children:p.boundVia??"—"})}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(p.createdAt)})]},p.id)):y.jsx(Ve,{children:y.jsx(ve,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No user bindings"})})})]})})]})]})}function qU(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 HU(e){return nt.get(`/admin/chats/${encodeURIComponent(e)}`)}function ZU(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 PU(){const[e,n]=w.useState(),[i,a]=w.useState(null);return i?y.jsx($U,{chatId:i,onBack:()=>a(null)}):y.jsx(FU,{cursor:e,setCursor:n,onSelect:a})}function FU({cursor:e,setCursor:n,onSelect:i}){const{data:a,isLoading:o,error:u}=Xt({queryKey:["chats",e],queryFn:()=>qU({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(ei,{children:[y.jsx(ti,{children:y.jsxs(Ve,{children:[y.jsx(Te,{children:"ID"}),y.jsx(Te,{children:"Type"}),y.jsx(Te,{children:"Topic"}),y.jsx(Te,{children:"Participants"}),y.jsx(Te,{children:"Lifecycle"}),y.jsx(Te,{children:"Created"})]})}),y.jsx(ni,{children:o?y.jsx(Ve,{children:y.jsx(ve,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):u?y.jsx(Ve,{children:y.jsxs(ve,{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(ve,{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(ve,{className:"font-mono text-xs max-w-[200px] truncate",children:c.id}),y.jsx(ve,{children:y.jsx(Ut,{variant:"secondary",children:c.type})}),y.jsx(ve,{children:c.topic??"—"}),y.jsx(ve,{children:c.participantCount}),y.jsx(ve,{className:"text-muted-foreground text-xs",children:c.lifecyclePolicy??"—"}),y.jsx(ve,{className:"text-muted-foreground",children:Rn(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 $U({chatId:e,onBack:n}){const[i,a]=w.useState(),o=Qc(),u=Xt({queryKey:["chat",e],queryFn:()=>HU(e)}),c=Xt({queryKey:["chat-messages",e,i],queryFn:()=>ZU(e,{limit:50,cursor:i})}),d=u.data,p=c.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(m1,{className:"h-4 w-4"})}),y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-semibold",children:(d==null?void 0:d.topic)??"Chat"}),y.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:e})]})]}),d&&y.jsxs(Mn,{children:[y.jsx(Wn,{children:y.jsx(er,{children:"Participants"})}),y.jsx(Un,{children:y.jsx("div",{className:"flex flex-wrap gap-2",children:d.participants.map(m=>y.jsxs(Ut,{variant:"outline",children:[o(m.agentId)," (",m.role,")"]},m.agentId))})})]}),y.jsxs(Mn,{children:[y.jsx(Wn,{children:y.jsxs(er,{className:"flex items-center gap-2",children:[y.jsx(Um,{className:"h-4 w-4"}),"Messages"]})}),y.jsxs(Un,{children:[c.isLoading?y.jsx("div",{className:"text-muted-foreground py-4 text-center",children:"Loading messages..."}):(p==null?void 0:p.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:p==null?void 0:p.items.map(m=>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:o(m.senderId)}),y.jsx("span",{className:"text-xs text-muted-foreground",children:Rn(m.createdAt)})]}),y.jsx("div",{className:"text-sm",children:m.format==="text"?y.jsx("p",{className:"whitespace-pre-wrap",children:typeof m.content=="string"?m.content:JSON.stringify(m.content)}):y.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-auto max-h-40",children:JSON.stringify(m.content,null,2)})}),y.jsx("div",{className:"flex gap-2 mt-1",children:y.jsx(Ut,{variant:"outline",className:"text-xs",children:m.format})})]},m.id))}),(p==null?void 0:p.nextCursor)&&y.jsx("div",{className:"flex justify-center mt-4",children:y.jsx($e,{variant:"outline",size:"sm",onClick:()=>a(p.nextCursor??void 0),children:"Load More"})})]})]})]})}function VU(){const{isAuthenticated:e,login:n}=Mm(),[i,a]=w.useState(""),[o,u]=w.useState(""),[c,d]=w.useState(null),[p,m]=w.useState(!1);if(e)return y.jsx(e1,{to:"/",replace:!0});const g=async v=>{v.preventDefault(),d(null),m(!0);try{await n(i,o)}catch(S){d(S instanceof Error?S.message:"Login failed")}finally{m(!1)}};return y.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:y.jsxs(Mn,{className:"w-full max-w-sm",children:[y.jsxs(Wn,{className:"text-center",children:[y.jsx(er,{className:"text-2xl",children:"First Tree"}),y.jsx(Lw,{children:"Sign in to admin console"})]}),y.jsx(Un,{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(St,{htmlFor:"username",children:"Username"}),y.jsx(Gt,{id:"username",value:i,onChange:v=>a(v.target.value),required:!0,autoFocus:!0})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:"password",children:"Password"}),y.jsx(Gt,{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 QU(){return nt.get("/admin/overview")}function YU(){const{data:e,isLoading:n,error:i}=Xt({queryKey:["overview"],queryFn:QU,refetchInterval:3e4}),a=[{label:"Total Agents",value:e==null?void 0:e.agents,icon:p1},{label:"Online Agents",value:e==null?void 0:e.onlineAgents,icon:tT},{label:"Total Chats",value:e==null?void 0:e.chats,icon:Um}];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(Mn,{children:[y.jsxs(Wn,{className:"flex flex-row items-center justify-between pb-2",children:[y.jsx(er,{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(Un,{children:y.jsx("div",{className:"text-3xl font-bold",children:n?"...":o.value??"—"})})]},o.label))})]})}function GU(){return nt.get("/admin/system/config")}function XU(e){return nt.patch("/admin/system/config",e)}const KU={[Wr.INBOX_TIMEOUT_SECONDS]:"Inbox Timeout (seconds)",[Wr.MAX_RETRY_COUNT]:"Max Retry Count",[Wr.POLLING_INTERVAL_SECONDS]:"Polling Interval (seconds)",[Wr.PRESENCE_CLEANUP_SECONDS]:"Presence Cleanup (seconds)"},g0=Object.values(Wr);function JU(){const e=Wl(),{data:n,isLoading:i}=Xt({queryKey:["system-config"],queryFn:GU}),[a,o]=w.useState({}),[u,c]=w.useState(!1);w.useEffect(()=>{if(!n)return;const m={};for(const g of g0){const v=n[g]??xh[g]??"";m[g]=String(v)}o(m)},[n]);const d=Zt({mutationFn:()=>{const m={};for(const[g,v]of Object.entries(a)){const S=v.trim();if(S==="")m[g]=xh[g]??0;else{const x=Number(S);m[g]=Number.isNaN(x)?S:x}}return XU(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(Mn,{children:[y.jsx(Wn,{children:y.jsx(er,{children:"System Configuration"})}),y.jsx(Un,{children:y.jsxs("form",{onSubmit:p,className:"space-y-4",children:[g0.map(m=>y.jsxs("div",{className:"space-y-2",children:[y.jsx(St,{htmlFor:m,children:KU[m]??m}),y.jsx(Gt,{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(xh[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 WU=new DC({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});function eL(){return y.jsx(MC,{client:WU,children:y.jsx(N2,{children:y.jsx(g2,{children:y.jsxs(Vk,{children:[y.jsx(sr,{path:"/login",element:y.jsx(VU,{})}),y.jsx(sr,{element:y.jsx(z2,{}),children:y.jsxs(sr,{element:y.jsx(WT,{}),children:[y.jsx(sr,{index:!0,element:y.jsx(YU,{})}),y.jsx(sr,{path:"agents",element:y.jsx(BU,{})}),y.jsx(sr,{path:"agents/:uuid",element:y.jsx(DU,{})}),y.jsx(sr,{path:"bindings",element:y.jsx(IU,{})}),y.jsx(sr,{path:"chats",element:y.jsx(PU,{})}),y.jsx(sr,{path:"admin-users",element:y.jsx(KD,{})}),y.jsx(sr,{path:"settings",element:y.jsx(JU,{})})]})})]})})})})}const Bw=document.getElementById("root");if(!Bw)throw new Error("Root element not found");uC.createRoot(Bw).render(y.jsx(w.StrictMode,{children:y.jsx(eL,{})}));
|