@agent-team-foundation/first-tree-hub 0.4.0 → 0.6.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-BnlTKa0H.mjs} +94 -18
- package/dist/cli/index.mjs +412 -28
- package/dist/{core-CMeOAZmx.mjs → core-B9bH7EjM.mjs} +4141 -704
- package/dist/drizzle/0008_uuid_identity.sql +12 -0
- package/dist/drizzle/0009_agent_runtime_m1.sql +31 -0
- package/dist/drizzle/0010_cloud_multi_tenancy.sql +34 -0
- package/dist/drizzle/0011_org_uuid_pk.sql +22 -0
- package/dist/drizzle/0012_session_level_state.sql +19 -0
- package/dist/drizzle/0013_hub_tasks.sql +38 -0
- package/dist/drizzle/0014_drop_task_fks.sql +9 -0
- package/dist/drizzle/0015_member_system.sql +34 -0
- package/dist/drizzle/0016_strange_havok.sql +25 -0
- package/dist/drizzle/0017_session_outputs_unique.sql +1 -0
- package/dist/drizzle/meta/0012_snapshot.json +1451 -0
- package/dist/drizzle/meta/0013_snapshot.json +1771 -0
- package/dist/drizzle/meta/0014_snapshot.json +1717 -0
- package/dist/drizzle/meta/0016_snapshot.json +1917 -0
- package/dist/drizzle/meta/_journal.json +70 -0
- package/dist/index.mjs +3 -3
- package/dist/web/assets/index--kyp_ZHv.css +1 -0
- package/dist/web/assets/index-C_FKYVro.js +310 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -2
- package/dist/web/assets/index-C4J9gHaF.js +0 -280
- package/dist/web/assets/index-vo2Sa6IQ.css +0 -1
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
var wb=e=>{throw TypeError(e)};var mh=(e,n,a)=>n.has(e)||wb("Cannot "+a);var O=(e,n,a)=>(mh(e,n,"read from private field"),a?a.call(e):n.get(e)),we=(e,n,a)=>n.has(e)?wb("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),de=(e,n,a,i)=>(mh(e,n,"write to private field"),i?i.call(e,a):n.set(e,a),a),Ie=(e,n,a)=>(mh(e,n,"access private method"),a);var rc=(e,n,a,i)=>({set _(s){de(e,n,s,a)},get _(){return O(e,n,i)}});function wN(e,n){for(var a=0;a<n.length;a++){const i=n[a];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function Ic(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ph={exports:{}},ro={};/**
|
|
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 Eb;function EN(){if(Eb)return ro;Eb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(i,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:u}}return ro.Fragment=n,ro.jsx=a,ro.jsxs=a,ro}var Cb;function CN(){return Cb||(Cb=1,ph.exports=EN()),ph.exports}var h=CN(),gh={exports:{}},Re={};/**
|
|
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 Nb;function NN(){if(Nb)return Re;Nb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,T={};function k(R,K,_){this.props=R,this.context=K,this.refs=T,this.updater=_||j}k.prototype.isReactComponent={},k.prototype.setState=function(R,K){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,K,"setState")},k.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function P(){}P.prototype=k.prototype;function U(R,K,_){this.props=R,this.context=K,this.refs=T,this.updater=_||j}var H=U.prototype=new P;H.constructor=U,C(H,k.prototype),H.isPureReactComponent=!0;var Y=Array.isArray;function L(){}var B={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function G(R,K,_){var oe=_.ref;return{$$typeof:e,type:R,key:K,ref:oe!==void 0?oe:null,props:_}}function ie(R,K){return G(R.type,K,R.props)}function le(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function se(R){var K={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(_){return K[_]})}var Ae=/\/+/g;function ce(R,K){return typeof R=="object"&&R!==null&&R.key!=null?se(""+R.key):K.toString(36)}function ne(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(L,L):(R.status="pending",R.then(function(K){R.status==="pending"&&(R.status="fulfilled",R.value=K)},function(K){R.status==="pending"&&(R.status="rejected",R.reason=K)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function q(R,K,_,oe,he){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var Oe=!1;if(R===null)Oe=!0;else switch(fe){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(R.$$typeof){case e:case n:Oe=!0;break;case y:return Oe=R._init,q(Oe(R._payload),K,_,oe,he)}}if(Oe)return he=he(R),Oe=oe===""?"."+ce(R,0):oe,Y(he)?(_="",Oe!=null&&(_=Oe.replace(Ae,"$&/")+"/"),q(he,K,_,"",function(ze){return ze})):he!=null&&(le(he)&&(he=ie(he,_+(he.key==null||R&&R.key===he.key?"":(""+he.key).replace(Ae,"$&/")+"/")+Oe)),K.push(he)),1;Oe=0;var et=oe===""?".":oe+":";if(Y(R))for(var _e=0;_e<R.length;_e++)oe=R[_e],fe=et+ce(oe,_e),Oe+=q(oe,K,_,fe,he);else if(_e=S(R),typeof _e=="function")for(R=_e.call(R),_e=0;!(oe=R.next()).done;)oe=oe.value,fe=et+ce(oe,_e++),Oe+=q(oe,K,_,fe,he);else if(fe==="object"){if(typeof R.then=="function")return q(ne(R),K,_,oe,he);throw K=String(R),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function re(R,K,_){if(R==null)return R;var oe=[],he=0;return q(R,oe,"","",function(fe){return K.call(_,fe,he++)}),oe}function me(R){if(R._status===-1){var K=R._result;K=K(),K.then(function(_){(R._status===0||R._status===-1)&&(R._status=1,R._result=_)},function(_){(R._status===0||R._status===-1)&&(R._status=2,R._result=_)}),R._status===-1&&(R._status=0,R._result=K)}if(R._status===1)return R._result.default;throw R._result}var Te=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=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(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},N={map:re,forEach:function(R,K,_){re(R,function(){K.apply(this,arguments)},_)},count:function(R){var K=0;return re(R,function(){K++}),K},toArray:function(R){return re(R,function(K){return K})||[]},only:function(R){if(!le(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Re.Activity=v,Re.Children=N,Re.Component=k,Re.Fragment=a,Re.Profiler=s,Re.PureComponent=U,Re.StrictMode=i,Re.Suspense=g,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Re.__COMPILER_RUNTIME={__proto__:null,c:function(R){return B.H.useMemoCache(R)}},Re.cache=function(R){return function(){return R.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(R,K,_){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var oe=C({},R.props),he=R.key;if(K!=null)for(fe in K.key!==void 0&&(he=""+K.key),K)!D.call(K,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&K.ref===void 0||(oe[fe]=K[fe]);var fe=arguments.length-2;if(fe===1)oe.children=_;else if(1<fe){for(var Oe=Array(fe),et=0;et<fe;et++)Oe[et]=arguments[et+2];oe.children=Oe}return G(R.type,he,oe)},Re.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},Re.createElement=function(R,K,_){var oe,he={},fe=null;if(K!=null)for(oe in K.key!==void 0&&(fe=""+K.key),K)D.call(K,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(he[oe]=K[oe]);var Oe=arguments.length-2;if(Oe===1)he.children=_;else if(1<Oe){for(var et=Array(Oe),_e=0;_e<Oe;_e++)et[_e]=arguments[_e+2];he.children=et}if(R&&R.defaultProps)for(oe in Oe=R.defaultProps,Oe)he[oe]===void 0&&(he[oe]=Oe[oe]);return G(R,fe,he)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(R){return{$$typeof:d,render:R}},Re.isValidElement=le,Re.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:me}},Re.memo=function(R,K){return{$$typeof:p,type:R,compare:K===void 0?null:K}},Re.startTransition=function(R){var K=B.T,_={};B.T=_;try{var oe=R(),he=B.S;he!==null&&he(_,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(L,Te)}catch(fe){Te(fe)}finally{K!==null&&_.types!==null&&(K.types=_.types),B.T=K}},Re.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Re.use=function(R){return B.H.use(R)},Re.useActionState=function(R,K,_){return B.H.useActionState(R,K,_)},Re.useCallback=function(R,K){return B.H.useCallback(R,K)},Re.useContext=function(R){return B.H.useContext(R)},Re.useDebugValue=function(){},Re.useDeferredValue=function(R,K){return B.H.useDeferredValue(R,K)},Re.useEffect=function(R,K){return B.H.useEffect(R,K)},Re.useEffectEvent=function(R){return B.H.useEffectEvent(R)},Re.useId=function(){return B.H.useId()},Re.useImperativeHandle=function(R,K,_){return B.H.useImperativeHandle(R,K,_)},Re.useInsertionEffect=function(R,K){return B.H.useInsertionEffect(R,K)},Re.useLayoutEffect=function(R,K){return B.H.useLayoutEffect(R,K)},Re.useMemo=function(R,K){return B.H.useMemo(R,K)},Re.useOptimistic=function(R,K){return B.H.useOptimistic(R,K)},Re.useReducer=function(R,K,_){return B.H.useReducer(R,K,_)},Re.useRef=function(R){return B.H.useRef(R)},Re.useState=function(R){return B.H.useState(R)},Re.useSyncExternalStore=function(R,K,_){return B.H.useSyncExternalStore(R,K,_)},Re.useTransition=function(){return B.H.useTransition()},Re.version="19.2.4",Re}var _b;function Om(){return _b||(_b=1,gh.exports=NN()),gh.exports}var w=Om();const _N=Ic(w),Rm=wN({__proto__:null,default:_N},[w]);var yh={exports:{}},ao={},vh={exports:{}},bh={};/**
|
|
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 jb;function jN(){return jb||(jb=1,(function(e){function n(q,re){var me=q.length;q.push(re);e:for(;0<me;){var Te=me-1>>>1,N=q[Te];if(0<s(N,re))q[Te]=re,q[me]=N,me=Te;else break e}}function a(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var re=q[0],me=q.pop();if(me!==re){q[0]=me;e:for(var Te=0,N=q.length,R=N>>>1;Te<R;){var K=2*(Te+1)-1,_=q[K],oe=K+1,he=q[oe];if(0>s(_,me))oe<N&&0>s(he,_)?(q[Te]=he,q[oe]=me,Te=oe):(q[Te]=_,q[K]=me,Te=K);else if(oe<N&&0>s(he,me))q[Te]=he,q[oe]=me,Te=oe;else break e}}return re}function s(q,re){var me=q.sortIndex-re.sortIndex;return me!==0?me:q.id-re.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 g=[],p=[],y=1,v=null,x=3,S=!1,j=!1,C=!1,T=!1,k=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function H(q){for(var re=a(p);re!==null;){if(re.callback===null)i(p);else if(re.startTime<=q)i(p),re.sortIndex=re.expirationTime,n(g,re);else break;re=a(p)}}function Y(q){if(C=!1,H(q),!j)if(a(g)!==null)j=!0,L||(L=!0,se());else{var re=a(p);re!==null&&ne(Y,re.startTime-q)}}var L=!1,B=-1,D=5,G=-1;function ie(){return T?!0:!(e.unstable_now()-G<D)}function le(){if(T=!1,L){var q=e.unstable_now();G=q;var re=!0;try{e:{j=!1,C&&(C=!1,P(B),B=-1),S=!0;var me=x;try{t:{for(H(q),v=a(g);v!==null&&!(v.expirationTime>q&&ie());){var Te=v.callback;if(typeof Te=="function"){v.callback=null,x=v.priorityLevel;var N=Te(v.expirationTime<=q);if(q=e.unstable_now(),typeof N=="function"){v.callback=N,H(q),re=!0;break t}v===a(g)&&i(g),H(q)}else i(g);v=a(g)}if(v!==null)re=!0;else{var R=a(p);R!==null&&ne(Y,R.startTime-q),re=!1}}break e}finally{v=null,x=me,S=!1}re=void 0}}finally{re?se():L=!1}}}var se;if(typeof U=="function")se=function(){U(le)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,ce=Ae.port2;Ae.port1.onmessage=le,se=function(){ce.postMessage(null)}}else se=function(){k(le,0)};function ne(q,re){B=k(function(){q(e.unstable_now())},re)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(q){switch(x){case 1:case 2:case 3:var re=3;break;default:re=x}var me=x;x=re;try{return q()}finally{x=me}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(q,re){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var me=x;x=q;try{return re()}finally{x=me}},e.unstable_scheduleCallback=function(q,re,me){var Te=e.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?Te+me:Te):me=Te,q){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=me+N,q={id:y++,callback:re,priorityLevel:q,startTime:me,expirationTime:N,sortIndex:-1},me>Te?(q.sortIndex=me,n(p,q),a(g)===null&&q===a(p)&&(C?(P(B),B=-1):C=!0,ne(Y,me-Te))):(q.sortIndex=N,n(g,q),j||S||(j=!0,L||(L=!0,se()))),q},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(q){var re=x;return function(){var me=x;x=re;try{return q.apply(this,arguments)}finally{x=me}}}})(bh)),bh}var kb;function kN(){return kb||(kb=1,vh.exports=jN()),vh.exports}var xh={exports:{}},rn={};/**
|
|
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 Tb;function TN(){if(Tb)return rn;Tb=1;var e=Om();function n(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(g,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:v==null?null:""+v,children:g,containerInfo:p,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,rn.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(g,p,null,y)},rn.flushSync=function(g){var p=c.T,y=i.p;try{if(c.T=null,i.p=2,g)return g()}finally{c.T=p,i.p=y,i.d.f()}},rn.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(g,p))},rn.prefetchDNS=function(g){typeof g=="string"&&i.d.D(g)},rn.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,v=d(y,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?i.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):y==="script"&&i.d.X(g,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},rn.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=d(p.as,p.crossOrigin);i.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(g)},rn.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=d(y,p.crossOrigin);i.d.L(g,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},rn.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=d(p.as,p.crossOrigin);i.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(g)},rn.requestFormReset=function(g){i.d.r(g)},rn.unstable_batchedUpdates=function(g,p){return g(p)},rn.useFormState=function(g,p,y){return c.H.useFormState(g,p,y)},rn.useFormStatus=function(){return c.H.useHostTransitionStatus()},rn.version="19.2.4",rn}var Ab;function F0(){if(Ab)return xh.exports;Ab=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(),xh.exports=TN(),xh.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 zb;function AN(){if(zb)return ao;zb=1;var e=kN(),n=Om(),a=F0();function i(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 s(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 g(t){if(u(t)!==t)throw Error(i(188))}function p(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(i(188));return r!==t?null:t}for(var l=t,o=r;;){var f=l.return;if(f===null)break;var m=f.alternate;if(m===null){if(o=f.return,o!==null){l=o;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===l)return g(f),t;if(m===o)return g(f),r;m=m.sibling}throw Error(i(188))}if(l.return!==o.return)l=f,o=m;else{for(var b=!1,E=f.child;E;){if(E===l){b=!0,l=f,o=m;break}if(E===o){b=!0,o=f,l=m;break}E=E.sibling}if(!b){for(E=m.child;E;){if(E===l){b=!0,l=m,o=f;break}if(E===o){b=!0,o=m,l=f;break}E=E.sibling}if(!b)throw Error(i(189))}}if(l.alternate!==o)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),U=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function se(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var Ae=Symbol.for("react.client.reference");function ce(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ae?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case k:return"Profiler";case T:return"StrictMode";case Y:return"Suspense";case L:return"SuspenseList";case G:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case j:return"Portal";case U:return t.displayName||"Context";case P:return(t._context.displayName||"Context")+".Consumer";case H:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return r=t.displayName||null,r!==null?r:ce(t.type)||"Memo";case D:r=t._payload,t=t._init;try{return ce(t(r))}catch{}}return null}var ne=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},Te=[],N=-1;function R(t){return{current:t}}function K(t){0>N||(t.current=Te[N],Te[N]=null,N--)}function _(t,r){N++,Te[N]=t.current,t.current=r}var oe=R(null),he=R(null),fe=R(null),Oe=R(null);function et(t,r){switch(_(fe,r),_(he,t),_(oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?$v(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=$v(r),t=Vv(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(oe),_(oe,t)}function _e(){K(oe),K(he),K(fe)}function ze(t){t.memoizedState!==null&&_(Oe,t);var r=oe.current,l=Vv(r,t.type);r!==l&&(_(he,t),_(oe,l))}function vt(t){he.current===t&&(K(oe),K(he)),Oe.current===t&&(K(Oe),Ws._currentValue=me)}var on,mr;function nn(t){if(on===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);on=r&&r[1]||"",mr=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+on+t+mr}var sa=!1;function oa(t,r){if(!t||sa)return"";sa=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(Q){var V=Q}Reflect.construct(t,[],te)}else{try{te.call()}catch(Q){V=Q}t.call(te.prototype)}}else{try{throw Error()}catch(Q){V=Q}(te=t())&&typeof te.catch=="function"&&te.catch(function(){})}}catch(Q){if(Q&&V&&typeof Q.stack=="string")return[Q.stack,V.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=o.DetermineComponentFrameRoot(),b=m[0],E=m[1];if(b&&E){var z=b.split(`
|
|
44
|
+
`),F=E.split(`
|
|
45
|
+
`);for(f=o=0;o<z.length&&!z[o].includes("DetermineComponentFrameRoot");)o++;for(;f<F.length&&!F[f].includes("DetermineComponentFrameRoot");)f++;if(o===z.length||f===F.length)for(o=z.length-1,f=F.length-1;1<=o&&0<=f&&z[o]!==F[f];)f--;for(;1<=o&&0<=f;o--,f--)if(z[o]!==F[f]){if(o!==1||f!==1)do if(o--,f--,0>f||z[o]!==F[f]){var X=`
|
|
46
|
+
`+z[o].replace(" at new "," at ");return t.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",t.displayName)),X}while(1<=o&&0<=f);break}}}finally{sa=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?nn(l):""}function li(t,r){switch(t.tag){case 26:case 27:case 5:return nn(t.type);case 16:return nn("Lazy");case 13:return t.child!==r&&r!==null?nn("Suspense Fallback"):nn("Suspense");case 19:return nn("SuspenseList");case 0:case 15:return oa(t.type,!1);case 11:return oa(t.type.render,!1);case 1:return oa(t.type,!0);case 31:return nn("Activity");default:return""}}function si(t){try{var r="",l=null;do r+=li(t,l),l=t,t=t.return;while(t);return r}catch(o){return`
|
|
47
|
+
Error generating stack: `+o.message+`
|
|
48
|
+
`+o.stack}}var pr=Object.prototype.hasOwnProperty,kn=e.unstable_scheduleCallback,ua=e.unstable_cancelCallback,oi=e.unstable_shouldYield,Vi=e.unstable_requestPaint,Ft=e.unstable_now,Qi=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,ue=e.unstable_UserBlockingPriority,$=e.unstable_NormalPriority,Ce=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,$t=e.log,qn=e.unstable_setDisableYieldValue,un=null,qt=null;function mn(t){if(typeof $t=="function"&&qn(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(un,t)}catch{}}var ct=Math.clz32?Math.clz32:oE,ca=Math.log,ir=Math.LN2;function oE(t){return t>>>=0,t===0?32:31-(ca(t)/ir|0)|0}var Po=256,Ho=262144,Zo=4194304;function ui(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 Fo(t,r,l){var o=t.pendingLanes;if(o===0)return 0;var f=0,m=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var E=o&134217727;return E!==0?(o=E&~m,o!==0?f=ui(o):(b&=E,b!==0?f=ui(b):l||(l=E&~t,l!==0&&(f=ui(l))))):(E=o&~m,E!==0?f=ui(E):b!==0?f=ui(b):l||(l=o&~t,l!==0&&(f=ui(l)))),f===0?0:r!==0&&r!==f&&(r&m)===0&&(m=f&-f,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:f}function ds(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function uE(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 _p(){var t=Zo;return Zo<<=1,(Zo&62914560)===0&&(Zo=4194304),t}function tf(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function hs(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function cE(t,r,l,o,f,m){var b=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var E=t.entanglements,z=t.expirationTimes,F=t.hiddenUpdates;for(l=b&~l;0<l;){var X=31-ct(l),te=1<<X;E[X]=0,z[X]=-1;var V=F[X];if(V!==null)for(F[X]=null,X=0;X<V.length;X++){var Q=V[X];Q!==null&&(Q.lane&=-536870913)}l&=~te}o!==0&&jp(t,o,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(b&~r))}function jp(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var o=31-ct(r);t.entangledLanes|=r,t.entanglements[o]=t.entanglements[o]|1073741824|l&261930}function kp(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var o=31-ct(l),f=1<<o;f&r|t[o]&r&&(t[o]|=r),l&=~f}}function Tp(t,r){var l=r&-r;return l=(l&42)!==0?1:nf(l),(l&(t.suspendedLanes|r))!==0?0:l}function nf(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 rf(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ap(){var t=re.p;return t!==0?t:(t=window.event,t===void 0?32:pb(t.type))}function zp(t,r){var l=re.p;try{return re.p=t,r()}finally{re.p=l}}var fa=Math.random().toString(36).slice(2),Xt="__reactFiber$"+fa,pn="__reactProps$"+fa,Yi="__reactContainer$"+fa,af="__reactEvents$"+fa,fE="__reactListeners$"+fa,dE="__reactHandles$"+fa,Op="__reactResources$"+fa,ms="__reactMarker$"+fa;function lf(t){delete t[Xt],delete t[pn],delete t[af],delete t[fE],delete t[dE]}function Gi(t){var r=t[Xt];if(r)return r;for(var l=t.parentNode;l;){if(r=l[Yi]||l[Xt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=Wv(t);t!==null;){if(l=t[Xt])return l;t=Wv(t)}return r}t=l,l=t.parentNode}return null}function Ki(t){if(t=t[Xt]||t[Yi]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function ps(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(i(33))}function Xi(t){var r=t[Op];return r||(r=t[Op]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Vt(t){t[ms]=!0}var Rp=new Set,Mp={};function ci(t,r){Ji(t,r),Ji(t+"Capture",r)}function Ji(t,r){for(Mp[t]=r,t=0;t<r.length;t++)Rp.add(r[t])}var hE=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]*$"),Dp={},Up={};function mE(t){return pr.call(Up,t)?!0:pr.call(Dp,t)?!1:hE.test(t)?Up[t]=!0:(Dp[t]=!0,!1)}function $o(t,r,l){if(mE(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function Vo(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 Rr(t,r,l,o){if(o===null)t.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+o)}}function Pn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Lp(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function pE(t,r,l){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,m=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(b){l=""+b,m.call(this,b)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function sf(t){if(!t._valueTracker){var r=Lp(t)?"checked":"value";t._valueTracker=pE(t,r,""+t[r])}}function Ip(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),o="";return t&&(o=Lp(t)?t.checked?"true":"false":t.value),t=o,t!==l?(r.setValue(t),!0):!1}function Qo(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 gE=/[\n"\\]/g;function Hn(t){return t.replace(gE,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function of(t,r,l,o,f,m,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=""+Pn(r)):t.value!==""+Pn(r)&&(t.value=""+Pn(r)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),r!=null?uf(t,b,Pn(r)):l!=null?uf(t,b,Pn(l)):o!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+Pn(E):t.removeAttribute("name")}function Bp(t,r,l,o,f,m,b,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){sf(t);return}l=l!=null?""+Pn(l):"",r=r!=null?""+Pn(r):l,E||r===t.value||(t.value=r),t.defaultValue=r}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=E?t.checked:!!o,t.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),sf(t)}function uf(t,r,l){r==="number"&&Qo(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Wi(t,r,l,o){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&&o&&(t[l].defaultSelected=!0)}else{for(l=""+Pn(l),r=null,f=0;f<t.length;f++){if(t[f].value===l){t[f].selected=!0,o&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function qp(t,r,l){if(r!=null&&(r=""+Pn(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+Pn(l):""}function Pp(t,r,l,o){if(r==null){if(o!=null){if(l!=null)throw Error(i(92));if(ne(o)){if(1<o.length)throw Error(i(93));o=o[0]}l=o}l==null&&(l=""),r=l}l=Pn(r),t.defaultValue=l,o=t.textContent,o===l&&o!==""&&o!==null&&(t.value=o),sf(t)}function el(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var yE=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 Hp(t,r,l){var o=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":o?t.setProperty(r,l):typeof l!="number"||l===0||yE.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Zp(t,r,l){if(r!=null&&typeof r!="object")throw Error(i(62));if(t=t.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var f in r)o=r[f],r.hasOwnProperty(f)&&l[f]!==o&&Hp(t,f,o)}else for(var m in r)r.hasOwnProperty(m)&&Hp(t,m,r[m])}function cf(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 vE=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"]]),bE=/^[\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 Yo(t){return bE.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Mr(){}var ff=null;function df(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var tl=null,nl=null;function Fp(t){var r=Ki(t);if(r&&(t=r.stateNode)){var l=t[pn]||null;e:switch(t=r.stateNode,r.type){case"input":if(of(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 o=l[r];if(o!==t&&o.form===t.form){var f=o[pn]||null;if(!f)throw Error(i(90));of(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<l.length;r++)o=l[r],o.form===t.form&&Ip(o)}break e;case"textarea":qp(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Wi(t,!!l.multiple,r,!1)}}}var hf=!1;function $p(t,r,l){if(hf)return t(r,l);hf=!0;try{var o=t(r);return o}finally{if(hf=!1,(tl!==null||nl!==null)&&(Du(),tl&&(r=tl,t=nl,nl=tl=null,Fp(r),t)))for(r=0;r<t.length;r++)Fp(t[r])}}function gs(t,r){var l=t.stateNode;if(l===null)return null;var o=l[pn]||null;if(o===null)return null;l=o[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":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(i(231,r,typeof l));return l}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mf=!1;if(Dr)try{var ys={};Object.defineProperty(ys,"passive",{get:function(){mf=!0}}),window.addEventListener("test",ys,ys),window.removeEventListener("test",ys,ys)}catch{mf=!1}var da=null,pf=null,Go=null;function Vp(){if(Go)return Go;var t,r=pf,l=r.length,o,f="value"in da?da.value:da.textContent,m=f.length;for(t=0;t<l&&r[t]===f[t];t++);var b=l-t;for(o=1;o<=b&&r[l-o]===f[m-o];o++);return Go=f.slice(t,1<o?1-o:void 0)}function Ko(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 Xo(){return!0}function Qp(){return!1}function gn(t){function r(l,o,f,m,b){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(l=t[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Xo:Qp,this.isPropagationStopped=Qp,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=Xo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Xo)},persist:function(){},isPersistent:Xo}),r}var fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jo=gn(fi),vs=v({},fi,{view:0,detail:0}),xE=gn(vs),gf,yf,bs,Wo=v({},vs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bf,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!==bs&&(bs&&t.type==="mousemove"?(gf=t.screenX-bs.screenX,yf=t.screenY-bs.screenY):yf=gf=0,bs=t),gf)},movementY:function(t){return"movementY"in t?t.movementY:yf}}),Yp=gn(Wo),SE=v({},Wo,{dataTransfer:0}),wE=gn(SE),EE=v({},vs,{relatedTarget:0}),vf=gn(EE),CE=v({},fi,{animationName:0,elapsedTime:0,pseudoElement:0}),NE=gn(CE),_E=v({},fi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),jE=gn(_E),kE=v({},fi,{data:0}),Gp=gn(kE),TE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AE={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"},zE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OE(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=zE[t])?!!r[t]:!1}function bf(){return OE}var RE=v({},vs,{key:function(t){if(t.key){var r=TE[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Ko(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?AE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bf,charCode:function(t){return t.type==="keypress"?Ko(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ko(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ME=gn(RE),DE=v({},Wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kp=gn(DE),UE=v({},vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bf}),LE=gn(UE),IE=v({},fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),BE=gn(IE),qE=v({},Wo,{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}),PE=gn(qE),HE=v({},fi,{newState:0,oldState:0}),ZE=gn(HE),FE=[9,13,27,32],xf=Dr&&"CompositionEvent"in window,xs=null;Dr&&"documentMode"in document&&(xs=document.documentMode);var $E=Dr&&"TextEvent"in window&&!xs,Xp=Dr&&(!xf||xs&&8<xs&&11>=xs),Jp=" ",Wp=!1;function eg(t,r){switch(t){case"keyup":return FE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rl=!1;function VE(t,r){switch(t){case"compositionend":return tg(r);case"keypress":return r.which!==32?null:(Wp=!0,Jp);case"textInput":return t=r.data,t===Jp&&Wp?null:t;default:return null}}function QE(t,r){if(rl)return t==="compositionend"||!xf&&eg(t,r)?(t=Vp(),Go=pf=da=null,rl=!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 Xp&&r.locale!=="ko"?null:r.data;default:return null}}var YE={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 ng(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!YE[t.type]:r==="textarea"}function rg(t,r,l,o){tl?nl?nl.push(o):nl=[o]:tl=o,r=Hu(r,"onChange"),0<r.length&&(l=new Jo("onChange","change",null,l,o),t.push({event:l,listeners:r}))}var Ss=null,ws=null;function GE(t){Bv(t,0)}function eu(t){var r=ps(t);if(Ip(r))return t}function ag(t,r){if(t==="change")return r}var ig=!1;if(Dr){var Sf;if(Dr){var wf="oninput"in document;if(!wf){var lg=document.createElement("div");lg.setAttribute("oninput","return;"),wf=typeof lg.oninput=="function"}Sf=wf}else Sf=!1;ig=Sf&&(!document.documentMode||9<document.documentMode)}function sg(){Ss&&(Ss.detachEvent("onpropertychange",og),ws=Ss=null)}function og(t){if(t.propertyName==="value"&&eu(ws)){var r=[];rg(r,ws,t,df(t)),$p(GE,r)}}function KE(t,r,l){t==="focusin"?(sg(),Ss=r,ws=l,Ss.attachEvent("onpropertychange",og)):t==="focusout"&&sg()}function XE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return eu(ws)}function JE(t,r){if(t==="click")return eu(r)}function WE(t,r){if(t==="input"||t==="change")return eu(r)}function eC(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Tn=typeof Object.is=="function"?Object.is:eC;function Es(t,r){if(Tn(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),o=Object.keys(r);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!pr.call(r,f)||!Tn(t[f],r[f]))return!1}return!0}function ug(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function cg(t,r){var l=ug(t);t=0;for(var o;l;){if(l.nodeType===3){if(o=t+l.textContent.length,t<=r&&o>=r)return{node:l,offset:r-t};t=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ug(l)}}function fg(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?fg(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function dg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Qo(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=Qo(t.document)}return r}function Ef(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 tC=Dr&&"documentMode"in document&&11>=document.documentMode,al=null,Cf=null,Cs=null,Nf=!1;function hg(t,r,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Nf||al==null||al!==Qo(o)||(o=al,"selectionStart"in o&&Ef(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Cs&&Es(Cs,o)||(Cs=o,o=Hu(Cf,"onSelect"),0<o.length&&(r=new Jo("onSelect","select",null,r,l),t.push({event:r,listeners:o}),r.target=al)))}function di(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var il={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},_f={},mg={};Dr&&(mg=document.createElement("div").style,"AnimationEvent"in window||(delete il.animationend.animation,delete il.animationiteration.animation,delete il.animationstart.animation),"TransitionEvent"in window||delete il.transitionend.transition);function hi(t){if(_f[t])return _f[t];if(!il[t])return t;var r=il[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in mg)return _f[t]=r[l];return t}var pg=hi("animationend"),gg=hi("animationiteration"),yg=hi("animationstart"),nC=hi("transitionrun"),rC=hi("transitionstart"),aC=hi("transitioncancel"),vg=hi("transitionend"),bg=new Map,jf="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(" ");jf.push("scrollEnd");function lr(t,r){bg.set(t,r),ci(r,[t])}var tu=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=[],ll=0,kf=0;function nu(){for(var t=ll,r=kf=ll=0;r<t;){var l=Zn[r];Zn[r++]=null;var o=Zn[r];Zn[r++]=null;var f=Zn[r];Zn[r++]=null;var m=Zn[r];if(Zn[r++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}m!==0&&xg(l,f,m)}}function ru(t,r,l,o){Zn[ll++]=t,Zn[ll++]=r,Zn[ll++]=l,Zn[ll++]=o,kf|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function Tf(t,r,l,o){return ru(t,r,l,o),au(t)}function mi(t,r){return ru(t,null,null,r),au(t)}function xg(t,r,l){t.lanes|=l;var o=t.alternate;o!==null&&(o.lanes|=l);for(var f=!1,m=t.return;m!==null;)m.childLanes|=l,o=m.alternate,o!==null&&(o.childLanes|=l),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&r!==null&&(f=31-ct(l),t=m.hiddenUpdates,o=t[f],o===null?t[f]=[r]:o.push(r),r.lane=l|536870912),m):null}function au(t){if(50<Vs)throw Vs=0,Id=null,Error(i(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var sl={};function iC(t,r,l,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(t,r,l,o){return new iC(t,r,l,o)}function Af(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ur(t,r){var l=t.alternate;return l===null?(l=An(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Sg(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function iu(t,r,l,o,f,m){var b=0;if(o=t,typeof t=="function")Af(t)&&(b=1);else if(typeof t=="string")b=cN(t,l,oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case G:return t=An(31,l,r,f),t.elementType=G,t.lanes=m,t;case C:return pi(l.children,f,m,r);case T:b=8,f|=24;break;case k:return t=An(12,l,r,f|2),t.elementType=k,t.lanes=m,t;case Y:return t=An(13,l,r,f),t.elementType=Y,t.lanes=m,t;case L:return t=An(19,l,r,f),t.elementType=L,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case U:b=10;break e;case P:b=9;break e;case H:b=11;break e;case B:b=14;break e;case D:b=16,o=null;break e}b=29,l=Error(i(130,t===null?"null":typeof t,"")),o=null}return r=An(b,l,r,f),r.elementType=t,r.type=o,r.lanes=m,r}function pi(t,r,l,o){return t=An(7,t,o,r),t.lanes=l,t}function zf(t,r,l){return t=An(6,t,null,r),t.lanes=l,t}function wg(t){var r=An(18,null,null,0);return r.stateNode=t,r}function Of(t,r,l){return r=An(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Eg=new WeakMap;function Fn(t,r){if(typeof t=="object"&&t!==null){var l=Eg.get(t);return l!==void 0?l:(r={value:t,source:r,stack:si(r)},Eg.set(t,r),r)}return{value:t,source:r,stack:si(r)}}var ol=[],ul=0,lu=null,Ns=0,$n=[],Vn=0,ha=null,gr=1,yr="";function Lr(t,r){ol[ul++]=Ns,ol[ul++]=lu,lu=t,Ns=r}function Cg(t,r,l){$n[Vn++]=gr,$n[Vn++]=yr,$n[Vn++]=ha,ha=t;var o=gr;t=yr;var f=32-ct(o)-1;o&=~(1<<f),l+=1;var m=32-ct(r)+f;if(30<m){var b=f-f%5;m=(o&(1<<b)-1).toString(32),o>>=b,f-=b,gr=1<<32-ct(r)+f|l<<f|o,yr=m+t}else gr=1<<m|l<<f|o,yr=t}function Rf(t){t.return!==null&&(Lr(t,1),Cg(t,1,0))}function Mf(t){for(;t===lu;)lu=ol[--ul],ol[ul]=null,Ns=ol[--ul],ol[ul]=null;for(;t===ha;)ha=$n[--Vn],$n[Vn]=null,yr=$n[--Vn],$n[Vn]=null,gr=$n[--Vn],$n[Vn]=null}function Ng(t,r){$n[Vn++]=gr,$n[Vn++]=yr,$n[Vn++]=ha,gr=r.id,yr=r.overflow,ha=t}var Jt=null,pt=null,Qe=!1,ma=null,Qn=!1,Df=Error(i(519));function pa(t){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _s(Fn(r,t)),Df}function _g(t){var r=t.stateNode,l=t.type,o=t.memoizedProps;switch(r[Xt]=t,r[pn]=o,l){case"dialog":Ze("cancel",r),Ze("close",r);break;case"iframe":case"object":case"embed":Ze("load",r);break;case"video":case"audio":for(l=0;l<Ys.length;l++)Ze(Ys[l],r);break;case"source":Ze("error",r);break;case"img":case"image":case"link":Ze("error",r),Ze("load",r);break;case"details":Ze("toggle",r);break;case"input":Ze("invalid",r),Bp(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ze("invalid",r);break;case"textarea":Ze("invalid",r),Pp(r,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||o.suppressHydrationWarning===!0||Zv(r.textContent,l)?(o.popover!=null&&(Ze("beforetoggle",r),Ze("toggle",r)),o.onScroll!=null&&Ze("scroll",r),o.onScrollEnd!=null&&Ze("scrollend",r),o.onClick!=null&&(r.onclick=Mr),r=!0):r=!1,r||pa(t,!0)}function jg(t){for(Jt=t.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Jt=Jt.return}}function cl(t){if(t!==Jt)return!1;if(!Qe)return jg(t),Qe=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Wd(t.type,t.memoizedProps)),l=!l),l&&pt&&pa(t),jg(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));pt=Jv(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));pt=Jv(t)}else r===27?(r=pt,Ta(t.type)?(t=ah,ah=null,pt=t):pt=r):pt=Jt?Gn(t.stateNode.nextSibling):null;return!0}function gi(){pt=Jt=null,Qe=!1}function Uf(){var t=ma;return t!==null&&(xn===null?xn=t:xn.push.apply(xn,t),ma=null),t}function _s(t){ma===null?ma=[t]:ma.push(t)}var Lf=R(null),yi=null,Ir=null;function ga(t,r,l){_(Lf,r._currentValue),r._currentValue=l}function Br(t){t._currentValue=Lf.current,K(Lf)}function If(t,r,l){for(;t!==null;){var o=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),t===l)break;t=t.return}}function Bf(t,r,l,o){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=f;for(var z=0;z<r.length;z++)if(E.context===r[z]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),If(m.return,l,t),o||(b=null);break e}m=E.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(i(341));b.lanes|=l,m=b.alternate,m!==null&&(m.lanes|=l),If(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 fl(t,r,l,o){t=null;for(var f=r,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var E=f.type;Tn(f.pendingProps.value,b.value)||(t!==null?t.push(E):t=[E])}}else if(f===Oe.current){if(b=f.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Ws):t=[Ws])}f=f.return}t!==null&&Bf(r,t,l,o),r.flags|=262144}function su(t){for(t=t.firstContext;t!==null;){if(!Tn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function vi(t){yi=t,Ir=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Wt(t){return kg(yi,t)}function ou(t,r){return yi===null&&vi(t),kg(t,r)}function kg(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Ir===null){if(t===null)throw Error(i(308));Ir=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Ir=Ir.next=r;return l}var lC=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,o){t.push(o)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},sC=e.unstable_scheduleCallback,oC=e.unstable_NormalPriority,Rt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qf(){return{controller:new lC,data:new Map,refCount:0}}function js(t){t.refCount--,t.refCount===0&&sC(oC,function(){t.controller.abort()})}var ks=null,Pf=0,dl=0,hl=null;function uC(t,r){if(ks===null){var l=ks=[];Pf=0,dl=Fd(),hl={status:"pending",value:void 0,then:function(o){l.push(o)}}}return Pf++,r.then(Tg,Tg),r}function Tg(){if(--Pf===0&&ks!==null){hl!==null&&(hl.status="fulfilled");var t=ks;ks=null,dl=0,hl=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function cC(t,r){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return t.then(function(){o.status="fulfilled",o.value=r;for(var f=0;f<l.length;f++)(0,l[f])(r)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var Ag=q.S;q.S=function(t,r){hv=Ft(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&uC(t,r),Ag!==null&&Ag(t,r)};var bi=R(null);function Hf(){var t=bi.current;return t!==null?t:ft.pooledCache}function uu(t,r){r===null?_(bi,bi.current):_(bi,r.pool)}function zg(){var t=Hf();return t===null?null:{parent:Rt._currentValue,pool:t}}var ml=Error(i(460)),Zf=Error(i(474)),cu=Error(i(542)),fu={then:function(){}};function Og(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Rg(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(Mr,Mr),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Dg(t),t;default:if(typeof r.status=="string")r.then(Mr,Mr);else{if(t=ft,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=r,t.status="pending",t.then(function(o){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=o}},function(o){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Dg(t),t}throw Si=r,ml}}function xi(t){try{var r=t._init;return r(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Si=l,ml):l}}var Si=null;function Mg(){if(Si===null)throw Error(i(459));var t=Si;return Si=null,t}function Dg(t){if(t===ml||t===cu)throw Error(i(483))}var pl=null,Ts=0;function du(t){var r=Ts;return Ts+=1,pl===null&&(pl=[]),Rg(pl,t,r)}function As(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function hu(t,r){throw r.$$typeof===x?Error(i(525)):(t=Object.prototype.toString.call(r),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Ug(t){function r(I,M){if(t){var Z=I.deletions;Z===null?(I.deletions=[M],I.flags|=16):Z.push(M)}}function l(I,M){if(!t)return null;for(;M!==null;)r(I,M),M=M.sibling;return null}function o(I){for(var M=new Map;I!==null;)I.key!==null?M.set(I.key,I):M.set(I.index,I),I=I.sibling;return M}function f(I,M){return I=Ur(I,M),I.index=0,I.sibling=null,I}function m(I,M,Z){return I.index=Z,t?(Z=I.alternate,Z!==null?(Z=Z.index,Z<M?(I.flags|=67108866,M):Z):(I.flags|=67108866,M)):(I.flags|=1048576,M)}function b(I){return t&&I.alternate===null&&(I.flags|=67108866),I}function E(I,M,Z,W){return M===null||M.tag!==6?(M=zf(Z,I.mode,W),M.return=I,M):(M=f(M,Z),M.return=I,M)}function z(I,M,Z,W){var Ne=Z.type;return Ne===C?X(I,M,Z.props.children,W,Z.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===D&&xi(Ne)===M.type)?(M=f(M,Z.props),As(M,Z),M.return=I,M):(M=iu(Z.type,Z.key,Z.props,null,I.mode,W),As(M,Z),M.return=I,M)}function F(I,M,Z,W){return M===null||M.tag!==4||M.stateNode.containerInfo!==Z.containerInfo||M.stateNode.implementation!==Z.implementation?(M=Of(Z,I.mode,W),M.return=I,M):(M=f(M,Z.children||[]),M.return=I,M)}function X(I,M,Z,W,Ne){return M===null||M.tag!==7?(M=pi(Z,I.mode,W,Ne),M.return=I,M):(M=f(M,Z),M.return=I,M)}function te(I,M,Z){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=zf(""+M,I.mode,Z),M.return=I,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case S:return Z=iu(M.type,M.key,M.props,null,I.mode,Z),As(Z,M),Z.return=I,Z;case j:return M=Of(M,I.mode,Z),M.return=I,M;case D:return M=xi(M),te(I,M,Z)}if(ne(M)||se(M))return M=pi(M,I.mode,Z,null),M.return=I,M;if(typeof M.then=="function")return te(I,du(M),Z);if(M.$$typeof===U)return te(I,ou(I,M),Z);hu(I,M)}return null}function V(I,M,Z,W){var Ne=M!==null?M.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ne!==null?null:E(I,M,""+Z,W);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case S:return Z.key===Ne?z(I,M,Z,W):null;case j:return Z.key===Ne?F(I,M,Z,W):null;case D:return Z=xi(Z),V(I,M,Z,W)}if(ne(Z)||se(Z))return Ne!==null?null:X(I,M,Z,W,null);if(typeof Z.then=="function")return V(I,M,du(Z),W);if(Z.$$typeof===U)return V(I,M,ou(I,Z),W);hu(I,Z)}return null}function Q(I,M,Z,W,Ne){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return I=I.get(Z)||null,E(M,I,""+W,Ne);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case S:return I=I.get(W.key===null?Z:W.key)||null,z(M,I,W,Ne);case j:return I=I.get(W.key===null?Z:W.key)||null,F(M,I,W,Ne);case D:return W=xi(W),Q(I,M,Z,W,Ne)}if(ne(W)||se(W))return I=I.get(Z)||null,X(M,I,W,Ne,null);if(typeof W.then=="function")return Q(I,M,Z,du(W),Ne);if(W.$$typeof===U)return Q(I,M,Z,ou(M,W),Ne);hu(M,W)}return null}function pe(I,M,Z,W){for(var Ne=null,Ke=null,be=M,Le=M=0,$e=null;be!==null&&Le<Z.length;Le++){be.index>Le?($e=be,be=null):$e=be.sibling;var Xe=V(I,be,Z[Le],W);if(Xe===null){be===null&&(be=$e);break}t&&be&&Xe.alternate===null&&r(I,be),M=m(Xe,M,Le),Ke===null?Ne=Xe:Ke.sibling=Xe,Ke=Xe,be=$e}if(Le===Z.length)return l(I,be),Qe&&Lr(I,Le),Ne;if(be===null){for(;Le<Z.length;Le++)be=te(I,Z[Le],W),be!==null&&(M=m(be,M,Le),Ke===null?Ne=be:Ke.sibling=be,Ke=be);return Qe&&Lr(I,Le),Ne}for(be=o(be);Le<Z.length;Le++)$e=Q(be,I,Le,Z[Le],W),$e!==null&&(t&&$e.alternate!==null&&be.delete($e.key===null?Le:$e.key),M=m($e,M,Le),Ke===null?Ne=$e:Ke.sibling=$e,Ke=$e);return t&&be.forEach(function(Ma){return r(I,Ma)}),Qe&&Lr(I,Le),Ne}function je(I,M,Z,W){if(Z==null)throw Error(i(151));for(var Ne=null,Ke=null,be=M,Le=M=0,$e=null,Xe=Z.next();be!==null&&!Xe.done;Le++,Xe=Z.next()){be.index>Le?($e=be,be=null):$e=be.sibling;var Ma=V(I,be,Xe.value,W);if(Ma===null){be===null&&(be=$e);break}t&&be&&Ma.alternate===null&&r(I,be),M=m(Ma,M,Le),Ke===null?Ne=Ma:Ke.sibling=Ma,Ke=Ma,be=$e}if(Xe.done)return l(I,be),Qe&&Lr(I,Le),Ne;if(be===null){for(;!Xe.done;Le++,Xe=Z.next())Xe=te(I,Xe.value,W),Xe!==null&&(M=m(Xe,M,Le),Ke===null?Ne=Xe:Ke.sibling=Xe,Ke=Xe);return Qe&&Lr(I,Le),Ne}for(be=o(be);!Xe.done;Le++,Xe=Z.next())Xe=Q(be,I,Le,Xe.value,W),Xe!==null&&(t&&Xe.alternate!==null&&be.delete(Xe.key===null?Le:Xe.key),M=m(Xe,M,Le),Ke===null?Ne=Xe:Ke.sibling=Xe,Ke=Xe);return t&&be.forEach(function(SN){return r(I,SN)}),Qe&&Lr(I,Le),Ne}function ot(I,M,Z,W){if(typeof Z=="object"&&Z!==null&&Z.type===C&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case S:e:{for(var Ne=Z.key;M!==null;){if(M.key===Ne){if(Ne=Z.type,Ne===C){if(M.tag===7){l(I,M.sibling),W=f(M,Z.props.children),W.return=I,I=W;break e}}else if(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===D&&xi(Ne)===M.type){l(I,M.sibling),W=f(M,Z.props),As(W,Z),W.return=I,I=W;break e}l(I,M);break}else r(I,M);M=M.sibling}Z.type===C?(W=pi(Z.props.children,I.mode,W,Z.key),W.return=I,I=W):(W=iu(Z.type,Z.key,Z.props,null,I.mode,W),As(W,Z),W.return=I,I=W)}return b(I);case j:e:{for(Ne=Z.key;M!==null;){if(M.key===Ne)if(M.tag===4&&M.stateNode.containerInfo===Z.containerInfo&&M.stateNode.implementation===Z.implementation){l(I,M.sibling),W=f(M,Z.children||[]),W.return=I,I=W;break e}else{l(I,M);break}else r(I,M);M=M.sibling}W=Of(Z,I.mode,W),W.return=I,I=W}return b(I);case D:return Z=xi(Z),ot(I,M,Z,W)}if(ne(Z))return pe(I,M,Z,W);if(se(Z)){if(Ne=se(Z),typeof Ne!="function")throw Error(i(150));return Z=Ne.call(Z),je(I,M,Z,W)}if(typeof Z.then=="function")return ot(I,M,du(Z),W);if(Z.$$typeof===U)return ot(I,M,ou(I,Z),W);hu(I,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,M!==null&&M.tag===6?(l(I,M.sibling),W=f(M,Z),W.return=I,I=W):(l(I,M),W=zf(Z,I.mode,W),W.return=I,I=W),b(I)):l(I,M)}return function(I,M,Z,W){try{Ts=0;var Ne=ot(I,M,Z,W);return pl=null,Ne}catch(be){if(be===ml||be===cu)throw be;var Ke=An(29,be,null,I.mode);return Ke.lanes=W,Ke.return=I,Ke}finally{}}}var wi=Ug(!0),Lg=Ug(!1),ya=!1;function Ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $f(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 va(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ba(t,r,l){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Je&2)!==0){var f=o.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),o.pending=r,r=au(t),xg(t,null,l),r}return ru(t,o,r,l),au(t)}function zs(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var o=r.lanes;o&=t.pendingLanes,l|=o,r.lanes=l,kp(t,l)}}function Vf(t,r){var l=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,l=l.next}while(l!==null);m===null?f=m=r:m=m.next=r}else f=m=r;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var Qf=!1;function Os(){if(Qf){var t=hl;if(t!==null)throw t}}function Rs(t,r,l,o){Qf=!1;var f=t.updateQueue;ya=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var z=E,F=z.next;z.next=null,b===null?m=F:b.next=F,b=z;var X=t.alternate;X!==null&&(X=X.updateQueue,E=X.lastBaseUpdate,E!==b&&(E===null?X.firstBaseUpdate=F:E.next=F,X.lastBaseUpdate=z))}if(m!==null){var te=f.baseState;b=0,X=F=z=null,E=m;do{var V=E.lane&-536870913,Q=V!==E.lane;if(Q?(Fe&V)===V:(o&V)===V){V!==0&&V===dl&&(Qf=!0),X!==null&&(X=X.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var pe=t,je=E;V=r;var ot=l;switch(je.tag){case 1:if(pe=je.payload,typeof pe=="function"){te=pe.call(ot,te,V);break e}te=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=je.payload,V=typeof pe=="function"?pe.call(ot,te,V):pe,V==null)break e;te=v({},te,V);break e;case 2:ya=!0}}V=E.callback,V!==null&&(t.flags|=64,Q&&(t.flags|=8192),Q=f.callbacks,Q===null?f.callbacks=[V]:Q.push(V))}else Q={lane:V,tag:E.tag,payload:E.payload,callback:E.callback,next:null},X===null?(F=X=Q,z=te):X=X.next=Q,b|=V;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;Q=E,E=Q.next,Q.next=null,f.lastBaseUpdate=Q,f.shared.pending=null}}while(!0);X===null&&(z=te),f.baseState=z,f.firstBaseUpdate=F,f.lastBaseUpdate=X,m===null&&(f.shared.lanes=0),Ca|=b,t.lanes=b,t.memoizedState=te}}function Ig(t,r){if(typeof t!="function")throw Error(i(191,t));t.call(r)}function Bg(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Ig(l[t],r)}var gl=R(null),mu=R(0);function qg(t,r){t=Yr,_(mu,t),_(gl,r),Yr=t|r.baseLanes}function Yf(){_(mu,Yr),_(gl,gl.current)}function Gf(){Yr=mu.current,K(gl),K(mu)}var zn=R(null),Yn=null;function xa(t){var r=t.alternate;_(zt,zt.current&1),_(zn,t),Yn===null&&(r===null||gl.current!==null||r.memoizedState!==null)&&(Yn=t)}function Kf(t){_(zt,zt.current),_(zn,t),Yn===null&&(Yn=t)}function Pg(t){t.tag===22?(_(zt,zt.current),_(zn,t),Yn===null&&(Yn=t)):Sa()}function Sa(){_(zt,zt.current),_(zn,zn.current)}function On(t){K(zn),Yn===t&&(Yn=null),K(zt)}var zt=R(0);function pu(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||nh(l)||rh(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 qr=0,De=null,lt=null,Mt=null,gu=!1,yl=!1,Ei=!1,yu=0,Ms=0,vl=null,fC=0;function _t(){throw Error(i(321))}function Xf(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!Tn(t[l],r[l]))return!1;return!0}function Jf(t,r,l,o,f,m){return qr=m,De=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,q.H=t===null||t.memoizedState===null?Cy:hd,Ei=!1,m=l(o,f),Ei=!1,yl&&(m=Zg(r,l,o,f)),Hg(t),m}function Hg(t){q.H=Ls;var r=lt!==null&<.next!==null;if(qr=0,Mt=lt=De=null,gu=!1,Ms=0,vl=null,r)throw Error(i(300));t===null||Dt||(t=t.dependencies,t!==null&&su(t)&&(Dt=!0))}function Zg(t,r,l,o){De=t;var f=0;do{if(yl&&(vl=null),Ms=0,yl=!1,25<=f)throw Error(i(301));if(f+=1,Mt=lt=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}q.H=Ny,m=r(l,o)}while(yl);return m}function dC(){var t=q.H,r=t.useState()[0];return r=typeof r.then=="function"?Ds(r):r,t=t.useState()[0],(lt!==null?lt.memoizedState:null)!==t&&(De.flags|=1024),r}function Wf(){var t=yu!==0;return yu=0,t}function ed(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function td(t){if(gu){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}gu=!1}qr=0,Mt=lt=De=null,yl=!1,Ms=yu=0,vl=null}function cn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?De.memoizedState=Mt=t:Mt=Mt.next=t,Mt}function Ot(){if(lt===null){var t=De.alternate;t=t!==null?t.memoizedState:null}else t=lt.next;var r=Mt===null?De.memoizedState:Mt.next;if(r!==null)Mt=r,lt=t;else{if(t===null)throw De.alternate===null?Error(i(467)):Error(i(310));lt=t,t={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},Mt===null?De.memoizedState=Mt=t:Mt=Mt.next=t}return Mt}function vu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ds(t){var r=Ms;return Ms+=1,vl===null&&(vl=[]),t=Rg(vl,t,r),r=De,(Mt===null?r.memoizedState:Mt.next)===null&&(r=r.alternate,q.H=r===null||r.memoizedState===null?Cy:hd),t}function bu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ds(t);if(t.$$typeof===U)return Wt(t)}throw Error(i(438,String(t)))}function nd(t){var r=null,l=De.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var o=De.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=vu(),De.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),o=0;o<t;o++)l[o]=ie;return r.index++,l}function Pr(t,r){return typeof r=="function"?r(t):r}function xu(t){var r=Ot();return rd(r,lt,t)}function rd(t,r,l){var o=t.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=l;var f=t.baseQueue,m=o.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}r.baseQueue=f=m,o.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{r=f.next;var E=b=null,z=null,F=r,X=!1;do{var te=F.lane&-536870913;if(te!==F.lane?(Fe&te)===te:(qr&te)===te){var V=F.revertLane;if(V===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),te===dl&&(X=!0);else if((qr&V)===V){F=F.next,V===dl&&(X=!0);continue}else te={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},z===null?(E=z=te,b=m):z=z.next=te,De.lanes|=V,Ca|=V;te=F.action,Ei&&l(m,te),m=F.hasEagerState?F.eagerState:l(m,te)}else V={lane:te,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},z===null?(E=z=V,b=m):z=z.next=V,De.lanes|=te,Ca|=te;F=F.next}while(F!==null&&F!==r);if(z===null?b=m:z.next=E,!Tn(m,t.memoizedState)&&(Dt=!0,X&&(l=hl,l!==null)))throw l;t.memoizedState=m,t.baseState=b,t.baseQueue=z,o.lastRenderedState=m}return f===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function ad(t){var r=Ot(),l=r.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=t;var o=l.dispatch,f=l.pending,m=r.memoizedState;if(f!==null){l.pending=null;var b=f=f.next;do m=t(m,b.action),b=b.next;while(b!==f);Tn(m,r.memoizedState)||(Dt=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,o]}function Fg(t,r,l){var o=De,f=Ot(),m=Qe;if(m){if(l===void 0)throw Error(i(407));l=l()}else l=r();var b=!Tn((lt||f).memoizedState,l);if(b&&(f.memoizedState=l,Dt=!0),f=f.queue,sd(Qg.bind(null,o,f,t),[t]),f.getSnapshot!==r||b||Mt!==null&&Mt.memoizedState.tag&1){if(o.flags|=2048,bl(9,{destroy:void 0},Vg.bind(null,o,f,l,r),null),ft===null)throw Error(i(349));m||(qr&127)!==0||$g(o,r,l)}return l}function $g(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=De.updateQueue,r===null?(r=vu(),De.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Vg(t,r,l,o){r.value=l,r.getSnapshot=o,Yg(r)&&Gg(t)}function Qg(t,r,l){return l(function(){Yg(r)&&Gg(t)})}function Yg(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!Tn(t,l)}catch{return!0}}function Gg(t){var r=mi(t,2);r!==null&&Sn(r,t,2)}function id(t){var r=cn();if(typeof t=="function"){var l=t;if(t=l(),Ei){mn(!0);try{l()}finally{mn(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:t},r}function Kg(t,r,l,o){return t.baseState=l,rd(t,lt,typeof o=="function"?o:Pr)}function hC(t,r,l,o,f){if(Eu(t))throw Error(i(485));if(t=r.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};q.T!==null?l(!0):m.isTransition=!1,o(m),l=r.pending,l===null?(m.next=r.pending=m,Xg(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Xg(t,r){var l=r.action,o=r.payload,f=t.state;if(r.isTransition){var m=q.T,b={};q.T=b;try{var E=l(f,o),z=q.S;z!==null&&z(b,E),Jg(t,r,E)}catch(F){ld(t,r,F)}finally{m!==null&&b.types!==null&&(m.types=b.types),q.T=m}}else try{m=l(f,o),Jg(t,r,m)}catch(F){ld(t,r,F)}}function Jg(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){Wg(t,r,o)},function(o){return ld(t,r,o)}):Wg(t,r,l)}function Wg(t,r,l){r.status="fulfilled",r.value=l,ey(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,Xg(t,l)))}function ld(t,r,l){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=l,ey(r),r=r.next;while(r!==o)}t.action=null}function ey(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function ty(t,r){return r}function ny(t,r){if(Qe){var l=ft.formState;if(l!==null){e:{var o=De;if(Qe){if(pt){t:{for(var f=pt,m=Qn;f.nodeType!==8;){if(!m){f=null;break t}if(f=Gn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){pt=Gn(f.nextSibling),o=f.data==="F!";break e}}pa(o)}o=!1}o&&(r=l[0])}}return l=cn(),l.memoizedState=l.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ty,lastRenderedState:r},l.queue=o,l=Sy.bind(null,De,o),o.dispatch=l,o=id(!1),m=dd.bind(null,De,!1,o.queue),o=cn(),f={state:r,dispatch:null,action:t,pending:null},o.queue=f,l=hC.bind(null,De,f,m,l),f.dispatch=l,o.memoizedState=t,[r,l,!1]}function ry(t){var r=Ot();return ay(r,lt,t)}function ay(t,r,l){if(r=rd(t,r,ty)[0],t=xu(Pr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=Ds(r)}catch(b){throw b===ml?cu:b}else o=r;r=Ot();var f=r.queue,m=f.dispatch;return l!==r.memoizedState&&(De.flags|=2048,bl(9,{destroy:void 0},mC.bind(null,f,l),null)),[o,m,t]}function mC(t,r){t.action=r}function iy(t){var r=Ot(),l=lt;if(l!==null)return ay(r,l,t);Ot(),r=r.memoizedState,l=Ot();var o=l.queue.dispatch;return l.memoizedState=t,[r,o,!1]}function bl(t,r,l,o){return t={tag:t,create:l,deps:o,inst:r,next:null},r=De.updateQueue,r===null&&(r=vu(),De.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(o=l.next,l.next=t,t.next=o,r.lastEffect=t),t}function ly(){return Ot().memoizedState}function Su(t,r,l,o){var f=cn();De.flags|=t,f.memoizedState=bl(1|r,{destroy:void 0},l,o===void 0?null:o)}function wu(t,r,l,o){var f=Ot();o=o===void 0?null:o;var m=f.memoizedState.inst;lt!==null&&o!==null&&Xf(o,lt.memoizedState.deps)?f.memoizedState=bl(r,m,l,o):(De.flags|=t,f.memoizedState=bl(1|r,m,l,o))}function sy(t,r){Su(8390656,8,t,r)}function sd(t,r){wu(2048,8,t,r)}function pC(t){De.flags|=4;var r=De.updateQueue;if(r===null)r=vu(),De.updateQueue=r,r.events=[t];else{var l=r.events;l===null?r.events=[t]:l.push(t)}}function oy(t){var r=Ot().memoizedState;return pC({ref:r,nextImpl:t}),function(){if((Je&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function uy(t,r){return wu(4,2,t,r)}function cy(t,r){return wu(4,4,t,r)}function fy(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 dy(t,r,l){l=l!=null?l.concat([t]):null,wu(4,4,fy.bind(null,r,t),l)}function od(){}function hy(t,r){var l=Ot();r=r===void 0?null:r;var o=l.memoizedState;return r!==null&&Xf(r,o[1])?o[0]:(l.memoizedState=[t,r],t)}function my(t,r){var l=Ot();r=r===void 0?null:r;var o=l.memoizedState;if(r!==null&&Xf(r,o[1]))return o[0];if(o=t(),Ei){mn(!0);try{t()}finally{mn(!1)}}return l.memoizedState=[o,r],o}function ud(t,r,l){return l===void 0||(qr&1073741824)!==0&&(Fe&261930)===0?t.memoizedState=r:(t.memoizedState=l,t=pv(),De.lanes|=t,Ca|=t,l)}function py(t,r,l,o){return Tn(l,r)?l:gl.current!==null?(t=ud(t,l,o),Tn(t,r)||(Dt=!0),t):(qr&42)===0||(qr&1073741824)!==0&&(Fe&261930)===0?(Dt=!0,t.memoizedState=l):(t=pv(),De.lanes|=t,Ca|=t,r)}function gy(t,r,l,o,f){var m=re.p;re.p=m!==0&&8>m?m:8;var b=q.T,E={};q.T=E,dd(t,!1,r,l);try{var z=f(),F=q.S;if(F!==null&&F(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var X=cC(z,o);Us(t,r,X,Dn(t))}else Us(t,r,o,Dn(t))}catch(te){Us(t,r,{then:function(){},status:"rejected",reason:te},Dn())}finally{re.p=m,b!==null&&E.types!==null&&(b.types=E.types),q.T=b}}function gC(){}function cd(t,r,l,o){if(t.tag!==5)throw Error(i(476));var f=yy(t).queue;gy(t,f,r,me,l===null?gC:function(){return vy(t),l(o)})}function yy(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:Pr,lastRenderedState:me},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function vy(t){var r=yy(t);r.next===null&&(r=t.alternate.memoizedState),Us(t,r.next.queue,{},Dn())}function fd(){return Wt(Ws)}function by(){return Ot().memoizedState}function xy(){return Ot().memoizedState}function yC(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=Dn();t=va(l);var o=ba(r,t,l);o!==null&&(Sn(o,r,l),zs(o,r,l)),r={cache:qf()},t.payload=r;return}r=r.return}}function vC(t,r,l){var o=Dn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Eu(t)?wy(r,l):(l=Tf(t,r,l,o),l!==null&&(Sn(l,t,o),Ey(l,r,o)))}function Sy(t,r,l){var o=Dn();Us(t,r,l,o)}function Us(t,r,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Eu(t))wy(r,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var b=r.lastRenderedState,E=m(b,l);if(f.hasEagerState=!0,f.eagerState=E,Tn(E,b))return ru(t,r,f,0),ft===null&&nu(),!1}catch{}finally{}if(l=Tf(t,r,f,o),l!==null)return Sn(l,t,o),Ey(l,r,o),!0}return!1}function dd(t,r,l,o){if(o={lane:2,revertLane:Fd(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Eu(t)){if(r)throw Error(i(479))}else r=Tf(t,l,o,2),r!==null&&Sn(r,t,2)}function Eu(t){var r=t.alternate;return t===De||r!==null&&r===De}function wy(t,r){yl=gu=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function Ey(t,r,l){if((l&4194048)!==0){var o=r.lanes;o&=t.pendingLanes,l|=o,r.lanes=l,kp(t,l)}}var Ls={readContext:Wt,use:bu,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};Ls.useEffectEvent=_t;var Cy={readContext:Wt,use:bu,useCallback:function(t,r){return cn().memoizedState=[t,r===void 0?null:r],t},useContext:Wt,useEffect:sy,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,Su(4194308,4,fy.bind(null,r,t),l)},useLayoutEffect:function(t,r){return Su(4194308,4,t,r)},useInsertionEffect:function(t,r){Su(4,2,t,r)},useMemo:function(t,r){var l=cn();r=r===void 0?null:r;var o=t();if(Ei){mn(!0);try{t()}finally{mn(!1)}}return l.memoizedState=[o,r],o},useReducer:function(t,r,l){var o=cn();if(l!==void 0){var f=l(r);if(Ei){mn(!0);try{l(r)}finally{mn(!1)}}}else f=r;return o.memoizedState=o.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},o.queue=t,t=t.dispatch=vC.bind(null,De,t),[o.memoizedState,t]},useRef:function(t){var r=cn();return t={current:t},r.memoizedState=t},useState:function(t){t=id(t);var r=t.queue,l=Sy.bind(null,De,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:od,useDeferredValue:function(t,r){var l=cn();return ud(l,t,r)},useTransition:function(){var t=id(!1);return t=gy.bind(null,De,t.queue,!0,!1),cn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var o=De,f=cn();if(Qe){if(l===void 0)throw Error(i(407));l=l()}else{if(l=r(),ft===null)throw Error(i(349));(Fe&127)!==0||$g(o,r,l)}f.memoizedState=l;var m={value:l,getSnapshot:r};return f.queue=m,sy(Qg.bind(null,o,m,t),[t]),o.flags|=2048,bl(9,{destroy:void 0},Vg.bind(null,o,m,l,r),null),l},useId:function(){var t=cn(),r=ft.identifierPrefix;if(Qe){var l=yr,o=gr;l=(o&~(1<<32-ct(o)-1)).toString(32)+l,r="_"+r+"R_"+l,l=yu++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=fC++,r="_"+r+"r_"+l.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:fd,useFormState:ny,useActionState:ny,useOptimistic:function(t){var r=cn();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=dd.bind(null,De,!0,l),l.dispatch=r,[t,r]},useMemoCache:nd,useCacheRefresh:function(){return cn().memoizedState=yC.bind(null,De)},useEffectEvent:function(t){var r=cn(),l={impl:t};return r.memoizedState=l,function(){if((Je&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},hd={readContext:Wt,use:bu,useCallback:hy,useContext:Wt,useEffect:sd,useImperativeHandle:dy,useInsertionEffect:uy,useLayoutEffect:cy,useMemo:my,useReducer:xu,useRef:ly,useState:function(){return xu(Pr)},useDebugValue:od,useDeferredValue:function(t,r){var l=Ot();return py(l,lt.memoizedState,t,r)},useTransition:function(){var t=xu(Pr)[0],r=Ot().memoizedState;return[typeof t=="boolean"?t:Ds(t),r]},useSyncExternalStore:Fg,useId:by,useHostTransitionStatus:fd,useFormState:ry,useActionState:ry,useOptimistic:function(t,r){var l=Ot();return Kg(l,lt,t,r)},useMemoCache:nd,useCacheRefresh:xy};hd.useEffectEvent=oy;var Ny={readContext:Wt,use:bu,useCallback:hy,useContext:Wt,useEffect:sd,useImperativeHandle:dy,useInsertionEffect:uy,useLayoutEffect:cy,useMemo:my,useReducer:ad,useRef:ly,useState:function(){return ad(Pr)},useDebugValue:od,useDeferredValue:function(t,r){var l=Ot();return lt===null?ud(l,t,r):py(l,lt.memoizedState,t,r)},useTransition:function(){var t=ad(Pr)[0],r=Ot().memoizedState;return[typeof t=="boolean"?t:Ds(t),r]},useSyncExternalStore:Fg,useId:by,useHostTransitionStatus:fd,useFormState:iy,useActionState:iy,useOptimistic:function(t,r){var l=Ot();return lt!==null?Kg(l,lt,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:nd,useCacheRefresh:xy};Ny.useEffectEvent=oy;function md(t,r,l,o){r=t.memoizedState,l=l(o,r),l=l==null?r:v({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var pd={enqueueSetState:function(t,r,l){t=t._reactInternals;var o=Dn(),f=va(o);f.payload=r,l!=null&&(f.callback=l),r=ba(t,f,o),r!==null&&(Sn(r,t,o),zs(r,t,o))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var o=Dn(),f=va(o);f.tag=1,f.payload=r,l!=null&&(f.callback=l),r=ba(t,f,o),r!==null&&(Sn(r,t,o),zs(r,t,o))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=Dn(),o=va(l);o.tag=2,r!=null&&(o.callback=r),r=ba(t,o,l),r!==null&&(Sn(r,t,l),zs(r,t,l))}};function _y(t,r,l,o,f,m,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,m,b):r.prototype&&r.prototype.isPureReactComponent?!Es(l,o)||!Es(f,m):!0}function jy(t,r,l,o){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,o),r.state!==t&&pd.enqueueReplaceState(r,r.state,null)}function Ci(t,r){var l=r;if("ref"in r){l={};for(var o in r)o!=="ref"&&(l[o]=r[o])}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 ky(t){tu(t)}function Ty(t){console.error(t)}function Ay(t){tu(t)}function Cu(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function zy(t,r,l){try{var o=t.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function gd(t,r,l){return l=va(l),l.tag=3,l.payload={element:null},l.callback=function(){Cu(t,r)},l}function Oy(t){return t=va(t),t.tag=3,t}function Ry(t,r,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var m=o.value;t.payload=function(){return f(m)},t.callback=function(){zy(r,l,o)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){zy(r,l,o),typeof f!="function"&&(Na===null?Na=new Set([this]):Na.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function bC(t,r,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=l.alternate,r!==null&&fl(r,l,f,!0),l=zn.current,l!==null){switch(l.tag){case 31:case 13:return Yn===null?Uu():l.alternate===null&&jt===0&&(jt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===fu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([o]):r.add(o),Pd(t,o,f)),!1;case 22:return l.flags|=65536,o===fu?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([o]):l.add(o)),Pd(t,o,f)),!1}throw Error(i(435,l.tag))}return Pd(t,o,f),Uu(),!1}if(Qe)return r=zn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,o!==Df&&(t=Error(i(422),{cause:o}),_s(Fn(t,l)))):(o!==Df&&(r=Error(i(423),{cause:o}),_s(Fn(r,l))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,o=Fn(o,l),f=gd(t.stateNode,o,f),Vf(t,f),jt!==4&&(jt=2)),!1;var m=Error(i(520),{cause:o});if(m=Fn(m,l),$s===null?$s=[m]:$s.push(m),jt!==4&&(jt=2),r===null)return!0;o=Fn(o,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=f&-f,l.lanes|=t,t=gd(l.stateNode,o,t),Vf(l,t),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Na===null||!Na.has(m))))return l.flags|=65536,f&=-f,l.lanes|=f,f=Oy(f),Ry(f,t,l,o),Vf(l,f),!1}l=l.return}while(l!==null);return!1}var yd=Error(i(461)),Dt=!1;function en(t,r,l,o){r.child=t===null?Lg(r,null,l,o):wi(r,t.child,l,o)}function My(t,r,l,o,f){l=l.render;var m=r.ref;if("ref"in o){var b={};for(var E in o)E!=="ref"&&(b[E]=o[E])}else b=o;return vi(r),o=Jf(t,r,l,b,m,f),E=Wf(),t!==null&&!Dt?(ed(t,r,f),Hr(t,r,f)):(Qe&&E&&Rf(r),r.flags|=1,en(t,r,o,f),r.child)}function Dy(t,r,l,o,f){if(t===null){var m=l.type;return typeof m=="function"&&!Af(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,Uy(t,r,m,o,f)):(t=iu(l.type,null,o,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!Nd(t,f)){var b=m.memoizedProps;if(l=l.compare,l=l!==null?l:Es,l(b,o)&&t.ref===r.ref)return Hr(t,r,f)}return r.flags|=1,t=Ur(m,o),t.ref=r.ref,t.return=r,r.child=t}function Uy(t,r,l,o,f){if(t!==null){var m=t.memoizedProps;if(Es(m,o)&&t.ref===r.ref)if(Dt=!1,r.pendingProps=o=m,Nd(t,f))(t.flags&131072)!==0&&(Dt=!0);else return r.lanes=t.lanes,Hr(t,r,f)}return vd(t,r,l,o,f)}function Ly(t,r,l,o){var f=o.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,t!==null){for(o=r.child=t.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~m}else o=0,r.child=null;return Iy(t,r,m,l,o)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&uu(r,m!==null?m.cachePool:null),m!==null?qg(r,m):Yf(),Pg(r);else return o=r.lanes=536870912,Iy(t,r,m!==null?m.baseLanes|l:l,l,o)}else m!==null?(uu(r,m.cachePool),qg(r,m),Sa(),r.memoizedState=null):(t!==null&&uu(r,null),Yf(),Sa());return en(t,r,f,l),r.child}function Is(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Iy(t,r,l,o,f){var m=Hf();return m=m===null?null:{parent:Rt._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},t!==null&&uu(r,null),Yf(),Pg(r),t!==null&&fl(t,r,o,!0),r.childLanes=f,null}function Nu(t,r){return r=ju({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function By(t,r,l){return wi(r,t.child,null,l),t=Nu(r,r.pendingProps),t.flags|=2,On(r),r.memoizedState=null,t}function xC(t,r,l){var o=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Qe){if(o.mode==="hidden")return t=Nu(r,o),r.lanes=536870912,Is(null,t);if(Kf(r),(t=pt)?(t=Xv(t,Qn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ha!==null?{id:gr,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},l=wg(t),l.return=r,r.child=l,Jt=r,pt=null)):t=null,t===null)throw pa(r);return r.lanes=536870912,null}return Nu(r,o)}var m=t.memoizedState;if(m!==null){var b=m.dehydrated;if(Kf(r),f)if(r.flags&256)r.flags&=-257,r=By(t,r,l);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(i(558));else if(Dt||fl(t,r,l,!1),f=(l&t.childLanes)!==0,Dt||f){if(o=ft,o!==null&&(b=Tp(o,l),b!==0&&b!==m.retryLane))throw m.retryLane=b,mi(t,b),Sn(o,t,b),yd;Uu(),r=By(t,r,l)}else t=m.treeContext,pt=Gn(b.nextSibling),Jt=r,Qe=!0,ma=null,Qn=!1,t!==null&&Ng(r,t),r=Nu(r,o),r.flags|=4096;return r}return t=Ur(t.child,{mode:o.mode,children:o.children}),t.ref=r.ref,r.child=t,t.return=r,t}function _u(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(i(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function vd(t,r,l,o,f){return vi(r),l=Jf(t,r,l,o,void 0,f),o=Wf(),t!==null&&!Dt?(ed(t,r,f),Hr(t,r,f)):(Qe&&o&&Rf(r),r.flags|=1,en(t,r,l,f),r.child)}function qy(t,r,l,o,f,m){return vi(r),r.updateQueue=null,l=Zg(r,o,l,f),Hg(t),o=Wf(),t!==null&&!Dt?(ed(t,r,m),Hr(t,r,m)):(Qe&&o&&Rf(r),r.flags|=1,en(t,r,l,m),r.child)}function Py(t,r,l,o,f){if(vi(r),r.stateNode===null){var m=sl,b=l.contextType;typeof b=="object"&&b!==null&&(m=Wt(b)),m=new l(o,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=pd,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=o,m.state=r.memoizedState,m.refs={},Ff(r),b=l.contextType,m.context=typeof b=="object"&&b!==null?Wt(b):sl,m.state=r.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(md(r,l,b,o),m.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&pd.enqueueReplaceState(m,m.state,null),Rs(r,o,m,f),Os(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(t===null){m=r.stateNode;var E=r.memoizedProps,z=Ci(l,E);m.props=z;var F=m.context,X=l.contextType;b=sl,typeof X=="object"&&X!==null&&(b=Wt(X));var te=l.getDerivedStateFromProps;X=typeof te=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,X||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||F!==b)&&jy(r,m,o,b),ya=!1;var V=r.memoizedState;m.state=V,Rs(r,o,m,f),Os(),F=r.memoizedState,E||V!==F||ya?(typeof te=="function"&&(md(r,l,te,o),F=r.memoizedState),(z=ya||_y(r,l,z,o,V,F,b))?(X||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=F),m.props=o,m.state=F,m.context=b,o=z):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{m=r.stateNode,$f(t,r),b=r.memoizedProps,X=Ci(l,b),m.props=X,te=r.pendingProps,V=m.context,F=l.contextType,z=sl,typeof F=="object"&&F!==null&&(z=Wt(F)),E=l.getDerivedStateFromProps,(F=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==te||V!==z)&&jy(r,m,o,z),ya=!1,V=r.memoizedState,m.state=V,Rs(r,o,m,f),Os();var Q=r.memoizedState;b!==te||V!==Q||ya||t!==null&&t.dependencies!==null&&su(t.dependencies)?(typeof E=="function"&&(md(r,l,E,o),Q=r.memoizedState),(X=ya||_y(r,l,X,o,V,Q,z)||t!==null&&t.dependencies!==null&&su(t.dependencies))?(F||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,Q,z),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,Q,z)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&V===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&V===t.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=Q),m.props=o,m.state=Q,m.context=z,o=X):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&V===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&V===t.memoizedState||(r.flags|=1024),o=!1)}return m=o,_u(t,r),o=(r.flags&128)!==0,m||o?(m=r.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&o?(r.child=wi(r,t.child,null,f),r.child=wi(r,null,l,f)):en(t,r,l,f),r.memoizedState=m.state,t=r.child):t=Hr(t,r,f),t}function Hy(t,r,l,o){return gi(),r.flags|=256,en(t,r,l,o),r.child}var bd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(t){return{baseLanes:t,cachePool:zg()}}function Sd(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=Mn),t}function Zy(t,r,l){var o=r.pendingProps,f=!1,m=(r.flags&128)!==0,b;if((b=m)||(b=t!==null&&t.memoizedState===null?!1:(zt.current&2)!==0),b&&(f=!0,r.flags&=-129),b=(r.flags&32)!==0,r.flags&=-33,t===null){if(Qe){if(f?xa(r):Sa(),(t=pt)?(t=Xv(t,Qn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:ha!==null?{id:gr,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},l=wg(t),l.return=r,r.child=l,Jt=r,pt=null)):t=null,t===null)throw pa(r);return rh(t)?r.lanes=32:r.lanes=536870912,null}var E=o.children;return o=o.fallback,f?(Sa(),f=r.mode,E=ju({mode:"hidden",children:E},f),o=pi(o,f,l,null),E.return=r,o.return=r,E.sibling=o,r.child=E,o=r.child,o.memoizedState=xd(l),o.childLanes=Sd(t,b,l),r.memoizedState=bd,Is(null,o)):(xa(r),wd(r,E))}var z=t.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(m)r.flags&256?(xa(r),r.flags&=-257,r=Ed(t,r,l)):r.memoizedState!==null?(Sa(),r.child=t.child,r.flags|=128,r=null):(Sa(),E=o.fallback,f=r.mode,o=ju({mode:"visible",children:o.children},f),E=pi(E,f,l,null),E.flags|=2,o.return=r,E.return=r,o.sibling=E,r.child=o,wi(r,t.child,null,l),o=r.child,o.memoizedState=xd(l),o.childLanes=Sd(t,b,l),r.memoizedState=bd,r=Is(null,o));else if(xa(r),rh(E)){if(b=E.nextSibling&&E.nextSibling.dataset,b)var F=b.dgst;b=F,o=Error(i(419)),o.stack="",o.digest=b,_s({value:o,source:null,stack:null}),r=Ed(t,r,l)}else if(Dt||fl(t,r,l,!1),b=(l&t.childLanes)!==0,Dt||b){if(b=ft,b!==null&&(o=Tp(b,l),o!==0&&o!==z.retryLane))throw z.retryLane=o,mi(t,o),Sn(b,t,o),yd;nh(E)||Uu(),r=Ed(t,r,l)}else nh(E)?(r.flags|=192,r.child=t.child,r=null):(t=z.treeContext,pt=Gn(E.nextSibling),Jt=r,Qe=!0,ma=null,Qn=!1,t!==null&&Ng(r,t),r=wd(r,o.children),r.flags|=4096);return r}return f?(Sa(),E=o.fallback,f=r.mode,z=t.child,F=z.sibling,o=Ur(z,{mode:"hidden",children:o.children}),o.subtreeFlags=z.subtreeFlags&65011712,F!==null?E=Ur(F,E):(E=pi(E,f,l,null),E.flags|=2),E.return=r,o.return=r,o.sibling=E,r.child=o,Is(null,o),o=r.child,E=t.child.memoizedState,E===null?E=xd(l):(f=E.cachePool,f!==null?(z=Rt._currentValue,f=f.parent!==z?{parent:z,pool:z}:f):f=zg(),E={baseLanes:E.baseLanes|l,cachePool:f}),o.memoizedState=E,o.childLanes=Sd(t,b,l),r.memoizedState=bd,Is(t.child,o)):(xa(r),l=t.child,t=l.sibling,l=Ur(l,{mode:"visible",children:o.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 wd(t,r){return r=ju({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function ju(t,r){return t=An(22,t,null,r),t.lanes=0,t}function Ed(t,r,l){return wi(r,t.child,null,l),t=wd(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function Fy(t,r,l){t.lanes|=r;var o=t.alternate;o!==null&&(o.lanes|=r),If(t.return,r,l)}function Cd(t,r,l,o,f,m){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:m}:(b.isBackwards=r,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=l,b.tailMode=f,b.treeForkCount=m)}function $y(t,r,l){var o=r.pendingProps,f=o.revealOrder,m=o.tail;o=o.children;var b=zt.current,E=(b&2)!==0;if(E?(b=b&1|2,r.flags|=128):b&=1,_(zt,b),en(t,r,o,l),o=Qe?Ns:0,!E&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Fy(t,l,r);else if(t.tag===19)Fy(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&&pu(t)===null&&(f=l),l=l.sibling;l=f,l===null?(f=r.child,r.child=null):(f=l.sibling,l.sibling=null),Cd(r,!1,f,l,m,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&pu(t)===null){r.child=f;break}t=f.sibling,f.sibling=l,l=f,f=t}Cd(r,!0,l,null,m,o);break;case"together":Cd(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function Hr(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),Ca|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(fl(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(i(153));if(r.child!==null){for(t=r.child,l=Ur(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Ur(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function Nd(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&su(t)))}function SC(t,r,l){switch(r.tag){case 3:et(r,r.stateNode.containerInfo),ga(r,Rt,t.memoizedState.cache),gi();break;case 27:case 5:ze(r);break;case 4:et(r,r.stateNode.containerInfo);break;case 10:ga(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Kf(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(xa(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Zy(t,r,l):(xa(r),t=Hr(t,r,l),t!==null?t.sibling:null);xa(r);break;case 19:var f=(t.flags&128)!==0;if(o=(l&r.childLanes)!==0,o||(fl(t,r,l,!1),o=(l&r.childLanes)!==0),f){if(o)return $y(t,r,l);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),_(zt,zt.current),o)break;return null;case 22:return r.lanes=0,Ly(t,r,l,r.pendingProps);case 24:ga(r,Rt,t.memoizedState.cache)}return Hr(t,r,l)}function Vy(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)Dt=!0;else{if(!Nd(t,l)&&(r.flags&128)===0)return Dt=!1,SC(t,r,l);Dt=(t.flags&131072)!==0}else Dt=!1,Qe&&(r.flags&1048576)!==0&&Cg(r,Ns,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(t=xi(r.elementType),r.type=t,typeof t=="function")Af(t)?(o=Ci(t,o),r.tag=1,r=Py(null,r,t,o,l)):(r.tag=0,r=vd(null,r,t,o,l));else{if(t!=null){var f=t.$$typeof;if(f===H){r.tag=11,r=My(null,r,t,o,l);break e}else if(f===B){r.tag=14,r=Dy(null,r,t,o,l);break e}}throw r=ce(t)||t,Error(i(306,r,""))}}return r;case 0:return vd(t,r,r.type,r.pendingProps,l);case 1:return o=r.type,f=Ci(o,r.pendingProps),Py(t,r,o,f,l);case 3:e:{if(et(r,r.stateNode.containerInfo),t===null)throw Error(i(387));o=r.pendingProps;var m=r.memoizedState;f=m.element,$f(t,r),Rs(r,o,null,l);var b=r.memoizedState;if(o=b.cache,ga(r,Rt,o),o!==m.cache&&Bf(r,[Rt],l,!0),Os(),o=b.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:b.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=Hy(t,r,o,l);break e}else if(o!==f){f=Fn(Error(i(424)),r),_s(f),r=Hy(t,r,o,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(pt=Gn(t.firstChild),Jt=r,Qe=!0,ma=null,Qn=!0,l=Lg(r,null,o,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(gi(),o===f){r=Hr(t,r,l);break e}en(t,r,o,l)}r=r.child}return r;case 26:return _u(t,r),t===null?(l=rb(r.type,null,r.pendingProps,null))?r.memoizedState=l:Qe||(l=r.type,t=r.pendingProps,o=Zu(fe.current).createElement(l),o[Xt]=r,o[pn]=t,tn(o,l,t),Vt(o),r.stateNode=o):r.memoizedState=rb(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return ze(r),t===null&&Qe&&(o=r.stateNode=eb(r.type,r.pendingProps,fe.current),Jt=r,Qn=!0,f=pt,Ta(r.type)?(ah=f,pt=Gn(o.firstChild)):pt=f),en(t,r,r.pendingProps.children,l),_u(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Qe&&((f=o=pt)&&(o=XC(o,r.type,r.pendingProps,Qn),o!==null?(r.stateNode=o,Jt=r,pt=Gn(o.firstChild),Qn=!1,f=!0):f=!1),f||pa(r)),ze(r),f=r.type,m=r.pendingProps,b=t!==null?t.memoizedProps:null,o=m.children,Wd(f,m)?o=null:b!==null&&Wd(f,b)&&(r.flags|=32),r.memoizedState!==null&&(f=Jf(t,r,dC,null,null,l),Ws._currentValue=f),_u(t,r),en(t,r,o,l),r.child;case 6:return t===null&&Qe&&((t=l=pt)&&(l=JC(l,r.pendingProps,Qn),l!==null?(r.stateNode=l,Jt=r,pt=null,t=!0):t=!1),t||pa(r)),null;case 13:return Zy(t,r,l);case 4:return et(r,r.stateNode.containerInfo),o=r.pendingProps,t===null?r.child=wi(r,null,o,l):en(t,r,o,l),r.child;case 11:return My(t,r,r.type,r.pendingProps,l);case 7:return en(t,r,r.pendingProps,l),r.child;case 8:return en(t,r,r.pendingProps.children,l),r.child;case 12:return en(t,r,r.pendingProps.children,l),r.child;case 10:return o=r.pendingProps,ga(r,r.type,o.value),en(t,r,o.children,l),r.child;case 9:return f=r.type._context,o=r.pendingProps.children,vi(r),f=Wt(f),o=o(f),r.flags|=1,en(t,r,o,l),r.child;case 14:return Dy(t,r,r.type,r.pendingProps,l);case 15:return Uy(t,r,r.type,r.pendingProps,l);case 19:return $y(t,r,l);case 31:return xC(t,r,l);case 22:return Ly(t,r,l,r.pendingProps);case 24:return vi(r),o=Wt(Rt),t===null?(f=Hf(),f===null&&(f=ft,m=qf(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=l),f=m),r.memoizedState={parent:o,cache:f},Ff(r),ga(r,Rt,f)):((t.lanes&l)!==0&&($f(t,r),Rs(r,null,null,l),Os()),f=t.memoizedState,m=r.memoizedState,f.parent!==o?(f={parent:o,cache:o},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),ga(r,Rt,o)):(o=m.cache,ga(r,Rt,o),o!==f.cache&&Bf(r,[Rt],l,!0))),en(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Zr(t){t.flags|=4}function _d(t,r,l,o,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(bv())t.flags|=8192;else throw Si=fu,Zf}else t.flags&=-16777217}function Qy(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ob(r))if(bv())t.flags|=8192;else throw Si=fu,Zf}function ku(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?_p():536870912,t.lanes|=r,El|=r)}function Bs(t,r){if(!Qe)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 o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function gt(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,o=0;if(r)for(var f=t.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=o,t.childLanes=l,r}function wC(t,r,l){var o=r.pendingProps;switch(Mf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(r),null;case 1:return gt(r),null;case 3:return l=r.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),Br(Rt),_e(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(cl(r)?Zr(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Uf())),gt(r),null;case 26:var f=r.type,m=r.memoizedState;return t===null?(Zr(r),m!==null?(gt(r),Qy(r,m)):(gt(r),_d(r,f,null,o,l))):m?m!==t.memoizedState?(Zr(r),gt(r),Qy(r,m)):(gt(r),r.flags&=-16777217):(t=t.memoizedProps,t!==o&&Zr(r),gt(r),_d(r,f,t,o,l)),null;case 27:if(vt(r),l=fe.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==o&&Zr(r);else{if(!o){if(r.stateNode===null)throw Error(i(166));return gt(r),null}t=oe.current,cl(r)?_g(r):(t=eb(f,o,l),r.stateNode=t,Zr(r))}return gt(r),null;case 5:if(vt(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==o&&Zr(r);else{if(!o){if(r.stateNode===null)throw Error(i(166));return gt(r),null}if(m=oe.current,cl(r))_g(r);else{var b=Zu(fe.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}m[Xt]=r,m[pn]=o;e:for(b=r.child;b!==null;){if(b.tag===5||b.tag===6)m.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=m;e:switch(tn(m,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Zr(r)}}return gt(r),_d(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,l),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==o&&Zr(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(i(166));if(t=fe.current,cl(r)){if(t=r.stateNode,l=r.memoizedProps,o=null,f=Jt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}t[Xt]=r,t=!!(t.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Zv(t.nodeValue,l)),t||pa(r,!0)}else t=Zu(t).createTextNode(o),t[Xt]=r,r.stateNode=t}return gt(r),null;case 31:if(l=r.memoizedState,t===null||t.memoizedState!==null){if(o=cl(r),l!==null){if(t===null){if(!o)throw Error(i(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[Xt]=r}else gi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;gt(r),t=!1}else l=Uf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return r.flags&256?(On(r),r):(On(r),null);if((r.flags&128)!==0)throw Error(i(558))}return gt(r),null;case 13:if(o=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=cl(r),o!==null&&o.dehydrated!==null){if(t===null){if(!f)throw Error(i(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(i(317));f[Xt]=r}else gi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;gt(r),f=!1}else f=Uf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(On(r),r):(On(r),null)}return On(r),(r.flags&128)!==0?(r.lanes=l,r):(l=o!==null,t=t!==null&&t.memoizedState!==null,l&&(o=r.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==f&&(o.flags|=2048)),l!==t&&l&&(r.child.flags|=8192),ku(r,r.updateQueue),gt(r),null);case 4:return _e(),t===null&&Yd(r.stateNode.containerInfo),gt(r),null;case 10:return Br(r.type),gt(r),null;case 19:if(K(zt),o=r.memoizedState,o===null)return gt(r),null;if(f=(r.flags&128)!==0,m=o.rendering,m===null)if(f)Bs(o,!1);else{if(jt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=pu(t),m!==null){for(r.flags|=128,Bs(o,!1),t=m.updateQueue,r.updateQueue=t,ku(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)Sg(l,t),l=l.sibling;return _(zt,zt.current&1|2),Qe&&Lr(r,o.treeForkCount),r.child}t=t.sibling}o.tail!==null&&Ft()>Ru&&(r.flags|=128,f=!0,Bs(o,!1),r.lanes=4194304)}else{if(!f)if(t=pu(m),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,ku(r,t),Bs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!Qe)return gt(r),null}else 2*Ft()-o.renderingStartTime>Ru&&l!==536870912&&(r.flags|=128,f=!0,Bs(o,!1),r.lanes=4194304);o.isBackwards?(m.sibling=r.child,r.child=m):(t=o.last,t!==null?t.sibling=m:r.child=m,o.last=m)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ft(),t.sibling=null,l=zt.current,_(zt,f?l&1|2:l&1),Qe&&Lr(r,o.treeForkCount),t):(gt(r),null);case 22:case 23:return On(r),Gf(),o=r.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(l&536870912)!==0&&(r.flags&128)===0&&(gt(r),r.subtreeFlags&6&&(r.flags|=8192)):gt(r),l=r.updateQueue,l!==null&&ku(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==l&&(r.flags|=2048),t!==null&&K(bi),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Br(Rt),gt(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function EC(t,r){switch(Mf(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Br(Rt),_e(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return vt(r),null;case 31:if(r.memoizedState!==null){if(On(r),r.alternate===null)throw Error(i(340));gi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(On(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(i(340));gi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return K(zt),null;case 4:return _e(),null;case 10:return Br(r.type),null;case 22:case 23:return On(r),Gf(),t!==null&&K(bi),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Br(Rt),null;case 25:return null;default:return null}}function Yy(t,r){switch(Mf(r),r.tag){case 3:Br(Rt),_e();break;case 26:case 27:case 5:vt(r);break;case 4:_e();break;case 31:r.memoizedState!==null&&On(r);break;case 13:On(r);break;case 19:K(zt);break;case 10:Br(r.type);break;case 22:case 23:On(r),Gf(),t!==null&&K(bi);break;case 24:Br(Rt)}}function qs(t,r){try{var l=r.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&t)===t){o=void 0;var m=l.create,b=l.inst;o=m(),b.destroy=o}l=l.next}while(l!==f)}}catch(E){at(r,r.return,E)}}function wa(t,r,l){try{var o=r.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var m=f.next;o=m;do{if((o.tag&t)===t){var b=o.inst,E=b.destroy;if(E!==void 0){b.destroy=void 0,f=r;var z=l,F=E;try{F()}catch(X){at(f,z,X)}}}o=o.next}while(o!==m)}}catch(X){at(r,r.return,X)}}function Gy(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Bg(r,l)}catch(o){at(t,t.return,o)}}}function Ky(t,r,l){l.props=Ci(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(o){at(t,r,o)}}function Ps(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof l=="function"?t.refCleanup=l(o):l.current=o}}catch(f){at(t,r,f)}}function vr(t,r){var l=t.ref,o=t.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){at(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){at(t,r,f)}else l.current=null}function Xy(t){var r=t.type,l=t.memoizedProps,o=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){at(t,t.return,f)}}function jd(t,r,l){try{var o=t.stateNode;$C(o,t.type,l,r),o[pn]=r}catch(f){at(t,t.return,f)}}function Jy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ta(t.type)||t.tag===4}function kd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Jy(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&&Ta(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 Td(t,r,l){var o=t.tag;if(o===5||o===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=Mr));else if(o!==4&&(o===27&&Ta(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(Td(t,r,l),t=t.sibling;t!==null;)Td(t,r,l),t=t.sibling}function Tu(t,r,l){var o=t.tag;if(o===5||o===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(o!==4&&(o===27&&Ta(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Tu(t,r,l),t=t.sibling;t!==null;)Tu(t,r,l),t=t.sibling}function Wy(t){var r=t.stateNode,l=t.memoizedProps;try{for(var o=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);tn(r,o,l),r[Xt]=t,r[pn]=l}catch(m){at(t,t.return,m)}}var Fr=!1,Ut=!1,Ad=!1,ev=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function CC(t,r){if(t=t.containerInfo,Xd=Ku,t=dg(t),Ef(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var b=0,E=-1,z=-1,F=0,X=0,te=t,V=null;t:for(;;){for(var Q;te!==l||f!==0&&te.nodeType!==3||(E=b+f),te!==m||o!==0&&te.nodeType!==3||(z=b+o),te.nodeType===3&&(b+=te.nodeValue.length),(Q=te.firstChild)!==null;)V=te,te=Q;for(;;){if(te===t)break t;if(V===l&&++F===f&&(E=b),V===m&&++X===o&&(z=b),(Q=te.nextSibling)!==null)break;te=V,V=te.parentNode}te=Q}l=E===-1||z===-1?null:{start:E,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jd={focusedElem:t,selectionRange:l},Ku=!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,m=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&&m!==null){t=void 0,l=r,f=m.memoizedProps,m=m.memoizedState,o=l.stateNode;try{var pe=Ci(l.type,f);t=o.getSnapshotBeforeUpdate(pe,m),o.__reactInternalSnapshotBeforeUpdate=t}catch(je){at(l,l.return,je)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)th(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":th(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(i(163))}if(t=r.sibling,t!==null){t.return=r.return,Qt=t;break}Qt=r.return}}function tv(t,r,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:Vr(t,l),o&4&&qs(5,l);break;case 1:if(Vr(t,l),o&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(b){at(l,l.return,b)}else{var f=Ci(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(b){at(l,l.return,b)}}o&64&&Gy(l),o&512&&Ps(l,l.return);break;case 3:if(Vr(t,l),o&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{Bg(t,r)}catch(b){at(l,l.return,b)}}break;case 27:r===null&&o&4&&Wy(l);case 26:case 5:Vr(t,l),r===null&&o&4&&Xy(l),o&512&&Ps(l,l.return);break;case 12:Vr(t,l);break;case 31:Vr(t,l),o&4&&av(t,l);break;case 13:Vr(t,l),o&4&&iv(t,l),o&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=RC.bind(null,l),WC(t,l))));break;case 22:if(o=l.memoizedState!==null||Fr,!o){r=r!==null&&r.memoizedState!==null||Ut,f=Fr;var m=Ut;Fr=o,(Ut=r)&&!m?Qr(t,l,(l.subtreeFlags&8772)!==0):Vr(t,l),Fr=f,Ut=m}break;case 30:break;default:Vr(t,l)}}function nv(t){var r=t.alternate;r!==null&&(t.alternate=null,nv(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&lf(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 bt=null,yn=!1;function $r(t,r,l){for(l=l.child;l!==null;)rv(t,r,l),l=l.sibling}function rv(t,r,l){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(un,l)}catch{}switch(l.tag){case 26:Ut||vr(l,r),$r(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ut||vr(l,r);var o=bt,f=yn;Ta(l.type)&&(bt=l.stateNode,yn=!1),$r(t,r,l),Ks(l.stateNode),bt=o,yn=f;break;case 5:Ut||vr(l,r);case 6:if(o=bt,f=yn,bt=null,$r(t,r,l),bt=o,yn=f,bt!==null)if(yn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(l.stateNode)}catch(m){at(l,r,m)}else try{bt.removeChild(l.stateNode)}catch(m){at(l,r,m)}break;case 18:bt!==null&&(yn?(t=bt,Gv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),zl(t)):Gv(bt,l.stateNode));break;case 4:o=bt,f=yn,bt=l.stateNode.containerInfo,yn=!0,$r(t,r,l),bt=o,yn=f;break;case 0:case 11:case 14:case 15:wa(2,l,r),Ut||wa(4,l,r),$r(t,r,l);break;case 1:Ut||(vr(l,r),o=l.stateNode,typeof o.componentWillUnmount=="function"&&Ky(l,r,o)),$r(t,r,l);break;case 21:$r(t,r,l);break;case 22:Ut=(o=Ut)||l.memoizedState!==null,$r(t,r,l),Ut=o;break;default:$r(t,r,l)}}function av(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{zl(t)}catch(l){at(r,r.return,l)}}}function iv(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{zl(t)}catch(l){at(r,r.return,l)}}function NC(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new ev),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new ev),r;default:throw Error(i(435,t.tag))}}function Au(t,r){var l=NC(t);r.forEach(function(o){if(!l.has(o)){l.add(o);var f=MC.bind(null,t,o);o.then(f,f)}})}function vn(t,r){var l=r.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],m=t,b=r,E=b;e:for(;E!==null;){switch(E.tag){case 27:if(Ta(E.type)){bt=E.stateNode,yn=!1;break e}break;case 5:bt=E.stateNode,yn=!1;break e;case 3:case 4:bt=E.stateNode.containerInfo,yn=!0;break e}E=E.return}if(bt===null)throw Error(i(160));rv(m,b,f),bt=null,yn=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)lv(r,t),r=r.sibling}var sr=null;function lv(t,r){var l=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:vn(r,t),bn(t),o&4&&(wa(3,t,t.return),qs(3,t),wa(5,t,t.return));break;case 1:vn(r,t),bn(t),o&512&&(Ut||l===null||vr(l,l.return)),o&64&&Fr&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=sr;if(vn(r,t),bn(t),o&512&&(Ut||l===null||vr(l,l.return)),o&4){var m=l!==null?l.memoizedState:null;if(o=t.memoizedState,l===null)if(o===null)if(t.stateNode===null){e:{o=t.type,l=t.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":m=f.getElementsByTagName("title")[0],(!m||m[ms]||m[Xt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(o),f.head.insertBefore(m,f.querySelector("head > title"))),tn(m,o,l),m[Xt]=t,Vt(m),o=m;break e;case"link":var b=lb("link","href",f).get(o+(l.href||""));if(b){for(var E=0;E<b.length;E++)if(m=b[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(E,1);break t}}m=f.createElement(o),tn(m,o,l),f.head.appendChild(m);break;case"meta":if(b=lb("meta","content",f).get(o+(l.content||""))){for(E=0;E<b.length;E++)if(m=b[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(E,1);break t}}m=f.createElement(o),tn(m,o,l),f.head.appendChild(m);break;default:throw Error(i(468,o))}m[Xt]=t,Vt(m),o=m}t.stateNode=o}else sb(f,t.type,t.stateNode);else t.stateNode=ib(f,o,t.memoizedProps);else m!==o?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,o===null?sb(f,t.type,t.stateNode):ib(f,o,t.memoizedProps)):o===null&&t.stateNode!==null&&jd(t,t.memoizedProps,l.memoizedProps)}break;case 27:vn(r,t),bn(t),o&512&&(Ut||l===null||vr(l,l.return)),l!==null&&o&4&&jd(t,t.memoizedProps,l.memoizedProps);break;case 5:if(vn(r,t),bn(t),o&512&&(Ut||l===null||vr(l,l.return)),t.flags&32){f=t.stateNode;try{el(f,"")}catch(pe){at(t,t.return,pe)}}o&4&&t.stateNode!=null&&(f=t.memoizedProps,jd(t,f,l!==null?l.memoizedProps:f)),o&1024&&(Ad=!0);break;case 6:if(vn(r,t),bn(t),o&4){if(t.stateNode===null)throw Error(i(162));o=t.memoizedProps,l=t.stateNode;try{l.nodeValue=o}catch(pe){at(t,t.return,pe)}}break;case 3:if(Vu=null,f=sr,sr=Fu(r.containerInfo),vn(r,t),sr=f,bn(t),o&4&&l!==null&&l.memoizedState.isDehydrated)try{zl(r.containerInfo)}catch(pe){at(t,t.return,pe)}Ad&&(Ad=!1,sv(t));break;case 4:o=sr,sr=Fu(t.stateNode.containerInfo),vn(r,t),bn(t),sr=o;break;case 12:vn(r,t),bn(t);break;case 31:vn(r,t),bn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Au(t,o)));break;case 13:vn(r,t),bn(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ou=Ft()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Au(t,o)));break;case 22:f=t.memoizedState!==null;var z=l!==null&&l.memoizedState!==null,F=Fr,X=Ut;if(Fr=F||f,Ut=X||z,vn(r,t),Ut=X,Fr=F,bn(t),o&8192)e:for(r=t.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(l===null||z||Fr||Ut||Ni(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){z=l=r;try{if(m=z.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{E=z.stateNode;var te=z.memoizedProps.style,V=te!=null&&te.hasOwnProperty("display")?te.display:null;E.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(pe){at(z,z.return,pe)}}}else if(r.tag===6){if(l===null){z=r;try{z.stateNode.nodeValue=f?"":z.memoizedProps}catch(pe){at(z,z.return,pe)}}}else if(r.tag===18){if(l===null){z=r;try{var Q=z.stateNode;f?Kv(Q,!0):Kv(z.stateNode,!1)}catch(pe){at(z,z.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}o&4&&(o=t.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,Au(t,l))));break;case 19:vn(r,t),bn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Au(t,o)));break;case 30:break;case 21:break;default:vn(r,t),bn(t)}}function bn(t){var r=t.flags;if(r&2){try{for(var l,o=t.return;o!==null;){if(Jy(o)){l=o;break}o=o.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var f=l.stateNode,m=kd(t);Tu(t,m,f);break;case 5:var b=l.stateNode;l.flags&32&&(el(b,""),l.flags&=-33);var E=kd(t);Tu(t,E,b);break;case 3:case 4:var z=l.stateNode.containerInfo,F=kd(t);Td(t,F,z);break;default:throw Error(i(161))}}catch(X){at(t,t.return,X)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function sv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;sv(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function Vr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)tv(t,r.alternate,r),r=r.sibling}function Ni(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:wa(4,r,r.return),Ni(r);break;case 1:vr(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Ky(r,r.return,l),Ni(r);break;case 27:Ks(r.stateNode);case 26:case 5:vr(r,r.return),Ni(r);break;case 22:r.memoizedState===null&&Ni(r);break;case 30:Ni(r);break;default:Ni(r)}t=t.sibling}}function Qr(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,f=t,m=r,b=m.flags;switch(m.tag){case 0:case 11:case 15:Qr(f,m,l),qs(4,m);break;case 1:if(Qr(f,m,l),o=m,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(F){at(o,o.return,F)}if(o=m,f=o.updateQueue,f!==null){var E=o.stateNode;try{var z=f.shared.hiddenCallbacks;if(z!==null)for(f.shared.hiddenCallbacks=null,f=0;f<z.length;f++)Ig(z[f],E)}catch(F){at(o,o.return,F)}}l&&b&64&&Gy(m),Ps(m,m.return);break;case 27:Wy(m);case 26:case 5:Qr(f,m,l),l&&o===null&&b&4&&Xy(m),Ps(m,m.return);break;case 12:Qr(f,m,l);break;case 31:Qr(f,m,l),l&&b&4&&av(f,m);break;case 13:Qr(f,m,l),l&&b&4&&iv(f,m);break;case 22:m.memoizedState===null&&Qr(f,m,l),Ps(m,m.return);break;case 30:break;default:Qr(f,m,l)}r=r.sibling}}function zd(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&&js(l))}function Od(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&js(t))}function or(t,r,l,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ov(t,r,l,o),r=r.sibling}function ov(t,r,l,o){var f=r.flags;switch(r.tag){case 0:case 11:case 15:or(t,r,l,o),f&2048&&qs(9,r);break;case 1:or(t,r,l,o);break;case 3:or(t,r,l,o),f&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&js(t)));break;case 12:if(f&2048){or(t,r,l,o),t=r.stateNode;try{var m=r.memoizedProps,b=m.id,E=m.onPostCommit;typeof E=="function"&&E(b,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(z){at(r,r.return,z)}}else or(t,r,l,o);break;case 31:or(t,r,l,o);break;case 13:or(t,r,l,o);break;case 23:break;case 22:m=r.stateNode,b=r.alternate,r.memoizedState!==null?m._visibility&2?or(t,r,l,o):Hs(t,r):m._visibility&2?or(t,r,l,o):(m._visibility|=2,xl(t,r,l,o,(r.subtreeFlags&10256)!==0||!1)),f&2048&&zd(b,r);break;case 24:or(t,r,l,o),f&2048&&Od(r.alternate,r);break;default:or(t,r,l,o)}}function xl(t,r,l,o,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,b=r,E=l,z=o,F=b.flags;switch(b.tag){case 0:case 11:case 15:xl(m,b,E,z,f),qs(8,b);break;case 23:break;case 22:var X=b.stateNode;b.memoizedState!==null?X._visibility&2?xl(m,b,E,z,f):Hs(m,b):(X._visibility|=2,xl(m,b,E,z,f)),f&&F&2048&&zd(b.alternate,b);break;case 24:xl(m,b,E,z,f),f&&F&2048&&Od(b.alternate,b);break;default:xl(m,b,E,z,f)}r=r.sibling}}function Hs(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,o=r,f=o.flags;switch(o.tag){case 22:Hs(l,o),f&2048&&zd(o.alternate,o);break;case 24:Hs(l,o),f&2048&&Od(o.alternate,o);break;default:Hs(l,o)}r=r.sibling}}var Zs=8192;function Sl(t,r,l){if(t.subtreeFlags&Zs)for(t=t.child;t!==null;)uv(t,r,l),t=t.sibling}function uv(t,r,l){switch(t.tag){case 26:Sl(t,r,l),t.flags&Zs&&t.memoizedState!==null&&fN(l,sr,t.memoizedState,t.memoizedProps);break;case 5:Sl(t,r,l);break;case 3:case 4:var o=sr;sr=Fu(t.stateNode.containerInfo),Sl(t,r,l),sr=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=Zs,Zs=16777216,Sl(t,r,l),Zs=o):Sl(t,r,l));break;default:Sl(t,r,l)}}function cv(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 Fs(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];Qt=o,dv(o,t)}cv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)fv(t),t=t.sibling}function fv(t){switch(t.tag){case 0:case 11:case 15:Fs(t),t.flags&2048&&wa(9,t,t.return);break;case 3:Fs(t);break;case 12:Fs(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,zu(t)):Fs(t);break;default:Fs(t)}}function zu(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];Qt=o,dv(o,t)}cv(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:wa(8,r,r.return),zu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,zu(r));break;default:zu(r)}t=t.sibling}}function dv(t,r){for(;Qt!==null;){var l=Qt;switch(l.tag){case 0:case 11:case 15:wa(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:js(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,Qt=o;else e:for(l=t;Qt!==null;){o=Qt;var f=o.sibling,m=o.return;if(nv(o),o===l){Qt=null;break e}if(f!==null){f.return=m,Qt=f;break e}Qt=m}}}var _C={getCacheForType:function(t){var r=Wt(Rt),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l},cacheSignal:function(){return Wt(Rt).controller.signal}},jC=typeof WeakMap=="function"?WeakMap:Map,Je=0,ft=null,He=null,Fe=0,rt=0,Rn=null,Ea=!1,wl=!1,Rd=!1,Yr=0,jt=0,Ca=0,_i=0,Md=0,Mn=0,El=0,$s=null,xn=null,Dd=!1,Ou=0,hv=0,Ru=1/0,Mu=null,Na=null,Pt=0,_a=null,Cl=null,Gr=0,Ud=0,Ld=null,mv=null,Vs=0,Id=null;function Dn(){return(Je&2)!==0&&Fe!==0?Fe&-Fe:q.T!==null?Fd():Ap()}function pv(){if(Mn===0)if((Fe&536870912)===0||Qe){var t=Ho;Ho<<=1,(Ho&3932160)===0&&(Ho=262144),Mn=t}else Mn=536870912;return t=zn.current,t!==null&&(t.flags|=32),Mn}function Sn(t,r,l){(t===ft&&(rt===2||rt===9)||t.cancelPendingCommit!==null)&&(Nl(t,0),ja(t,Fe,Mn,!1)),hs(t,l),((Je&2)===0||t!==ft)&&(t===ft&&((Je&2)===0&&(_i|=l),jt===4&&ja(t,Fe,Mn,!1)),br(t))}function gv(t,r,l){if((Je&6)!==0)throw Error(i(327));var o=!l&&(r&127)===0&&(r&t.expiredLanes)===0||ds(t,r),f=o?AC(t,r):qd(t,r,!0),m=o;do{if(f===0){wl&&!o&&ja(t,r,0,!1);break}else{if(l=t.current.alternate,m&&!kC(l)){f=qd(t,r,!1),m=!1;continue}if(f===2){if(m=r,t.errorRecoveryDisabledLanes&m)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=$s;var z=E.current.memoizedState.isDehydrated;if(z&&(Nl(E,b).flags|=256),b=qd(E,b,!1),b!==2){if(Rd&&!z){E.errorRecoveryDisabledLanes|=m,_i|=m,f=4;break e}m=xn,xn=f,m!==null&&(xn===null?xn=m:xn.push.apply(xn,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){Nl(t,0),ja(t,r,0,!0);break}e:{switch(o=t,m=f,m){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:ja(o,r,Mn,!Ea);break e;case 2:xn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(f=Ou+300-Ft(),10<f)){if(ja(o,r,Mn,!Ea),Fo(o,0,!0)!==0)break e;Gr=r,o.timeoutHandle=Qv(yv.bind(null,o,l,xn,Mu,Dd,r,Mn,_i,El,Ea,m,"Throttled",-0,0),f);break e}yv(o,l,xn,Mu,Dd,r,Mn,_i,El,Ea,m,null,-0,0)}}break}while(!0);br(t)}function yv(t,r,l,o,f,m,b,E,z,F,X,te,V,Q){if(t.timeoutHandle=-1,te=r.subtreeFlags,te&8192||(te&16785408)===16785408){te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mr},uv(r,m,te);var pe=(m&62914560)===m?Ou-Ft():(m&4194048)===m?hv-Ft():0;if(pe=dN(te,pe),pe!==null){Gr=m,t.cancelPendingCommit=pe(Nv.bind(null,t,r,m,l,o,f,b,E,z,X,te,null,V,Q)),ja(t,m,b,!F);return}}Nv(t,r,m,l,o,f,b,E,z)}function kC(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 o=0;o<l.length;o++){var f=l[o],m=f.getSnapshot;f=f.value;try{if(!Tn(m(),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 ja(t,r,l,o){r&=~Md,r&=~_i,t.suspendedLanes|=r,t.pingedLanes&=~r,o&&(t.warmLanes|=r),o=t.expirationTimes;for(var f=r;0<f;){var m=31-ct(f),b=1<<m;o[m]=-1,f&=~b}l!==0&&jp(t,l,r)}function Du(){return(Je&6)===0?(Qs(0),!1):!0}function Bd(){if(He!==null){if(rt===0)var t=He.return;else t=He,Ir=yi=null,td(t),pl=null,Ts=0,t=He;for(;t!==null;)Yy(t.alternate,t),t=t.return;He=null}}function Nl(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,YC(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Gr=0,Bd(),ft=t,He=l=Ur(t.current,null),Fe=r,rt=0,Rn=null,Ea=!1,wl=ds(t,r),Rd=!1,El=Mn=Md=_i=Ca=jt=0,xn=$s=null,Dd=!1,(r&8)!==0&&(r|=r&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=r;0<o;){var f=31-ct(o),m=1<<f;r|=t[f],o&=~m}return Yr=r,nu(),l}function vv(t,r){De=null,q.H=Ls,r===ml||r===cu?(r=Mg(),rt=3):r===Zf?(r=Mg(),rt=4):rt=r===yd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Rn=r,He===null&&(jt=1,Cu(t,Fn(r,t.current)))}function bv(){var t=zn.current;return t===null?!0:(Fe&4194048)===Fe?Yn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?t===Yn:!1}function xv(){var t=q.H;return q.H=Ls,t===null?Ls:t}function Sv(){var t=q.A;return q.A=_C,t}function Uu(){jt=4,Ea||(Fe&4194048)!==Fe&&zn.current!==null||(wl=!0),(Ca&134217727)===0&&(_i&134217727)===0||ft===null||ja(ft,Fe,Mn,!1)}function qd(t,r,l){var o=Je;Je|=2;var f=xv(),m=Sv();(ft!==t||Fe!==r)&&(Mu=null,Nl(t,r)),r=!1;var b=jt;e:do try{if(rt!==0&&He!==null){var E=He,z=Rn;switch(rt){case 8:Bd(),b=6;break e;case 3:case 2:case 9:case 6:zn.current===null&&(r=!0);var F=rt;if(rt=0,Rn=null,_l(t,E,z,F),l&&wl){b=0;break e}break;default:F=rt,rt=0,Rn=null,_l(t,E,z,F)}}TC(),b=jt;break}catch(X){vv(t,X)}while(!0);return r&&t.shellSuspendCounter++,Ir=yi=null,Je=o,q.H=f,q.A=m,He===null&&(ft=null,Fe=0,nu()),b}function TC(){for(;He!==null;)wv(He)}function AC(t,r){var l=Je;Je|=2;var o=xv(),f=Sv();ft!==t||Fe!==r?(Mu=null,Ru=Ft()+500,Nl(t,r)):wl=ds(t,r);e:do try{if(rt!==0&&He!==null){r=He;var m=Rn;t:switch(rt){case 1:rt=0,Rn=null,_l(t,r,m,1);break;case 2:case 9:if(Og(m)){rt=0,Rn=null,Ev(r);break}r=function(){rt!==2&&rt!==9||ft!==t||(rt=7),br(t)},m.then(r,r);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:Og(m)?(rt=0,Rn=null,Ev(r)):(rt=0,Rn=null,_l(t,r,m,7));break;case 5:var b=null;switch(He.tag){case 26:b=He.memoizedState;case 5:case 27:var E=He;if(b?ob(b):E.stateNode.complete){rt=0,Rn=null;var z=E.sibling;if(z!==null)He=z;else{var F=E.return;F!==null?(He=F,Lu(F)):He=null}break t}}rt=0,Rn=null,_l(t,r,m,5);break;case 6:rt=0,Rn=null,_l(t,r,m,6);break;case 8:Bd(),jt=6;break e;default:throw Error(i(462))}}zC();break}catch(X){vv(t,X)}while(!0);return Ir=yi=null,q.H=o,q.A=f,Je=l,He!==null?0:(ft=null,Fe=0,nu(),jt)}function zC(){for(;He!==null&&!oi();)wv(He)}function wv(t){var r=Vy(t.alternate,t,Yr);t.memoizedProps=t.pendingProps,r===null?Lu(t):He=r}function Ev(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=qy(l,r,r.pendingProps,r.type,void 0,Fe);break;case 11:r=qy(l,r,r.pendingProps,r.type.render,r.ref,Fe);break;case 5:td(r);default:Yy(l,r),r=He=Sg(r,Yr),r=Vy(l,r,Yr)}t.memoizedProps=t.pendingProps,r===null?Lu(t):He=r}function _l(t,r,l,o){Ir=yi=null,td(r),pl=null,Ts=0;var f=r.return;try{if(bC(t,f,r,l,Fe)){jt=1,Cu(t,Fn(l,t.current)),He=null;return}}catch(m){if(f!==null)throw He=f,m;jt=1,Cu(t,Fn(l,t.current)),He=null;return}r.flags&32768?(Qe||o===1?t=!0:wl||(Fe&536870912)!==0?t=!1:(Ea=t=!0,(o===2||o===9||o===3||o===6)&&(o=zn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Cv(r,t)):Lu(r)}function Lu(t){var r=t;do{if((r.flags&32768)!==0){Cv(r,Ea);return}t=r.return;var l=wC(r.alternate,r,Yr);if(l!==null){He=l;return}if(r=r.sibling,r!==null){He=r;return}He=r=t}while(r!==null);jt===0&&(jt=5)}function Cv(t,r){do{var l=EC(t.alternate,t);if(l!==null){l.flags&=32767,He=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){He=t;return}He=t=l}while(t!==null);jt=6,He=null}function Nv(t,r,l,o,f,m,b,E,z){t.cancelPendingCommit=null;do Iu();while(Pt!==0);if((Je&6)!==0)throw Error(i(327));if(r!==null){if(r===t.current)throw Error(i(177));if(m=r.lanes|r.childLanes,m|=kf,cE(t,l,m,b,E,z),t===ft&&(He=ft=null,Fe=0),Cl=r,_a=t,Gr=l,Ud=m,Ld=f,mv=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,DC($,function(){return Av(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=q.T,q.T=null,f=re.p,re.p=2,b=Je,Je|=4;try{CC(t,r,l)}finally{Je=b,re.p=f,q.T=o}}Pt=1,_v(),jv(),kv()}}function _v(){if(Pt===1){Pt=0;var t=_a,r=Cl,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var o=re.p;re.p=2;var f=Je;Je|=4;try{lv(r,t);var m=Jd,b=dg(t.containerInfo),E=m.focusedElem,z=m.selectionRange;if(b!==E&&E&&E.ownerDocument&&fg(E.ownerDocument.documentElement,E)){if(z!==null&&Ef(E)){var F=z.start,X=z.end;if(X===void 0&&(X=F),"selectionStart"in E)E.selectionStart=F,E.selectionEnd=Math.min(X,E.value.length);else{var te=E.ownerDocument||document,V=te&&te.defaultView||window;if(V.getSelection){var Q=V.getSelection(),pe=E.textContent.length,je=Math.min(z.start,pe),ot=z.end===void 0?je:Math.min(z.end,pe);!Q.extend&&je>ot&&(b=ot,ot=je,je=b);var I=cg(E,je),M=cg(E,ot);if(I&&M&&(Q.rangeCount!==1||Q.anchorNode!==I.node||Q.anchorOffset!==I.offset||Q.focusNode!==M.node||Q.focusOffset!==M.offset)){var Z=te.createRange();Z.setStart(I.node,I.offset),Q.removeAllRanges(),je>ot?(Q.addRange(Z),Q.extend(M.node,M.offset)):(Z.setEnd(M.node,M.offset),Q.addRange(Z))}}}}for(te=[],Q=E;Q=Q.parentNode;)Q.nodeType===1&&te.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<te.length;E++){var W=te[E];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Ku=!!Xd,Jd=Xd=null}finally{Je=f,re.p=o,q.T=l}}t.current=r,Pt=2}}function jv(){if(Pt===2){Pt=0;var t=_a,r=Cl,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var o=re.p;re.p=2;var f=Je;Je|=4;try{tv(t,r.alternate,r)}finally{Je=f,re.p=o,q.T=l}}Pt=3}}function kv(){if(Pt===4||Pt===3){Pt=0,Vi();var t=_a,r=Cl,l=Gr,o=mv;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Pt=5:(Pt=0,Cl=_a=null,Tv(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Na=null),rf(l),r=r.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(un,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=q.T,f=re.p,re.p=2,q.T=null;try{for(var m=t.onRecoverableError,b=0;b<o.length;b++){var E=o[b];m(E.value,{componentStack:E.stack})}}finally{q.T=r,re.p=f}}(Gr&3)!==0&&Iu(),br(t),f=t.pendingLanes,(l&261930)!==0&&(f&42)!==0?t===Id?Vs++:(Vs=0,Id=t):Vs=0,Qs(0)}}function Tv(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,js(r)))}function Iu(){return _v(),jv(),kv(),Av()}function Av(){if(Pt!==5)return!1;var t=_a,r=Ud;Ud=0;var l=rf(Gr),o=q.T,f=re.p;try{re.p=32>l?32:l,q.T=null,l=Ld,Ld=null;var m=_a,b=Gr;if(Pt=0,Cl=_a=null,Gr=0,(Je&6)!==0)throw Error(i(331));var E=Je;if(Je|=4,fv(m.current),ov(m,m.current,b,l),Je=E,Qs(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(un,m)}catch{}return!0}finally{re.p=f,q.T=o,Tv(t,r)}}function zv(t,r,l){r=Fn(l,r),r=gd(t.stateNode,r,2),t=ba(t,r,2),t!==null&&(hs(t,2),br(t))}function at(t,r,l){if(t.tag===3)zv(t,t,l);else for(;r!==null;){if(r.tag===3){zv(r,t,l);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Na===null||!Na.has(o))){t=Fn(l,t),l=Oy(2),o=ba(r,l,2),o!==null&&(Ry(l,o,r,t),hs(o,2),br(o));break}}r=r.return}}function Pd(t,r,l){var o=t.pingCache;if(o===null){o=t.pingCache=new jC;var f=new Set;o.set(r,f)}else f=o.get(r),f===void 0&&(f=new Set,o.set(r,f));f.has(l)||(Rd=!0,f.add(l),t=OC.bind(null,t,r,l),r.then(t,t))}function OC(t,r,l){var o=t.pingCache;o!==null&&o.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,ft===t&&(Fe&l)===l&&(jt===4||jt===3&&(Fe&62914560)===Fe&&300>Ft()-Ou?(Je&2)===0&&Nl(t,0):Md|=l,El===Fe&&(El=0)),br(t)}function Ov(t,r){r===0&&(r=_p()),t=mi(t,r),t!==null&&(hs(t,r),br(t))}function RC(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Ov(t,l)}function MC(t,r){var l=0;switch(t.tag){case 31:case 13:var o=t.stateNode,f=t.memoizedState;f!==null&&(l=f.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(r),Ov(t,l)}function DC(t,r){return kn(t,r)}var Bu=null,jl=null,Hd=!1,qu=!1,Zd=!1,ka=0;function br(t){t!==jl&&t.next===null&&(jl===null?Bu=jl=t:jl=jl.next=t),qu=!0,Hd||(Hd=!0,LC())}function Qs(t,r){if(!Zd&&qu){Zd=!0;do for(var l=!1,o=Bu;o!==null;){if(t!==0){var f=o.pendingLanes;if(f===0)var m=0;else{var b=o.suspendedLanes,E=o.pingedLanes;m=(1<<31-ct(42|t)+1)-1,m&=f&~(b&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,Uv(o,m))}else m=Fe,m=Fo(o,o===ft?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||ds(o,m)||(l=!0,Uv(o,m));o=o.next}while(l);Zd=!1}}function UC(){Rv()}function Rv(){qu=Hd=!1;var t=0;ka!==0&&QC()&&(t=ka);for(var r=Ft(),l=null,o=Bu;o!==null;){var f=o.next,m=Mv(o,r);m===0?(o.next=null,l===null?Bu=f:l.next=f,f===null&&(jl=l)):(l=o,(t!==0||(m&3)!==0)&&(qu=!0)),o=f}Pt!==0&&Pt!==5||Qs(t),ka!==0&&(ka=0)}function Mv(t,r){for(var l=t.suspendedLanes,o=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var b=31-ct(m),E=1<<b,z=f[b];z===-1?((E&l)===0||(E&o)!==0)&&(f[b]=uE(E,r)):z<=r&&(t.expiredLanes|=E),m&=~E}if(r=ft,l=Fe,l=Fo(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,l===0||t===r&&(rt===2||rt===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&ua(o),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||ds(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(o!==null&&ua(o),rf(l)){case 2:case 8:l=ue;break;case 32:l=$;break;case 268435456:l=Ve;break;default:l=$}return o=Dv.bind(null,t),l=kn(l,o),t.callbackPriority=r,t.callbackNode=l,r}return o!==null&&o!==null&&ua(o),t.callbackPriority=2,t.callbackNode=null,2}function Dv(t,r){if(Pt!==0&&Pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Iu()&&t.callbackNode!==l)return null;var o=Fe;return o=Fo(t,t===ft?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(gv(t,o,r),Mv(t,Ft()),t.callbackNode!=null&&t.callbackNode===l?Dv.bind(null,t):null)}function Uv(t,r){if(Iu())return null;gv(t,r,!0)}function LC(){GC(function(){(Je&6)!==0?kn(J,UC):Rv()})}function Fd(){if(ka===0){var t=dl;t===0&&(t=Po,Po<<=1,(Po&261888)===0&&(Po=256)),ka=t}return ka}function Lv(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Yo(""+t)}function Iv(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 IC(t,r,l,o,f){if(r==="submit"&&l&&l.stateNode===f){var m=Lv((f[pn]||null).action),b=o.submitter;b&&(r=(r=b[pn]||null)?Lv(r.formAction):b.getAttribute("formAction"),r!==null&&(m=r,b=null));var E=new Jo("action","action",null,o,f);t.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ka!==0){var z=b?Iv(f,b):new FormData(f);cd(l,{pending:!0,data:z,method:f.method,action:m},null,z)}}else typeof m=="function"&&(E.preventDefault(),z=b?Iv(f,b):new FormData(f),cd(l,{pending:!0,data:z,method:f.method,action:m},m,z))},currentTarget:f}]})}}for(var $d=0;$d<jf.length;$d++){var Vd=jf[$d],BC=Vd.toLowerCase(),qC=Vd[0].toUpperCase()+Vd.slice(1);lr(BC,"on"+qC)}lr(pg,"onAnimationEnd"),lr(gg,"onAnimationIteration"),lr(yg,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(nC,"onTransitionRun"),lr(rC,"onTransitionStart"),lr(aC,"onTransitionCancel"),lr(vg,"onTransitionEnd"),Ji("onMouseEnter",["mouseout","mouseover"]),Ji("onMouseLeave",["mouseout","mouseover"]),Ji("onPointerEnter",["pointerout","pointerover"]),Ji("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),PC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function Bv(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var o=t[l],f=o.event;o=o.listeners;e:{var m=void 0;if(r)for(var b=o.length-1;0<=b;b--){var E=o[b],z=E.instance,F=E.currentTarget;if(E=E.listener,z!==m&&f.isPropagationStopped())break e;m=E,f.currentTarget=F;try{m(f)}catch(X){tu(X)}f.currentTarget=null,m=z}else for(b=0;b<o.length;b++){if(E=o[b],z=E.instance,F=E.currentTarget,E=E.listener,z!==m&&f.isPropagationStopped())break e;m=E,f.currentTarget=F;try{m(f)}catch(X){tu(X)}f.currentTarget=null,m=z}}}}function Ze(t,r){var l=r[af];l===void 0&&(l=r[af]=new Set);var o=t+"__bubble";l.has(o)||(qv(r,t,2,!1),l.add(o))}function Qd(t,r,l){var o=0;r&&(o|=4),qv(l,t,o,r)}var Pu="_reactListening"+Math.random().toString(36).slice(2);function Yd(t){if(!t[Pu]){t[Pu]=!0,Rp.forEach(function(l){l!=="selectionchange"&&(PC.has(l)||Qd(l,!1,t),Qd(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Pu]||(r[Pu]=!0,Qd("selectionchange",!1,r))}}function qv(t,r,l,o){switch(pb(r)){case 2:var f=pN;break;case 8:f=gN;break;default:f=uh}l=f.bind(null,r,l,t),f=void 0,!mf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),o?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 Gd(t,r,l,o,f){var m=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var E=o.stateNode.containerInfo;if(E===f)break;if(b===4)for(b=o.return;b!==null;){var z=b.tag;if((z===3||z===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;E!==null;){if(b=Gi(E),b===null)return;if(z=b.tag,z===5||z===6||z===26||z===27){o=m=b;continue e}E=E.parentNode}}o=o.return}$p(function(){var F=m,X=df(l),te=[];e:{var V=bg.get(t);if(V!==void 0){var Q=Jo,pe=t;switch(t){case"keypress":if(Ko(l)===0)break e;case"keydown":case"keyup":Q=ME;break;case"focusin":pe="focus",Q=vf;break;case"focusout":pe="blur",Q=vf;break;case"beforeblur":case"afterblur":Q=vf;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":Q=Yp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=wE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=LE;break;case pg:case gg:case yg:Q=NE;break;case vg:Q=BE;break;case"scroll":case"scrollend":Q=xE;break;case"wheel":Q=PE;break;case"copy":case"cut":case"paste":Q=jE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Kp;break;case"toggle":case"beforetoggle":Q=ZE}var je=(r&4)!==0,ot=!je&&(t==="scroll"||t==="scrollend"),I=je?V!==null?V+"Capture":null:V;je=[];for(var M=F,Z;M!==null;){var W=M;if(Z=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||Z===null||I===null||(W=gs(M,I),W!=null&&je.push(Gs(M,W,Z))),ot)break;M=M.return}0<je.length&&(V=new Q(V,pe,null,l,X),te.push({event:V,listeners:je}))}}if((r&7)===0){e:{if(V=t==="mouseover"||t==="pointerover",Q=t==="mouseout"||t==="pointerout",V&&l!==ff&&(pe=l.relatedTarget||l.fromElement)&&(Gi(pe)||pe[Yi]))break e;if((Q||V)&&(V=X.window===X?X:(V=X.ownerDocument)?V.defaultView||V.parentWindow:window,Q?(pe=l.relatedTarget||l.toElement,Q=F,pe=pe?Gi(pe):null,pe!==null&&(ot=u(pe),je=pe.tag,pe!==ot||je!==5&&je!==27&&je!==6)&&(pe=null)):(Q=null,pe=F),Q!==pe)){if(je=Yp,W="onMouseLeave",I="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(je=Kp,W="onPointerLeave",I="onPointerEnter",M="pointer"),ot=Q==null?V:ps(Q),Z=pe==null?V:ps(pe),V=new je(W,M+"leave",Q,l,X),V.target=ot,V.relatedTarget=Z,W=null,Gi(X)===F&&(je=new je(I,M+"enter",pe,l,X),je.target=Z,je.relatedTarget=ot,W=je),ot=W,Q&&pe)t:{for(je=HC,I=Q,M=pe,Z=0,W=I;W;W=je(W))Z++;W=0;for(var Ne=M;Ne;Ne=je(Ne))W++;for(;0<Z-W;)I=je(I),Z--;for(;0<W-Z;)M=je(M),W--;for(;Z--;){if(I===M||M!==null&&I===M.alternate){je=I;break t}I=je(I),M=je(M)}je=null}else je=null;Q!==null&&Pv(te,V,Q,je,!1),pe!==null&&ot!==null&&Pv(te,ot,pe,je,!0)}}e:{if(V=F?ps(F):window,Q=V.nodeName&&V.nodeName.toLowerCase(),Q==="select"||Q==="input"&&V.type==="file")var Ke=ag;else if(ng(V))if(ig)Ke=WE;else{Ke=XE;var be=KE}else Q=V.nodeName,!Q||Q.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?F&&cf(F.elementType)&&(Ke=ag):Ke=JE;if(Ke&&(Ke=Ke(t,F))){rg(te,Ke,l,X);break e}be&&be(t,V,F),t==="focusout"&&F&&V.type==="number"&&F.memoizedProps.value!=null&&uf(V,"number",V.value)}switch(be=F?ps(F):window,t){case"focusin":(ng(be)||be.contentEditable==="true")&&(al=be,Cf=F,Cs=null);break;case"focusout":Cs=Cf=al=null;break;case"mousedown":Nf=!0;break;case"contextmenu":case"mouseup":case"dragend":Nf=!1,hg(te,l,X);break;case"selectionchange":if(tC)break;case"keydown":case"keyup":hg(te,l,X)}var Le;if(xf)e:{switch(t){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else rl?eg(t,l)&&($e="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&($e="onCompositionStart");$e&&(Xp&&l.locale!=="ko"&&(rl||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&rl&&(Le=Vp()):(da=X,pf="value"in da?da.value:da.textContent,rl=!0)),be=Hu(F,$e),0<be.length&&($e=new Gp($e,t,null,l,X),te.push({event:$e,listeners:be}),Le?$e.data=Le:(Le=tg(l),Le!==null&&($e.data=Le)))),(Le=$E?VE(t,l):QE(t,l))&&($e=Hu(F,"onBeforeInput"),0<$e.length&&(be=new Gp("onBeforeInput","beforeinput",null,l,X),te.push({event:be,listeners:$e}),be.data=Le)),IC(te,t,F,l,X)}Bv(te,r)})}function Gs(t,r,l){return{instance:t,listener:r,currentTarget:l}}function Hu(t,r){for(var l=r+"Capture",o=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=gs(t,l),f!=null&&o.unshift(Gs(t,f,m)),f=gs(t,r),f!=null&&o.push(Gs(t,f,m))),t.tag===3)return o;t=t.return}return[]}function HC(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Pv(t,r,l,o,f){for(var m=r._reactName,b=[];l!==null&&l!==o;){var E=l,z=E.alternate,F=E.stateNode;if(E=E.tag,z!==null&&z===o)break;E!==5&&E!==26&&E!==27||F===null||(z=F,f?(F=gs(l,m),F!=null&&b.unshift(Gs(l,F,z))):f||(F=gs(l,m),F!=null&&b.push(Gs(l,F,z)))),l=l.return}b.length!==0&&t.push({event:r,listeners:b})}var ZC=/\r\n?/g,FC=/\u0000|\uFFFD/g;function Hv(t){return(typeof t=="string"?t:""+t).replace(ZC,`
|
|
49
|
+
`).replace(FC,"")}function Zv(t,r){return r=Hv(r),Hv(t)===r}function st(t,r,l,o,f,m){switch(l){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||el(t,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&el(t,""+o);break;case"className":Vo(t,"class",o);break;case"tabIndex":Vo(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Vo(t,l,o);break;case"style":Zp(t,o,m);break;case"data":if(r!=="object"){Vo(t,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(l);break}o=Yo(""+o),t.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="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 m=="function"&&(l==="formAction"?(r!=="input"&&st(t,r,"name",f.name,f,null),st(t,r,"formEncType",f.formEncType,f,null),st(t,r,"formMethod",f.formMethod,f,null),st(t,r,"formTarget",f.formTarget,f,null)):(st(t,r,"encType",f.encType,f,null),st(t,r,"method",f.method,f,null),st(t,r,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(l);break}o=Yo(""+o),t.setAttribute(l,o);break;case"onClick":o!=null&&(t.onclick=Mr);break;case"onScroll":o!=null&&Ze("scroll",t);break;case"onScrollEnd":o!=null&&Ze("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(i(60));t.innerHTML=l}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}l=Yo(""+o),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":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(l,""+o):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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":o===!0?t.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(l,o):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(l,o):t.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(l):t.setAttribute(l,o);break;case"popover":Ze("beforetoggle",t),Ze("toggle",t),$o(t,"popover",o);break;case"xlinkActuate":Rr(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Rr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Rr(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Rr(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Rr(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Rr(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Rr(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Rr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Rr(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":$o(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=vE.get(l)||l,$o(t,l,o))}}function Kd(t,r,l,o,f,m){switch(l){case"style":Zp(t,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(i(60));t.innerHTML=l}}break;case"children":typeof o=="string"?el(t,o):(typeof o=="number"||typeof o=="bigint")&&el(t,""+o);break;case"onScroll":o!=null&&Ze("scroll",t);break;case"onScrollEnd":o!=null&&Ze("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mp.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),r=l.slice(2,f?l.length-7:void 0),m=t[pn]||null,m=m!=null?m[l]:null,typeof m=="function"&&t.removeEventListener(r,m,f),typeof o=="function")){typeof m!="function"&&m!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,o,f);break e}l in t?t[l]=o:o===!0?t.setAttribute(l,""):$o(t,l,o)}}}function tn(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",t),Ze("load",t);var o=!1,f=!1,m;for(m in l)if(l.hasOwnProperty(m)){var b=l[m];if(b!=null)switch(m){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:st(t,r,m,b,l,null)}}f&&st(t,r,"srcSet",l.srcSet,l,null),o&&st(t,r,"src",l.src,l,null);return;case"input":Ze("invalid",t);var E=m=b=f=null,z=null,F=null;for(o in l)if(l.hasOwnProperty(o)){var X=l[o];if(X!=null)switch(o){case"name":f=X;break;case"type":b=X;break;case"checked":z=X;break;case"defaultChecked":F=X;break;case"value":m=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,r));break;default:st(t,r,o,X,l,null)}}Bp(t,m,E,z,F,b,f,!1);return;case"select":Ze("invalid",t),o=b=m=null;for(f in l)if(l.hasOwnProperty(f)&&(E=l[f],E!=null))switch(f){case"value":m=E;break;case"defaultValue":b=E;break;case"multiple":o=E;default:st(t,r,f,E,l,null)}r=m,l=b,t.multiple=!!o,r!=null?Wi(t,!!o,r,!1):l!=null&&Wi(t,!!o,l,!0);return;case"textarea":Ze("invalid",t),m=f=o=null;for(b in l)if(l.hasOwnProperty(b)&&(E=l[b],E!=null))switch(b){case"value":o=E;break;case"defaultValue":f=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:st(t,r,b,E,l,null)}Pp(t,o,f,m);return;case"option":for(z in l)if(l.hasOwnProperty(z)&&(o=l[z],o!=null))switch(z){case"selected":t.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:st(t,r,z,o,l,null)}return;case"dialog":Ze("beforetoggle",t),Ze("toggle",t),Ze("cancel",t),Ze("close",t);break;case"iframe":case"object":Ze("load",t);break;case"video":case"audio":for(o=0;o<Ys.length;o++)Ze(Ys[o],t);break;case"image":Ze("error",t),Ze("load",t);break;case"details":Ze("toggle",t);break;case"embed":case"source":case"link":Ze("error",t),Ze("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(F in l)if(l.hasOwnProperty(F)&&(o=l[F],o!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:st(t,r,F,o,l,null)}return;default:if(cf(r)){for(X in l)l.hasOwnProperty(X)&&(o=l[X],o!==void 0&&Kd(t,r,X,o,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(o=l[E],o!=null&&st(t,r,E,o,l,null))}function $C(t,r,l,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,E=null,z=null,F=null,X=null;for(Q in l){var te=l[Q];if(l.hasOwnProperty(Q)&&te!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":z=te;default:o.hasOwnProperty(Q)||st(t,r,Q,null,o,te)}}for(var V in o){var Q=o[V];if(te=l[V],o.hasOwnProperty(V)&&(Q!=null||te!=null))switch(V){case"type":m=Q;break;case"name":f=Q;break;case"checked":F=Q;break;case"defaultChecked":X=Q;break;case"value":b=Q;break;case"defaultValue":E=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,r));break;default:Q!==te&&st(t,r,V,Q,o,te)}}of(t,b,E,z,F,X,m,f);return;case"select":Q=b=E=V=null;for(m in l)if(z=l[m],l.hasOwnProperty(m)&&z!=null)switch(m){case"value":break;case"multiple":Q=z;default:o.hasOwnProperty(m)||st(t,r,m,null,o,z)}for(f in o)if(m=o[f],z=l[f],o.hasOwnProperty(f)&&(m!=null||z!=null))switch(f){case"value":V=m;break;case"defaultValue":E=m;break;case"multiple":b=m;default:m!==z&&st(t,r,f,m,o,z)}r=E,l=b,o=Q,V!=null?Wi(t,!!l,V,!1):!!o!=!!l&&(r!=null?Wi(t,!!l,r,!0):Wi(t,!!l,l?[]:"",!1));return;case"textarea":Q=V=null;for(E in l)if(f=l[E],l.hasOwnProperty(E)&&f!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:st(t,r,E,null,o,f)}for(b in o)if(f=o[b],m=l[b],o.hasOwnProperty(b)&&(f!=null||m!=null))switch(b){case"value":V=f;break;case"defaultValue":Q=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(i(91));break;default:f!==m&&st(t,r,b,f,o,m)}qp(t,V,Q);return;case"option":for(var pe in l)if(V=l[pe],l.hasOwnProperty(pe)&&V!=null&&!o.hasOwnProperty(pe))switch(pe){case"selected":t.selected=!1;break;default:st(t,r,pe,null,o,V)}for(z in o)if(V=o[z],Q=l[z],o.hasOwnProperty(z)&&V!==Q&&(V!=null||Q!=null))switch(z){case"selected":t.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:st(t,r,z,V,o,Q)}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 je in l)V=l[je],l.hasOwnProperty(je)&&V!=null&&!o.hasOwnProperty(je)&&st(t,r,je,null,o,V);for(F in o)if(V=o[F],Q=l[F],o.hasOwnProperty(F)&&V!==Q&&(V!=null||Q!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(i(137,r));break;default:st(t,r,F,V,o,Q)}return;default:if(cf(r)){for(var ot in l)V=l[ot],l.hasOwnProperty(ot)&&V!==void 0&&!o.hasOwnProperty(ot)&&Kd(t,r,ot,void 0,o,V);for(X in o)V=o[X],Q=l[X],!o.hasOwnProperty(X)||V===Q||V===void 0&&Q===void 0||Kd(t,r,X,V,o,Q);return}}for(var I in l)V=l[I],l.hasOwnProperty(I)&&V!=null&&!o.hasOwnProperty(I)&&st(t,r,I,null,o,V);for(te in o)V=o[te],Q=l[te],!o.hasOwnProperty(te)||V===Q||V==null&&Q==null||st(t,r,te,V,o,Q)}function Fv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function VC(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],m=f.transferSize,b=f.initiatorType,E=f.duration;if(m&&E&&Fv(b)){for(b=0,E=f.responseEnd,o+=1;o<l.length;o++){var z=l[o],F=z.startTime;if(F>E)break;var X=z.transferSize,te=z.initiatorType;X&&Fv(te)&&(z=z.responseEnd,b+=X*(z<E?1:(E-F)/(z-F)))}if(--o,r+=8*(m+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 Xd=null,Jd=null;function Zu(t){return t.nodeType===9?t:t.ownerDocument}function $v(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 Vv(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 Wd(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 eh=null;function QC(){var t=window.event;return t&&t.type==="popstate"?t===eh?!1:(eh=t,!0):(eh=null,!1)}var Qv=typeof setTimeout=="function"?setTimeout:void 0,YC=typeof clearTimeout=="function"?clearTimeout:void 0,Yv=typeof Promise=="function"?Promise:void 0,GC=typeof queueMicrotask=="function"?queueMicrotask:typeof Yv<"u"?function(t){return Yv.resolve(null).then(t).catch(KC)}:Qv;function KC(t){setTimeout(function(){throw t})}function Ta(t){return t==="head"}function Gv(t,r){var l=r,o=0;do{var f=l.nextSibling;if(t.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){t.removeChild(f),zl(r);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Ks(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Ks(l);for(var m=l.firstChild;m;){var b=m.nextSibling,E=m.nodeName;m[ms]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=b}}else l==="body"&&Ks(t.ownerDocument.body);l=f}while(l);zl(r)}function Kv(t,r){var l=t;t=0;do{var o=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||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=o}while(l)}function th(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":th(l),lf(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function XC(t,r,l,o){for(;t.nodeType===1;){var f=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[ms])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==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(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Gn(t.nextSibling),t===null)break}return null}function JC(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Gn(t.nextSibling),t===null))return null;return t}function Xv(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Gn(t.nextSibling),t===null))return null;return t}function nh(t){return t.data==="$?"||t.data==="$~"}function rh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function WC(t,r){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||l.readyState!=="loading")r();else{var o=function(){r(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function Gn(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 ah=null;function Jv(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(r===0)return Gn(t.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}t=t.nextSibling}return null}function Wv(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 eb(t,r,l){switch(r=Zu(l),t){case"html":if(t=r.documentElement,!t)throw Error(i(452));return t;case"head":if(t=r.head,!t)throw Error(i(453));return t;case"body":if(t=r.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function Ks(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);lf(t)}var Kn=new Map,tb=new Set;function Fu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Kr=re.d;re.d={f:eN,r:tN,D:nN,C:rN,L:aN,m:iN,X:sN,S:lN,M:oN};function eN(){var t=Kr.f(),r=Du();return t||r}function tN(t){var r=Ki(t);r!==null&&r.tag===5&&r.type==="form"?vy(r):Kr.r(t)}var kl=typeof document>"u"?null:document;function nb(t,r,l){var o=kl;if(o&&typeof r=="string"&&r){var f=Hn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),tb.has(f)||(tb.add(f),t={rel:t,crossOrigin:l,href:r},o.querySelector(f)===null&&(r=o.createElement("link"),tn(r,"link",t),Vt(r),o.head.appendChild(r)))}}function nN(t){Kr.D(t),nb("dns-prefetch",t,null)}function rN(t,r){Kr.C(t,r),nb("preconnect",t,r)}function aN(t,r,l){Kr.L(t,r,l);var o=kl;if(o&&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 m=f;switch(r){case"style":m=Tl(t);break;case"script":m=Al(t)}Kn.has(m)||(t=v({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),Kn.set(m,t),o.querySelector(f)!==null||r==="style"&&o.querySelector(Xs(m))||r==="script"&&o.querySelector(Js(m))||(r=o.createElement("link"),tn(r,"link",t),Vt(r),o.head.appendChild(r)))}}function iN(t,r){Kr.m(t,r);var l=kl;if(l&&t){var o=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+Hn(o)+'"][href="'+Hn(t)+'"]',m=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Al(t)}if(!Kn.has(m)&&(t=v({rel:"modulepreload",href:t},r),Kn.set(m,t),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Js(m)))return}o=l.createElement("link"),tn(o,"link",t),Vt(o),l.head.appendChild(o)}}}function lN(t,r,l){Kr.S(t,r,l);var o=kl;if(o&&t){var f=Xi(o).hoistableStyles,m=Tl(t);r=r||"default";var b=f.get(m);if(!b){var E={loading:0,preload:null};if(b=o.querySelector(Xs(m)))E.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":r},l),(l=Kn.get(m))&&ih(t,l);var z=b=o.createElement("link");Vt(z),tn(z,"link",t),z._p=new Promise(function(F,X){z.onload=F,z.onerror=X}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,$u(b,r,o)}b={type:"stylesheet",instance:b,count:1,state:E},f.set(m,b)}}}function sN(t,r){Kr.X(t,r);var l=kl;if(l&&t){var o=Xi(l).hoistableScripts,f=Al(t),m=o.get(f);m||(m=l.querySelector(Js(f)),m||(t=v({src:t,async:!0},r),(r=Kn.get(f))&&lh(t,r),m=l.createElement("script"),Vt(m),tn(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function oN(t,r){Kr.M(t,r);var l=kl;if(l&&t){var o=Xi(l).hoistableScripts,f=Al(t),m=o.get(f);m||(m=l.querySelector(Js(f)),m||(t=v({src:t,async:!0,type:"module"},r),(r=Kn.get(f))&&lh(t,r),m=l.createElement("script"),Vt(m),tn(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function rb(t,r,l,o){var f=(f=fe.current)?Fu(f):null;if(!f)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Tl(l.href),l=Xi(f).hoistableStyles,o=l.get(r),o||(o={type:"style",instance:null,count:0,state:null},l.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Tl(l.href);var m=Xi(f).hoistableStyles,b=m.get(t);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,b),(m=f.querySelector(Xs(t)))&&!m._p&&(b.instance=m,b.state.loading=5),Kn.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},Kn.set(t,l),m||uN(f,t,l,b.state))),r&&o===null)throw Error(i(528,""));return b}if(r&&o!==null)throw Error(i(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Al(l),l=Xi(f).hoistableScripts,o=l.get(r),o||(o={type:"script",instance:null,count:0,state:null},l.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function Tl(t){return'href="'+Hn(t)+'"'}function Xs(t){return'link[rel="stylesheet"]['+t+"]"}function ab(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function uN(t,r,l,o){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=t.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),tn(r,"link",l),Vt(r),t.head.appendChild(r))}function Al(t){return'[src="'+Hn(t)+'"]'}function Js(t){return"script[async]"+t}function ib(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var o=t.querySelector('style[data-href~="'+Hn(l.href)+'"]');if(o)return r.instance=o,Vt(o),o;var f=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Vt(o),tn(o,"style",f),$u(o,l.precedence,t),r.instance=o;case"stylesheet":f=Tl(l.href);var m=t.querySelector(Xs(f));if(m)return r.state.loading|=4,r.instance=m,Vt(m),m;o=ab(l),(f=Kn.get(f))&&ih(o,f),m=(t.ownerDocument||t).createElement("link"),Vt(m);var b=m;return b._p=new Promise(function(E,z){b.onload=E,b.onerror=z}),tn(m,"link",o),r.state.loading|=4,$u(m,l.precedence,t),r.instance=m;case"script":return m=Al(l.src),(f=t.querySelector(Js(m)))?(r.instance=f,Vt(f),f):(o=l,(f=Kn.get(m))&&(o=v({},l),lh(o,f)),t=t.ownerDocument||t,f=t.createElement("script"),Vt(f),tn(f,"link",o),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,$u(o,l.precedence,t));return r.instance}function $u(t,r,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,m=f,b=0;b<o.length;b++){var E=o[b];if(E.dataset.precedence===r)m=E;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function ih(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function lh(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Vu=null;function lb(t,r,l){if(Vu===null){var o=new Map,f=Vu=new Map;f.set(l,o)}else f=Vu,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(t))return o;for(o.set(t,null),l=l.getElementsByTagName(t),f=0;f<l.length;f++){var m=l[f];if(!(m[ms]||m[Xt]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(r)||"";b=t+b;var E=o.get(b);E?E.push(m):o.set(b,[m])}}return o}function sb(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function cN(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 ob(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function fN(t,r,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=Tl(o.href),m=r.querySelector(Xs(f));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Qu.bind(t),r.then(t,t)),l.state.loading|=4,l.instance=m,Vt(m);return}m=r.ownerDocument||r,o=ab(o),(f=Kn.get(f))&&ih(o,f),m=m.createElement("link"),Vt(m);var b=m;b._p=new Promise(function(E,z){b.onload=E,b.onerror=z}),tn(m,"link",o),l.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Qu.bind(t),r.addEventListener("load",l),r.addEventListener("error",l))}}var sh=0;function dN(t,r){return t.stylesheets&&t.count===0&&Gu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var o=setTimeout(function(){if(t.stylesheets&&Gu(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&sh===0&&(sh=62500*VC());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Gu(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>sh?50:800)+r);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Qu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yu=null;function Gu(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yu=new Map,r.forEach(hN,t),Yu=null,Qu.call(t))}function hN(t,r){if(!(r.state.loading&4)){var l=Yu.get(t);if(l)var o=l.get(null);else{l=new Map,Yu.set(t,l);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var b=f[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),o=b)}o&&l.set(null,o)}f=r.instance,b=f.getAttribute("data-precedence"),m=l.get(b)||o,m===o&&l.set(null,f),l.set(b,f),this.count++,o=Qu.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var Ws={$$typeof:U,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function mN(t,r,l,o,f,m,b,E,z){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tf(0),this.hiddenUpdates=tf(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function ub(t,r,l,o,f,m,b,E,z,F,X,te){return t=new mN(t,r,l,b,z,F,X,te,E),r=1,m===!0&&(r|=24),m=An(3,null,null,r),t.current=m,m.stateNode=t,r=qf(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:o,isDehydrated:l,cache:r},Ff(m),t}function cb(t){return t?(t=sl,t):sl}function fb(t,r,l,o,f,m){f=cb(f),o.context===null?o.context=f:o.pendingContext=f,o=va(r),o.payload={element:l},m=m===void 0?null:m,m!==null&&(o.callback=m),l=ba(t,o,r),l!==null&&(Sn(l,t,r),zs(l,t,r))}function db(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function oh(t,r){db(t,r),(t=t.alternate)&&db(t,r)}function hb(t){if(t.tag===13||t.tag===31){var r=mi(t,67108864);r!==null&&Sn(r,t,67108864),oh(t,67108864)}}function mb(t){if(t.tag===13||t.tag===31){var r=Dn();r=nf(r);var l=mi(t,r);l!==null&&Sn(l,t,r),oh(t,r)}}var Ku=!0;function pN(t,r,l,o){var f=q.T;q.T=null;var m=re.p;try{re.p=2,uh(t,r,l,o)}finally{re.p=m,q.T=f}}function gN(t,r,l,o){var f=q.T;q.T=null;var m=re.p;try{re.p=8,uh(t,r,l,o)}finally{re.p=m,q.T=f}}function uh(t,r,l,o){if(Ku){var f=ch(o);if(f===null)Gd(t,r,o,Xu,l),gb(t,o);else if(vN(f,t,r,l,o))o.stopPropagation();else if(gb(t,o),r&4&&-1<yN.indexOf(t)){for(;f!==null;){var m=Ki(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=ui(m.pendingLanes);if(b!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;b;){var z=1<<31-ct(b);E.entanglements[1]|=z,b&=~z}br(m),(Je&6)===0&&(Ru=Ft()+500,Qs(0))}}break;case 31:case 13:E=mi(m,2),E!==null&&Sn(E,m,2),Du(),oh(m,2)}if(m=ch(o),m===null&&Gd(t,r,o,Xu,l),m===f)break;f=m}f!==null&&o.stopPropagation()}else Gd(t,r,o,null,l)}}function ch(t){return t=df(t),fh(t)}var Xu=null;function fh(t){if(Xu=null,t=Gi(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 Xu=t,null}function pb(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(Qi()){case J:return 2;case ue:return 8;case $:case Ce:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var dh=!1,Aa=null,za=null,Oa=null,eo=new Map,to=new Map,Ra=[],yN="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 gb(t,r){switch(t){case"focusin":case"focusout":Aa=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Oa=null;break;case"pointerover":case"pointerout":eo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(r.pointerId)}}function no(t,r,l,o,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:l,eventSystemFlags:o,nativeEvent:m,targetContainers:[f]},r!==null&&(r=Ki(r),r!==null&&hb(r)),t):(t.eventSystemFlags|=o,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function vN(t,r,l,o,f){switch(r){case"focusin":return Aa=no(Aa,t,r,l,o,f),!0;case"dragenter":return za=no(za,t,r,l,o,f),!0;case"mouseover":return Oa=no(Oa,t,r,l,o,f),!0;case"pointerover":var m=f.pointerId;return eo.set(m,no(eo.get(m)||null,t,r,l,o,f)),!0;case"gotpointercapture":return m=f.pointerId,to.set(m,no(to.get(m)||null,t,r,l,o,f)),!0}return!1}function yb(t){var r=Gi(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,zp(t.priority,function(){mb(l)});return}}else if(r===31){if(r=d(l),r!==null){t.blockedOn=r,zp(t.priority,function(){mb(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 Ju(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=ch(t.nativeEvent);if(l===null){l=t.nativeEvent;var o=new l.constructor(l.type,l);ff=o,l.target.dispatchEvent(o),ff=null}else return r=Ki(l),r!==null&&hb(r),t.blockedOn=l,!1;r.shift()}return!0}function vb(t,r,l){Ju(t)&&l.delete(r)}function bN(){dh=!1,Aa!==null&&Ju(Aa)&&(Aa=null),za!==null&&Ju(za)&&(za=null),Oa!==null&&Ju(Oa)&&(Oa=null),eo.forEach(vb),to.forEach(vb)}function Wu(t,r){t.blockedOn===r&&(t.blockedOn=null,dh||(dh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,bN)))}var ec=null;function bb(t){ec!==t&&(ec=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ec===t&&(ec=null);for(var r=0;r<t.length;r+=3){var l=t[r],o=t[r+1],f=t[r+2];if(typeof o!="function"){if(fh(o||l)===null)continue;break}var m=Ki(l);m!==null&&(t.splice(r,3),r-=3,cd(m,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function zl(t){function r(z){return Wu(z,t)}Aa!==null&&Wu(Aa,t),za!==null&&Wu(za,t),Oa!==null&&Wu(Oa,t),eo.forEach(r),to.forEach(r);for(var l=0;l<Ra.length;l++){var o=Ra[l];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Ra.length&&(l=Ra[0],l.blockedOn===null);)yb(l),l.blockedOn===null&&Ra.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],m=l[o+1],b=f[pn]||null;if(typeof m=="function")b||bb(l);else if(b){var E=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[pn]||null)E=b.formAction;else if(fh(f)!==null)continue}else E=b.action;typeof E=="function"?l[o+1]=E:(l.splice(o,3),o-=3),bb(l)}}}function xb(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function hh(t){this._internalRoot=t}tc.prototype.render=hh.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(i(409));var l=r.current,o=Dn();fb(l,o,t,r,null,null)},tc.prototype.unmount=hh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;fb(t.current,2,null,t,null,null),Du(),r[Yi]=null}};function tc(t){this._internalRoot=t}tc.prototype.unstable_scheduleHydration=function(t){if(t){var r=Ap();t={blockedOn:null,target:t,priority:r};for(var l=0;l<Ra.length&&r!==0&&r<Ra[l].priority;l++);Ra.splice(l,0,t),l===0&&yb(t)}};var Sb=n.version;if(Sb!=="19.2.4")throw Error(i(527,Sb,"19.2.4"));re.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=p(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var xN={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{un=nc.inject(xN),qt=nc}catch{}}return ao.createRoot=function(t,r){if(!s(t))throw Error(i(299));var l=!1,o="",f=ky,m=Ty,b=Ay;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError)),r=ub(t,1,!1,null,null,l,o,null,f,m,b,xb),t[Yi]=r.current,Yd(t),new hh(r)},ao.hydrateRoot=function(t,r,l){if(!s(t))throw Error(i(299));var o=!1,f="",m=ky,b=Ty,E=Ay,z=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(z=l.formState)),r=ub(t,1,!0,r,l??null,o,f,z,m,b,E,xb),r.context=cb(null),l=r.current,o=Dn(),o=nf(o),f=va(o),f.callback=null,ba(l,f,o),l=o,r.current.lanes=l,hs(r,l),br(r),t[Yi]=r.current,Yd(t),new tc(r)},ao.version="19.2.4",ao}var Ob;function zN(){if(Ob)return yh.exports;Ob=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(),yh.exports=AN(),yh.exports}var ON=zN(),as=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(){}},Ti,Pa,$l,R0,RN=(R0=class extends as{constructor(){super();we(this,Ti);we(this,Pa);we(this,$l);de(this,$l,n=>{if(typeof window<"u"&&window.addEventListener){const a=()=>n();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){O(this,Pa)||this.setEventListener(O(this,$l))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,Pa))==null||n.call(this),de(this,Pa,void 0))}setEventListener(n){var a;de(this,$l,n),(a=O(this,Pa))==null||a.call(this),de(this,Pa,n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(n){O(this,Ti)!==n&&(de(this,Ti,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(a=>{a(n)})}isFocused(){var n;return typeof O(this,Ti)=="boolean"?O(this,Ti):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ti=new WeakMap,Pa=new WeakMap,$l=new WeakMap,R0),Mm=new RN,MN={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},Ha,zm,M0,DN=(M0=class{constructor(){we(this,Ha,MN);we(this,zm,!1)}setTimeoutProvider(e){de(this,Ha,e)}setTimeout(e,n){return O(this,Ha).setTimeout(e,n)}clearTimeout(e){O(this,Ha).clearTimeout(e)}setInterval(e,n){return O(this,Ha).setInterval(e,n)}clearInterval(e){O(this,Ha).clearInterval(e)}},Ha=new WeakMap,zm=new WeakMap,M0),ki=new DN;function UN(e){setTimeout(e,0)}var LN=typeof window>"u"||"Deno"in globalThis;function hn(){}function IN(e,n){return typeof e=="function"?e(n):e}function Kh(e){return typeof e=="number"&&e>=0&&e!==1/0}function $0(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Xa(e,n){return typeof e=="function"?e(n):e}function Jn(e,n){return typeof e=="function"?e(n):e}function Rb(e,n){const{type:a="all",exact:i,fetchStatus:s,predicate:u,queryKey:c,stale:d}=e;if(c){if(i){if(n.queryHash!==Dm(c,n.options))return!1}else if(!bo(n.queryKey,c))return!1}if(a!=="all"){const g=n.isActive();if(a==="active"&&!g||a==="inactive"&&g)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||s&&s!==n.state.fetchStatus||u&&!u(n))}function Mb(e,n){const{exact:a,status:i,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(a){if(qi(n.options.mutationKey)!==qi(u))return!1}else if(!bo(n.options.mutationKey,u))return!1}return!(i&&n.state.status!==i||s&&!s(n))}function Dm(e,n){return((n==null?void 0:n.queryKeyHashFn)||qi)(e)}function qi(e){return JSON.stringify(e,(n,a)=>Xh(a)?Object.keys(a).sort().reduce((i,s)=>(i[s]=a[s],i),{}):a)}function bo(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(a=>bo(e[a],n[a])):!1}var BN=Object.prototype.hasOwnProperty;function V0(e,n,a=0){if(e===n)return e;if(a>500)return n;const i=Db(e)&&Db(n);if(!i&&!(Xh(e)&&Xh(n)))return n;const u=(i?e:Object.keys(e)).length,c=i?n:Object.keys(n),d=c.length,g=i?new Array(d):{};let p=0;for(let y=0;y<d;y++){const v=i?y:c[y],x=e[v],S=n[v];if(x===S){g[v]=x,(i?y<u:BN.call(e,v))&&p++;continue}if(x===null||S===null||typeof x!="object"||typeof S!="object"){g[v]=S;continue}const j=V0(x,S,a+1);g[v]=j,j===x&&p++}return u===d&&p===u?e:g}function _c(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const a in e)if(e[a]!==n[a])return!1;return!0}function Db(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xh(e){if(!Ub(e))return!1;const n=e.constructor;if(n===void 0)return!0;const a=n.prototype;return!(!Ub(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ub(e){return Object.prototype.toString.call(e)==="[object Object]"}function qN(e){return new Promise(n=>{ki.setTimeout(n,e)})}function Jh(e,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,n):a.structuralSharing!==!1?V0(e,n):n}function PN(e,n,a=0){const i=[...e,n];return a&&i.length>a?i.slice(1):i}function HN(e,n,a=0){const i=[n,...e];return a&&i.length>a?i.slice(0,-1):i}var Um=Symbol();function Q0(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Um?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Lm(e,n){return typeof e=="function"?e(...n):!!e}function ZN(e,n,a){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),i||(i=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}var xo=(()=>{let e=()=>LN;return{isServer(){return e()},setIsServer(n){e=n}}})();function Wh(){let e,n;const a=new Promise((s,u)=>{e=s,n=u});a.status="pending",a.catch(()=>{});function i(s){Object.assign(a,s),delete a.resolve,delete a.reject}return a.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},a.reject=s=>{i({status:"rejected",reason:s}),n(s)},a}var FN=UN;function $N(){let e=[],n=0,a=d=>{d()},i=d=>{d()},s=FN;const u=d=>{n?e.push(d):s(()=>{a(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{i(()=>{d.forEach(g=>{a(g)})})})};return{batch:d=>{let g;n++;try{g=d()}finally{n--,n||c()}return g},batchCalls:d=>(...g)=>{u(()=>{d(...g)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{s=d}}}var Zt=$N(),Vl,Za,Ql,D0,VN=(D0=class extends as{constructor(){super();we(this,Vl,!0);we(this,Za);we(this,Ql);de(this,Ql,n=>{if(typeof window<"u"&&window.addEventListener){const a=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}})}onSubscribe(){O(this,Za)||this.setEventListener(O(this,Ql))}onUnsubscribe(){var n;this.hasListeners()||((n=O(this,Za))==null||n.call(this),de(this,Za,void 0))}setEventListener(n){var a;de(this,Ql,n),(a=O(this,Za))==null||a.call(this),de(this,Za,n(this.setOnline.bind(this)))}setOnline(n){O(this,Vl)!==n&&(de(this,Vl,n),this.listeners.forEach(i=>{i(n)}))}isOnline(){return O(this,Vl)}},Vl=new WeakMap,Za=new WeakMap,Ql=new WeakMap,D0),jc=new VN;function QN(e){return Math.min(1e3*2**e,3e4)}function Y0(e){return(e??"online")==="online"?jc.isOnline():!0}var em=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function G0(e){let n=!1,a=0,i;const s=Wh(),u=()=>s.status!=="pending",c=C=>{var T;if(!u()){const k=new em(C);x(k),(T=e.onCancel)==null||T.call(e,k)}},d=()=>{n=!0},g=()=>{n=!1},p=()=>Mm.isFocused()&&(e.networkMode==="always"||jc.isOnline())&&e.canRun(),y=()=>Y0(e.networkMode)&&e.canRun(),v=C=>{u()||(i==null||i(),s.resolve(C))},x=C=>{u()||(i==null||i(),s.reject(C))},S=()=>new Promise(C=>{var T;i=k=>{(u()||p())&&C(k)},(T=e.onPause)==null||T.call(e)}).then(()=>{var C;i=void 0,u()||(C=e.onContinue)==null||C.call(e)}),j=()=>{if(u())return;let C;const T=a===0?e.initialPromise:void 0;try{C=T??e.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(v).catch(k=>{var L;if(u())return;const P=e.retry??(xo.isServer()?0:3),U=e.retryDelay??QN,H=typeof U=="function"?U(a,k):U,Y=P===!0||typeof P=="number"&&a<P||typeof P=="function"&&P(a,k);if(n||!Y){x(k);return}a++,(L=e.onFail)==null||L.call(e,a,k),qN(H).then(()=>p()?void 0:S()).then(()=>{n?x(k):j()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(i==null||i(),s),cancelRetry:d,continueRetry:g,canStart:y,start:()=>(y()?j():S().then(j),s)}}var Ai,U0,K0=(U0=class{constructor(){we(this,Ai)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kh(this.gcTime)&&de(this,Ai,ki.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xo.isServer()?1/0:300*1e3))}clearGcTimeout(){O(this,Ai)&&(ki.clearTimeout(O(this,Ai)),de(this,Ai,void 0))}},Ai=new WeakMap,U0),zi,Yl,Xn,Oi,Yt,To,Ri,Ln,X0,Jr,L0,YN=(L0=class extends K0{constructor(n){super();we(this,Ln);we(this,zi);we(this,Yl);we(this,Xn);we(this,Oi);we(this,Yt);we(this,To);we(this,Ri);de(this,Ri,!1),de(this,To,n.defaultOptions),this.setOptions(n.options),this.observers=[],de(this,Oi,n.client),de(this,Xn,O(this,Oi).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,de(this,zi,Ib(this.options)),this.state=n.state??O(this,zi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=O(this,Yt))==null?void 0:n.promise}setOptions(n){if(this.options={...O(this,To),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Ib(this.options);a.data!==void 0&&(this.setState(Lb(a.data,a.dataUpdatedAt)),de(this,zi,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Xn).remove(this)}setData(n,a){const i=Jh(this.state.data,n,this.options);return Ie(this,Ln,Jr).call(this,{data:i,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),i}setState(n,a){Ie(this,Ln,Jr).call(this,{type:"setState",state:n,setStateOptions:a})}cancel(n){var i,s;const a=(i=O(this,Yt))==null?void 0:i.promise;return(s=O(this,Yt))==null||s.cancel(n),a?a.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return O(this,zi)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Jn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Um||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Xa(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:!$0(this.state.dataUpdatedAt,n)}onFocus(){var a;const n=this.observers.find(i=>i.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(a=O(this,Yt))==null||a.continue()}onOnline(){var a;const n=this.observers.find(i=>i.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(a=O(this,Yt))==null||a.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(a=>a!==n),this.observers.length||(O(this,Yt)&&(O(this,Ri)||Ie(this,Ln,X0).call(this)?O(this,Yt).cancel({revert:!0}):O(this,Yt).cancelRetry()),this.scheduleGc()),O(this,Xn).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ie(this,Ln,Jr).call(this,{type:"invalidate"})}async fetch(n,a){var g,p,y,v,x,S,j,C,T,k,P,U;if(this.state.fetchStatus!=="idle"&&((g=O(this,Yt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(O(this,Yt))return O(this,Yt).continueRetry(),O(this,Yt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const H=this.observers.find(Y=>Y.options.queryFn);H&&this.setOptions(H.options)}const i=new AbortController,s=H=>{Object.defineProperty(H,"signal",{enumerable:!0,get:()=>(de(this,Ri,!0),i.signal)})},u=()=>{const H=Q0(this.options,a),L=(()=>{const B={client:O(this,Oi),queryKey:this.queryKey,meta:this.meta};return s(B),B})();return de(this,Ri,!1),this.options.persister?this.options.persister(H,L,this):H(L)},d=(()=>{const H={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:O(this,Oi),state:this.state,fetchFn:u};return s(H),H})();(p=this.options.behavior)==null||p.onFetch(d,this),de(this,Yl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=d.fetchOptions)==null?void 0:y.meta))&&Ie(this,Ln,Jr).call(this,{type:"fetch",meta:(v=d.fetchOptions)==null?void 0:v.meta}),de(this,Yt,G0({initialPromise:a==null?void 0:a.initialPromise,fn:d.fetchFn,onCancel:H=>{H instanceof em&&H.revert&&this.setState({...O(this,Yl),fetchStatus:"idle"}),i.abort()},onFail:(H,Y)=>{Ie(this,Ln,Jr).call(this,{type:"failed",failureCount:H,error:Y})},onPause:()=>{Ie(this,Ln,Jr).call(this,{type:"pause"})},onContinue:()=>{Ie(this,Ln,Jr).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const H=await O(this,Yt).start();if(H===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(H),(S=(x=O(this,Xn).config).onSuccess)==null||S.call(x,H,this),(C=(j=O(this,Xn).config).onSettled)==null||C.call(j,H,this.state.error,this),H}catch(H){if(H instanceof em){if(H.silent)return O(this,Yt).promise;if(H.revert){if(this.state.data===void 0)throw H;return this.state.data}}throw Ie(this,Ln,Jr).call(this,{type:"error",error:H}),(k=(T=O(this,Xn).config).onError)==null||k.call(T,H,this),(U=(P=O(this,Xn).config).onSettled)==null||U.call(P,this.state.data,H,this),H}finally{this.scheduleGc()}}},zi=new WeakMap,Yl=new WeakMap,Xn=new WeakMap,Oi=new WeakMap,Yt=new WeakMap,To=new WeakMap,Ri=new WeakMap,Ln=new WeakSet,X0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Jr=function(n){const a=i=>{switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...J0(i.data,this.options),fetchMeta:n.meta??null};case"success":const s={...i,...Lb(n.data,n.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,Yl,n.manual?s:void 0),s;case"error":const u=n.error;return{...i,error:u,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=a(this.state),Zt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),O(this,Xn).notify({query:this,type:"updated",action:n})})},L0);function J0(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Y0(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lb(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ib(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,a=n!==void 0,i=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var En,Ye,Ao,dn,Mi,Gl,Wr,Fa,zo,Kl,Xl,Di,Ui,$a,Jl,nt,ho,tm,nm,rm,am,im,lm,sm,W0,I0,GN=(I0=class extends as{constructor(n,a){super();we(this,nt);we(this,En);we(this,Ye);we(this,Ao);we(this,dn);we(this,Mi);we(this,Gl);we(this,Wr);we(this,Fa);we(this,zo);we(this,Kl);we(this,Xl);we(this,Di);we(this,Ui);we(this,$a);we(this,Jl,new Set);this.options=a,de(this,En,n),de(this,Fa,null),de(this,Wr,Wh()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Ye).addObserver(this),Bb(O(this,Ye),this.options)?Ie(this,nt,ho).call(this):this.updateResult(),Ie(this,nt,am).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return om(O(this,Ye),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return om(O(this,Ye),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ie(this,nt,im).call(this),Ie(this,nt,lm).call(this),O(this,Ye).removeObserver(this)}setOptions(n){const a=this.options,i=O(this,Ye);if(this.options=O(this,En).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Jn(this.options.enabled,O(this,Ye))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ie(this,nt,sm).call(this),O(this,Ye).setOptions(this.options),a._defaulted&&!_c(this.options,a)&&O(this,En).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Ye),observer:this});const s=this.hasListeners();s&&qb(O(this,Ye),i,this.options,a)&&Ie(this,nt,ho).call(this),this.updateResult(),s&&(O(this,Ye)!==i||Jn(this.options.enabled,O(this,Ye))!==Jn(a.enabled,O(this,Ye))||Xa(this.options.staleTime,O(this,Ye))!==Xa(a.staleTime,O(this,Ye)))&&Ie(this,nt,tm).call(this);const u=Ie(this,nt,nm).call(this);s&&(O(this,Ye)!==i||Jn(this.options.enabled,O(this,Ye))!==Jn(a.enabled,O(this,Ye))||u!==O(this,$a))&&Ie(this,nt,rm).call(this,u)}getOptimisticResult(n){const a=O(this,En).getQueryCache().build(O(this,En),n),i=this.createResult(a,n);return XN(this,i)&&(de(this,dn,i),de(this,Gl,this.options),de(this,Mi,O(this,Ye).state)),i}getCurrentResult(){return O(this,dn)}trackResult(n,a){return new Proxy(n,{get:(i,s)=>(this.trackProp(s),a==null||a(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,Wr).status==="pending"&&O(this,Wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,s))})}trackProp(n){O(this,Jl).add(n)}getCurrentQuery(){return O(this,Ye)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const a=O(this,En).defaultQueryOptions(n),i=O(this,En).getQueryCache().build(O(this,En),a);return i.fetch().then(()=>this.createResult(i,a))}fetch(n){return Ie(this,nt,ho).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,dn)))}createResult(n,a){var G;const i=O(this,Ye),s=this.options,u=O(this,dn),c=O(this,Mi),d=O(this,Gl),p=n!==i?n.state:O(this,Ao),{state:y}=n;let v={...y},x=!1,S;if(a._optimisticResults){const ie=this.hasListeners(),le=!ie&&Bb(n,a),se=ie&&qb(n,i,a,s);(le||se)&&(v={...v,...J0(y.data,n.options)}),a._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:j,errorUpdatedAt:C,status:T}=v;S=v.data;let k=!1;if(a.placeholderData!==void 0&&S===void 0&&T==="pending"){let ie;u!=null&&u.isPlaceholderData&&a.placeholderData===(d==null?void 0:d.placeholderData)?(ie=u.data,k=!0):ie=typeof a.placeholderData=="function"?a.placeholderData((G=O(this,Xl))==null?void 0:G.state.data,O(this,Xl)):a.placeholderData,ie!==void 0&&(T="success",S=Jh(u==null?void 0:u.data,ie,a),x=!0)}if(a.select&&S!==void 0&&!k)if(u&&S===(c==null?void 0:c.data)&&a.select===O(this,zo))S=O(this,Kl);else try{de(this,zo,a.select),S=a.select(S),S=Jh(u==null?void 0:u.data,S,a),de(this,Kl,S),de(this,Fa,null)}catch(ie){de(this,Fa,ie)}O(this,Fa)&&(j=O(this,Fa),S=O(this,Kl),C=Date.now(),T="error");const P=v.fetchStatus==="fetching",U=T==="pending",H=T==="error",Y=U&&P,L=S!==void 0,D={status:T,fetchStatus:v.fetchStatus,isPending:U,isSuccess:T==="success",isError:H,isInitialLoading:Y,isLoading:Y,data:S,dataUpdatedAt:v.dataUpdatedAt,error:j,errorUpdatedAt:C,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:P,isRefetching:P&&!U,isLoadingError:H&&!L,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:H&&L,isStale:Im(n,a),refetch:this.refetch,promise:O(this,Wr),isEnabled:Jn(a.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const ie=D.data!==void 0,le=D.status==="error"&&!ie,se=ne=>{le?ne.reject(D.error):ie&&ne.resolve(D.data)},Ae=()=>{const ne=de(this,Wr,D.promise=Wh());se(ne)},ce=O(this,Wr);switch(ce.status){case"pending":n.queryHash===i.queryHash&&se(ce);break;case"fulfilled":(le||D.data!==ce.value)&&Ae();break;case"rejected":(!le||D.error!==ce.reason)&&Ae();break}}return D}updateResult(){const n=O(this,dn),a=this.createResult(O(this,Ye),this.options);if(de(this,Mi,O(this,Ye).state),de(this,Gl,this.options),O(this,Mi).data!==void 0&&de(this,Xl,O(this,Ye)),_c(a,n))return;de(this,dn,a);const i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,u=typeof s=="function"?s():s;if(u==="all"||!u&&!O(this,Jl).size)return!0;const c=new Set(u??O(this,Jl));return this.options.throwOnError&&c.add("error"),Object.keys(O(this,dn)).some(d=>{const g=d;return O(this,dn)[g]!==n[g]&&c.has(g)})};Ie(this,nt,W0).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ie(this,nt,am).call(this)}},En=new WeakMap,Ye=new WeakMap,Ao=new WeakMap,dn=new WeakMap,Mi=new WeakMap,Gl=new WeakMap,Wr=new WeakMap,Fa=new WeakMap,zo=new WeakMap,Kl=new WeakMap,Xl=new WeakMap,Di=new WeakMap,Ui=new WeakMap,$a=new WeakMap,Jl=new WeakMap,nt=new WeakSet,ho=function(n){Ie(this,nt,sm).call(this);let a=O(this,Ye).fetch(this.options,n);return n!=null&&n.throwOnError||(a=a.catch(hn)),a},tm=function(){Ie(this,nt,im).call(this);const n=Xa(this.options.staleTime,O(this,Ye));if(xo.isServer()||O(this,dn).isStale||!Kh(n))return;const i=$0(O(this,dn).dataUpdatedAt,n)+1;de(this,Di,ki.setTimeout(()=>{O(this,dn).isStale||this.updateResult()},i))},nm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Ye)):this.options.refetchInterval)??!1},rm=function(n){Ie(this,nt,lm).call(this),de(this,$a,n),!(xo.isServer()||Jn(this.options.enabled,O(this,Ye))===!1||!Kh(O(this,$a))||O(this,$a)===0)&&de(this,Ui,ki.setInterval(()=>{(this.options.refetchIntervalInBackground||Mm.isFocused())&&Ie(this,nt,ho).call(this)},O(this,$a)))},am=function(){Ie(this,nt,tm).call(this),Ie(this,nt,rm).call(this,Ie(this,nt,nm).call(this))},im=function(){O(this,Di)&&(ki.clearTimeout(O(this,Di)),de(this,Di,void 0))},lm=function(){O(this,Ui)&&(ki.clearInterval(O(this,Ui)),de(this,Ui,void 0))},sm=function(){const n=O(this,En).getQueryCache().build(O(this,En),this.options);if(n===O(this,Ye))return;const a=O(this,Ye);de(this,Ye,n),de(this,Ao,n.state),this.hasListeners()&&(a==null||a.removeObserver(this),n.addObserver(this))},W0=function(n){Zt.batch(()=>{n.listeners&&this.listeners.forEach(a=>{a(O(this,dn))}),O(this,En).getQueryCache().notify({query:O(this,Ye),type:"observerResultsUpdated"})})},I0);function KN(e,n){return Jn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Bb(e,n){return KN(e,n)||e.state.data!==void 0&&om(e,n,n.refetchOnMount)}function om(e,n,a){if(Jn(n.enabled,e)!==!1&&Xa(n.staleTime,e)!=="static"){const i=typeof a=="function"?a(e):a;return i==="always"||i!==!1&&Im(e,n)}return!1}function qb(e,n,a,i){return(e!==n||Jn(i.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&Im(e,a)}function Im(e,n){return Jn(n.enabled,e)!==!1&&e.isStaleByTime(Xa(n.staleTime,e))}function XN(e,n){return!_c(e.getCurrentResult(),n)}function Pb(e){return{onFetch:(n,a)=>{var y,v,x,S,j;const i=n.options,s=(x=(v=(y=n.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,u=((S=n.state.data)==null?void 0:S.pages)||[],c=((j=n.state.data)==null?void 0:j.pageParams)||[];let d={pages:[],pageParams:[]},g=0;const p=async()=>{let C=!1;const T=U=>{ZN(U,()=>n.signal,()=>C=!0)},k=Q0(n.options,n.fetchOptions),P=async(U,H,Y)=>{if(C)return Promise.reject();if(H==null&&U.pages.length)return Promise.resolve(U);const B=(()=>{const le={client:n.client,queryKey:n.queryKey,pageParam:H,direction:Y?"backward":"forward",meta:n.options.meta};return T(le),le})(),D=await k(B),{maxPages:G}=n.options,ie=Y?HN:PN;return{pages:ie(U.pages,D,G),pageParams:ie(U.pageParams,H,G)}};if(s&&u.length){const U=s==="backward",H=U?JN:Hb,Y={pages:u,pageParams:c},L=H(i,Y);d=await P(Y,L,U)}else{const U=e??u.length;do{const H=g===0?c[0]??i.initialPageParam:Hb(i,d);if(g>0&&H==null)break;d=await P(d,H),g++}while(g<U)}return d};n.options.persister?n.fetchFn=()=>{var C,T;return(T=(C=n.options).persister)==null?void 0:T.call(C,p,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a)}:n.fetchFn=p}}}function Hb(e,{pages:n,pageParams:a}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,a[i],a):void 0}function JN(e,{pages:n,pageParams:a}){var i;return n.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,n[0],n,a[0],a):void 0}var Oo,Sr,an,Li,wr,Ia,B0,WN=(B0=class extends K0{constructor(n){super();we(this,wr);we(this,Oo);we(this,Sr);we(this,an);we(this,Li);de(this,Oo,n.client),this.mutationId=n.mutationId,de(this,an,n.mutationCache),de(this,Sr,[]),this.state=n.state||e1(),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,Sr).includes(n)||(O(this,Sr).push(n),this.clearGcTimeout(),O(this,an).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){de(this,Sr,O(this,Sr).filter(a=>a!==n)),this.scheduleGc(),O(this,an).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){O(this,Sr).length||(this.state.status==="pending"?this.scheduleGc():O(this,an).remove(this))}continue(){var n;return((n=O(this,Li))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var c,d,g,p,y,v,x,S,j,C,T,k,P,U,H,Y,L,B;const a=()=>{Ie(this,wr,Ia).call(this,{type:"continue"})},i={client:O(this,Oo),meta:this.options.meta,mutationKey:this.options.mutationKey};de(this,Li,G0({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:(D,G)=>{Ie(this,wr,Ia).call(this,{type:"failed",failureCount:D,error:G})},onPause:()=>{Ie(this,wr,Ia).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,an).canRun(this)}));const s=this.state.status==="pending",u=!O(this,Li).canStart();try{if(s)a();else{Ie(this,wr,Ia).call(this,{type:"pending",variables:n,isPaused:u}),O(this,an).config.onMutate&&await O(this,an).config.onMutate(n,this,i);const G=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,n,i));G!==this.state.context&&Ie(this,wr,Ia).call(this,{type:"pending",context:G,variables:n,isPaused:u})}const D=await O(this,Li).start();return await((p=(g=O(this,an).config).onSuccess)==null?void 0:p.call(g,D,n,this.state.context,this,i)),await((v=(y=this.options).onSuccess)==null?void 0:v.call(y,D,n,this.state.context,i)),await((S=(x=O(this,an).config).onSettled)==null?void 0:S.call(x,D,null,this.state.variables,this.state.context,this,i)),await((C=(j=this.options).onSettled)==null?void 0:C.call(j,D,null,n,this.state.context,i)),Ie(this,wr,Ia).call(this,{type:"success",data:D}),D}catch(D){try{await((k=(T=O(this,an).config).onError)==null?void 0:k.call(T,D,n,this.state.context,this,i))}catch(G){Promise.reject(G)}try{await((U=(P=this.options).onError)==null?void 0:U.call(P,D,n,this.state.context,i))}catch(G){Promise.reject(G)}try{await((Y=(H=O(this,an).config).onSettled)==null?void 0:Y.call(H,void 0,D,this.state.variables,this.state.context,this,i))}catch(G){Promise.reject(G)}try{await((B=(L=this.options).onSettled)==null?void 0:B.call(L,void 0,D,n,this.state.context,i))}catch(G){Promise.reject(G)}throw Ie(this,wr,Ia).call(this,{type:"error",error:D}),D}finally{O(this,an).runNext(this)}}},Oo=new WeakMap,Sr=new WeakMap,an=new WeakMap,Li=new WeakMap,wr=new WeakSet,Ia=function(n){const a=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,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{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Zt.batch(()=>{O(this,Sr).forEach(i=>{i.onMutationUpdate(n)}),O(this,an).notify({mutation:this,type:"updated",action:n})})},B0);function e1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ea,ur,Ro,q0,e_=(q0=class extends as{constructor(n={}){super();we(this,ea);we(this,ur);we(this,Ro);this.config=n,de(this,ea,new Set),de(this,ur,new Map),de(this,Ro,0)}build(n,a,i){const s=new WN({client:n,mutationCache:this,mutationId:++rc(this,Ro)._,options:n.defaultMutationOptions(a),state:i});return this.add(s),s}add(n){O(this,ea).add(n);const a=ac(n);if(typeof a=="string"){const i=O(this,ur).get(a);i?i.push(n):O(this,ur).set(a,[n])}this.notify({type:"added",mutation:n})}remove(n){if(O(this,ea).delete(n)){const a=ac(n);if(typeof a=="string"){const i=O(this,ur).get(a);if(i)if(i.length>1){const s=i.indexOf(n);s!==-1&&i.splice(s,1)}else i[0]===n&&O(this,ur).delete(a)}}this.notify({type:"removed",mutation:n})}canRun(n){const a=ac(n);if(typeof a=="string"){const i=O(this,ur).get(a),s=i==null?void 0:i.find(u=>u.state.status==="pending");return!s||s===n}else return!0}runNext(n){var i;const a=ac(n);if(typeof a=="string"){const s=(i=O(this,ur).get(a))==null?void 0:i.find(u=>u!==n&&u.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Zt.batch(()=>{O(this,ea).forEach(n=>{this.notify({type:"removed",mutation:n})}),O(this,ea).clear(),O(this,ur).clear()})}getAll(){return Array.from(O(this,ea))}find(n){const a={exact:!0,...n};return this.getAll().find(i=>Mb(a,i))}findAll(n={}){return this.getAll().filter(a=>Mb(n,a))}notify(n){Zt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}resumePausedMutations(){const n=this.getAll().filter(a=>a.state.isPaused);return Zt.batch(()=>Promise.all(n.map(a=>a.continue().catch(hn))))}},ea=new WeakMap,ur=new WeakMap,Ro=new WeakMap,q0);function ac(e){var n;return(n=e.options.scope)==null?void 0:n.id}var ta,Va,Cn,na,aa,xc,um,P0,t_=(P0=class extends as{constructor(a,i){super();we(this,aa);we(this,ta);we(this,Va);we(this,Cn);we(this,na);de(this,ta,a),this.setOptions(i),this.bindMethods(),Ie(this,aa,xc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var s;const i=this.options;this.options=O(this,ta).defaultMutationOptions(a),_c(this.options,i)||O(this,ta).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,Cn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&qi(i.mutationKey)!==qi(this.options.mutationKey)?this.reset():((s=O(this,Cn))==null?void 0:s.state.status)==="pending"&&O(this,Cn).setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=O(this,Cn))==null||a.removeObserver(this)}onMutationUpdate(a){Ie(this,aa,xc).call(this),Ie(this,aa,um).call(this,a)}getCurrentResult(){return O(this,Va)}reset(){var a;(a=O(this,Cn))==null||a.removeObserver(this),de(this,Cn,void 0),Ie(this,aa,xc).call(this),Ie(this,aa,um).call(this)}mutate(a,i){var s;return de(this,na,i),(s=O(this,Cn))==null||s.removeObserver(this),de(this,Cn,O(this,ta).getMutationCache().build(O(this,ta),this.options)),O(this,Cn).addObserver(this),O(this,Cn).execute(a)}},ta=new WeakMap,Va=new WeakMap,Cn=new WeakMap,na=new WeakMap,aa=new WeakSet,xc=function(){var i;const a=((i=O(this,Cn))==null?void 0:i.state)??e1();de(this,Va,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},um=function(a){Zt.batch(()=>{var i,s,u,c,d,g,p,y;if(O(this,na)&&this.hasListeners()){const v=O(this,Va).variables,x=O(this,Va).context,S={client:O(this,ta),meta:this.options.meta,mutationKey:this.options.mutationKey};if((a==null?void 0:a.type)==="success"){try{(s=(i=O(this,na)).onSuccess)==null||s.call(i,a.data,v,x,S)}catch(j){Promise.reject(j)}try{(c=(u=O(this,na)).onSettled)==null||c.call(u,a.data,null,v,x,S)}catch(j){Promise.reject(j)}}else if((a==null?void 0:a.type)==="error"){try{(g=(d=O(this,na)).onError)==null||g.call(d,a.error,v,x,S)}catch(j){Promise.reject(j)}try{(y=(p=O(this,na)).onSettled)==null||y.call(p,void 0,a.error,v,x,S)}catch(j){Promise.reject(j)}}}this.listeners.forEach(v=>{v(O(this,Va))})})},P0),Er,H0,n_=(H0=class extends as{constructor(n={}){super();we(this,Er);this.config=n,de(this,Er,new Map)}build(n,a,i){const s=a.queryKey,u=a.queryHash??Dm(s,a);let c=this.get(u);return c||(c=new YN({client:n,queryKey:s,queryHash:u,options:n.defaultQueryOptions(a),state:i,defaultOptions:n.getQueryDefaults(s)}),this.add(c)),c}add(n){O(this,Er).has(n.queryHash)||(O(this,Er).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const a=O(this,Er).get(n.queryHash);a&&(n.destroy(),a===n&&O(this,Er).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Zt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return O(this,Er).get(n)}getAll(){return[...O(this,Er).values()]}find(n){const a={exact:!0,...n};return this.getAll().find(i=>Rb(a,i))}findAll(n={}){const a=this.getAll();return Object.keys(n).length>0?a.filter(i=>Rb(n,i)):a}notify(n){Zt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Er=new WeakMap,H0),kt,Qa,Ya,Wl,es,Ga,ts,ns,Z0,r_=(Z0=class{constructor(e={}){we(this,kt);we(this,Qa);we(this,Ya);we(this,Wl);we(this,es);we(this,Ga);we(this,ts);we(this,ns);de(this,kt,e.queryCache||new n_),de(this,Qa,e.mutationCache||new e_),de(this,Ya,e.defaultOptions||{}),de(this,Wl,new Map),de(this,es,new Map),de(this,Ga,0)}mount(){rc(this,Ga)._++,O(this,Ga)===1&&(de(this,ts,Mm.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,kt).onFocus())})),de(this,ns,jc.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,kt).onOnline())})))}unmount(){var e,n;rc(this,Ga)._--,O(this,Ga)===0&&((e=O(this,ts))==null||e.call(this),de(this,ts,void 0),(n=O(this,ns))==null||n.call(this),de(this,ns,void 0))}isFetching(e){return O(this,kt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Qa).findAll({...e,status:"pending"}).length}getQueryData(e){var a;const n=this.defaultQueryOptions({queryKey:e});return(a=O(this,kt).get(n.queryHash))==null?void 0:a.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),a=O(this,kt).build(this,n),i=a.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(Xa(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return O(this,kt).findAll(e).map(({queryKey:n,state:a})=>{const i=a.data;return[n,i]})}setQueryData(e,n,a){const i=this.defaultQueryOptions({queryKey:e}),s=O(this,kt).get(i.queryHash),u=s==null?void 0:s.state.data,c=IN(n,u);if(c!==void 0)return O(this,kt).build(this,i).setData(c,{...a,manual:!0})}setQueriesData(e,n,a){return Zt.batch(()=>O(this,kt).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,a)]))}getQueryState(e){var a;const n=this.defaultQueryOptions({queryKey:e});return(a=O(this,kt).get(n.queryHash))==null?void 0:a.state}removeQueries(e){const n=O(this,kt);Zt.batch(()=>{n.findAll(e).forEach(a=>{n.remove(a)})})}resetQueries(e,n){const a=O(this,kt);return Zt.batch(()=>(a.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const a={revert:!0,...n},i=Zt.batch(()=>O(this,kt).findAll(e).map(s=>s.cancel(a)));return Promise.all(i).then(hn).catch(hn)}invalidateQueries(e,n={}){return Zt.batch(()=>(O(this,kt).findAll(e).forEach(a=>{a.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 a={...n,cancelRefetch:n.cancelRefetch??!0},i=Zt.batch(()=>O(this,kt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,a);return a.throwOnError||(u=u.catch(hn)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(hn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=O(this,kt).build(this,n);return a.isStaleByTime(Xa(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hn).catch(hn)}fetchInfiniteQuery(e){return e.behavior=Pb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hn).catch(hn)}ensureInfiniteQueryData(e){return e.behavior=Pb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jc.isOnline()?O(this,Qa).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,kt)}getMutationCache(){return O(this,Qa)}getDefaultOptions(){return O(this,Ya)}setDefaultOptions(e){de(this,Ya,e)}setQueryDefaults(e,n){O(this,Wl).set(qi(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...O(this,Wl).values()],a={};return n.forEach(i=>{bo(e,i.queryKey)&&Object.assign(a,i.defaultOptions)}),a}setMutationDefaults(e,n){O(this,es).set(qi(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...O(this,es).values()],a={};return n.forEach(i=>{bo(e,i.mutationKey)&&Object.assign(a,i.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const n={...O(this,Ya).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Dm(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===Um&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,Ya).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,kt).clear(),O(this,Qa).clear()}},kt=new WeakMap,Qa=new WeakMap,Ya=new WeakMap,Wl=new WeakMap,es=new WeakMap,Ga=new WeakMap,ts=new WeakMap,ns=new WeakMap,Z0),t1=w.createContext(void 0),tr=e=>{const n=w.useContext(t1);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},a_=({client:e,children:n})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(t1.Provider,{value:e,children:n})),n1=w.createContext(!1),i_=()=>w.useContext(n1);n1.Provider;function l_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var s_=w.createContext(l_()),o_=()=>w.useContext(s_),u_=(e,n,a)=>{const i=a!=null&&a.state.error&&typeof e.throwOnError=="function"?Lm(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(n.isReset()||(e.retryOnMount=!1))},c_=e=>{w.useEffect(()=>{e.clearReset()},[e])},f_=({result:e,errorResetBoundary:n,throwOnError:a,query:i,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||Lm(a,[e.error,i])),d_=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>a(i(...s)):a(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},h_=(e,n)=>e.isLoading&&e.isFetching&&!n,m_=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Zb=(e,n,a)=>n.fetchOptimistic(e).catch(()=>{a.clearReset()});function p_(e,n,a){var x,S,j,C;const i=i_(),s=o_(),u=tr(),c=u.defaultQueryOptions(e);(S=(x=u.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||S.call(x,c);const d=u.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",d_(c),u_(c,s,d),c_(s);const g=!u.getQueryCache().get(c.queryHash),[p]=w.useState(()=>new n(u,c)),y=p.getOptimisticResult(c),v=!i&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(T=>{const k=v?p.subscribe(Zt.batchCalls(T)):hn;return p.updateResult(),k},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),w.useEffect(()=>{p.setOptions(c)},[c,p]),m_(c,y))throw Zb(c,p,s);if(f_({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;if((C=(j=u.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||C.call(j,c,y),c.experimental_prefetchInRender&&!xo.isServer()&&h_(y,i)){const T=g?Zb(c,p,s):d==null?void 0:d.promise;T==null||T.catch(hn).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?y:p.trackResult(y)}function Ge(e,n){return p_(e,GN)}function yt(e,n){const a=tr(),[i]=w.useState(()=>new t_(a,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const s=w.useSyncExternalStore(w.useCallback(c=>i.subscribe(Zt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=w.useCallback((c,d)=>{i.mutate(c,d).catch(hn)},[i]);if(s.error&&Lm(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.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 Fb="popstate";function $b(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function g_(e={}){function n(i,s){var p;let u=(p=s.state)==null?void 0:p.masked,{pathname:c,search:d,hash:g}=u||i.location;return cm("",{pathname:c,search:d,hash:g},s.state&&s.state.usr||null,s.state&&s.state.key||"default",u?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function a(i,s){return typeof s=="string"?s:So(s)}return v_(n,a,null,e)}function xt(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function er(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function y_(){return Math.random().toString(36).substring(2,10)}function Vb(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 cm(e,n,a=null,i,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?is(n):n,state:a,key:n&&n.key||i||y_(),unstable_mask:s}}function So({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function is(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function v_(e,n,a,i={}){let{window:s=document.defaultView,v5Compat:u=!1}=i,c=s.history,d="POP",g=null,p=y();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function y(){return(c.state||{idx:null}).idx}function v(){d="POP";let T=y(),k=T==null?null:T-p;p=T,g&&g({action:d,location:C.location,delta:k})}function x(T,k){d="PUSH";let P=$b(T)?T:cm(C.location,T,k);p=y()+1;let U=Vb(P,p),H=C.createHref(P.unstable_mask||P);try{c.pushState(U,"",H)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;s.location.assign(H)}u&&g&&g({action:d,location:C.location,delta:1})}function S(T,k){d="REPLACE";let P=$b(T)?T:cm(C.location,T,k);p=y();let U=Vb(P,p),H=C.createHref(P.unstable_mask||P);c.replaceState(U,"",H),u&&g&&g({action:d,location:C.location,delta:0})}function j(T){return b_(T)}let C={get action(){return d},get location(){return e(s,c)},listen(T){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(Fb,v),g=T,()=>{s.removeEventListener(Fb,v),g=null}},createHref(T){return n(s,T)},createURL:j,encodeLocation(T){let k=j(T);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:S,go(T){return c.go(T)}};return C}function b_(e,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),xt(a,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:So(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=a+i),new URL(i,a)}function r1(e,n,a="/"){return x_(e,n,a,!1)}function x_(e,n,a,i){let s=typeof n=="string"?is(n):n,u=ia(s.pathname||"/",a);if(u==null)return null;let c=a1(e);S_(c);let d=null;for(let g=0;d==null&&g<c.length;++g){let p=O_(u);d=A_(c[g],p,i)}return d}function a1(e,n=[],a=[],i="",s=!1){let u=(c,d,g=s,p)=>{let y={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&g)return;xt(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let v=kr([i,y.relativePath]),x=a.concat(y);c.children&&c.children.length>0&&(xt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),a1(c.children,n,x,v,g)),!(c.path==null&&!c.index)&&n.push({path:v,score:k_(v,c.index),routesMeta:x})};return e.forEach((c,d)=>{var g;if(c.path===""||!((g=c.path)!=null&&g.includes("?")))u(c,d);else for(let p of i1(c.path))u(c,d,!0,p)}),n}function i1(e){let n=e.split("/");if(n.length===0)return[];let[a,...i]=n,s=a.endsWith("?"),u=a.replace(/\?$/,"");if(i.length===0)return s?[u,""]:[u];let c=i1(i.join("/")),d=[];return d.push(...c.map(g=>g===""?u:[u,g].join("/"))),s&&d.push(...c),d.map(g=>e.startsWith("/")&&g===""?"/":g)}function S_(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:T_(n.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var w_=/^:[\w-]+$/,E_=3,C_=2,N_=1,__=10,j_=-2,Qb=e=>e==="*";function k_(e,n){let a=e.split("/"),i=a.length;return a.some(Qb)&&(i+=j_),n&&(i+=C_),a.filter(s=>!Qb(s)).reduce((s,u)=>s+(w_.test(u)?E_:u===""?N_:__),i)}function T_(e,n){return e.length===n.length&&e.slice(0,-1).every((i,s)=>i===n[s])?e[e.length-1]-n[n.length-1]:0}function A_(e,n,a=!1){let{routesMeta:i}=e,s={},u="/",c=[];for(let d=0;d<i.length;++d){let g=i[d],p=d===i.length-1,y=u==="/"?n:n.slice(u.length)||"/",v=kc({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},y),x=g.route;if(!v&&p&&a&&!i[i.length-1].route.index&&(v=kc({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!v)return null;Object.assign(s,v.params),c.push({params:s,pathname:kr([u,v.pathname]),pathnameBase:U_(kr([u,v.pathnameBase])),route:x}),v.pathnameBase!=="/"&&(u=kr([u,v.pathnameBase]))}return c}function kc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,i]=z_(e.path,e.caseSensitive,e.end),s=n.match(a);if(!s)return null;let u=s[0],c=u.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:i.reduce((p,{paramName:y,isOptional:v},x)=>{if(y==="*"){let j=d[x]||"";c=u.slice(0,u.length-j.length).replace(/(.)\/+$/,"$1")}const S=d[x];return v&&!S?p[y]=void 0:p[y]=(S||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:c,pattern:e}}function z_(e,n=!1,a=!0){er(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 i=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,g,p,y)=>{if(i.push({paramName:d,isOptional:g!=null}),g){let v=y.charAt(p+c.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),i]}function O_(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return er(!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 ia(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,i=e.charAt(a);return i&&i!=="/"?null:e.slice(a)||"/"}var R_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function M_(e,n="/"){let{pathname:a,search:i="",hash:s=""}=typeof e=="string"?is(e):e,u;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?u=Yb(a.substring(1),"/"):u=Yb(a,n)):u=n,{pathname:u,search:L_(i),hash:I_(s)}}function Yb(e,n){let a=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Sh(e,n,a,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function D_(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Bm(e){let n=D_(e);return n.map((a,i)=>i===n.length-1?a.pathname:a.pathnameBase)}function Bc(e,n,a,i=!1){let s;typeof e=="string"?s=is(e):(s={...e},xt(!s.pathname||!s.pathname.includes("?"),Sh("?","pathname","search",s)),xt(!s.pathname||!s.pathname.includes("#"),Sh("#","pathname","hash",s)),xt(!s.search||!s.search.includes("#"),Sh("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,d;if(c==null)d=a;else{let v=n.length-1;if(!i&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),v-=1;s.pathname=x.join("/")}d=v>=0?n[v]:"/"}let g=M_(s,d),p=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&a.endsWith("/");return!g.pathname.endsWith("/")&&(p||y)&&(g.pathname+="/"),g}var kr=e=>e.join("/").replace(/\/\/+/g,"/"),U_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),L_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,B_=class{constructor(e,n,a,i=!1){this.status=e,this.statusText=n||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function q_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function P_(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var l1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function s1(e,n){let a=e;if(typeof a!="string"||!R_.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,s=!1;if(l1)try{let u=new URL(window.location.href),c=a.startsWith("//")?new URL(u.protocol+a):new URL(a),d=ia(c.pathname,n);c.origin===u.origin&&d!=null?a=d+c.search+c.hash:s=!0}catch{er(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var o1=["POST","PUT","PATCH","DELETE"];new Set(o1);var H_=["GET",...o1];new Set(H_);var ls=w.createContext(null);ls.displayName="DataRouter";var qc=w.createContext(null);qc.displayName="DataRouterState";var Z_=w.createContext(!1),u1=w.createContext({isTransitioning:!1});u1.displayName="ViewTransition";var F_=w.createContext(new Map);F_.displayName="Fetchers";var $_=w.createContext(null);$_.displayName="Await";var Bn=w.createContext(null);Bn.displayName="Navigation";var Mo=w.createContext(null);Mo.displayName="Location";var nr=w.createContext({outlet:null,matches:[],isDataRoute:!1});nr.displayName="Route";var qm=w.createContext(null);qm.displayName="RouteError";var c1="REACT_ROUTER_ERROR",V_="REDIRECT",Q_="ROUTE_ERROR_RESPONSE";function Y_(e){if(e.startsWith(`${c1}:${V_}:{`))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 G_(e){if(e.startsWith(`${c1}:${Q_}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new B_(n.status,n.statusText,n.data)}catch{}}function K_(e,{relative:n}={}){xt(ss(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:i}=w.useContext(Bn),{hash:s,pathname:u,search:c}=Do(e,{relative:n}),d=u;return a!=="/"&&(d=u==="/"?a:kr([a,u])),i.createHref({pathname:d,search:c,hash:s})}function ss(){return w.useContext(Mo)!=null}function rr(){return xt(ss(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Mo).location}var f1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function d1(e){w.useContext(Bn).static||w.useLayoutEffect(e)}function ti(){let{isDataRoute:e}=w.useContext(nr);return e?dj():X_()}function X_(){xt(ss(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(ls),{basename:n,navigator:a}=w.useContext(Bn),{matches:i}=w.useContext(nr),{pathname:s}=rr(),u=JSON.stringify(Bm(i)),c=w.useRef(!1);return d1(()=>{c.current=!0}),w.useCallback((g,p={})=>{if(er(c.current,f1),!c.current)return;if(typeof g=="number"){a.go(g);return}let y=Bc(g,JSON.parse(u),s,p.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:kr([n,y.pathname])),(p.replace?a.replace:a.push)(y,p.state,p)},[n,a,u,s,e])}var J_=w.createContext(null);function W_(e){let n=w.useContext(nr).outlet;return w.useMemo(()=>n&&w.createElement(J_.Provider,{value:e},n),[n,e])}function ej(){let{matches:e}=w.useContext(nr),n=e[e.length-1];return n?n.params:{}}function Do(e,{relative:n}={}){let{matches:a}=w.useContext(nr),{pathname:i}=rr(),s=JSON.stringify(Bm(a));return w.useMemo(()=>Bc(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function tj(e,n){return h1(e,n)}function h1(e,n,a){var T;xt(ss(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=w.useContext(Bn),{matches:s}=w.useContext(nr),u=s[s.length-1],c=u?u.params:{},d=u?u.pathname:"/",g=u?u.pathnameBase:"/",p=u&&u.route;{let k=p&&p.path||"";p1(d,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${k}">) 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="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let y=rr(),v;if(n){let k=typeof n=="string"?is(n):n;xt(g==="/"||((T=k.pathname)==null?void 0:T.startsWith(g)),`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 "${g}" but pathname "${k.pathname}" was given in the \`location\` prop.`),v=k}else v=y;let x=v.pathname||"/",S=x;if(g!=="/"){let k=g.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(k.length).join("/")}let j=r1(e,{pathname:S});er(p||j!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),er(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.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 C=lj(j&&j.map(k=>Object.assign({},k,{params:Object.assign({},c,k.params),pathname:kr([g,i.encodeLocation?i.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:kr([g,i.encodeLocation?i.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),s,a);return n&&C?w.createElement(Mo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},C):C}function nj(){let e=fj(),n=q_(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},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),a?w.createElement("pre",{style:s},a):null,c)}var rj=w.createElement(nj,null),m1=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 a=G_(e.digest);a&&(e=a)}let n=e!==void 0?w.createElement(nr.Provider,{value:this.props.routeContext},w.createElement(qm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(aj,{error:e},n):n}};m1.contextType=Z_;var wh=new WeakMap;function aj({children:e,error:n}){let{basename:a}=w.useContext(Bn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let i=Y_(n.digest);if(i){let s=wh.get(n);if(s)throw s;let u=s1(i.location,a);if(l1&&!wh.get(n))if(u.isExternal||i.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw wh.set(n,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function ij({routeContext:e,match:n,children:a}){let i=w.useContext(ls);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(nr.Provider,{value:e},a)}function lj(e,n=[],a){let i=a==null?void 0:a.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let s=e,u=i==null?void 0:i.errors;if(u!=null){let y=s.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);xt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,d=-1;if(a&&i){c=i.renderFallback;for(let y=0;y<s.length;y++){let v=s[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(d=y),v.route.id){let{loaderData:x,errors:S}=i,j=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!S||S[v.route.id]===void 0);if(v.route.lazy||j){a.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let g=a==null?void 0:a.onError,p=i&&g?(y,v)=>{var x,S;g(y,{location:i.location,params:((S=(x=i.matches)==null?void 0:x[0])==null?void 0:S.params)??{},unstable_pattern:P_(i.matches),errorInfo:v})}:void 0;return s.reduceRight((y,v,x)=>{let S,j=!1,C=null,T=null;i&&(S=u&&v.route.id?u[v.route.id]:void 0,C=v.route.errorElement||rj,c&&(d<0&&x===0?(p1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,T=null):d===x&&(j=!0,T=v.route.hydrateFallbackElement||null)));let k=n.concat(s.slice(0,x+1)),P=()=>{let U;return S?U=C:j?U=T:v.route.Component?U=w.createElement(v.route.Component,null):v.route.element?U=v.route.element:U=y,w.createElement(ij,{match:v,routeContext:{outlet:y,matches:k,isDataRoute:i!=null},children:U})};return i&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?w.createElement(m1,{location:i.location,revalidation:i.revalidation,component:C,error:S,children:P(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:p}):P()},null)}function Pm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sj(e){let n=w.useContext(ls);return xt(n,Pm(e)),n}function oj(e){let n=w.useContext(qc);return xt(n,Pm(e)),n}function uj(e){let n=w.useContext(nr);return xt(n,Pm(e)),n}function Hm(e){let n=uj(e),a=n.matches[n.matches.length-1];return xt(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function cj(){return Hm("useRouteId")}function fj(){var i;let e=w.useContext(qm),n=oj("useRouteError"),a=Hm("useRouteError");return e!==void 0?e:(i=n.errors)==null?void 0:i[a]}function dj(){let{router:e}=sj("useNavigate"),n=Hm("useNavigate"),a=w.useRef(!1);return d1(()=>{a.current=!0}),w.useCallback(async(s,u={})=>{er(a.current,f1),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var Gb={};function p1(e,n,a){!n&&!Gb[e]&&(Gb[e]=!0,er(!1,a))}w.memo(hj);function hj({routes:e,future:n,state:a,isStatic:i,onError:s}){return h1(e,void 0,{state:a,isStatic:i,onError:s})}function g1({to:e,replace:n,state:a,relative:i}){xt(ss(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=w.useContext(Bn);er(!s,"<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(nr),{pathname:c}=rr(),d=ti(),g=Bc(e,Bm(u),c,i==="path"),p=JSON.stringify(g);return w.useEffect(()=>{d(JSON.parse(p),{replace:n,state:a,relative:i})},[d,p,i,n,a]),null}function fm(e){return W_(e.context)}function Ba(e){xt(!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 mj({basename:e="/",children:n=null,location:a,navigationType:i="POP",navigator:s,static:u=!1,unstable_useTransitions:c}){xt(!ss(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:d,navigator:s,static:u,unstable_useTransitions:c,future:{}}),[d,s,u,c]);typeof a=="string"&&(a=is(a));let{pathname:p="/",search:y="",hash:v="",state:x=null,key:S="default",unstable_mask:j}=a,C=w.useMemo(()=>{let T=ia(p,d);return T==null?null:{location:{pathname:T,search:y,hash:v,state:x,key:S,unstable_mask:j},navigationType:i}},[d,p,y,v,x,S,i,j]);return er(C!=null,`<Router basename="${d}"> is not able to match the URL "${p}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:w.createElement(Bn.Provider,{value:g},w.createElement(Mo.Provider,{children:n,value:C}))}function pj({children:e,location:n}){return tj(dm(e),n)}function dm(e,n=[]){let a=[];return w.Children.forEach(e,(i,s)=>{if(!w.isValidElement(i))return;let u=[...n,s];if(i.type===w.Fragment){a.push.apply(a,dm(i.props.children,u));return}xt(i.type===Ba,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),xt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=dm(i.props.children,u)),a.push(c)}),a}var Sc="get",wc="application/x-www-form-urlencoded";function Pc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function gj(e){return Pc(e)&&e.tagName.toLowerCase()==="button"}function yj(e){return Pc(e)&&e.tagName.toLowerCase()==="form"}function vj(e){return Pc(e)&&e.tagName.toLowerCase()==="input"}function bj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xj(e,n){return e.button===0&&(!n||n==="_self")&&!bj(e)}function hm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,a)=>{let i=e[a];return n.concat(Array.isArray(i)?i.map(s=>[a,s]):[[a,i]])},[]))}function Sj(e,n){let a=hm(e);return n&&n.forEach((i,s)=>{a.has(s)||n.getAll(s).forEach(u=>{a.append(s,u)})}),a}var ic=null;function wj(){if(ic===null)try{new FormData(document.createElement("form"),0),ic=!1}catch{ic=!0}return ic}var Ej=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Eh(e){return e!=null&&!Ej.has(e)?(er(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wc}"`),null):e}function Cj(e,n){let a,i,s,u,c;if(yj(e)){let d=e.getAttribute("action");i=d?ia(d,n):null,a=e.getAttribute("method")||Sc,s=Eh(e.getAttribute("enctype"))||wc,u=new FormData(e)}else if(gj(e)||vj(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 g=e.getAttribute("formaction")||d.getAttribute("action");if(i=g?ia(g,n):null,a=e.getAttribute("formmethod")||d.getAttribute("method")||Sc,s=Eh(e.getAttribute("formenctype"))||Eh(d.getAttribute("enctype"))||wc,u=new FormData(d,e),!wj()){let{name:p,type:y,value:v}=e;if(y==="image"){let x=p?`${p}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else p&&u.append(p,v)}}else{if(Pc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Sc,i=null,s=wc,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:i,method:a.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zm(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Nj(e,n,a,i){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:n&&ia(s.pathname,n)==="/"?s.pathname=`${n.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function _j(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jj(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 kj(e,n,a){let i=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await _j(u,a);return c.links?c.links():[]}return[]}));return Oj(i.flat(1).filter(jj).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Kb(e,n,a,i,s,u){let c=(g,p)=>a[p]?g.route.id!==a[p].route.id:!0,d=(g,p)=>{var y;return a[p].pathname!==g.pathname||((y=a[p].route.path)==null?void 0:y.endsWith("*"))&&a[p].params["*"]!==g.params["*"]};return u==="assets"?n.filter((g,p)=>c(g,p)||d(g,p)):u==="data"?n.filter((g,p)=>{var v;let y=i.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(c(g,p)||d(g,p))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((v=a[0])==null?void 0:v.params)||{},nextUrl:new URL(e,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function Tj(e,n,{includeHydrateFallback:a}={}){return Aj(e.map(i=>{let s=n.routes[i.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function Aj(e){return[...new Set(e)]}function zj(e){let n={},a=Object.keys(e).sort();for(let i of a)n[i]=e[i];return n}function Oj(e,n){let a=new Set;return new Set(n),e.reduce((i,s)=>{let u=JSON.stringify(zj(s));return a.has(u)||(a.add(u),i.push({key:u,link:s})),i},[])}function y1(){let e=w.useContext(ls);return Zm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Rj(){let e=w.useContext(qc);return Zm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Fm=w.createContext(void 0);Fm.displayName="FrameworkContext";function v1(){let e=w.useContext(Fm);return Zm(e,"You must render this element inside a <HydratedRouter> element"),e}function Mj(e,n){let a=w.useContext(Fm),[i,s]=w.useState(!1),[u,c]=w.useState(!1),{onFocus:d,onBlur:g,onMouseEnter:p,onMouseLeave:y,onTouchStart:v}=n,x=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=k=>{k.forEach(P=>{c(P.isIntersecting)})},T=new IntersectionObserver(C,{threshold:.5});return x.current&&T.observe(x.current),()=>{T.disconnect()}}},[e]),w.useEffect(()=>{if(i){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[i]);let S=()=>{s(!0)},j=()=>{s(!1),c(!1)};return a?e!=="intent"?[u,x,{}]:[u,x,{onFocus:io(d,S),onBlur:io(g,j),onMouseEnter:io(p,S),onMouseLeave:io(y,j),onTouchStart:io(v,S)}]:[!1,x,{}]}function io(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function Dj({page:e,...n}){let{router:a}=y1(),i=w.useMemo(()=>r1(a.routes,e,a.basename),[a.routes,e,a.basename]);return i?w.createElement(Lj,{page:e,matches:i,...n}):null}function Uj(e){let{manifest:n,routeModules:a}=v1(),[i,s]=w.useState([]);return w.useEffect(()=>{let u=!1;return kj(e,n,a).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,a]),i}function Lj({page:e,matches:n,...a}){let i=rr(),{future:s,manifest:u,routeModules:c}=v1(),{basename:d}=y1(),{loaderData:g,matches:p}=Rj(),y=w.useMemo(()=>Kb(e,n,p,u,i,"data"),[e,n,p,u,i]),v=w.useMemo(()=>Kb(e,n,p,u,i,"assets"),[e,n,p,u,i]),x=w.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let C=new Set,T=!1;if(n.forEach(P=>{var H;let U=u.routes[P.route.id];!U||!U.hasLoader||(!y.some(Y=>Y.route.id===P.route.id)&&P.route.id in g&&((H=c[P.route.id])!=null&&H.shouldRevalidate)||U.hasClientLoader?T=!0:C.add(P.route.id))}),C.size===0)return[];let k=Nj(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return T&&C.size>0&&k.searchParams.set("_routes",n.filter(P=>C.has(P.route.id)).map(P=>P.route.id).join(",")),[k.pathname+k.search]},[d,s.unstable_trailingSlashAwareDataRequests,g,i,u,y,n,e,c]),S=w.useMemo(()=>Tj(v,u),[v,u]),j=Uj(v);return w.createElement(w.Fragment,null,x.map(C=>w.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),S.map(C=>w.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),j.map(({key:C,link:T})=>w.createElement("link",{key:C,nonce:a.nonce,...T,crossOrigin:T.crossOrigin??a.crossOrigin})))}function Ij(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var Bj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bj&&(window.__reactRouterVersion="7.13.1")}catch{}function qj({basename:e,children:n,unstable_useTransitions:a,window:i}){let s=w.useRef();s.current==null&&(s.current=g_({window:i,v5Compat:!0}));let u=s.current,[c,d]=w.useState({action:u.action,location:u.location}),g=w.useCallback(p=>{a===!1?d(p):w.startTransition(()=>d(p))},[a]);return w.useLayoutEffect(()=>u.listen(g),[u,g]),w.createElement(mj,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:u,unstable_useTransitions:a})}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x1=w.forwardRef(function({onClick:n,discover:a="render",prefetch:i="none",relative:s,reloadDocument:u,replace:c,unstable_mask:d,state:g,target:p,to:y,preventScrollReset:v,viewTransition:x,unstable_defaultShouldRevalidate:S,...j},C){let{basename:T,navigator:k,unstable_useTransitions:P}=w.useContext(Bn),U=typeof y=="string"&&b1.test(y),H=s1(y,T);y=H.to;let Y=K_(y,{relative:s}),L=rr(),B=null;if(d){let ne=Bc(d,[],L.unstable_mask?L.unstable_mask.pathname:"/",!0);T!=="/"&&(ne.pathname=ne.pathname==="/"?T:kr([T,ne.pathname])),B=k.createHref(ne)}let[D,G,ie]=Mj(i,j),le=Zj(y,{replace:c,unstable_mask:d,state:g,target:p,preventScrollReset:v,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:S,unstable_useTransitions:P});function se(ne){n&&n(ne),ne.defaultPrevented||le(ne)}let Ae=!(H.isExternal||u),ce=w.createElement("a",{...j,...ie,href:(Ae?B:void 0)||H.absoluteURL||Y,onClick:Ae?se:n,ref:Ij(C,G),target:p,"data-discover":!U&&a==="render"?"true":void 0});return D&&!U?w.createElement(w.Fragment,null,ce,w.createElement(Dj,{page:Y})):ce});x1.displayName="Link";var S1=w.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:i="",end:s=!1,style:u,to:c,viewTransition:d,children:g,...p},y){let v=Do(c,{relative:p.relative}),x=rr(),S=w.useContext(qc),{navigator:j,basename:C}=w.useContext(Bn),T=S!=null&&Yj(v)&&d===!0,k=j.encodeLocation?j.encodeLocation(v).pathname:v.pathname,P=x.pathname,U=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(P=P.toLowerCase(),U=U?U.toLowerCase():null,k=k.toLowerCase()),U&&C&&(U=ia(U,C)||U);const H=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let Y=P===k||!s&&P.startsWith(k)&&P.charAt(H)==="/",L=U!=null&&(U===k||!s&&U.startsWith(k)&&U.charAt(k.length)==="/"),B={isActive:Y,isPending:L,isTransitioning:T},D=Y?n:void 0,G;typeof i=="function"?G=i(B):G=[i,Y?"active":null,L?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let ie=typeof u=="function"?u(B):u;return w.createElement(x1,{...p,"aria-current":D,className:G,ref:y,style:ie,to:c,viewTransition:d},typeof g=="function"?g(B):g)});S1.displayName="NavLink";var Pj=w.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:i,replace:s,state:u,method:c=Sc,action:d,onSubmit:g,relative:p,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:x,...S},j)=>{let{unstable_useTransitions:C}=w.useContext(Bn),T=Vj(),k=Qj(d,{relative:p}),P=c.toLowerCase()==="get"?"get":"post",U=typeof d=="string"&&b1.test(d),H=Y=>{if(g&&g(Y),Y.defaultPrevented)return;Y.preventDefault();let L=Y.nativeEvent.submitter,B=(L==null?void 0:L.getAttribute("formmethod"))||c,D=()=>T(L||Y.currentTarget,{fetcherKey:n,method:B,navigate:a,replace:s,state:u,relative:p,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:x});C&&a!==!1?w.startTransition(()=>D()):D()};return w.createElement("form",{ref:j,method:P,action:k,onSubmit:i?g:H,...S,"data-discover":!U&&e==="render"?"true":void 0})});Pj.displayName="Form";function Hj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function w1(e){let n=w.useContext(ls);return xt(n,Hj(e)),n}function Zj(e,{target:n,replace:a,unstable_mask:i,state:s,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:g,unstable_useTransitions:p}={}){let y=ti(),v=rr(),x=Do(e,{relative:c});return w.useCallback(S=>{if(xj(S,n)){S.preventDefault();let j=a!==void 0?a:So(v)===So(x),C=()=>y(e,{replace:j,unstable_mask:i,state:s,preventScrollReset:u,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:g});p?w.startTransition(()=>C()):C()}},[v,y,x,a,i,s,n,e,u,c,d,g,p])}function E1(e){er(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=w.useRef(hm(e)),a=w.useRef(!1),i=rr(),s=w.useMemo(()=>Sj(i.search,a.current?null:n.current),[i.search]),u=ti(),c=w.useCallback((d,g)=>{const p=hm(typeof d=="function"?d(new URLSearchParams(s)):d);a.current=!0,u("?"+p,g)},[u,s]);return[s,c]}var Fj=0,$j=()=>`__${String(++Fj)}__`;function Vj(){let{router:e}=w1("useSubmit"),{basename:n}=w.useContext(Bn),a=cj(),i=e.fetch,s=e.navigate;return w.useCallback(async(u,c={})=>{let{action:d,method:g,encType:p,formData:y,body:v}=Cj(u,n);if(c.navigate===!1){let x=c.fetcherKey||$j();await i(x,a,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||g,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:v,formMethod:c.method||g,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,s,n,a])}function Qj(e,{relative:n}={}){let{basename:a}=w.useContext(Bn),i=w.useContext(nr);xt(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),u={...Do(e||".",{relative:n})},c=rr();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),g=d.getAll("index");if(g.some(y=>y==="")){d.delete("index"),g.filter(v=>v).forEach(v=>d.append("index",v));let y=d.toString();u.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:kr([a,u.pathname])),So(u)}function Yj(e,{relative:n}={}){let a=w.useContext(u1);xt(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=w1("useViewTransitionState"),s=Do(e,{relative:n});if(!a.isTransitioning)return!1;let u=ia(a.currentLocation.pathname,i)||a.currentLocation.pathname,c=ia(a.nextLocation.pathname,i)||a.nextLocation.pathname;return kc(s.pathname,c)!=null||kc(s.pathname,u)!=null}const Gj="/api/v1";async function Kj(e,n){const a=await fetch(`${Gj}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:n})});if(!a.ok){const i=await a.text();let s;try{s=JSON.parse(i).error??i}catch{s=i}throw new Error(s)}return await a.json()}const C1="/api/v1",$m="first-tree-hub:tokens";function Vm(){const e=localStorage.getItem($m);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function N1(e){localStorage.setItem($m,JSON.stringify(e))}function _1(){localStorage.removeItem($m)}class Xj extends Error{constructor(n,a){super(a),this.status=n,this.name="ApiError"}}let lo=null;async function Jj(e){return lo||(lo=(async()=>{try{const n=await fetch(`${C1}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:e})});if(!n.ok)return null;const a=await n.json(),i={accessToken:a.accessToken,refreshToken:a.refreshToken??e};return N1(i),i}catch{return null}finally{lo=null}})(),lo)}async function lc(e,n){const{method:a="GET",body:i}=n??{},s=d=>{const g={};return d&&(g.Authorization=`Bearer ${d}`),i!==void 0&&(g["Content-Type"]="application/json"),fetch(`${C1}${e}`,{method:a,headers:g,body:i!==void 0?JSON.stringify(i):void 0})},u=Vm();let c=await s(u==null?void 0:u.accessToken);if(c.status===401&&(u!=null&&u.refreshToken)){const d=await Jj(u.refreshToken);d&&(c=await s(d.accessToken))}if(!c.ok){c.status===401&&(_1(),window.dispatchEvent(new CustomEvent("auth:logout")));const d=await c.text();let g;try{g=JSON.parse(d).error??d}catch{g=d}throw new Xj(c.status,g)}if(c.status!==204)return await c.json()}const Ue={get:e=>lc(e),post:(e,n)=>lc(e,{method:"POST",body:n}),patch:(e,n)=>lc(e,{method:"PATCH",body:n}),delete:e=>lc(e,{method:"DELETE"})},j1=w.createContext(null);function Wj({children:e}){const[n,a]=w.useState(()=>!!Vm()),[i,s]=w.useState(null),[u,c]=w.useState(null),[d,g]=w.useState(null),p=w.useCallback(()=>{_1(),a(!1),s(null),c(null),g(null)},[]),y=w.useCallback(async()=>{try{const x=await Ue.get("/me");s(x.member.role),c(x.member.id),g(x.member.agentId)}catch{}},[]),v=w.useCallback(async(x,S)=>{const j=await Kj(x,S);N1({accessToken:j.accessToken,refreshToken:j.refreshToken}),a(!0),await Ue.get("/me").then(C=>{s(C.member.role),c(C.member.id),g(C.member.agentId)}).catch(()=>{})},[]);return w.useEffect(()=>{n&&!i&&y()},[n,i,y]),w.useEffect(()=>{const x=()=>p();return window.addEventListener("auth:logout",x),()=>window.removeEventListener("auth:logout",x)},[p]),h.jsx(j1.Provider,{value:{isAuthenticated:n,role:i,memberId:u,agentId:d,login:v,logout:p},children:e})}function Uo(){const e=w.useContext(j1);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function ek(){const{isAuthenticated:e}=Uo();return e?h.jsx(fm,{}):h.jsx(g1,{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 k1=(...e)=>e.filter((n,a,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===a).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 tk=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 nk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,i)=>i?i.toUpperCase():a.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 Xb=e=>{const n=nk(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 rk={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 ak=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 ik=w.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:c,...d},g)=>w.createElement("svg",{ref:g,...rk,width:n,height:n,stroke:e,strokeWidth:i?Number(a)*24/Number(n):a,className:k1("lucide",s),...!u&&!ak(d)&&{"aria-hidden":"true"},...d},[...c.map(([p,y])=>w.createElement(p,y)),...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 Ct=(e,n)=>{const a=w.forwardRef(({className:i,...s},u)=>w.createElement(ik,{ref:u,iconNode:n,className:k1(`lucide-${tk(Xb(e))}`,`lucide-${e}`,i),...s}));return a.displayName=Xb(e),a};/**
|
|
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 lk=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],T1=Ct("arrow-left",lk);/**
|
|
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 sk=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],ok=Ct("bell",sk);/**
|
|
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 uk=[["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"}]],ck=Ct("bot",uk);/**
|
|
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 fk=[["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"}]],dk=Ct("cable",fk);/**
|
|
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 hk=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],A1=Ct("check",hk);/**
|
|
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 mk=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pk=Ct("chevron-down",mk);/**
|
|
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 gk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],z1=Ct("chevron-right",gk);/**
|
|
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 yk=[["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"}]],Hc=Ct("copy",yk);/**
|
|
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 vk=[["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"}]],bk=Ct("key",vk);/**
|
|
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 xk=[["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"}]],Sk=Ct("link-2",xk);/**
|
|
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 wk=[["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"}]],Ek=Ct("log-out",wk);/**
|
|
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 Ck=[["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"}]],Nk=Ct("message-square",Ck);/**
|
|
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 _k=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],jk=Ct("panel-right-close",_k);/**
|
|
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 kk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],Tk=Ct("panel-right-open",kk);/**
|
|
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 Ak=[["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"}]],Ch=Ct("pencil",Ak);/**
|
|
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 zk=[["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"}]],Ok=Ct("play",zk);/**
|
|
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 Rk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wo=Ct("plus",Rk);/**
|
|
186
|
+
* @license lucide-react v0.577.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const Mk=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Dk=Ct("send",Mk);/**
|
|
191
|
+
* @license lucide-react v0.577.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Uk=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Jb=Ct("terminal",Uk);/**
|
|
196
|
+
* @license lucide-react v0.577.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Lk=[["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"}]],mo=Ct("trash-2",Lk);/**
|
|
201
|
+
* @license lucide-react v0.577.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const Ik=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Bk=Ct("triangle-alert",Ik);/**
|
|
206
|
+
* @license lucide-react v0.577.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const qk=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],Pk=Ct("unplug",qk);/**
|
|
211
|
+
* @license lucide-react v0.577.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Hk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zk=Ct("x",Hk);function O1(e){var n,a,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(a=O1(e[n]))&&(i&&(i+=" "),i+=a)}else for(a in e)e[a]&&(i&&(i+=" "),i+=a);return i}function R1(){for(var e,n,a=0,i="",s=arguments.length;a<s;a++)(e=arguments[a])&&(n=O1(e))&&(i&&(i+=" "),i+=n);return i}const Fk=(e,n)=>{const a=new Array(e.length+n.length);for(let i=0;i<e.length;i++)a[i]=e[i];for(let i=0;i<n.length;i++)a[e.length+i]=n[i];return a},$k=(e,n)=>({classGroupId:e,validator:n}),M1=(e=new Map,n=null,a)=>({nextPart:e,validators:n,classGroupId:a}),Tc="-",Wb=[],Vk="arbitrary..",Qk=e=>{const n=Gk(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Yk(c);const d=c.split(Tc),g=d[0]===""&&d.length>1?1:0;return D1(d,g,n)},getConflictingClassGroupIds:(c,d)=>{if(d){const g=i[c],p=a[c];return g?p?Fk(p,g):g:p||Wb}return a[c]||Wb}}},D1=(e,n,a)=>{if(e.length-n===0)return a.classGroupId;const s=e[n],u=a.nextPart.get(s);if(u){const p=D1(e,n+1,u);if(p)return p}const c=a.validators;if(c===null)return;const d=n===0?e.join(Tc):e.slice(n).join(Tc),g=c.length;for(let p=0;p<g;p++){const y=c[p];if(y.validator(d))return y.classGroupId}},Yk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),a=n.indexOf(":"),i=n.slice(0,a);return i?Vk+i:void 0})(),Gk=e=>{const{theme:n,classGroups:a}=e;return Kk(a,n)},Kk=(e,n)=>{const a=M1();for(const i in e){const s=e[i];Qm(s,a,i,n)}return a},Qm=(e,n,a,i)=>{const s=e.length;for(let u=0;u<s;u++){const c=e[u];Xk(c,n,a,i)}},Xk=(e,n,a,i)=>{if(typeof e=="string"){Jk(e,n,a);return}if(typeof e=="function"){Wk(e,n,a,i);return}e2(e,n,a,i)},Jk=(e,n,a)=>{const i=e===""?n:U1(n,e);i.classGroupId=a},Wk=(e,n,a,i)=>{if(t2(e)){Qm(e(i),n,a,i);return}n.validators===null&&(n.validators=[]),n.validators.push($k(a,e))},e2=(e,n,a,i)=>{const s=Object.entries(e),u=s.length;for(let c=0;c<u;c++){const[d,g]=s[c];Qm(g,U1(n,d),a,i)}},U1=(e,n)=>{let a=e;const i=n.split(Tc),s=i.length;for(let u=0;u<s;u++){const c=i[u];let d=a.nextPart.get(c);d||(d=M1(),a.nextPart.set(c,d)),a=d}return a},t2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,n2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),i=Object.create(null);const s=(u,c)=>{a[u]=c,n++,n>e&&(n=0,i=a,a=Object.create(null))};return{get(u){let c=a[u];if(c!==void 0)return c;if((c=i[u])!==void 0)return s(u,c),c},set(u,c){u in a?a[u]=c:s(u,c)}}},mm="!",ex=":",r2=[],tx=(e,n,a,i,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:i,isExternal:s}),a2=e=>{const{prefix:n,experimentalParseClassName:a}=e;let i=s=>{const u=[];let c=0,d=0,g=0,p;const y=s.length;for(let C=0;C<y;C++){const T=s[C];if(c===0&&d===0){if(T===ex){u.push(s.slice(g,C)),g=C+1;continue}if(T==="/"){p=C;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const v=u.length===0?s:s.slice(g);let x=v,S=!1;v.endsWith(mm)?(x=v.slice(0,-1),S=!0):v.startsWith(mm)&&(x=v.slice(1),S=!0);const j=p&&p>g?p-g:void 0;return tx(u,S,x,j)};if(n){const s=n+ex,u=i;i=c=>c.startsWith(s)?u(c.slice(s.length)):tx(r2,!1,c,void 0,!0)}if(a){const s=i;i=u=>a({className:u,parseClassName:s})}return i},i2=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((a,i)=>{n.set(a,1e6+i)}),a=>{const i=[];let s=[];for(let u=0;u<a.length;u++){const c=a[u],d=c[0]==="[",g=n.has(c);d||g?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(c)):s.push(c)}return s.length>0&&(s.sort(),i.push(...s)),i}},l2=e=>({cache:n2(e.cacheSize),parseClassName:a2(e),sortModifiers:i2(e),...Qk(e)}),s2=/\s+/,o2=(e,n)=>{const{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=n,c=[],d=e.trim().split(s2);let g="";for(let p=d.length-1;p>=0;p-=1){const y=d[p],{isExternal:v,modifiers:x,hasImportantModifier:S,baseClassName:j,maybePostfixModifierPosition:C}=a(y);if(v){g=y+(g.length>0?" "+g:g);continue}let T=!!C,k=i(T?j.substring(0,C):j);if(!k){if(!T){g=y+(g.length>0?" "+g:g);continue}if(k=i(j),!k){g=y+(g.length>0?" "+g:g);continue}T=!1}const P=x.length===0?"":x.length===1?x[0]:u(x).join(":"),U=S?P+mm:P,H=U+k;if(c.indexOf(H)>-1)continue;c.push(H);const Y=s(k,T);for(let L=0;L<Y.length;++L){const B=Y[L];c.push(U+B)}g=y+(g.length>0?" "+g:g)}return g},u2=(...e)=>{let n=0,a,i,s="";for(;n<e.length;)(a=e[n++])&&(i=L1(a))&&(s&&(s+=" "),s+=i);return s},L1=e=>{if(typeof e=="string")return e;let n,a="";for(let i=0;i<e.length;i++)e[i]&&(n=L1(e[i]))&&(a&&(a+=" "),a+=n);return a},c2=(e,...n)=>{let a,i,s,u;const c=g=>{const p=n.reduce((y,v)=>v(y),e());return a=l2(p),i=a.cache.get,s=a.cache.set,u=d,d(g)},d=g=>{const p=i(g);if(p)return p;const y=o2(g,a);return s(g,y),y};return u=c,(...g)=>u(u2(...g))},f2=[],Ht=e=>{const n=a=>a[e]||f2;return n.isThemeGetter=!0,n},I1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,B1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,d2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,h2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,m2=/\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$/,p2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,g2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Da=e=>d2.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>!!e&&Number.isInteger(Number(e)),Nh=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),Xr=e=>h2.test(e),q1=()=>!0,v2=e=>m2.test(e)&&!p2.test(e),Ym=()=>!1,b2=e=>g2.test(e),x2=e=>y2.test(e),S2=e=>!ye(e)&&!ve(e),w2=e=>ni(e,Z1,Ym),ye=e=>I1.test(e),ji=e=>ni(e,F1,v2),nx=e=>ni(e,A2,Pe),E2=e=>ni(e,V1,q1),C2=e=>ni(e,$1,Ym),rx=e=>ni(e,P1,Ym),N2=e=>ni(e,H1,x2),sc=e=>ni(e,Q1,b2),ve=e=>B1.test(e),so=e=>Hi(e,F1),_2=e=>Hi(e,$1),ax=e=>Hi(e,P1),j2=e=>Hi(e,Z1),k2=e=>Hi(e,H1),oc=e=>Hi(e,Q1,!0),T2=e=>Hi(e,V1,!0),ni=(e,n,a)=>{const i=I1.exec(e);return i?i[1]?n(i[1]):a(i[2]):!1},Hi=(e,n,a=!1)=>{const i=B1.exec(e);return i?i[1]?n(i[1]):a:!1},P1=e=>e==="position"||e==="percentage",H1=e=>e==="image"||e==="url",Z1=e=>e==="length"||e==="size"||e==="bg-size",F1=e=>e==="length",A2=e=>e==="number",$1=e=>e==="family-name",V1=e=>e==="number"||e==="weight",Q1=e=>e==="shadow",z2=()=>{const e=Ht("color"),n=Ht("font"),a=Ht("text"),i=Ht("font-weight"),s=Ht("tracking"),u=Ht("leading"),c=Ht("breakpoint"),d=Ht("container"),g=Ht("spacing"),p=Ht("radius"),y=Ht("shadow"),v=Ht("inset-shadow"),x=Ht("text-shadow"),S=Ht("drop-shadow"),j=Ht("blur"),C=Ht("perspective"),T=Ht("aspect"),k=Ht("ease"),P=Ht("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...H(),ve,ye],L=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],D=()=>[ve,ye,g],G=()=>[Da,"full","auto",...D()],ie=()=>[Ua,"none","subgrid",ve,ye],le=()=>["auto",{span:["full",Ua,ve,ye]},Ua,ve,ye],se=()=>[Ua,"auto",ve,ye],Ae=()=>["auto","min","max","fr",ve,ye],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...D()],re=()=>[Da,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],me=()=>[Da,"screen","full","dvw","lvw","svw","min","max","fit",...D()],Te=()=>[Da,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],N=()=>[e,ve,ye],R=()=>[...H(),ax,rx,{position:[ve,ye]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",j2,w2,{size:[ve,ye]}],oe=()=>[Nh,so,ji],he=()=>["","none","full",p,ve,ye],fe=()=>["",Pe,so,ji],Oe=()=>["solid","dashed","dotted","double"],et=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>[Pe,Nh,ax,rx],ze=()=>["","none",j,ve,ye],vt=()=>["none",Pe,ve,ye],on=()=>["none",Pe,ve,ye],mr=()=>[Pe,ve,ye],nn=()=>[Da,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xr],breakpoint:[Xr],color:[q1],container:[Xr],"drop-shadow":[Xr],ease:["in","out","in-out"],font:[S2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xr],shadow:[Xr],spacing:["px",Pe],text:[Xr],"text-shadow":[Xr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Da,ye,ve,T]}],container:["container"],columns:[{columns:[Pe,ye,ve,d]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{"inset-s":G(),start:G()}],end:[{"inset-e":G(),end:G()}],"inset-bs":[{"inset-bs":G()}],"inset-be":[{"inset-be":G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[Ua,"auto",ve,ye]}],basis:[{basis:[Da,"full","auto",d,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Da,"auto","initial","none",ye]}],grow:[{grow:["",Pe,ve,ye]}],shrink:[{shrink:["",Pe,ve,ye]}],order:[{order:[Ua,"first","last","none",ve,ye]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...me()]}],"min-inline-size":[{"min-inline":["auto",...me()]}],"max-inline-size":[{"max-inline":["none",...me()]}],"block-size":[{block:["auto",...Te()]}],"min-block-size":[{"min-block":["auto",...Te()]}],"max-block-size":[{"max-block":["none",...Te()]}],w:[{w:[d,"screen",...re()]}],"min-w":[{"min-w":[d,"screen","none",...re()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",a,so,ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,T2,E2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nh,ye]}],"font-family":[{font:[_2,C2,n]}],"font-features":[{"font-features":[ye]}],"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:[s,ve,ye]}],"line-clamp":[{"line-clamp":[Pe,"none",ve,nx]}],leading:[{leading:[u,...D()]}],"list-image":[{"list-image":["none",ve,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ve,ji]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Pe,"auto",ve,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ye]}],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",ve,ye]}],"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:K()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ua,ve,ye],radial:["",ve,ye],conic:[Ua,ve,ye]},k2,N2]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ve,ye]}],"outline-w":[{outline:["",Pe,so,ji]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",y,oc,sc]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",v,oc,sc]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Pe,ji]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",x,oc,sc]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Pe,ve,ye]}],"mix-blend":[{"mix-blend":[...et(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":et()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[ve,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":H()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ye]}],filter:[{filter:["","none",ve,ye]}],blur:[{blur:ze()}],brightness:[{brightness:[Pe,ve,ye]}],contrast:[{contrast:[Pe,ve,ye]}],"drop-shadow":[{"drop-shadow":["","none",S,oc,sc]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",Pe,ve,ye]}],"hue-rotate":[{"hue-rotate":[Pe,ve,ye]}],invert:[{invert:["",Pe,ve,ye]}],saturate:[{saturate:[Pe,ve,ye]}],sepia:[{sepia:["",Pe,ve,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ye]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ve,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ve,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ve,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ve,ye]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ve,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ve,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ve,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ve,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ve,ye]}],ease:[{ease:["linear","initial",k,ve,ye]}],delay:[{delay:[Pe,ve,ye]}],animate:[{animate:["none",P,ve,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ve,ye]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:vt()}],"rotate-x":[{"rotate-x":vt()}],"rotate-y":[{"rotate-y":vt()}],"rotate-z":[{"rotate-z":vt()}],scale:[{scale:on()}],"scale-x":[{"scale-x":on()}],"scale-y":[{"scale-y":on()}],"scale-z":[{"scale-z":on()}],"scale-3d":["scale-3d"],skew:[{skew:mr()}],"skew-x":[{"skew-x":mr()}],"skew-y":[{"skew-y":mr()}],transform:[{transform:[ve,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nn()}],"translate-x":[{"translate-x":nn()}],"translate-y":[{"translate-y":nn()}],"translate-z":[{"translate-z":nn()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",ve,ye]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ye]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[Pe,so,ji,nx]}],stroke:[{stroke:["none",...N()]}],"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"]}},O2=c2(z2);function Me(...e){return O2(R1(e))}function ln(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)):"—"}function Eo(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.severity&&n.set("severity",e.severity),(e==null?void 0:e.read)!==void 0&&n.set("read",String(e.read)),e!=null&&e.agentId&&n.set("agentId",e.agentId);const a=n.toString();return Ue.get(`/admin/notifications${a?`?${a}`:""}`)}function Y1(e){return Ue.post(`/admin/notifications/${e}/read`)}function R2(){return Ue.post("/admin/notifications/read-all")}function Gm(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 a=n.toString();return Ue.get(`/admin/agents${a?`?${a}`:""}`)}function M2(e){return Ue.get(`/admin/agents/${encodeURIComponent(e)}`)}function D2(e){return Ue.post("/admin/agents",e)}function ix(e,n){return Ue.patch(`/admin/agents/${encodeURIComponent(e)}`,n)}function U2(e){return Ue.delete(`/admin/agents/${encodeURIComponent(e)}`)}function L2(e){return Ue.post(`/admin/agents/${encodeURIComponent(e)}/suspend`,{})}function I2(e){return Ue.post(`/admin/agents/${encodeURIComponent(e)}/reactivate`,{})}function B2(e,n){return Ue.post(`/admin/agents/${encodeURIComponent(e)}/provision`,{clientId:n})}function q2(e){return Ue.post(`/admin/agents/${encodeURIComponent(e)}/test`,{})}function dr(){const{data:e}=Ge({queryKey:["agents","name-map"],queryFn:()=>Gm({limit:100}),staleTime:3e4});return w.useMemo(()=>{const n=new Map;if(e!=null&&e.items)for(const a of e.items)n.set(a.uuid,a.name??a.displayName??a.uuid);return a=>a?n.get(a)??a:"—"},[e])}function P2(e){switch(e){case"high":return"bg-red-500";case"medium":return"bg-yellow-500";default:return"bg-gray-400"}}function H2(e){const n=Date.now()-new Date(e).getTime(),a=Math.floor(n/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;const i=Math.floor(a/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function Z2(){var v;const[e,n]=w.useState(!1),a=w.useRef(null),i=ti(),s=dr(),{data:u}=Ge({queryKey:["notifications","bell"],queryFn:()=>Eo({limit:5}),refetchInterval:1e4}),{data:c}=Ge({queryKey:["notifications","unread-count"],queryFn:()=>Eo({read:!1,limit:100}),refetchInterval:1e4}),d=((v=c==null?void 0:c.items)==null?void 0:v.length)??0,g=d>0,p=w.useCallback(async x=>{x.read||Y1(x.id).catch(()=>{}),n(!1),x.agentId&&x.chatId?i(`/?a=${x.agentId}&c=${x.chatId}`):x.agentId&&i(`/?a=${x.agentId}`)},[i]),y=w.useCallback(()=>{R2().catch(()=>{})},[]);return h.jsxs("div",{className:"relative",children:[h.jsxs("button",{type:"button",onClick:()=>n(!e),className:"relative flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[h.jsx(ok,{className:"h-4 w-4"}),g&&h.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:d>99?"99+":d})]}),e&&h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",className:"fixed inset-0 z-40 cursor-default",onClick:()=>n(!1)}),h.jsxs("div",{ref:a,className:"absolute right-0 top-full mt-1 z-50 w-80 rounded-md border border-border bg-card shadow-lg",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[h.jsx("span",{className:"text-sm font-medium",children:"Notifications"}),g&&h.jsx("button",{type:"button",onClick:y,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all"})]}),h.jsx("div",{className:"max-h-80 overflow-y-auto",children:!(u!=null&&u.items)||u.items.length===0?h.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"No notifications"}):u.items.map(x=>h.jsxs("button",{type:"button",onClick:()=>p(x),className:Me("w-full flex items-start gap-2 px-3 py-2 text-left hover:bg-accent/50 transition-colors",!x.read&&"bg-accent/20"),children:[h.jsx("span",{className:Me("mt-1.5 h-2 w-2 shrink-0 rounded-full",P2(x.severity))}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:Me("text-sm truncate",!x.read&&"font-medium"),children:x.message}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.agentId?s(x.agentId):""," ",H2(x.createdAt)]})]})]},x.id))})]})]})]})}const lx=[{to:"/",label:"Workspace",end:!0},{to:"/agents",label:"Agents",end:!1}],F2={to:"/admin",label:"Admin",end:!1};function $2(){const{role:e,logout:n}=Uo(),i=e==="admin"?[...lx,F2]:lx,s=rr(),u=s.pathname==="/"||s.search.includes("a=");return h.jsxs("div",{className:"flex flex-col h-screen bg-background",children:[h.jsxs("header",{className:"relative h-12 shrink-0 border-b border-border bg-card flex items-center px-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ck,{className:"h-5 w-5 text-primary"}),h.jsx("span",{className:"font-semibold text-sm tracking-tight",children:"First Tree"})]}),h.jsx("nav",{className:"absolute inset-x-0 flex items-center justify-center gap-1 pointer-events-none",children:i.map(c=>h.jsx(S1,{to:c.to,end:c.end,className:({isActive:d})=>Me("pointer-events-auto px-3 py-1.5 rounded-md text-sm font-medium transition-colors",d?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:c.label},c.to))}),h.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[h.jsx(Z2,{}),h.jsx("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:h.jsx(Ek,{className:"h-4 w-4"})})]})]}),u?h.jsx(fm,{}):h.jsx("main",{className:"flex-1 overflow-auto",children:h.jsx("div",{className:"p-6 max-w-5xl mx-auto",children:h.jsx(fm,{})})})]})}function G1(){return Ue.get("/admin/adapter-mappings")}function V2(e){return Ue.post("/admin/adapter-mappings",e)}function Q2(e){return Ue.delete(`/admin/adapter-mappings/${e}`)}function K1(){return Ue.get("/admin/adapters/status")}function X1(){return Ue.get("/admin/adapters")}function Y2(e){return Ue.post("/admin/adapters",e)}function G2(e,n){return Ue.patch(`/admin/adapters/${e}`,n)}function K2(e){return Ue.delete(`/admin/adapters/${e}`)}const sx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ox=R1,J1=(e,n)=>a=>{var i;if((n==null?void 0:n.variants)==null)return ox(e,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(p=>{const y=a==null?void 0:a[p],v=u==null?void 0:u[p];if(y===null)return null;const x=sx(y)||sx(v);return s[p][x]}),d=a&&Object.entries(a).reduce((p,y)=>{let[v,x]=y;return x===void 0||(p[v]=x),p},{}),g=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((p,y)=>{let{class:v,className:x,...S}=y;return Object.entries(S).every(j=>{let[C,T]=j;return Array.isArray(T)?T.includes({...u,...d}[C]):{...u,...d}[C]===T})?[...p,v,x]:p},[]);return ox(e,c,g,a==null?void 0:a.class,a==null?void 0:a.className)},X2=J1("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 It({className:e,variant:n,...a}){return h.jsx("div",{className:Me(X2({variant:n}),e),...a})}const cr=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{ref:a,className:Me("rounded-xl border bg-card text-card-foreground shadow-sm",e),...n}));cr.displayName="Card";const Cr=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{ref:a,className:Me("flex flex-col space-y-1.5 p-6",e),...n}));Cr.displayName="CardHeader";const Nr=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{ref:a,className:Me("font-semibold leading-none tracking-tight",e),...n}));Nr.displayName="CardTitle";const W1=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{ref:a,className:Me("text-sm text-muted-foreground",e),...n}));W1.displayName="CardDescription";const fr=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{ref:a,className:Me("p-6 pt-0",e),...n}));fr.displayName="CardContent";const J2=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{ref:a,className:Me("flex items-center p-6 pt-0",e),...n}));J2.displayName="CardFooter";const Tr=w.forwardRef(({className:e,...n},a)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:a,className:Me("w-full caption-bottom text-sm",e),...n})}));Tr.displayName="Table";const Ar=w.forwardRef(({className:e,...n},a)=>h.jsx("thead",{ref:a,className:Me("[&_tr]:border-b",e),...n}));Ar.displayName="TableHeader";const zr=w.forwardRef(({className:e,...n},a)=>h.jsx("tbody",{ref:a,className:Me("[&_tr:last-child]:border-0",e),...n}));zr.displayName="TableBody";const tt=w.forwardRef(({className:e,...n},a)=>h.jsx("tr",{ref:a,className:Me("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...n}));tt.displayName="TableRow";const Se=w.forwardRef(({className:e,...n},a)=>h.jsx("th",{ref:a,className:Me("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...n}));Se.displayName="TableHead";const xe=w.forwardRef(({className:e,...n},a)=>h.jsx("td",{ref:a,className:Me("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n}));xe.displayName="TableCell";function W2(){const e=ti(),n=dr(),{data:a,isLoading:i}=Ge({queryKey:["adapters"],queryFn:X1}),{data:s,isLoading:u}=Ge({queryKey:["adapter-mappings"],queryFn:G1}),{data:c}=Ge({queryKey:["adapter-statuses"],queryFn:K1,refetchInterval:15e3}),d=i||u;return h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-semibold",children:"Platform Bindings"}),h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Overview of all platform bindings. Manage bindings from each Agent's detail page."})]}),h.jsxs(cr,{children:[h.jsx(Cr,{children:h.jsx(Nr,{children:"Bot Bindings"})}),h.jsx(fr,{children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Agent"}),h.jsx(Se,{children:"Platform"}),h.jsx(Se,{children:"Status"}),h.jsx(Se,{children:"Connection"}),h.jsx(Se,{children:"Created"})]})}),h.jsx(zr,{children:d?h.jsx(tt,{children:h.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):a!=null&&a.length?a.map(g=>{const p=c==null?void 0:c.find(y=>y.configId===g.id);return h.jsxs(tt,{className:"cursor-pointer",onClick:()=>e(`/agents/${g.agentId}`),children:[h.jsx(xe,{className:"font-mono text-sm",children:n(g.agentId)}),h.jsx(xe,{children:h.jsx(It,{variant:"secondary",children:g.platform})}),h.jsx(xe,{children:h.jsx(It,{variant:g.status==="active"?"default":"destructive",children:g.status})}),h.jsx(xe,{children:h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:Me("inline-block h-2 w-2 rounded-full",p!=null&&p.connected?"bg-green-500":"bg-gray-300")}),h.jsx("span",{className:"text-xs text-muted-foreground",children:p!=null&&p.connected?"Online":"Offline"})]})}),h.jsx(xe,{className:"text-muted-foreground",children:ln(g.createdAt)})]},g.id)}):h.jsx(tt,{children:h.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No bot bindings"})})})]})})]}),h.jsxs(cr,{children:[h.jsx(Cr,{children:h.jsx(Nr,{children:"User Bindings"})}),h.jsx(fr,{children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Agent"}),h.jsx(Se,{children:"Platform"}),h.jsx(Se,{children:"External User ID"}),h.jsx(Se,{children:"Display Name"}),h.jsx(Se,{children:"Bound Via"}),h.jsx(Se,{children:"Created"})]})}),h.jsx(zr,{children:d?h.jsx(tt,{children:h.jsx(xe,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):s!=null&&s.length?s.map(g=>h.jsxs(tt,{className:"cursor-pointer",onClick:()=>e(`/agents/${g.agentId}`),children:[h.jsx(xe,{className:"font-mono text-sm",children:n(g.agentId)}),h.jsx(xe,{children:h.jsx(It,{variant:"secondary",children:g.platform})}),h.jsx(xe,{className:"font-mono text-sm",children:g.externalUserId}),h.jsx(xe,{children:g.displayName??"—"}),h.jsx(xe,{children:h.jsx(It,{variant:"outline",children:g.boundVia??"—"})}),h.jsx(xe,{className:"text-muted-foreground",children:ln(g.createdAt)})]},g.id)):h.jsx(tt,{children:h.jsx(xe,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No user bindings"})})})]})})]})]})}function Lo(){return Ue.get("/admin/agents/activity")}function Km(){return Ue.get("/admin/clients")}function eT(e){return Ue.post(`/admin/clients/${e}/disconnect`)}function tT(){return Ue.post("/connect-tokens")}function ux(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Xm(...e){return n=>{let a=!1;const i=e.map(s=>{const u=ux(s,n);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():ux(e[s],null)}}}}function Zi(...e){return w.useCallback(Xm(...e),e)}var nT=Symbol.for("react.lazy"),Ac=Rm[" use ".trim().toString()];function rT(e){return typeof e=="object"&&e!==null&&"then"in e}function eS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===nT&&"_payload"in e&&rT(e._payload)}function tS(e){const n=iT(e),a=w.forwardRef((i,s)=>{let{children:u,...c}=i;eS(u)&&typeof Ac=="function"&&(u=Ac(u._payload));const d=w.Children.toArray(u),g=d.find(sT);if(g){const p=g.props.children,y=d.map(v=>v===g?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return h.jsx(n,{...c,ref:s,children:w.isValidElement(p)?w.cloneElement(p,void 0,y):null})}return h.jsx(n,{...c,ref:s,children:u})});return a.displayName=`${e}.Slot`,a}var aT=tS("Slot");function iT(e){const n=w.forwardRef((a,i)=>{let{children:s,...u}=a;if(eS(s)&&typeof Ac=="function"&&(s=Ac(s._payload)),w.isValidElement(s)){const c=uT(s),d=oT(u,s.props);return s.type!==w.Fragment&&(d.ref=i?Xm(i,c):c),w.cloneElement(s,d)}return w.Children.count(s)>1?w.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var lT=Symbol("radix.slottable");function sT(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lT}function oT(e,n){const a={...n};for(const i in n){const s=e[i],u=n[i];/^on[A-Z]/.test(i)?s&&u?a[i]=(...d)=>{const g=u(...d);return s(...d),g}:s&&(a[i]=s):i==="style"?a[i]={...s,...u}:i==="className"&&(a[i]=[s,u].filter(Boolean).join(" "))}return{...e,...a}}function uT(e){var i,s;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}const cT=J1("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"}}),qe=w.forwardRef(({className:e,variant:n,size:a,asChild:i=!1,...s},u)=>{const c=i?aT:"button";return h.jsx(c,{className:Me(cT({variant:n,size:a,className:e})),ref:u,...s})});qe.displayName="Button";function nS({state:e}){if(!e)return h.jsx("span",{className:"text-xs text-muted-foreground",children:"offline"});const n={idle:"text-green-600",working:"text-blue-600",blocked:"text-yellow-600",error:"text-red-600"};return h.jsx("span",{className:Me("text-xs font-medium",n[e]??"text-muted-foreground"),children:e})}function fT(){const[e,n]=w.useState(null),[a,i]=w.useState(!1),s=yt({mutationFn:tT,onSuccess:c=>{n(c),i(!1)}}),u=async()=>{e&&(await navigator.clipboard.writeText(e.command),i(!0),setTimeout(()=>i(!1),2e3))};return e?h.jsxs("div",{className:"mb-4 p-3 border border-border rounded-lg bg-muted/30 space-y-2",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[h.jsx(Jb,{className:"h-4 w-4 shrink-0"}),h.jsxs("span",{children:["Run this command in your terminal (expires in ",e.expiresIn/60," min):"]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("code",{className:"flex-1 text-xs bg-background border border-border rounded px-3 py-2 font-mono break-all select-all",children:e.command}),h.jsxs(qe,{variant:"outline",size:"sm",onClick:u,className:"shrink-0",children:[a?h.jsx(A1,{className:"h-3 w-3 mr-1"}):h.jsx(Hc,{className:"h-3 w-3 mr-1"}),a?"Copied":"Copy"]})]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"This token is single-use. Generate a new one if it expires."})]}):h.jsxs("div",{className:"flex items-center gap-3 mb-4 p-3 border border-border rounded-lg bg-muted/30",children:[h.jsx(Jb,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsx("span",{className:"text-sm text-muted-foreground",children:"Connect a new client to this Hub"}),h.jsx(qe,{variant:"outline",size:"sm",onClick:()=>s.mutate(),disabled:s.isPending,children:s.isPending?"Generating...":"Generate Connect Command"})]})}function dT(){const e=tr(),n=dr(),[a,i]=w.useState(null),[s,u]=w.useState(null),{data:c}=Ge({queryKey:["clients"],queryFn:Km,refetchInterval:1e4}),{data:d}=Ge({queryKey:["activity"],queryFn:Lo,refetchInterval:1e4}),g=yt({mutationFn:eT,onSuccess:()=>{u(null),e.invalidateQueries({queryKey:["clients"]}),e.invalidateQueries({queryKey:["activity"]})}}),p=new Map;if(d!=null&&d.agents){for(const v of d.agents)if(v.clientId){const x=p.get(v.clientId)??[];x.push(v),p.set(v.clientId,x)}}const y=v=>p.get(v)??[];return h.jsxs("div",{children:[h.jsx(fT,{}),s&&h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:h.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 max-w-md w-full shadow-lg",children:[h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Disconnect Client"}),h.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["This will disconnect"," ",h.jsx("span",{className:"font-medium text-foreground",children:s.hostname??s.id.slice(0,8)})," ","and affect all bound agents:"]}),h.jsx("ul",{className:"mb-4 space-y-1",children:y(s.id).length===0?h.jsx("li",{className:"text-sm text-muted-foreground",children:"No bound agents"}):y(s.id).map(v=>h.jsxs("li",{className:"text-sm flex items-center gap-2",children:[h.jsx("span",{className:"font-medium",children:n(v.agentId)}),h.jsx(nS,{state:v.runtimeState})]},v.agentId))}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx(qe,{variant:"outline",size:"sm",onClick:()=>u(null),children:"Cancel"}),h.jsx(qe,{variant:"destructive",size:"sm",onClick:()=>g.mutate(s.id),disabled:g.isPending,children:g.isPending?"Disconnecting...":"Disconnect"})]})]})}),!c||c.length===0?h.jsx("div",{className:"text-center text-muted-foreground py-12",children:"No connected clients. Use the button above to generate a connect command."}):h.jsx("div",{className:"border rounded-lg overflow-hidden",children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{className:"w-8"}),h.jsx(Se,{children:"Hostname"}),h.jsx(Se,{children:"OS"}),h.jsx(Se,{children:"SDK"}),h.jsx(Se,{children:"Agents"}),h.jsx(Se,{children:"Connected"}),h.jsx(Se,{children:"Status"}),h.jsx(Se,{})]})}),h.jsx(zr,{children:c.map(v=>{const x=a===v.id,S=y(v.id);return h.jsx(hT,{client:v,boundAgents:S,isExpanded:x,agentName:n,onToggle:()=>i(x?null:v.id),onDisconnect:()=>u(v)},v.id)})})]})})]})}function hT({client:e,boundAgents:n,isExpanded:a,agentName:i,onToggle:s,onDisconnect:u}){return h.jsxs(h.Fragment,{children:[h.jsxs(tt,{className:"cursor-pointer hover:bg-accent/50",onClick:s,children:[h.jsx(xe,{className:"px-2",children:a?h.jsx(pk,{className:"h-4 w-4"}):h.jsx(z1,{className:"h-4 w-4"})}),h.jsx(xe,{className:"font-medium",children:e.hostname??"—"}),h.jsx(xe,{className:"text-muted-foreground",children:e.os??"—"}),h.jsx(xe,{className:"font-mono text-xs text-muted-foreground",children:e.sdkVersion??"—"}),h.jsx(xe,{children:e.agentCount}),h.jsx(xe,{className:"text-muted-foreground text-sm",children:e.connectedAt?ln(e.connectedAt):"—"}),h.jsx(xe,{children:h.jsx(It,{variant:e.status==="connected"?"default":"secondary",children:e.status})}),h.jsx(xe,{children:h.jsxs(qe,{variant:"outline",size:"sm",onClick:c=>{c.stopPropagation(),u()},children:[h.jsx(Pk,{className:"h-3 w-3 mr-1"}),"Disconnect"]})})]}),a&&h.jsx(tt,{children:h.jsxs(xe,{colSpan:8,className:"bg-muted/30 px-8 py-3",children:[h.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:["Bound Agents (",n.length,")"]}),n.length===0?h.jsx("div",{className:"text-sm text-muted-foreground",children:"No agents bound to this client"}):h.jsx("div",{className:"space-y-1",children:n.map(c=>h.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[h.jsx("span",{className:"font-medium",children:i(c.agentId)}),h.jsx(nS,{state:c.runtimeState}),h.jsx("span",{className:"text-xs text-muted-foreground",children:c.activeSessions!==null?`${c.activeSessions}/${c.totalSessions??0} sessions`:""})]},c.agentId))})]})})]})}function ee(e,n,a){function i(d,g){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),n(d,g);const p=c.prototype,y=Object.keys(p);for(let v=0;v<y.length;v++){const x=y[v];x in d||(d[x]=p[x].bind(d))}}const s=(a==null?void 0:a.Parent)??Object;class u extends s{}Object.defineProperty(u,"name",{value:e});function c(d){var g;const p=a!=null&&a.Parent?new u:this;i(p,d),(g=p._zod).deferred??(g.deferred=[]);for(const y of p._zod.deferred)y();return p}return Object.defineProperty(c,"init",{value:i}),Object.defineProperty(c,Symbol.hasInstance,{value:d=>{var g,p;return a!=null&&a.Parent&&d instanceof a.Parent?!0:(p=(g=d==null?void 0:d._zod)==null?void 0:g.traits)==null?void 0:p.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}class Bl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rS extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const aS={};function Wa(e){return aS}function iS(e){const n=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>n.indexOf(+i)===-1).map(([i,s])=>s)}function pm(e,n){return typeof n=="bigint"?n.toString():n}function Jm(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Wm(e){return e==null}function ep(e){const n=e.startsWith("^")?1:0,a=e.endsWith("$")?e.length-1:e.length;return e.slice(n,a)}function mT(e,n){const a=(e.toString().split(".")[1]||"").length,i=n.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const g=i.match(/\d?e-(\d?)/);g!=null&&g[1]&&(s=Number.parseInt(g[1]))}const u=a>s?a:s,c=Number.parseInt(e.toFixed(u).replace(".","")),d=Number.parseInt(n.toFixed(u).replace(".",""));return c%d/10**u}const cx=Symbol("evaluating");function it(e,n,a){let i;Object.defineProperty(e,n,{get(){if(i!==cx)return i===void 0&&(i=cx,i=a()),i},set(s){Object.defineProperty(e,n,{value:s})},configurable:!0})}function Fi(e,n,a){Object.defineProperty(e,n,{value:a,writable:!0,enumerable:!0,configurable:!0})}function ri(...e){const n={};for(const a of e){const i=Object.getOwnPropertyDescriptors(a);Object.assign(n,i)}return Object.defineProperties({},n)}function fx(e){return JSON.stringify(e)}function pT(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const lS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function zc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gT=Jm(()=>{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 rs(e){if(zc(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const a=n.prototype;return!(zc(a)===!1||Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)}function sS(e){return rs(e)?{...e}:Array.isArray(e)?[...e]:e}const yT=new Set(["string","number","symbol"]);function Zc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ai(e,n,a){const i=new e._zod.constr(n??e._zod.def);return(!n||a!=null&&a.parent)&&(i._zod.parent=e),i}function Ee(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 vT(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const bT={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 xT(e,n){const a=e._zod.def,i=a.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=ri(e._zod.def,{get shape(){const c={};for(const d in n){if(!(d in a.shape))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(c[d]=a.shape[d])}return Fi(this,"shape",c),c},checks:[]});return ai(e,u)}function ST(e,n){const a=e._zod.def,i=a.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=ri(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d in n){if(!(d in a.shape))throw new Error(`Unrecognized key: "${d}"`);n[d]&&delete c[d]}return Fi(this,"shape",c),c},checks:[]});return ai(e,u)}function wT(e,n){if(!rs(n))throw new Error("Invalid input to extend: expected a plain object");const a=e._zod.def.checks;if(a&&a.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 s=ri(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Fi(this,"shape",u),u}});return ai(e,s)}function ET(e,n){if(!rs(n))throw new Error("Invalid input to safeExtend: expected a plain object");const a=ri(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n};return Fi(this,"shape",i),i}});return ai(e,a)}function CT(e,n){const a=ri(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n._zod.def.shape};return Fi(this,"shape",i),i},get catchall(){return n._zod.def.catchall},checks:[]});return ai(e,a)}function NT(e,n,a){const s=n._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=ri(n._zod.def,{get shape(){const d=n._zod.def.shape,g={...d};if(a)for(const p in a){if(!(p in d))throw new Error(`Unrecognized key: "${p}"`);a[p]&&(g[p]=e?new e({type:"optional",innerType:d[p]}):d[p])}else for(const p in d)g[p]=e?new e({type:"optional",innerType:d[p]}):d[p];return Fi(this,"shape",g),g},checks:[]});return ai(n,c)}function _T(e,n,a){const i=ri(n._zod.def,{get shape(){const s=n._zod.def.shape,u={...s};if(a)for(const c in a){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);a[c]&&(u[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c in s)u[c]=new e({type:"nonoptional",innerType:s[c]});return Fi(this,"shape",u),u}});return ai(n,i)}function Ll(e,n=0){var a;if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(((a=e.issues[i])==null?void 0:a.continue)!==!0)return!0;return!1}function Il(e,n){return n.map(a=>{var i;return(i=a).path??(i.path=[]),a.path.unshift(e),a})}function uc(e){return typeof e=="string"?e:e==null?void 0:e.message}function ei(e,n,a){var s,u,c,d,g,p;const i={...e,path:e.path??[]};if(!e.message){const y=uc((c=(u=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:u.error)==null?void 0:c.call(u,e))??uc((d=n==null?void 0:n.error)==null?void 0:d.call(n,e))??uc((g=a.customError)==null?void 0:g.call(a,e))??uc((p=a.localeError)==null?void 0:p.call(a,e))??"Invalid input";i.message=y}return delete i.inst,delete i.continue,n!=null&&n.reportInput||delete i.input,i}function tp(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Co(...e){const[n,a,i]=e;return typeof n=="string"?{message:n,code:"custom",input:a,inst:i}:{...n}}const oS=(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,pm,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uS=ee("$ZodError",oS),cS=ee("$ZodError",oS,{Parent:Error});function jT(e,n=a=>a.message){const a={},i=[];for(const s of e.issues)s.path.length>0?(a[s.path[0]]=a[s.path[0]]||[],a[s.path[0]].push(n(s))):i.push(n(s));return{formErrors:i,fieldErrors:a}}function kT(e,n=a=>a.message){const a={_errors:[]},i=s=>{for(const u of s.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)a._errors.push(n(u));else{let c=a,d=0;for(;d<u.path.length;){const g=u.path[d];d===u.path.length-1?(c[g]=c[g]||{_errors:[]},c[g]._errors.push(n(u))):c[g]=c[g]||{_errors:[]},c=c[g],d++}}};return i(e),a}const np=e=>(n,a,i,s)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},c=n._zod.run({value:a,issues:[]},u);if(c instanceof Promise)throw new Bl;if(c.issues.length){const d=new((s==null?void 0:s.Err)??e)(c.issues.map(g=>ei(g,u,Wa())));throw lS(d,s==null?void 0:s.callee),d}return c.value},rp=e=>async(n,a,i,s)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let c=n._zod.run({value:a,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new((s==null?void 0:s.Err)??e)(c.issues.map(g=>ei(g,u,Wa())));throw lS(d,s==null?void 0:s.callee),d}return c.value},Fc=e=>(n,a,i)=>{const s=i?{...i,async:!1}:{async:!1},u=n._zod.run({value:a,issues:[]},s);if(u instanceof Promise)throw new Bl;return u.issues.length?{success:!1,error:new(e??uS)(u.issues.map(c=>ei(c,s,Wa())))}:{success:!0,data:u.value}},TT=Fc(cS),$c=e=>async(n,a,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let u=n._zod.run({value:a,issues:[]},s);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>ei(c,s,Wa())))}:{success:!0,data:u.value}},AT=$c(cS),zT=e=>(n,a,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return np(e)(n,a,s)},OT=e=>(n,a,i)=>np(e)(n,a,i),RT=e=>async(n,a,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return rp(e)(n,a,s)},MT=e=>async(n,a,i)=>rp(e)(n,a,i),DT=e=>(n,a,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Fc(e)(n,a,s)},UT=e=>(n,a,i)=>Fc(e)(n,a,i),LT=e=>async(n,a,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return $c(e)(n,a,s)},IT=e=>async(n,a,i)=>$c(e)(n,a,i),BT=/^[cC][^\s-]{8,}$/,qT=/^[0-9a-z]+$/,PT=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,HT=/^[0-9a-vA-V]{20}$/,ZT=/^[A-Za-z0-9]{27}$/,FT=/^[a-zA-Z0-9_-]{21}$/,$T=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,VT=/^([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})$/,dx=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)$/,QT=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,YT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function GT(){return new RegExp(YT,"u")}const KT=/^(?:(?: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])$/,XT=/^(([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}|:))$/,JT=/^((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])$/,WT=/^(([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])$/,eA=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fS=/^[A-Za-z0-9_-]*$/,tA=/^\+[1-9]\d{6,14}$/,dS="(?:(?:\\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])))",nA=new RegExp(`^${dS}$`);function hS(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 rA(e){return new RegExp(`^${hS(e)}$`)}function aA(e){const n=hS({precision:e.precision}),a=["Z"];e.local&&a.push(""),e.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${n}(?:${a.join("|")})`;return new RegExp(`^${dS}T(?:${i})$`)}const iA=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}$`)},lA=/^-?\d+$/,mS=/^-?\d+(?:\.\d+)?$/,sA=/^(?:true|false)$/i,oA=/^[^A-Z]*$/,uA=/^[^a-z]*$/,_n=ee("$ZodCheck",(e,n)=>{var a;e._zod??(e._zod={}),e._zod.def=n,(a=e._zod).onattach??(a.onattach=[])}),pS={number:"number",bigint:"bigint",object:"date"},gS=ee("$ZodCheckLessThan",(e,n)=>{_n.init(e,n);const a=pS[typeof n.value];e._zod.onattach.push(i=>{const s=i._zod.bag,u=(n.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?s.maximum=n.value:s.exclusiveMaximum=n.value)}),e._zod.check=i=>{(n.inclusive?i.value<=n.value:i.value<n.value)||i.issues.push({origin:a,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:i.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),yS=ee("$ZodCheckGreaterThan",(e,n)=>{_n.init(e,n);const a=pS[typeof n.value];e._zod.onattach.push(i=>{const s=i._zod.bag,u=(n.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?s.minimum=n.value:s.exclusiveMinimum=n.value)}),e._zod.check=i=>{(n.inclusive?i.value>=n.value:i.value>n.value)||i.issues.push({origin:a,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:i.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),cA=ee("$ZodCheckMultipleOf",(e,n)=>{_n.init(e,n),e._zod.onattach.push(a=>{var i;(i=a._zod.bag).multipleOf??(i.multipleOf=n.value)}),e._zod.check=a=>{if(typeof a.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof a.value=="bigint"?a.value%n.value===BigInt(0):mT(a.value,n.value)===0)||a.issues.push({origin:typeof a.value,code:"not_multiple_of",divisor:n.value,input:a.value,inst:e,continue:!n.abort})}}),fA=ee("$ZodCheckNumberFormat",(e,n)=>{var c;_n.init(e,n),n.format=n.format||"float64";const a=(c=n.format)==null?void 0:c.includes("int"),i=a?"int":"number",[s,u]=bT[n.format];e._zod.onattach.push(d=>{const g=d._zod.bag;g.format=n.format,g.minimum=s,g.maximum=u,a&&(g.pattern=lA)}),e._zod.check=d=>{const g=d.value;if(a){if(!Number.isInteger(g)){d.issues.push({expected:i,format:n.format,code:"invalid_type",continue:!1,input:g,inst:e});return}if(!Number.isSafeInteger(g)){g>0?d.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!n.abort}):d.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!n.abort});return}}g<s&&d.issues.push({origin:"number",input:g,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!n.abort}),g>u&&d.issues.push({origin:"number",input:g,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),dA=ee("$ZodCheckMaxLength",(e,n)=>{var a;_n.init(e,n),(a=e._zod.def).when??(a.when=i=>{const s=i.value;return!Wm(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<s&&(i._zod.bag.maximum=n.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=n.maximum)return;const c=tp(s);i.issues.push({origin:c,code:"too_big",maximum:n.maximum,inclusive:!0,input:s,inst:e,continue:!n.abort})}}),hA=ee("$ZodCheckMinLength",(e,n)=>{var a;_n.init(e,n),(a=e._zod.def).when??(a.when=i=>{const s=i.value;return!Wm(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>s&&(i._zod.bag.minimum=n.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=n.minimum)return;const c=tp(s);i.issues.push({origin:c,code:"too_small",minimum:n.minimum,inclusive:!0,input:s,inst:e,continue:!n.abort})}}),mA=ee("$ZodCheckLengthEquals",(e,n)=>{var a;_n.init(e,n),(a=e._zod.def).when??(a.when=i=>{const s=i.value;return!Wm(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=n.length,s.maximum=n.length,s.length=n.length}),e._zod.check=i=>{const s=i.value,u=s.length;if(u===n.length)return;const c=tp(s),d=u>n.length;i.issues.push({origin:c,...d?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!n.abort})}}),Vc=ee("$ZodCheckStringFormat",(e,n)=>{var a,i;_n.init(e,n),e._zod.onattach.push(s=>{const u=s._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(a=e._zod).check??(a.check=s=>{n.pattern.lastIndex=0,!n.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:n.format,input:s.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(i=e._zod).check??(i.check=()=>{})}),pA=ee("$ZodCheckRegex",(e,n)=>{Vc.init(e,n),e._zod.check=a=>{n.pattern.lastIndex=0,!n.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:"regex",input:a.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),gA=ee("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=oA),Vc.init(e,n)}),yA=ee("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=uA),Vc.init(e,n)}),vA=ee("$ZodCheckIncludes",(e,n)=>{_n.init(e,n);const a=Zc(n.includes),i=new RegExp(typeof n.position=="number"?`^.{${n.position}}${a}`:a);n.pattern=i,e._zod.onattach.push(s=>{const u=s._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=s=>{s.value.includes(n.includes,n.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:s.value,inst:e,continue:!n.abort})}}),bA=ee("$ZodCheckStartsWith",(e,n)=>{_n.init(e,n);const a=new RegExp(`^${Zc(n.prefix)}.*`);n.pattern??(n.pattern=a),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(a)}),e._zod.check=i=>{i.value.startsWith(n.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:i.value,inst:e,continue:!n.abort})}}),xA=ee("$ZodCheckEndsWith",(e,n)=>{_n.init(e,n);const a=new RegExp(`.*${Zc(n.suffix)}$`);n.pattern??(n.pattern=a),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(a)}),e._zod.check=i=>{i.value.endsWith(n.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:i.value,inst:e,continue:!n.abort})}}),SA=ee("$ZodCheckOverwrite",(e,n)=>{_n.init(e,n),e._zod.check=a=>{a.value=n.tx(a.value)}});class wA{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 i=n.split(`
|
|
216
|
+
`).filter(c=>c),s=Math.min(...i.map(c=>c.length-c.trimStart().length)),u=i.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of u)this.content.push(c)}compile(){const n=Function,a=this==null?void 0:this.args,s=[...((this==null?void 0:this.content)??[""]).map(u=>` ${u}`)];return new n(...a,s.join(`
|
|
217
|
+
`))}}const EA={major:4,minor:3,patch:6},Tt=ee("$ZodType",(e,n)=>{var s;var a;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=EA;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const u of i)for(const c of u._zod.onattach)c(e);if(i.length===0)(a=e._zod).deferred??(a.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const u=(d,g,p)=>{let y=Ll(d),v;for(const x of g){if(x._zod.def.when){if(!x._zod.def.when(d))continue}else if(y)continue;const S=d.issues.length,j=x._zod.check(d);if(j instanceof Promise&&(p==null?void 0:p.async)===!1)throw new Bl;if(v||j instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await j,d.issues.length!==S&&(y||(y=Ll(d,S)))});else{if(d.issues.length===S)continue;y||(y=Ll(d,S))}}return v?v.then(()=>d):d},c=(d,g,p)=>{if(Ll(d))return d.aborted=!0,d;const y=u(g,i,p);if(y instanceof Promise){if(p.async===!1)throw new Bl;return y.then(v=>e._zod.parse(v,p))}return e._zod.parse(y,p)};e._zod.run=(d,g)=>{if(g.skipChecks)return e._zod.parse(d,g);if(g.direction==="backward"){const y=e._zod.parse({value:d.value,issues:[]},{...g,skipChecks:!0});return y instanceof Promise?y.then(v=>c(v,d,g)):c(y,d,g)}const p=e._zod.parse(d,g);if(p instanceof Promise){if(g.async===!1)throw new Bl;return p.then(y=>u(y,i,g))}return u(p,i,g)}}it(e,"~standard",()=>({validate:u=>{var c;try{const d=TT(e,u);return d.success?{value:d.data}:{issues:(c=d.error)==null?void 0:c.issues}}catch{return AT(e,u).then(g=>{var p;return g.success?{value:g.data}:{issues:(p=g.error)==null?void 0:p.issues}})}},vendor:"zod",version:1}))}),ap=ee("$ZodString",(e,n)=>{var a;Tt.init(e,n),e._zod.pattern=[...((a=e==null?void 0:e._zod.bag)==null?void 0:a.patterns)??[]].pop()??iA(e._zod.bag),e._zod.parse=(i,s)=>{if(n.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),wt=ee("$ZodStringFormat",(e,n)=>{Vc.init(e,n),ap.init(e,n)}),CA=ee("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=VT),wt.init(e,n)}),NA=ee("$ZodUUID",(e,n)=>{if(n.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(i===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=dx(i))}else n.pattern??(n.pattern=dx());wt.init(e,n)}),_A=ee("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=QT),wt.init(e,n)}),jA=ee("$ZodURL",(e,n)=>{wt.init(e,n),e._zod.check=a=>{try{const i=a.value.trim(),s=new URL(i);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(s.hostname)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:a.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:a.value,inst:e,continue:!n.abort})),n.normalize?a.value=s.href:a.value=i;return}catch{a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:e,continue:!n.abort})}}}),kA=ee("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=GT()),wt.init(e,n)}),TA=ee("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=FT),wt.init(e,n)}),AA=ee("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=BT),wt.init(e,n)}),zA=ee("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=qT),wt.init(e,n)}),OA=ee("$ZodULID",(e,n)=>{n.pattern??(n.pattern=PT),wt.init(e,n)}),RA=ee("$ZodXID",(e,n)=>{n.pattern??(n.pattern=HT),wt.init(e,n)}),MA=ee("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=ZT),wt.init(e,n)}),DA=ee("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=aA(n)),wt.init(e,n)}),UA=ee("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=nA),wt.init(e,n)}),LA=ee("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=rA(n)),wt.init(e,n)}),IA=ee("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=$T),wt.init(e,n)}),BA=ee("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=KT),wt.init(e,n),e._zod.bag.format="ipv4"}),qA=ee("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=XT),wt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=a=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:e,continue:!n.abort})}}}),PA=ee("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=JT),wt.init(e,n)}),HA=ee("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=WT),wt.init(e,n),e._zod.check=a=>{const i=a.value.split("/");try{if(i.length!==2)throw new Error;const[s,u]=i;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://[${s}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:e,continue:!n.abort})}}});function vS(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const ZA=ee("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=eA),wt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=a=>{vS(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:e,continue:!n.abort})}});function FA(e){if(!fS.test(e))return!1;const n=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),a=n.padEnd(Math.ceil(n.length/4)*4,"=");return vS(a)}const $A=ee("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=fS),wt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=a=>{FA(a.value)||a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:e,continue:!n.abort})}}),VA=ee("$ZodE164",(e,n)=>{n.pattern??(n.pattern=tA),wt.init(e,n)});function QA(e,n=null){try{const a=e.split(".");if(a.length!==3)return!1;const[i]=a;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||n&&(!("alg"in s)||s.alg!==n))}catch{return!1}}const YA=ee("$ZodJWT",(e,n)=>{wt.init(e,n),e._zod.check=a=>{QA(a.value,n.alg)||a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:e,continue:!n.abort})}}),bS=ee("$ZodNumber",(e,n)=>{Tt.init(e,n),e._zod.pattern=e._zod.bag.pattern??mS,e._zod.parse=(a,i)=>{if(n.coerce)try{a.value=Number(a.value)}catch{}const s=a.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return a;const u=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return a.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...u?{received:u}:{}}),a}}),GA=ee("$ZodNumberFormat",(e,n)=>{fA.init(e,n),bS.init(e,n)}),KA=ee("$ZodBoolean",(e,n)=>{Tt.init(e,n),e._zod.pattern=sA,e._zod.parse=(a,i)=>{if(n.coerce)try{a.value=!!a.value}catch{}const s=a.value;return typeof s=="boolean"||a.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),a}}),XA=ee("$ZodUnknown",(e,n)=>{Tt.init(e,n),e._zod.parse=a=>a}),JA=ee("$ZodNever",(e,n)=>{Tt.init(e,n),e._zod.parse=(a,i)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:e}),a)});function hx(e,n,a){e.issues.length&&n.issues.push(...Il(a,e.issues)),n.value[a]=e.value}const WA=ee("$ZodArray",(e,n)=>{Tt.init(e,n),e._zod.parse=(a,i)=>{const s=a.value;if(!Array.isArray(s))return a.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),a;a.value=Array(s.length);const u=[];for(let c=0;c<s.length;c++){const d=s[c],g=n.element._zod.run({value:d,issues:[]},i);g instanceof Promise?u.push(g.then(p=>hx(p,a,c))):hx(g,a,c)}return u.length?Promise.all(u).then(()=>a):a}});function Oc(e,n,a,i,s){if(e.issues.length){if(s&&!(a in i))return;n.issues.push(...Il(a,e.issues))}e.value===void 0?a in i&&(n.value[a]=void 0):n.value[a]=e.value}function xS(e){var i,s,u,c;const n=Object.keys(e.shape);for(const d of n)if(!((c=(u=(s=(i=e.shape)==null?void 0:i[d])==null?void 0:s._zod)==null?void 0:u.traits)!=null&&c.has("$ZodType")))throw new Error(`Invalid element at key "${d}": expected a Zod schema`);const a=vT(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(a)}}function SS(e,n,a,i,s,u){const c=[],d=s.keySet,g=s.catchall._zod,p=g.def.type,y=g.optout==="optional";for(const v in n){if(d.has(v))continue;if(p==="never"){c.push(v);continue}const x=g.run({value:n[v],issues:[]},i);x instanceof Promise?e.push(x.then(S=>Oc(S,a,v,n,y))):Oc(x,a,v,n,y)}return c.length&&a.issues.push({code:"unrecognized_keys",keys:c,input:n,inst:u}),e.length?Promise.all(e).then(()=>a):a}const ez=ee("$ZodObject",(e,n)=>{Tt.init(e,n);const a=Object.getOwnPropertyDescriptor(n,"shape");if(!(a!=null&&a.get)){const d=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...d};return Object.defineProperty(n,"shape",{value:g}),g}})}const i=Jm(()=>xS(n));it(e._zod,"propValues",()=>{const d=n.shape,g={};for(const p in d){const y=d[p]._zod;if(y.values){g[p]??(g[p]=new Set);for(const v of y.values)g[p].add(v)}}return g});const s=zc,u=n.catchall;let c;e._zod.parse=(d,g)=>{c??(c=i.value);const p=d.value;if(!s(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;d.value={};const y=[],v=c.shape;for(const x of c.keys){const S=v[x],j=S._zod.optout==="optional",C=S._zod.run({value:p[x],issues:[]},g);C instanceof Promise?y.push(C.then(T=>Oc(T,d,x,p,j))):Oc(C,d,x,p,j)}return u?SS(y,p,d,g,i.value,e):y.length?Promise.all(y).then(()=>d):d}}),tz=ee("$ZodObjectJIT",(e,n)=>{ez.init(e,n);const a=e._zod.parse,i=Jm(()=>xS(n)),s=x=>{var U;const S=new wA(["shape","payload","ctx"]),j=i.value,C=H=>{const Y=fx(H);return`shape[${Y}]._zod.run({ value: input[${Y}], issues: [] }, ctx)`};S.write("const input = payload.value;");const T=Object.create(null);let k=0;for(const H of j.keys)T[H]=`key_${k++}`;S.write("const newResult = {};");for(const H of j.keys){const Y=T[H],L=fx(H),B=x[H],D=((U=B==null?void 0:B._zod)==null?void 0:U.optout)==="optional";S.write(`const ${Y} = ${C(H)};`),D?S.write(`
|
|
218
|
+
if (${Y}.issues.length) {
|
|
219
|
+
if (${L} in input) {
|
|
220
|
+
payload.issues = payload.issues.concat(${Y}.issues.map(iss => ({
|
|
221
|
+
...iss,
|
|
222
|
+
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
223
|
+
})));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (${Y}.value === undefined) {
|
|
228
|
+
if (${L} in input) {
|
|
229
|
+
newResult[${L}] = undefined;
|
|
230
|
+
}
|
|
231
|
+
} else {
|
|
232
|
+
newResult[${L}] = ${Y}.value;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
`):S.write(`
|
|
236
|
+
if (${Y}.issues.length) {
|
|
237
|
+
payload.issues = payload.issues.concat(${Y}.issues.map(iss => ({
|
|
238
|
+
...iss,
|
|
239
|
+
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
240
|
+
})));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (${Y}.value === undefined) {
|
|
244
|
+
if (${L} in input) {
|
|
245
|
+
newResult[${L}] = undefined;
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
newResult[${L}] = ${Y}.value;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
`)}S.write("payload.value = newResult;"),S.write("return payload;");const P=S.compile();return(H,Y)=>P(x,H,Y)};let u;const c=zc,d=!aS.jitless,p=d&&gT.value,y=n.catchall;let v;e._zod.parse=(x,S)=>{v??(v=i.value);const j=x.value;return c(j)?d&&p&&(S==null?void 0:S.async)===!1&&S.jitless!==!0?(u||(u=s(n.shape)),x=u(x,S),y?SS([],j,x,S,v,e):x):a(x,S):(x.issues.push({expected:"object",code:"invalid_type",input:j,inst:e}),x)}});function mx(e,n,a,i){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const s=e.filter(u=>!Ll(u));return s.length===1?(n.value=s[0].value,s[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:a,errors:e.map(u=>u.issues.map(c=>ei(c,i,Wa())))}),n)}const nz=ee("$ZodUnion",(e,n)=>{Tt.init(e,n),it(e._zod,"optin",()=>n.options.some(s=>s._zod.optin==="optional")?"optional":void 0),it(e._zod,"optout",()=>n.options.some(s=>s._zod.optout==="optional")?"optional":void 0),it(e._zod,"values",()=>{if(n.options.every(s=>s._zod.values))return new Set(n.options.flatMap(s=>Array.from(s._zod.values)))}),it(e._zod,"pattern",()=>{if(n.options.every(s=>s._zod.pattern)){const s=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${s.map(u=>ep(u.source)).join("|")})$`)}});const a=n.options.length===1,i=n.options[0]._zod.run;e._zod.parse=(s,u)=>{if(a)return i(s,u);let c=!1;const d=[];for(const g of n.options){const p=g._zod.run({value:s.value,issues:[]},u);if(p instanceof Promise)d.push(p),c=!0;else{if(p.issues.length===0)return p;d.push(p)}}return c?Promise.all(d).then(g=>mx(g,s,e,u)):mx(d,s,e,u)}}),rz=ee("$ZodIntersection",(e,n)=>{Tt.init(e,n),e._zod.parse=(a,i)=>{const s=a.value,u=n.left._zod.run({value:s,issues:[]},i),c=n.right._zod.run({value:s,issues:[]},i);return u instanceof Promise||c instanceof Promise?Promise.all([u,c]).then(([g,p])=>px(a,g,p)):px(a,u,c)}});function gm(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(rs(e)&&rs(n)){const a=Object.keys(n),i=Object.keys(e).filter(u=>a.indexOf(u)!==-1),s={...e,...n};for(const u of i){const c=gm(e[u],n[u]);if(!c.valid)return{valid:!1,mergeErrorPath:[u,...c.mergeErrorPath]};s[u]=c.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let i=0;i<e.length;i++){const s=e[i],u=n[i],c=gm(s,u);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};a.push(c.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function px(e,n,a){const i=new Map;let s;for(const d of n.issues)if(d.code==="unrecognized_keys"){s??(s=d);for(const g of d.keys)i.has(g)||i.set(g,{}),i.get(g).l=!0}else e.issues.push(d);for(const d of a.issues)if(d.code==="unrecognized_keys")for(const g of d.keys)i.has(g)||i.set(g,{}),i.get(g).r=!0;else e.issues.push(d);const u=[...i].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(u.length&&s&&e.issues.push({...s,keys:u}),Ll(e))return e;const c=gm(n.value,a.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const az=ee("$ZodRecord",(e,n)=>{Tt.init(e,n),e._zod.parse=(a,i)=>{const s=a.value;if(!rs(s))return a.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),a;const u=[],c=n.keyType._zod.values;if(c){a.value={};const d=new Set;for(const p of c)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){d.add(typeof p=="number"?p.toString():p);const y=n.valueType._zod.run({value:s[p],issues:[]},i);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&a.issues.push(...Il(p,v.issues)),a.value[p]=v.value})):(y.issues.length&&a.issues.push(...Il(p,y.issues)),a.value[p]=y.value)}let g;for(const p in s)d.has(p)||(g=g??[],g.push(p));g&&g.length>0&&a.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:g})}else{a.value={};for(const d of Reflect.ownKeys(s)){if(d==="__proto__")continue;let g=n.keyType._zod.run({value:d,issues:[]},i);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&mS.test(d)&&g.issues.length){const v=n.keyType._zod.run({value:Number(d),issues:[]},i);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?a.value[d]=s[d]:a.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>ei(v,i,Wa())),input:d,path:[d],inst:e});continue}const y=n.valueType._zod.run({value:s[d],issues:[]},i);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&a.issues.push(...Il(d,v.issues)),a.value[g.value]=v.value})):(y.issues.length&&a.issues.push(...Il(d,y.issues)),a.value[g.value]=y.value)}}return u.length?Promise.all(u).then(()=>a):a}}),iz=ee("$ZodEnum",(e,n)=>{Tt.init(e,n);const a=iS(n.entries),i=new Set(a);e._zod.values=i,e._zod.pattern=new RegExp(`^(${a.filter(s=>yT.has(typeof s)).map(s=>typeof s=="string"?Zc(s):s.toString()).join("|")})$`),e._zod.parse=(s,u)=>{const c=s.value;return i.has(c)||s.issues.push({code:"invalid_value",values:a,input:c,inst:e}),s}}),lz=ee("$ZodTransform",(e,n)=>{Tt.init(e,n),e._zod.parse=(a,i)=>{if(i.direction==="backward")throw new rS(e.constructor.name);const s=n.transform(a.value,a);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(c=>(a.value=c,a));if(s instanceof Promise)throw new Bl;return a.value=s,a}});function gx(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const wS=ee("$ZodOptional",(e,n)=>{Tt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",it(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),it(e._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${ep(a.source)})?$`):void 0}),e._zod.parse=(a,i)=>{if(n.innerType._zod.optin==="optional"){const s=n.innerType._zod.run(a,i);return s instanceof Promise?s.then(u=>gx(u,a.value)):gx(s,a.value)}return a.value===void 0?a:n.innerType._zod.run(a,i)}}),sz=ee("$ZodExactOptional",(e,n)=>{wS.init(e,n),it(e._zod,"values",()=>n.innerType._zod.values),it(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(a,i)=>n.innerType._zod.run(a,i)}),oz=ee("$ZodNullable",(e,n)=>{Tt.init(e,n),it(e._zod,"optin",()=>n.innerType._zod.optin),it(e._zod,"optout",()=>n.innerType._zod.optout),it(e._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${ep(a.source)}|null)$`):void 0}),it(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(a,i)=>a.value===null?a:n.innerType._zod.run(a,i)}),uz=ee("$ZodDefault",(e,n)=>{Tt.init(e,n),e._zod.optin="optional",it(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(a,i)=>{if(i.direction==="backward")return n.innerType._zod.run(a,i);if(a.value===void 0)return a.value=n.defaultValue,a;const s=n.innerType._zod.run(a,i);return s instanceof Promise?s.then(u=>yx(u,n)):yx(s,n)}});function yx(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const cz=ee("$ZodPrefault",(e,n)=>{Tt.init(e,n),e._zod.optin="optional",it(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(a,i)=>(i.direction==="backward"||a.value===void 0&&(a.value=n.defaultValue),n.innerType._zod.run(a,i))}),fz=ee("$ZodNonOptional",(e,n)=>{Tt.init(e,n),it(e._zod,"values",()=>{const a=n.innerType._zod.values;return a?new Set([...a].filter(i=>i!==void 0)):void 0}),e._zod.parse=(a,i)=>{const s=n.innerType._zod.run(a,i);return s instanceof Promise?s.then(u=>vx(u,e)):vx(s,e)}});function vx(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 dz=ee("$ZodCatch",(e,n)=>{Tt.init(e,n),it(e._zod,"optin",()=>n.innerType._zod.optin),it(e._zod,"optout",()=>n.innerType._zod.optout),it(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(a,i)=>{if(i.direction==="backward")return n.innerType._zod.run(a,i);const s=n.innerType._zod.run(a,i);return s instanceof Promise?s.then(u=>(a.value=u.value,u.issues.length&&(a.value=n.catchValue({...a,error:{issues:u.issues.map(c=>ei(c,i,Wa()))},input:a.value}),a.issues=[]),a)):(a.value=s.value,s.issues.length&&(a.value=n.catchValue({...a,error:{issues:s.issues.map(u=>ei(u,i,Wa()))},input:a.value}),a.issues=[]),a)}}),hz=ee("$ZodPipe",(e,n)=>{Tt.init(e,n),it(e._zod,"values",()=>n.in._zod.values),it(e._zod,"optin",()=>n.in._zod.optin),it(e._zod,"optout",()=>n.out._zod.optout),it(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(a,i)=>{if(i.direction==="backward"){const u=n.out._zod.run(a,i);return u instanceof Promise?u.then(c=>cc(c,n.in,i)):cc(u,n.in,i)}const s=n.in._zod.run(a,i);return s instanceof Promise?s.then(u=>cc(u,n.out,i)):cc(s,n.out,i)}});function cc(e,n,a){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},a)}const mz=ee("$ZodReadonly",(e,n)=>{Tt.init(e,n),it(e._zod,"propValues",()=>n.innerType._zod.propValues),it(e._zod,"values",()=>n.innerType._zod.values),it(e._zod,"optin",()=>{var a,i;return(i=(a=n.innerType)==null?void 0:a._zod)==null?void 0:i.optin}),it(e._zod,"optout",()=>{var a,i;return(i=(a=n.innerType)==null?void 0:a._zod)==null?void 0:i.optout}),e._zod.parse=(a,i)=>{if(i.direction==="backward")return n.innerType._zod.run(a,i);const s=n.innerType._zod.run(a,i);return s instanceof Promise?s.then(bx):bx(s)}});function bx(e){return e.value=Object.freeze(e.value),e}const pz=ee("$ZodCustom",(e,n)=>{_n.init(e,n),Tt.init(e,n),e._zod.parse=(a,i)=>a,e._zod.check=a=>{const i=a.value,s=n.fn(i);if(s instanceof Promise)return s.then(u=>xx(u,a,i,e));xx(s,a,i,e)}});function xx(e,n,a,i){if(!e){const s={code:"custom",input:a,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),n.issues.push(Co(s))}}var Sx;class gz{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...a){const i=a[0];return this._map.set(n,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const a=this._map.get(n);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(n),this}get(n){const a=n._zod.parent;if(a){const i={...this.get(a)??{}};delete i.id;const s={...i,...this._map.get(n)};return Object.keys(s).length?s:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function yz(){return new gz}(Sx=globalThis).__zod_globalRegistry??(Sx.__zod_globalRegistry=yz());const po=globalThis.__zod_globalRegistry;function vz(e,n){return new e({type:"string",...Ee(n)})}function bz(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(n)})}function wx(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(n)})}function xz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(n)})}function Sz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(n)})}function wz(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(n)})}function Ez(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(n)})}function Cz(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(n)})}function Nz(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(n)})}function _z(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(n)})}function jz(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(n)})}function kz(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(n)})}function Tz(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(n)})}function Az(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(n)})}function zz(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(n)})}function Oz(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(n)})}function Rz(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(n)})}function Mz(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(n)})}function Dz(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(n)})}function Uz(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(n)})}function Lz(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(n)})}function Iz(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(n)})}function Bz(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(n)})}function qz(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(n)})}function Pz(e,n){return new e({type:"string",format:"date",check:"string_format",...Ee(n)})}function Hz(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(n)})}function Zz(e,n){return new e({type:"string",format:"duration",check:"string_format",...Ee(n)})}function Fz(e,n){return new e({type:"number",checks:[],...Ee(n)})}function $z(e,n){return new e({type:"number",coerce:!0,checks:[],...Ee(n)})}function Vz(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ee(n)})}function Qz(e,n){return new e({type:"boolean",...Ee(n)})}function Yz(e){return new e({type:"unknown"})}function Gz(e,n){return new e({type:"never",...Ee(n)})}function Ex(e,n){return new gS({check:"less_than",...Ee(n),value:e,inclusive:!1})}function _h(e,n){return new gS({check:"less_than",...Ee(n),value:e,inclusive:!0})}function Cx(e,n){return new yS({check:"greater_than",...Ee(n),value:e,inclusive:!1})}function jh(e,n){return new yS({check:"greater_than",...Ee(n),value:e,inclusive:!0})}function Nx(e,n){return new cA({check:"multiple_of",...Ee(n),value:e})}function ES(e,n){return new dA({check:"max_length",...Ee(n),maximum:e})}function Rc(e,n){return new hA({check:"min_length",...Ee(n),minimum:e})}function CS(e,n){return new mA({check:"length_equals",...Ee(n),length:e})}function Kz(e,n){return new pA({check:"string_format",format:"regex",...Ee(n),pattern:e})}function Xz(e){return new gA({check:"string_format",format:"lowercase",...Ee(e)})}function Jz(e){return new yA({check:"string_format",format:"uppercase",...Ee(e)})}function Wz(e,n){return new vA({check:"string_format",format:"includes",...Ee(n),includes:e})}function eO(e,n){return new bA({check:"string_format",format:"starts_with",...Ee(n),prefix:e})}function tO(e,n){return new xA({check:"string_format",format:"ends_with",...Ee(n),suffix:e})}function os(e){return new SA({check:"overwrite",tx:e})}function nO(e){return os(n=>n.normalize(e))}function rO(){return os(e=>e.trim())}function aO(){return os(e=>e.toLowerCase())}function iO(){return os(e=>e.toUpperCase())}function lO(){return os(e=>pT(e))}function sO(e,n,a){return new e({type:"array",element:n,...Ee(a)})}function oO(e,n,a){return new e({type:"custom",check:"custom",fn:n,...Ee(a)})}function uO(e){const n=cO(a=>(a.addIssue=i=>{if(typeof i=="string")a.issues.push(Co(i,a.value,n._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=a.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),a.issues.push(Co(s))}},e(a.value,a)));return n}function cO(e,n){const a=new _n({check:"custom",...Ee(n)});return a._zod.check=e,a}function NS(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)??po,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 Bt(e,n,a={path:[],schemaPath:[]}){var y,v;var i;const s=e._zod.def,u=n.seen.get(e);if(u)return u.count++,a.schemaPath.includes(e)&&(u.cycle=a.path),u.schema;const c={schema:{},count:1,cycle:void 0,path:a.path};n.seen.set(e,c);const d=(v=(y=e._zod).toJSONSchema)==null?void 0:v.call(y);if(d)c.schema=d;else{const x={...a,schemaPath:[...a.schemaPath,e],path:a.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,c.schema,x);else{const j=c.schema,C=n.processors[s.type];if(!C)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);C(e,n,j,x)}const S=e._zod.parent;S&&(c.ref||(c.ref=S),Bt(S,n,x),n.seen.get(S).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(c.schema,g),n.io==="input"&&fn(e)&&(delete c.schema.examples,delete c.schema.default),n.io==="input"&&c.schema._prefault&&((i=c.schema).default??(i.default=c.schema._prefault)),delete c.schema._prefault,n.seen.get(e).schema}function _S(e,n){var c,d,g,p;const a=e.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const y of e.seen.entries()){const v=(c=e.metadataRegistry.get(y[0]))==null?void 0:c.id;if(v){const x=i.get(v);if(x&&x!==y[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(v,y[0])}}const s=y=>{var C;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const T=(C=e.external.registry.get(y[0]))==null?void 0:C.id,k=e.external.uri??(U=>U);if(T)return{ref:k(T)};const P=y[1].defId??y[1].schema.id??`schema${e.counter++}`;return y[1].defId=P,{defId:P,ref:`${k("__shared")}#/${v}/${P}`}}if(y[1]===a)return{ref:"#"};const S=`#/${v}/`,j=y[1].schema.id??`__schema${e.counter++}`;return{defId:j,ref:S+j}},u=y=>{if(y[1].schema.$ref)return;const v=y[1],{ref:x,defId:S}=s(y);v.def={...v.schema},S&&(v.defId=S);const j=v.schema;for(const C in j)delete j[C];j.$ref=x};if(e.cycles==="throw")for(const y of e.seen.entries()){const v=y[1];if(v.cycle)throw new Error(`Cycle detected: #/${(d=v.cycle)==null?void 0:d.join("/")}/<root>
|
|
252
|
+
|
|
253
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const y of e.seen.entries()){const v=y[1];if(n===y[0]){u(y);continue}if(e.external){const S=(g=e.external.registry.get(y[0]))==null?void 0:g.id;if(n!==y[0]&&S){u(y);continue}}if((p=e.metadataRegistry.get(y[0]))==null?void 0:p.id){u(y);continue}if(v.cycle){u(y);continue}if(v.count>1&&e.reused==="ref"){u(y);continue}}}function jS(e,n){var c,d,g;const a=e.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=p=>{const y=e.seen.get(p);if(y.ref===null)return;const v=y.def??y.schema,x={...v},S=y.ref;if(y.ref=null,S){i(S);const C=e.seen.get(S),T=C.schema;if(T.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(T)):Object.assign(v,T),Object.assign(v,x),p._zod.parent===S)for(const P in v)P==="$ref"||P==="allOf"||P in x||delete v[P];if(T.$ref&&C.def)for(const P in v)P==="$ref"||P==="allOf"||P in C.def&&JSON.stringify(v[P])===JSON.stringify(C.def[P])&&delete v[P]}const j=p._zod.parent;if(j&&j!==S){i(j);const C=e.seen.get(j);if(C!=null&&C.schema.$ref&&(v.$ref=C.schema.$ref,C.def))for(const T in v)T==="$ref"||T==="allOf"||T in C.def&&JSON.stringify(v[T])===JSON.stringify(C.def[T])&&delete v[T]}e.override({zodSchema:p,jsonSchema:v,path:y.path??[]})};for(const p of[...e.seen.entries()].reverse())i(p[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const p=(d=e.external.registry.get(n))==null?void 0:d.id;if(!p)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(p)}Object.assign(s,a.def??a.schema);const u=((g=e.external)==null?void 0:g.defs)??{};for(const p of e.seen.entries()){const y=p[1];y.def&&y.defId&&(u[y.defId]=y.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?s.$defs=u:s.definitions=u);try{const p=JSON.parse(JSON.stringify(s));return Object.defineProperty(p,"~standard",{value:{...n["~standard"],jsonSchema:{input:Mc(n,"input",e.processors),output:Mc(n,"output",e.processors)}},enumerable:!1,writable:!1}),p}catch{throw new Error("Error converting schema to JSON.")}}function fn(e,n){const a=n??{seen:new Set};if(a.seen.has(e))return!1;a.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return fn(i.element,a);if(i.type==="set")return fn(i.valueType,a);if(i.type==="lazy")return fn(i.getter(),a);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return fn(i.innerType,a);if(i.type==="intersection")return fn(i.left,a)||fn(i.right,a);if(i.type==="record"||i.type==="map")return fn(i.keyType,a)||fn(i.valueType,a);if(i.type==="pipe")return fn(i.in,a)||fn(i.out,a);if(i.type==="object"){for(const s in i.shape)if(fn(i.shape[s],a))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(fn(s,a))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(fn(s,a))return!0;return!!(i.rest&&fn(i.rest,a))}return!1}const fO=(e,n={})=>a=>{const i=NS({...a,processors:n});return Bt(e,i),_S(i,e),jS(i,e)},Mc=(e,n,a={})=>i=>{const{libraryOptions:s,target:u}=i??{},c=NS({...s??{},target:u,io:n,processors:a});return Bt(e,c),_S(c,e),jS(c,e)},dO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hO=(e,n,a,i)=>{const s=a;s.type="string";const{minimum:u,maximum:c,format:d,patterns:g,contentEncoding:p}=e._zod.bag;if(typeof u=="number"&&(s.minLength=u),typeof c=="number"&&(s.maxLength=c),d&&(s.format=dO[d]??d,s.format===""&&delete s.format,d==="time"&&delete s.format),p&&(s.contentEncoding=p),g&&g.size>0){const y=[...g];y.length===1?s.pattern=y[0].source:y.length>1&&(s.allOf=[...y.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},mO=(e,n,a,i)=>{const s=a,{minimum:u,maximum:c,format:d,multipleOf:g,exclusiveMaximum:p,exclusiveMinimum:y}=e._zod.bag;typeof d=="string"&&d.includes("int")?s.type="integer":s.type="number",typeof y=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(s.minimum=y,s.exclusiveMinimum=!0):s.exclusiveMinimum=y),typeof u=="number"&&(s.minimum=u,typeof y=="number"&&n.target!=="draft-04"&&(y>=u?delete s.minimum:delete s.exclusiveMinimum)),typeof p=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(s.maximum=p,s.exclusiveMaximum=!0):s.exclusiveMaximum=p),typeof c=="number"&&(s.maximum=c,typeof p=="number"&&n.target!=="draft-04"&&(p<=c?delete s.maximum:delete s.exclusiveMaximum)),typeof g=="number"&&(s.multipleOf=g)},pO=(e,n,a,i)=>{a.type="boolean"},gO=(e,n,a,i)=>{a.not={}},yO=(e,n,a,i)=>{},vO=(e,n,a,i)=>{const s=e._zod.def,u=iS(s.entries);u.every(c=>typeof c=="number")&&(a.type="number"),u.every(c=>typeof c=="string")&&(a.type="string"),a.enum=u},bO=(e,n,a,i)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},xO=(e,n,a,i)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},SO=(e,n,a,i)=>{const s=a,u=e._zod.def,{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(s.minItems=c),typeof d=="number"&&(s.maxItems=d),s.type="array",s.items=Bt(u.element,n,{...i,path:[...i.path,"items"]})},wO=(e,n,a,i)=>{var p;const s=a,u=e._zod.def;s.type="object",s.properties={};const c=u.shape;for(const y in c)s.properties[y]=Bt(c[y],n,{...i,path:[...i.path,"properties",y]});const d=new Set(Object.keys(c)),g=new Set([...d].filter(y=>{const v=u.shape[y]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));g.size>0&&(s.required=Array.from(g)),((p=u.catchall)==null?void 0:p._zod.def.type)==="never"?s.additionalProperties=!1:u.catchall?u.catchall&&(s.additionalProperties=Bt(u.catchall,n,{...i,path:[...i.path,"additionalProperties"]})):n.io==="output"&&(s.additionalProperties=!1)},EO=(e,n,a,i)=>{const s=e._zod.def,u=s.inclusive===!1,c=s.options.map((d,g)=>Bt(d,n,{...i,path:[...i.path,u?"oneOf":"anyOf",g]}));u?a.oneOf=c:a.anyOf=c},CO=(e,n,a,i)=>{const s=e._zod.def,u=Bt(s.left,n,{...i,path:[...i.path,"allOf",0]}),c=Bt(s.right,n,{...i,path:[...i.path,"allOf",1]}),d=p=>"allOf"in p&&Object.keys(p).length===1,g=[...d(u)?u.allOf:[u],...d(c)?c.allOf:[c]];a.allOf=g},NO=(e,n,a,i)=>{const s=a,u=e._zod.def;s.type="object";const c=u.keyType,d=c._zod.bag,g=d==null?void 0:d.patterns;if(u.mode==="loose"&&g&&g.size>0){const y=Bt(u.valueType,n,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const v of g)s.patternProperties[v.source]=y}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(s.propertyNames=Bt(u.keyType,n,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=Bt(u.valueType,n,{...i,path:[...i.path,"additionalProperties"]});const p=c._zod.values;if(p){const y=[...p].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(s.required=y)}},_O=(e,n,a,i)=>{const s=e._zod.def,u=Bt(s.innerType,n,i),c=n.seen.get(e);n.target==="openapi-3.0"?(c.ref=s.innerType,a.nullable=!0):a.anyOf=[u,{type:"null"}]},jO=(e,n,a,i)=>{const s=e._zod.def;Bt(s.innerType,n,i);const u=n.seen.get(e);u.ref=s.innerType},kO=(e,n,a,i)=>{const s=e._zod.def;Bt(s.innerType,n,i);const u=n.seen.get(e);u.ref=s.innerType,a.default=JSON.parse(JSON.stringify(s.defaultValue))},TO=(e,n,a,i)=>{const s=e._zod.def;Bt(s.innerType,n,i);const u=n.seen.get(e);u.ref=s.innerType,n.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},AO=(e,n,a,i)=>{const s=e._zod.def;Bt(s.innerType,n,i);const u=n.seen.get(e);u.ref=s.innerType;let c;try{c=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=c},zO=(e,n,a,i)=>{const s=e._zod.def,u=n.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;Bt(u,n,i);const c=n.seen.get(e);c.ref=u},OO=(e,n,a,i)=>{const s=e._zod.def;Bt(s.innerType,n,i);const u=n.seen.get(e);u.ref=s.innerType,a.readOnly=!0},kS=(e,n,a,i)=>{const s=e._zod.def;Bt(s.innerType,n,i);const u=n.seen.get(e);u.ref=s.innerType},RO=ee("ZodISODateTime",(e,n)=>{DA.init(e,n),Nt.init(e,n)});function MO(e){return qz(RO,e)}const DO=ee("ZodISODate",(e,n)=>{UA.init(e,n),Nt.init(e,n)});function UO(e){return Pz(DO,e)}const LO=ee("ZodISOTime",(e,n)=>{LA.init(e,n),Nt.init(e,n)});function IO(e){return Hz(LO,e)}const BO=ee("ZodISODuration",(e,n)=>{IA.init(e,n),Nt.init(e,n)});function qO(e){return Zz(BO,e)}const PO=(e,n)=>{uS.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:a=>kT(e,a)},flatten:{value:a=>jT(e,a)},addIssue:{value:a=>{e.issues.push(a),e.message=JSON.stringify(e.issues,pm,2)}},addIssues:{value:a=>{e.issues.push(...a),e.message=JSON.stringify(e.issues,pm,2)}},isEmpty:{get(){return e.issues.length===0}}})},ar=ee("ZodError",PO,{Parent:Error}),HO=np(ar),ZO=rp(ar),FO=Fc(ar),$O=$c(ar),VO=zT(ar),QO=OT(ar),YO=RT(ar),GO=MT(ar),KO=DT(ar),XO=UT(ar),JO=LT(ar),WO=IT(ar),At=ee("ZodType",(e,n)=>(Tt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Mc(e,"input"),output:Mc(e,"output")}}),e.toJSONSchema=fO(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...a)=>e.clone(ri(n,{checks:[...n.checks??[],...a.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(a,i)=>ai(e,a,i),e.brand=()=>e,e.register=((a,i)=>(a.add(e,i),e)),e.parse=(a,i)=>HO(e,a,i,{callee:e.parse}),e.safeParse=(a,i)=>FO(e,a,i),e.parseAsync=async(a,i)=>ZO(e,a,i,{callee:e.parseAsync}),e.safeParseAsync=async(a,i)=>$O(e,a,i),e.spa=e.safeParseAsync,e.encode=(a,i)=>VO(e,a,i),e.decode=(a,i)=>QO(e,a,i),e.encodeAsync=async(a,i)=>YO(e,a,i),e.decodeAsync=async(a,i)=>GO(e,a,i),e.safeEncode=(a,i)=>KO(e,a,i),e.safeDecode=(a,i)=>XO(e,a,i),e.safeEncodeAsync=async(a,i)=>JO(e,a,i),e.safeDecodeAsync=async(a,i)=>WO(e,a,i),e.refine=(a,i)=>e.check(VR(a,i)),e.superRefine=a=>e.check(QR(a)),e.overwrite=a=>e.check(os(a)),e.optional=()=>kx(e),e.exactOptional=()=>RR(e),e.nullable=()=>Tx(e),e.nullish=()=>kx(Tx(e)),e.nonoptional=a=>BR(e,a),e.array=()=>Io(e),e.or=a=>_R([e,a]),e.and=a=>kR(e,a),e.transform=a=>Ax(e,zR(a)),e.default=a=>UR(e,a),e.prefault=a=>IR(e,a),e.catch=a=>PR(e,a),e.pipe=a=>Ax(e,a),e.readonly=()=>FR(e),e.describe=a=>{const i=e.clone();return po.add(i,{description:a}),i},Object.defineProperty(e,"description",{get(){var a;return(a=po.get(e))==null?void 0:a.description},configurable:!0}),e.meta=(...a)=>{if(a.length===0)return po.get(e);const i=e.clone();return po.add(i,a[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=a=>a(e),e)),TS=ee("_ZodString",(e,n)=>{ap.init(e,n),At.init(e,n),e._zod.processJSONSchema=(i,s,u)=>hO(e,i,s);const a=e._zod.bag;e.format=a.format??null,e.minLength=a.minimum??null,e.maxLength=a.maximum??null,e.regex=(...i)=>e.check(Kz(...i)),e.includes=(...i)=>e.check(Wz(...i)),e.startsWith=(...i)=>e.check(eO(...i)),e.endsWith=(...i)=>e.check(tO(...i)),e.min=(...i)=>e.check(Rc(...i)),e.max=(...i)=>e.check(ES(...i)),e.length=(...i)=>e.check(CS(...i)),e.nonempty=(...i)=>e.check(Rc(1,...i)),e.lowercase=i=>e.check(Xz(i)),e.uppercase=i=>e.check(Jz(i)),e.trim=()=>e.check(rO()),e.normalize=(...i)=>e.check(nO(...i)),e.toLowerCase=()=>e.check(aO()),e.toUpperCase=()=>e.check(iO()),e.slugify=()=>e.check(lO())}),eR=ee("ZodString",(e,n)=>{ap.init(e,n),TS.init(e,n),e.email=a=>e.check(bz(tR,a)),e.url=a=>e.check(Cz(nR,a)),e.jwt=a=>e.check(Bz(yR,a)),e.emoji=a=>e.check(Nz(rR,a)),e.guid=a=>e.check(wx(_x,a)),e.uuid=a=>e.check(xz(fc,a)),e.uuidv4=a=>e.check(Sz(fc,a)),e.uuidv6=a=>e.check(wz(fc,a)),e.uuidv7=a=>e.check(Ez(fc,a)),e.nanoid=a=>e.check(_z(aR,a)),e.guid=a=>e.check(wx(_x,a)),e.cuid=a=>e.check(jz(iR,a)),e.cuid2=a=>e.check(kz(lR,a)),e.ulid=a=>e.check(Tz(sR,a)),e.base64=a=>e.check(Uz(mR,a)),e.base64url=a=>e.check(Lz(pR,a)),e.xid=a=>e.check(Az(oR,a)),e.ksuid=a=>e.check(zz(uR,a)),e.ipv4=a=>e.check(Oz(cR,a)),e.ipv6=a=>e.check(Rz(fR,a)),e.cidrv4=a=>e.check(Mz(dR,a)),e.cidrv6=a=>e.check(Dz(hR,a)),e.e164=a=>e.check(Iz(gR,a)),e.datetime=a=>e.check(MO(a)),e.date=a=>e.check(UO(a)),e.time=a=>e.check(IO(a)),e.duration=a=>e.check(qO(a))});function A(e){return vz(eR,e)}const Nt=ee("ZodStringFormat",(e,n)=>{wt.init(e,n),TS.init(e,n)}),tR=ee("ZodEmail",(e,n)=>{_A.init(e,n),Nt.init(e,n)}),_x=ee("ZodGUID",(e,n)=>{CA.init(e,n),Nt.init(e,n)}),fc=ee("ZodUUID",(e,n)=>{NA.init(e,n),Nt.init(e,n)}),nR=ee("ZodURL",(e,n)=>{jA.init(e,n),Nt.init(e,n)}),rR=ee("ZodEmoji",(e,n)=>{kA.init(e,n),Nt.init(e,n)}),aR=ee("ZodNanoID",(e,n)=>{TA.init(e,n),Nt.init(e,n)}),iR=ee("ZodCUID",(e,n)=>{AA.init(e,n),Nt.init(e,n)}),lR=ee("ZodCUID2",(e,n)=>{zA.init(e,n),Nt.init(e,n)}),sR=ee("ZodULID",(e,n)=>{OA.init(e,n),Nt.init(e,n)}),oR=ee("ZodXID",(e,n)=>{RA.init(e,n),Nt.init(e,n)}),uR=ee("ZodKSUID",(e,n)=>{MA.init(e,n),Nt.init(e,n)}),cR=ee("ZodIPv4",(e,n)=>{BA.init(e,n),Nt.init(e,n)}),fR=ee("ZodIPv6",(e,n)=>{qA.init(e,n),Nt.init(e,n)}),dR=ee("ZodCIDRv4",(e,n)=>{PA.init(e,n),Nt.init(e,n)}),hR=ee("ZodCIDRv6",(e,n)=>{HA.init(e,n),Nt.init(e,n)}),mR=ee("ZodBase64",(e,n)=>{ZA.init(e,n),Nt.init(e,n)}),pR=ee("ZodBase64URL",(e,n)=>{$A.init(e,n),Nt.init(e,n)}),gR=ee("ZodE164",(e,n)=>{VA.init(e,n),Nt.init(e,n)}),yR=ee("ZodJWT",(e,n)=>{YA.init(e,n),Nt.init(e,n)}),ip=ee("ZodNumber",(e,n)=>{bS.init(e,n),At.init(e,n),e._zod.processJSONSchema=(i,s,u)=>mO(e,i,s),e.gt=(i,s)=>e.check(Cx(i,s)),e.gte=(i,s)=>e.check(jh(i,s)),e.min=(i,s)=>e.check(jh(i,s)),e.lt=(i,s)=>e.check(Ex(i,s)),e.lte=(i,s)=>e.check(_h(i,s)),e.max=(i,s)=>e.check(_h(i,s)),e.int=i=>e.check(jx(i)),e.safe=i=>e.check(jx(i)),e.positive=i=>e.check(Cx(0,i)),e.nonnegative=i=>e.check(jh(0,i)),e.negative=i=>e.check(Ex(0,i)),e.nonpositive=i=>e.check(_h(0,i)),e.multipleOf=(i,s)=>e.check(Nx(i,s)),e.step=(i,s)=>e.check(Nx(i,s)),e.finite=()=>e;const a=e._zod.bag;e.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??.5),e.isFinite=!0,e.format=a.format??null});function ut(e){return Fz(ip,e)}const vR=ee("ZodNumberFormat",(e,n)=>{GA.init(e,n),ip.init(e,n)});function jx(e){return Vz(vR,e)}const bR=ee("ZodBoolean",(e,n)=>{KA.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>pO(e,a,i)});function us(e){return Qz(bR,e)}const xR=ee("ZodUnknown",(e,n)=>{XA.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>yO()});function St(){return Yz(xR)}const SR=ee("ZodNever",(e,n)=>{JA.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>gO(e,a,i)});function wR(e){return Gz(SR,e)}const ER=ee("ZodArray",(e,n)=>{WA.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>SO(e,a,i,s),e.element=n.element,e.min=(a,i)=>e.check(Rc(a,i)),e.nonempty=a=>e.check(Rc(1,a)),e.max=(a,i)=>e.check(ES(a,i)),e.length=(a,i)=>e.check(CS(a,i)),e.unwrap=()=>e.element});function Io(e,n){return sO(ER,e,n)}const CR=ee("ZodObject",(e,n)=>{tz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>wO(e,a,i,s),it(e,"shape",()=>n.shape),e.keyof=()=>dt(Object.keys(e._zod.def.shape)),e.catchall=a=>e.clone({...e._zod.def,catchall:a}),e.passthrough=()=>e.clone({...e._zod.def,catchall:St()}),e.loose=()=>e.clone({...e._zod.def,catchall:St()}),e.strict=()=>e.clone({...e._zod.def,catchall:wR()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=a=>wT(e,a),e.safeExtend=a=>ET(e,a),e.merge=a=>CT(e,a),e.pick=a=>xT(e,a),e.omit=a=>ST(e,a),e.partial=(...a)=>NT(AS,e,a[0]),e.required=(...a)=>_T(zS,e,a[0])});function ge(e,n){const a={type:"object",shape:e??{},...Ee(n)};return new CR(a)}const NR=ee("ZodUnion",(e,n)=>{nz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>EO(e,a,i,s),e.options=n.options});function _R(e,n){return new NR({type:"union",options:e,...Ee(n)})}const jR=ee("ZodIntersection",(e,n)=>{rz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>CO(e,a,i,s)});function kR(e,n){return new jR({type:"intersection",left:e,right:n})}const TR=ee("ZodRecord",(e,n)=>{az.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>NO(e,a,i,s),e.keyType=n.keyType,e.valueType=n.valueType});function Kt(e,n,a){return new TR({type:"record",keyType:e,valueType:n,...Ee(a)})}const ym=ee("ZodEnum",(e,n)=>{iz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(i,s,u)=>vO(e,i,s),e.enum=n.entries,e.options=Object.values(n.entries);const a=new Set(Object.keys(n.entries));e.extract=(i,s)=>{const u={};for(const c of i)if(a.has(c))u[c]=n.entries[c];else throw new Error(`Key ${c} not found in enum`);return new ym({...n,checks:[],...Ee(s),entries:u})},e.exclude=(i,s)=>{const u={...n.entries};for(const c of i)if(a.has(c))delete u[c];else throw new Error(`Key ${c} not found in enum`);return new ym({...n,checks:[],...Ee(s),entries:u})}});function dt(e,n){const a=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ym({type:"enum",entries:a,...Ee(n)})}const AR=ee("ZodTransform",(e,n)=>{lz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>xO(e,a),e._zod.parse=(a,i)=>{if(i.direction==="backward")throw new rS(e.constructor.name);a.addIssue=u=>{if(typeof u=="string")a.issues.push(Co(u,a.value,n));else{const c=u;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=a.value),c.inst??(c.inst=e),a.issues.push(Co(c))}};const s=n.transform(a.value,a);return s instanceof Promise?s.then(u=>(a.value=u,a)):(a.value=s,a)}});function zR(e){return new AR({type:"transform",transform:e})}const AS=ee("ZodOptional",(e,n)=>{wS.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>kS(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function kx(e){return new AS({type:"optional",innerType:e})}const OR=ee("ZodExactOptional",(e,n)=>{sz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>kS(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function RR(e){return new OR({type:"optional",innerType:e})}const MR=ee("ZodNullable",(e,n)=>{oz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>_O(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function Tx(e){return new MR({type:"nullable",innerType:e})}const DR=ee("ZodDefault",(e,n)=>{uz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>kO(e,a,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function UR(e,n){return new DR({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():sS(n)}})}const LR=ee("ZodPrefault",(e,n)=>{cz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>TO(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function IR(e,n){return new LR({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():sS(n)}})}const zS=ee("ZodNonOptional",(e,n)=>{fz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>jO(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function BR(e,n){return new zS({type:"nonoptional",innerType:e,...Ee(n)})}const qR=ee("ZodCatch",(e,n)=>{dz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>AO(e,a,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function PR(e,n){return new qR({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const HR=ee("ZodPipe",(e,n)=>{hz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>zO(e,a,i,s),e.in=n.in,e.out=n.out});function Ax(e,n){return new HR({type:"pipe",in:e,out:n})}const ZR=ee("ZodReadonly",(e,n)=>{mz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>OO(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function FR(e){return new ZR({type:"readonly",innerType:e})}const $R=ee("ZodCustom",(e,n)=>{pz.init(e,n),At.init(e,n),e._zod.processJSONSchema=(a,i,s)=>bO(e,a)});function VR(e,n={}){return oO($R,e,n)}function QR(e){return uO(e)}function Qc(e){return $z(ip,e)}const YR={FEISHU:"feishu",SLACK:"slack",KAEL:"kael"},OS=dt(["feishu","slack","kael"]),RS=dt(["active","inactive"]);ge({platform:OS,agentId:A().min(1),credentials:Kt(A(),St()),status:RS.default("active")});ge({agentId:A().min(1).optional(),credentials:Kt(A(),St()).optional(),status:RS.optional()});ge({id:ut(),platform:A(),agentId:A(),hasCredentials:us(),status:A(),createdAt:A(),updatedAt:A()});const GR=dt(["code","reverse_token","oauth","manual"]);ge({appId:A().min(1),appSecret:A().min(1)});ge({platform:OS,externalUserId:A().min(1),agentId:A().min(1),boundVia:GR.default("manual"),displayName:A().max(200).optional()});ge({id:ut(),platform:A(),externalUserId:A(),agentId:A(),boundVia:A().nullable(),displayName:A().nullable(),createdAt:A()});ge({feishuUserId:A().min(1),displayName:A().max(200).optional()});ge({configId:ut(),platform:A(),agentId:A(),appId:A(),connected:us(),lastActiveAt:A().nullable()});const MS=dt(["online","offline"]),DS=dt(["idle","working","blocked","error"]),KR=dt(["active","suspended","evicted"]);ge({chatId:A().min(1),state:KR});ge({runtimeState:DS});ge({token:A().min(1),runtimeType:A().max(50),runtimeVersion:A().max(50).optional()});ge({agentId:A(),status:MS,connectedAt:A().nullable(),lastSeenAt:A(),clientId:A().nullable().optional(),runtimeType:A().nullable().optional(),runtimeVersion:A().nullable().optional(),runtimeState:DS.nullable().optional(),activeSessions:ut().int().nullable().optional(),totalSessions:ut().int().nullable().optional(),runtimeUpdatedAt:A().nullable().optional()});ge({total:ut().int(),running:ut().int(),byState:ge({idle:ut().int(),working:ut().int(),blocked:ut().int(),error:ut().int()}),clients:ut().int()});const US={HUMAN:"human",PERSONAL_ASSISTANT:"personal_assistant",AUTONOMOUS_AGENT:"autonomous_agent"},Yc=dt(["human","personal_assistant","autonomous_agent"]),XR=dt(["admin-api","bootstrap","portal"]);dt(["active","suspended"]);ge({name:A().min(1).max(100).regex(/^[a-z0-9_-]+$/,"Only lowercase alphanumeric, hyphens, and underscores").optional(),type:Yc,displayName:A().max(200).optional(),delegateMention:A().max(100).optional(),profile:A().optional(),organizationId:A().max(100).optional(),source:XR.optional(),public:us().default(!1).optional(),metadata:Kt(A(),St()).optional(),managerId:A().optional()});ge({type:Yc.optional(),displayName:A().max(200).nullable().optional(),delegateMention:A().max(100).nullable().optional(),profile:A().nullable().optional(),metadata:Kt(A(),St()).optional()});ge({uuid:A(),name:A().nullable(),organizationId:A(),type:Yc,displayName:A().nullable(),delegateMention:A().nullable(),profile:A().nullable(),inboxId:A(),status:A(),source:A().nullable().optional(),cloudUserId:A().nullable().optional(),public:us().optional(),metadata:Kt(A(),St()),managerId:A().nullable(),presenceStatus:MS.optional(),createdAt:A(),updatedAt:A()});ge({name:A().max(100).optional(),type:Yc.optional(),displayName:A().max(200).optional(),delegateMention:A().max(100).optional(),profile:A().optional(),metadata:Kt(A(),St()).optional()});ge({exists:us(),status:dt(["active","suspended"]).nullable()});ge({repo:A().nullable(),branch:A().nullable()});ge({name:A().max(100).optional(),expiresAt:A().datetime().optional()});const JR=ge({id:A(),agentId:A(),name:A().nullable(),expiresAt:A().nullable(),revokedAt:A().nullable(),createdAt:A(),lastUsedAt:A().nullable()});JR.extend({token:A()});ge({username:A().min(1),password:A().min(1)});ge({accessToken:A(),refreshToken:A()});ge({refreshToken:A().min(1)});ge({token:A().min(1)});ge({token:A(),expiresIn:ut(),command:A()});const WR=dt(["direct","group","thread"]);ge({type:WR,topic:A().max(500).optional(),participantIds:Io(A()).min(1),metadata:Kt(A(),St()).optional()});const eM=ge({agentId:A(),role:A(),mode:A(),joinedAt:A()}),tM=ge({id:A(),organizationId:A(),type:A(),topic:A().nullable(),lifecyclePolicy:A().nullable().optional(),metadata:Kt(A(),St()),createdAt:A(),updatedAt:A()});tM.extend({participants:Io(eM)});ge({agentId:A().min(1),mode:dt(["full","mention_only"]).default("full")});ge({agentId:A().min(1)});const nM=dt(["connected","disconnected"]);ge({id:A(),status:nM,sdkVersion:A().max(50).nullable(),hostname:A().max(100).nullable(),os:A().max(50).nullable(),agentCount:ut().int().min(0),connectedAt:A().nullable(),lastSeenAt:A(),metadata:Kt(A(),St()).nullable()});ge({clientId:A().min(1).max(100),hostname:A().max(100).optional(),os:A().max(50).optional(),sdkVersion:A().max(50).optional()});ge({limit:Qc().int().min(1).max(100).default(20),cursor:A().optional()});const lp=dt(["hub_ui","cli","feishu","github","api"]),LS=dt(["text","markdown","card","reference","file","task"]);ge({format:LS.default("text"),content:St(),metadata:Kt(A(),St()).optional(),inReplyTo:A().optional(),replyToInbox:A().optional(),replyToChat:A().optional(),source:lp.optional()});ge({format:LS.default("text"),content:St(),metadata:Kt(A(),St()).optional(),replyToInbox:A().optional(),replyToChat:A().optional(),source:lp.optional()});const rM=ge({id:A(),chatId:A(),senderId:A(),format:A(),content:St(),metadata:Kt(A(),St()),replyToInbox:A().nullable(),replyToChat:A().nullable(),inReplyTo:A().nullable(),source:lp.nullable(),createdAt:A()});dt(["pending","delivered","acked","failed"]);const aM=ge({id:ut(),inboxId:A(),messageId:A(),chatId:A().nullable(),status:A(),retryCount:ut(),createdAt:A(),deliveredAt:A().nullable(),ackedAt:A().nullable()});aM.extend({message:rM});ge({limit:Qc().int().min(1).max(50).default(10)});const iM={ADMIN:"admin",MEMBER:"member"},sp=dt(["admin","member"]),lM=ge({id:A(),userId:A(),organizationId:A(),agentId:A(),role:sp,createdAt:A()});ge({username:A().min(1).max(100),displayName:A().min(1).max(200),role:sp.default("member")});ge({role:sp.optional()});lM.extend({username:A(),displayName:A(),password:A()});const sM=dt(["agent_error","session_error","agent_needs_decision","agent_blocked","agent_stale","agent_disconnected","agent_connected","session_completed"]),IS=dt(["high","medium","low"]);ge({id:A(),organizationId:A(),type:sM,severity:IS,agentId:A().nullable(),chatId:A().nullable(),message:A(),read:us(),createdAt:A()});ge({limit:Qc().int().min(1).max(100).default(20),cursor:A().optional(),severity:IS.optional(),read:dt(["true","false"]).transform(e=>e==="true").optional(),agentId:A().optional()});const BS=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;ge({name:A().min(2).max(50).regex(/^[a-z0-9][a-z0-9-]*$/,"Must start with a letter or digit and contain only lowercase alphanumeric and hyphens").refine(e=>!BS.test(e),"Name must not be a UUID format"),displayName:A().min(1).max(200),maxAgents:ut().int().min(0).default(0),maxMessagesPerMinute:ut().int().min(0).default(0),features:Kt(A(),St()).default({})});ge({name:A().min(2).max(50).regex(/^[a-z0-9][a-z0-9-]*$/,"Must start with a letter or digit and contain only lowercase alphanumeric and hyphens").refine(e=>!BS.test(e),"Name must not be a UUID format").optional(),displayName:A().min(1).max(200).optional(),maxAgents:ut().int().min(0).optional(),maxMessagesPerMinute:ut().int().min(0).optional(),features:Kt(A(),St()).optional()});ge({id:A(),name:A(),displayName:A(),maxAgents:ut(),maxMessagesPerMinute:ut(),features:Kt(A(),St()),createdAt:A(),updatedAt:A()});ge({id:A(),agentId:A(),chatId:A(),content:A(),updatedAt:A()});ge({agentId:A(),chatId:A(),content:A().max(5e4)});const oM=ge({organizationId:A(),agentCount:ut(),chatCount:ut(),messageCount:ut()});ge({totalAgents:ut(),totalChats:ut(),totalMessages:ut(),byOrganization:Io(oM)});ge({key:A(),value:St(),updatedAt:A()});Kt(A(),St());const ra={INBOX_TIMEOUT_SECONDS:"inbox_timeout_seconds",MAX_RETRY_COUNT:"max_retry_count",POLLING_INTERVAL_SECONDS:"polling_interval_seconds",PRESENCE_CLEANUP_SECONDS:"presence_cleanup_seconds"},kh={[ra.INBOX_TIMEOUT_SECONDS]:300,[ra.MAX_RETRY_COUNT]:3,[ra.POLLING_INTERVAL_SECONDS]:5,[ra.PRESENCE_CLEANUP_SECONDS]:60},No=dt(["pending","assigned","working","completed","failed","cancelled"]),zx=dt(["agent","admin"]),uM=dt(["assigned","status_changed","cancelled"]);ge({taskId:A(),event:uM,title:A(),body:A().default(""),status:No,fromStatus:No.optional(),originRef:A().nullable().optional()});const cM=ge({title:A().min(1).max(500),body:A().optional(),assigneeAgentId:A().optional(),originRef:A().max(500).optional(),metadata:Kt(A(),St()).optional()});cM.extend({organizationId:A().optional()});ge({status:dt(["working","completed","failed"]),result:A().optional()});ge({assigneeAgentId:A().nullable().optional(),status:No.optional(),result:A().optional()});ge({chatId:A().min(1)});const fM=ge({id:A(),organizationId:A(),title:A(),body:A(),status:No,assigneeAgentId:A().nullable(),createdByType:zx,createdById:A(),originRef:A().nullable(),result:A().nullable(),metadata:Kt(A(),St()),createdAt:A(),updatedAt:A(),cancelledAt:A().nullable(),cancelledByType:zx.nullable(),cancelledById:A().nullable()}),dM=ge({taskId:A(),chatId:A(),linkedByAgentId:A().nullable(),linkedAt:A()});fM.extend({chats:Io(dM)});ge({status:No.optional(),assigneeAgentId:A().optional(),originRef:A().optional(),limit:Qc().int().min(1).max(100).default(20),cursor:A().optional()});const hM=dt(["normal","idle_island","awaiting_reply","no_chat","not_applicable"]);ge({taskId:A(),signal:hM,reason:A()});const mM=dt(["active","suspended"]);ge({id:A(),username:A(),displayName:A(),avatarUrl:A().nullable(),status:mM,createdAt:A(),updatedAt:A()});ge({username:A().min(1).max(100),displayName:A().min(1).max(200),password:A().min(8).max(200)});ge({displayName:A().min(1).max(200).optional(),password:A().min(8).max(200).optional()});function qS(){return Ue.get("/members")}function pM(e){return Ue.post("/members",e)}function gM(e){return Ue.delete(`/members/${encodeURIComponent(e)}`)}function Ja(e,n,{checkForDefaultPrevented:a=!0}={}){return function(s){if(e==null||e(s),a===!1||!s.defaultPrevented)return n==null?void 0:n(s)}}function yM(e,n){const a=w.createContext(n),i=u=>{const{children:c,...d}=u,g=w.useMemo(()=>d,Object.values(d));return h.jsx(a.Provider,{value:g,children:c})};i.displayName=e+"Provider";function s(u){const c=w.useContext(a);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${u}\` must be used within \`${e}\``)}return[i,s]}function vM(e,n=[]){let a=[];function i(u,c){const d=w.createContext(c),g=a.length;a=[...a,c];const p=v=>{var k;const{scope:x,children:S,...j}=v,C=((k=x==null?void 0:x[e])==null?void 0:k[g])||d,T=w.useMemo(()=>j,Object.values(j));return h.jsx(C.Provider,{value:T,children:S})};p.displayName=u+"Provider";function y(v,x){var C;const S=((C=x==null?void 0:x[e])==null?void 0:C[g])||d,j=w.useContext(S);if(j)return j;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[p,y]}const s=()=>{const u=a.map(c=>w.createContext(c));return function(d){const g=(d==null?void 0:d[e])||u;return w.useMemo(()=>({[`__scope${e}`]:{...d,[e]:g}}),[d,g])}};return s.scopeName=e,[i,bM(s,...n)]}function bM(...e){const n=e[0];if(e.length===1)return n;const a=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=i.reduce((d,{useScope:g,scopeName:p})=>{const v=g(u)[`__scope${p}`];return{...d,...v}},{});return w.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return a.scopeName=n.scopeName,a}var _o=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},xM=Rm[" useId ".trim().toString()]||(()=>{}),SM=0;function Th(e){const[n,a]=w.useState(xM());return _o(()=>{a(i=>i??String(SM++))},[e]),e||(n?`radix-${n}`:"")}var wM=Rm[" useInsertionEffect ".trim().toString()]||_o;function EM({prop:e,defaultProp:n,onChange:a=()=>{},caller:i}){const[s,u,c]=CM({defaultProp:n,onChange:a}),d=e!==void 0,g=d?e:s;{const y=w.useRef(e!==void 0);w.useEffect(()=>{const v=y.current;v!==d&&console.warn(`${i} 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.`),y.current=d},[d,i])}const p=w.useCallback(y=>{var v;if(d){const x=NM(y)?y(e):y;x!==e&&((v=c.current)==null||v.call(c,x))}else u(y)},[d,e,u,c]);return[g,p]}function CM({defaultProp:e,onChange:n}){const[a,i]=w.useState(e),s=w.useRef(a),u=w.useRef(n);return wM(()=>{u.current=n},[n]),w.useEffect(()=>{var c;s.current!==a&&((c=u.current)==null||c.call(u,a),s.current=a)},[a,s]),[a,i,u]}function NM(e){return typeof e=="function"}var PS=F0();const _M=Ic(PS);function HS(e){const n=jM(e),a=w.forwardRef((i,s)=>{const{children:u,...c}=i,d=w.Children.toArray(u),g=d.find(TM);if(g){const p=g.props.children,y=d.map(v=>v===g?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return h.jsx(n,{...c,ref:s,children:w.isValidElement(p)?w.cloneElement(p,void 0,y):null})}return h.jsx(n,{...c,ref:s,children:u})});return a.displayName=`${e}.Slot`,a}function jM(e){const n=w.forwardRef((a,i)=>{const{children:s,...u}=a;if(w.isValidElement(s)){const c=zM(s),d=AM(u,s.props);return s.type!==w.Fragment&&(d.ref=i?Xm(i,c):c),w.cloneElement(s,d)}return w.Children.count(s)>1?w.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var kM=Symbol("radix.slottable");function TM(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kM}function AM(e,n){const a={...n};for(const i in n){const s=e[i],u=n[i];/^on[A-Z]/.test(i)?s&&u?a[i]=(...d)=>{const g=u(...d);return s(...d),g}:s&&(a[i]=s):i==="style"?a[i]={...s,...u}:i==="className"&&(a[i]=[s,u].filter(Boolean).join(" "))}return{...e,...a}}function zM(e){var i,s;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var OM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],la=OM.reduce((e,n)=>{const a=HS(`Primitive.${n}`),i=w.forwardRef((s,u)=>{const{asChild:c,...d}=s,g=c?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(g,{...d,ref:u})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function RM(e,n){e&&PS.flushSync(()=>e.dispatchEvent(n))}function jo(e){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useMemo(()=>(...a)=>{var i;return(i=n.current)==null?void 0:i.call(n,...a)},[])}function MM(e,n=globalThis==null?void 0:globalThis.document){const a=jo(e);w.useEffect(()=>{const i=s=>{s.key==="Escape"&&a(s)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[a,n])}var DM="DismissableLayer",vm="dismissableLayer.update",UM="dismissableLayer.pointerDownOutside",LM="dismissableLayer.focusOutside",Ox,ZS=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),FS=w.forwardRef((e,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...g}=e,p=w.useContext(ZS),[y,v]=w.useState(null),x=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=w.useState({}),j=Zi(n,B=>v(B)),C=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=C.indexOf(T),P=y?C.indexOf(y):-1,U=p.layersWithOutsidePointerEventsDisabled.size>0,H=P>=k,Y=qM(B=>{const D=B.target,G=[...p.branches].some(ie=>ie.contains(D));!H||G||(s==null||s(B),c==null||c(B),B.defaultPrevented||d==null||d())},x),L=PM(B=>{const D=B.target;[...p.branches].some(ie=>ie.contains(D))||(u==null||u(B),c==null||c(B),B.defaultPrevented||d==null||d())},x);return MM(B=>{P===p.layers.size-1&&(i==null||i(B),!B.defaultPrevented&&d&&(B.preventDefault(),d()))},x),w.useEffect(()=>{if(y)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ox=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),Rx(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Ox)}},[y,x,a,p]),w.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),Rx())},[y,p]),w.useEffect(()=>{const B=()=>S({});return document.addEventListener(vm,B),()=>document.removeEventListener(vm,B)},[]),h.jsx(la.div,{...g,ref:j,style:{pointerEvents:U?H?"auto":"none":void 0,...e.style},onFocusCapture:Ja(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Ja(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Ja(e.onPointerDownCapture,Y.onPointerDownCapture)})});FS.displayName=DM;var IM="DismissableLayerBranch",BM=w.forwardRef((e,n)=>{const a=w.useContext(ZS),i=w.useRef(null),s=Zi(n,i);return w.useEffect(()=>{const u=i.current;if(u)return a.branches.add(u),()=>{a.branches.delete(u)}},[a.branches]),h.jsx(la.div,{...e,ref:s})});BM.displayName=IM;function qM(e,n=globalThis==null?void 0:globalThis.document){const a=jo(e),i=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const u=d=>{if(d.target&&!i.current){let g=function(){$S(UM,a,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",s.current),s.current=g,n.addEventListener("click",s.current,{once:!0})):g()}else n.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",u),n.removeEventListener("click",s.current)}},[n,a]),{onPointerDownCapture:()=>i.current=!0}}function PM(e,n=globalThis==null?void 0:globalThis.document){const a=jo(e),i=w.useRef(!1);return w.useEffect(()=>{const s=u=>{u.target&&!i.current&&$S(LM,a,{originalEvent:u},{discrete:!1})};return n.addEventListener("focusin",s),()=>n.removeEventListener("focusin",s)},[n,a]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Rx(){const e=new CustomEvent(vm);document.dispatchEvent(e)}function $S(e,n,a,{discrete:i}){const s=a.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});n&&s.addEventListener(e,n,{once:!0}),i?RM(s,u):s.dispatchEvent(u)}var Ah="focusScope.autoFocusOnMount",zh="focusScope.autoFocusOnUnmount",Mx={bubbles:!1,cancelable:!0},HM="FocusScope",VS=w.forwardRef((e,n)=>{const{loop:a=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...c}=e,[d,g]=w.useState(null),p=jo(s),y=jo(u),v=w.useRef(null),x=Zi(n,C=>g(C)),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let C=function(U){if(S.paused||!d)return;const H=U.target;d.contains(H)?v.current=H:qa(v.current,{select:!0})},T=function(U){if(S.paused||!d)return;const H=U.relatedTarget;H!==null&&(d.contains(H)||qa(v.current,{select:!0}))},k=function(U){if(document.activeElement===document.body)for(const Y of U)Y.removedNodes.length>0&&qa(d)};document.addEventListener("focusin",C),document.addEventListener("focusout",T);const P=new MutationObserver(k);return d&&P.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",T),P.disconnect()}}},[i,d,S.paused]),w.useEffect(()=>{if(d){Ux.add(S);const C=document.activeElement;if(!d.contains(C)){const k=new CustomEvent(Ah,Mx);d.addEventListener(Ah,p),d.dispatchEvent(k),k.defaultPrevented||(ZM(YM(QS(d)),{select:!0}),document.activeElement===C&&qa(d))}return()=>{d.removeEventListener(Ah,p),setTimeout(()=>{const k=new CustomEvent(zh,Mx);d.addEventListener(zh,y),d.dispatchEvent(k),k.defaultPrevented||qa(C??document.body,{select:!0}),d.removeEventListener(zh,y),Ux.remove(S)},0)}}},[d,p,y,S]);const j=w.useCallback(C=>{if(!a&&!i||S.paused)return;const T=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,k=document.activeElement;if(T&&k){const P=C.currentTarget,[U,H]=FM(P);U&&H?!C.shiftKey&&k===H?(C.preventDefault(),a&&qa(U,{select:!0})):C.shiftKey&&k===U&&(C.preventDefault(),a&&qa(H,{select:!0})):k===P&&C.preventDefault()}},[a,i,S.paused]);return h.jsx(la.div,{tabIndex:-1,...c,ref:x,onKeyDown:j})});VS.displayName=HM;function ZM(e,{select:n=!1}={}){const a=document.activeElement;for(const i of e)if(qa(i,{select:n}),document.activeElement!==a)return}function FM(e){const n=QS(e),a=Dx(n,e),i=Dx(n.reverse(),e);return[a,i]}function QS(e){const n=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function Dx(e,n){for(const a of e)if(!$M(a,{upTo:n}))return a}function $M(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 VM(e){return e instanceof HTMLInputElement&&"select"in e}function qa(e,{select:n=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&VM(e)&&n&&e.select()}}var Ux=QM();function QM(){let e=[];return{add(n){const a=e[0];n!==a&&(a==null||a.pause()),e=Lx(e,n),e.unshift(n)},remove(n){var a;e=Lx(e,n),(a=e[0])==null||a.resume()}}}function Lx(e,n){const a=[...e],i=a.indexOf(n);return i!==-1&&a.splice(i,1),a}function YM(e){return e.filter(n=>n.tagName!=="A")}var GM="Portal",YS=w.forwardRef((e,n)=>{var d;const{container:a,...i}=e,[s,u]=w.useState(!1);_o(()=>u(!0),[]);const c=a||s&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?_M.createPortal(h.jsx(la.div,{...i,ref:n}),c):null});YS.displayName=GM;function KM(e,n){return w.useReducer((a,i)=>n[a][i]??a,e)}var Gc=e=>{const{present:n,children:a}=e,i=XM(n),s=typeof a=="function"?a({present:i.isPresent}):w.Children.only(a),u=Zi(i.ref,JM(s));return typeof a=="function"||i.isPresent?w.cloneElement(s,{ref:u}):null};Gc.displayName="Presence";function XM(e){const[n,a]=w.useState(),i=w.useRef(null),s=w.useRef(e),u=w.useRef("none"),c=e?"mounted":"unmounted",[d,g]=KM(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=dc(i.current);u.current=d==="mounted"?p:"none"},[d]),_o(()=>{const p=i.current,y=s.current;if(y!==e){const x=u.current,S=dc(p);e?g("MOUNT"):S==="none"||(p==null?void 0:p.display)==="none"?g("UNMOUNT"):g(y&&x!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,g]),_o(()=>{if(n){let p;const y=n.ownerDocument.defaultView??window,v=S=>{const C=dc(i.current).includes(CSS.escape(S.animationName));if(S.target===n&&C&&(g("ANIMATION_END"),!s.current)){const T=n.style.animationFillMode;n.style.animationFillMode="forwards",p=y.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=T)})}},x=S=>{S.target===n&&(u.current=dc(i.current))};return n.addEventListener("animationstart",x),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{y.clearTimeout(p),n.removeEventListener("animationstart",x),n.removeEventListener("animationcancel",v),n.removeEventListener("animationend",v)}}else g("ANIMATION_END")},[n,g]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:w.useCallback(p=>{i.current=p?getComputedStyle(p):null,a(p)},[])}}function dc(e){return(e==null?void 0:e.animationName)||"none"}function JM(e){var i,s;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Oh=0;function WM(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ix()),document.body.insertAdjacentElement("beforeend",e[1]??Ix()),Oh++,()=>{Oh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Oh--}},[])}function Ix(){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 _r=function(){return _r=Object.assign||function(n){for(var a,i=1,s=arguments.length;i<s;i++){a=arguments[i];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(n[u]=a[u])}return n},_r.apply(this,arguments)};function GS(e,n){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)n.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]]);return a}function e4(e,n,a){if(a||arguments.length===2)for(var i=0,s=n.length,u;i<s;i++)(u||!(i in n))&&(u||(u=Array.prototype.slice.call(n,0,i)),u[i]=n[i]);return e.concat(u||Array.prototype.slice.call(n))}var Ec="right-scroll-bar-position",Cc="width-before-scroll-bar",t4="with-scroll-bars-hidden",n4="--removed-body-scroll-bar-size";function Rh(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function r4(e,n){var a=w.useState(function(){return{value:e,callback:n,facade:{get current(){return a.value},set current(i){var s=a.value;s!==i&&(a.value=i,a.callback(i,s))}}}})[0];return a.callback=n,a.facade}var a4=typeof window<"u"?w.useLayoutEffect:w.useEffect,Bx=new WeakMap;function i4(e,n){var a=r4(null,function(i){return e.forEach(function(s){return Rh(s,i)})});return a4(function(){var i=Bx.get(a);if(i){var s=new Set(i),u=new Set(e),c=a.current;s.forEach(function(d){u.has(d)||Rh(d,null)}),u.forEach(function(d){s.has(d)||Rh(d,c)})}Bx.set(a,e)},[e]),a}function l4(e){return e}function s4(e,n){n===void 0&&(n=l4);var a=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(u){var c=n(u,i);return a.push(c),function(){a=a.filter(function(d){return d!==c})}},assignSyncMedium:function(u){for(i=!0;a.length;){var c=a;a=[],c.forEach(u)}a={push:function(d){return u(d)},filter:function(){return a}}},assignMedium:function(u){i=!0;var c=[];if(a.length){var d=a;a=[],d.forEach(u),c=a}var g=function(){var y=c;c=[],y.forEach(u)},p=function(){return Promise.resolve().then(g)};p(),a={push:function(y){c.push(y),p()},filter:function(y){return c=c.filter(y),a}}}};return s}function o4(e){e===void 0&&(e={});var n=s4(null);return n.options=_r({async:!0,ssr:!1},e),n}var KS=function(e){var n=e.sideCar,a=GS(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,_r({},a))};KS.isSideCarExport=!0;function u4(e,n){return e.useMedium(n),KS}var XS=o4(),Mh=function(){},Kc=w.forwardRef(function(e,n){var a=w.useRef(null),i=w.useState({onScrollCapture:Mh,onWheelCapture:Mh,onTouchMoveCapture:Mh}),s=i[0],u=i[1],c=e.forwardProps,d=e.children,g=e.className,p=e.removeScrollBar,y=e.enabled,v=e.shards,x=e.sideCar,S=e.noRelative,j=e.noIsolation,C=e.inert,T=e.allowPinchZoom,k=e.as,P=k===void 0?"div":k,U=e.gapMode,H=GS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Y=x,L=i4([a,n]),B=_r(_r({},H),s);return w.createElement(w.Fragment,null,y&&w.createElement(Y,{sideCar:XS,removeScrollBar:p,shards:v,noRelative:S,noIsolation:j,inert:C,setCallbacks:u,allowPinchZoom:!!T,lockRef:a,gapMode:U}),c?w.cloneElement(w.Children.only(d),_r(_r({},B),{ref:L})):w.createElement(P,_r({},B,{className:g,ref:L}),d))});Kc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kc.classNames={fullWidth:Cc,zeroRight:Ec};var c4=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function f4(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=c4();return n&&e.setAttribute("nonce",n),e}function d4(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function h4(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var m4=function(){var e=0,n=null;return{add:function(a){e==0&&(n=f4())&&(d4(n,a),h4(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},p4=function(){var e=m4();return function(n,a){w.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&a])}},JS=function(){var e=p4(),n=function(a){var i=a.styles,s=a.dynamic;return e(i,s),null};return n},g4={left:0,top:0,right:0,gap:0},Dh=function(e){return parseInt(e||"",10)||0},y4=function(e){var n=window.getComputedStyle(document.body),a=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],s=n[e==="padding"?"paddingRight":"marginRight"];return[Dh(a),Dh(i),Dh(s)]},v4=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return g4;var n=y4(e),a=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-a+n[2]-n[0])}},b4=JS(),ql="data-scroll-locked",x4=function(e,n,a,i){var s=e.left,u=e.top,c=e.right,d=e.gap;return a===void 0&&(a="margin"),`
|
|
254
|
+
.`.concat(t4,` {
|
|
255
|
+
overflow: hidden `).concat(i,`;
|
|
256
|
+
padding-right: `).concat(d,"px ").concat(i,`;
|
|
257
|
+
}
|
|
258
|
+
body[`).concat(ql,`] {
|
|
259
|
+
overflow: hidden `).concat(i,`;
|
|
260
|
+
overscroll-behavior: contain;
|
|
261
|
+
`).concat([n&&"position: relative ".concat(i,";"),a==="margin"&&`
|
|
262
|
+
padding-left: `.concat(s,`px;
|
|
263
|
+
padding-top: `).concat(u,`px;
|
|
264
|
+
padding-right: `).concat(c,`px;
|
|
265
|
+
margin-left:0;
|
|
266
|
+
margin-top:0;
|
|
267
|
+
margin-right: `).concat(d,"px ").concat(i,`;
|
|
268
|
+
`),a==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.`).concat(Ec,` {
|
|
272
|
+
right: `).concat(d,"px ").concat(i,`;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.`).concat(Cc,` {
|
|
276
|
+
margin-right: `).concat(d,"px ").concat(i,`;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.`).concat(Ec," .").concat(Ec,` {
|
|
280
|
+
right: 0 `).concat(i,`;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.`).concat(Cc," .").concat(Cc,` {
|
|
284
|
+
margin-right: 0 `).concat(i,`;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
body[`).concat(ql,`] {
|
|
288
|
+
`).concat(n4,": ").concat(d,`px;
|
|
289
|
+
}
|
|
290
|
+
`)},qx=function(){var e=parseInt(document.body.getAttribute(ql)||"0",10);return isFinite(e)?e:0},S4=function(){w.useEffect(function(){return document.body.setAttribute(ql,(qx()+1).toString()),function(){var e=qx()-1;e<=0?document.body.removeAttribute(ql):document.body.setAttribute(ql,e.toString())}},[])},w4=function(e){var n=e.noRelative,a=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;S4();var u=w.useMemo(function(){return v4(s)},[s]);return w.createElement(b4,{styles:x4(u,!n,s,a?"":"!important")})},bm=!1;if(typeof window<"u")try{var hc=Object.defineProperty({},"passive",{get:function(){return bm=!0,!0}});window.addEventListener("test",hc,hc),window.removeEventListener("test",hc,hc)}catch{bm=!1}var Ol=bm?{passive:!1}:!1,E4=function(e){return e.tagName==="TEXTAREA"},WS=function(e,n){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!E4(e)&&a[n]==="visible")},C4=function(e){return WS(e,"overflowY")},N4=function(e){return WS(e,"overflowX")},Px=function(e,n){var a=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=ew(e,i);if(s){var u=tw(e,i),c=u[1],d=u[2];if(c>d)return!0}i=i.parentNode}while(i&&i!==a.body);return!1},_4=function(e){var n=e.scrollTop,a=e.scrollHeight,i=e.clientHeight;return[n,a,i]},j4=function(e){var n=e.scrollLeft,a=e.scrollWidth,i=e.clientWidth;return[n,a,i]},ew=function(e,n){return e==="v"?C4(n):N4(n)},tw=function(e,n){return e==="v"?_4(n):j4(n)},k4=function(e,n){return e==="h"&&n==="rtl"?-1:1},T4=function(e,n,a,i,s){var u=k4(e,window.getComputedStyle(n).direction),c=u*i,d=a.target,g=n.contains(d),p=!1,y=c>0,v=0,x=0;do{if(!d)break;var S=tw(e,d),j=S[0],C=S[1],T=S[2],k=C-T-u*j;(j||k)&&ew(e,d)&&(v+=k,x+=j);var P=d.parentNode;d=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!g&&d!==document.body||g&&(n.contains(d)||n===d));return(y&&Math.abs(v)<1||!y&&Math.abs(x)<1)&&(p=!0),p},mc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hx=function(e){return[e.deltaX,e.deltaY]},Zx=function(e){return e&&"current"in e?e.current:e},A4=function(e,n){return e[0]===n[0]&&e[1]===n[1]},z4=function(e){return`
|
|
291
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
292
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
293
|
+
`)},O4=0,Rl=[];function R4(e){var n=w.useRef([]),a=w.useRef([0,0]),i=w.useRef(),s=w.useState(O4++)[0],u=w.useState(JS)[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(s));var C=e4([e.lockRef.current],(e.shards||[]).map(Zx),!0).filter(Boolean);return C.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var d=w.useCallback(function(C,T){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!c.current.allowPinchZoom;var k=mc(C),P=a.current,U="deltaX"in C?C.deltaX:P[0]-k[0],H="deltaY"in C?C.deltaY:P[1]-k[1],Y,L=C.target,B=Math.abs(U)>Math.abs(H)?"h":"v";if("touches"in C&&B==="h"&&L.type==="range")return!1;var D=window.getSelection(),G=D&&D.anchorNode,ie=G?G===L||G.contains(L):!1;if(ie)return!1;var le=Px(B,L);if(!le)return!0;if(le?Y=B:(Y=B==="v"?"h":"v",le=Px(B,L)),!le)return!1;if(!i.current&&"changedTouches"in C&&(U||H)&&(i.current=Y),!Y)return!0;var se=i.current||Y;return T4(se,T,C,se==="h"?U:H)},[]),g=w.useCallback(function(C){var T=C;if(!(!Rl.length||Rl[Rl.length-1]!==u)){var k="deltaY"in T?Hx(T):mc(T),P=n.current.filter(function(Y){return Y.name===T.type&&(Y.target===T.target||T.target===Y.shadowParent)&&A4(Y.delta,k)})[0];if(P&&P.should){T.cancelable&&T.preventDefault();return}if(!P){var U=(c.current.shards||[]).map(Zx).filter(Boolean).filter(function(Y){return Y.contains(T.target)}),H=U.length>0?d(T,U[0]):!c.current.noIsolation;H&&T.cancelable&&T.preventDefault()}}},[]),p=w.useCallback(function(C,T,k,P){var U={name:C,delta:T,target:k,should:P,shadowParent:M4(k)};n.current.push(U),setTimeout(function(){n.current=n.current.filter(function(H){return H!==U})},1)},[]),y=w.useCallback(function(C){a.current=mc(C),i.current=void 0},[]),v=w.useCallback(function(C){p(C.type,Hx(C),C.target,d(C,e.lockRef.current))},[]),x=w.useCallback(function(C){p(C.type,mc(C),C.target,d(C,e.lockRef.current))},[]);w.useEffect(function(){return Rl.push(u),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",g,Ol),document.addEventListener("touchmove",g,Ol),document.addEventListener("touchstart",y,Ol),function(){Rl=Rl.filter(function(C){return C!==u}),document.removeEventListener("wheel",g,Ol),document.removeEventListener("touchmove",g,Ol),document.removeEventListener("touchstart",y,Ol)}},[]);var S=e.removeScrollBar,j=e.inert;return w.createElement(w.Fragment,null,j?w.createElement(u,{styles:z4(s)}):null,S?w.createElement(w4,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function M4(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const D4=u4(XS,R4);var nw=w.forwardRef(function(e,n){return w.createElement(Kc,_r({},e,{ref:n,sideCar:D4}))});nw.classNames=Kc.classNames;var U4=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Ml=new WeakMap,pc=new WeakMap,gc={},Uh=0,rw=function(e){return e&&(e.host||rw(e.parentNode))},L4=function(e,n){return n.map(function(a){if(e.contains(a))return a;var i=rw(a);return i&&e.contains(i)?i:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},I4=function(e,n,a,i){var s=L4(n,Array.isArray(e)?e:[e]);gc[a]||(gc[a]=new WeakMap);var u=gc[a],c=[],d=new Set,g=new Set(s),p=function(v){!v||d.has(v)||(d.add(v),p(v.parentNode))};s.forEach(p);var y=function(v){!v||g.has(v)||Array.prototype.forEach.call(v.children,function(x){if(d.has(x))y(x);else try{var S=x.getAttribute(i),j=S!==null&&S!=="false",C=(Ml.get(x)||0)+1,T=(u.get(x)||0)+1;Ml.set(x,C),u.set(x,T),c.push(x),C===1&&j&&pc.set(x,!0),T===1&&x.setAttribute(a,"true"),j||x.setAttribute(i,"true")}catch(k){console.error("aria-hidden: cannot operate on ",x,k)}})};return y(n),d.clear(),Uh++,function(){c.forEach(function(v){var x=Ml.get(v)-1,S=u.get(v)-1;Ml.set(v,x),u.set(v,S),x||(pc.has(v)||v.removeAttribute(i),pc.delete(v)),S||v.removeAttribute(a)}),Uh--,Uh||(Ml=new WeakMap,Ml=new WeakMap,pc=new WeakMap,gc={})}},B4=function(e,n,a){a===void 0&&(a="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=U4(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),I4(i,s,a,"aria-hidden")):function(){return null}},Xc="Dialog",[aw]=vM(Xc),[q4,hr]=aw(Xc),iw=e=>{const{__scopeDialog:n,children:a,open:i,defaultOpen:s,onOpenChange:u,modal:c=!0}=e,d=w.useRef(null),g=w.useRef(null),[p,y]=EM({prop:i,defaultProp:s??!1,onChange:u,caller:Xc});return h.jsx(q4,{scope:n,triggerRef:d,contentRef:g,contentId:Th(),titleId:Th(),descriptionId:Th(),open:p,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(v=>!v),[y]),modal:c,children:a})};iw.displayName=Xc;var lw="DialogTrigger",sw=w.forwardRef((e,n)=>{const{__scopeDialog:a,...i}=e,s=hr(lw,a),u=Zi(n,s.triggerRef);return h.jsx(la.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":cp(s.open),...i,ref:u,onClick:Ja(e.onClick,s.onOpenToggle)})});sw.displayName=lw;var op="DialogPortal",[P4,ow]=aw(op,{forceMount:void 0}),uw=e=>{const{__scopeDialog:n,forceMount:a,children:i,container:s}=e,u=hr(op,n);return h.jsx(P4,{scope:n,forceMount:a,children:w.Children.map(i,c=>h.jsx(Gc,{present:a||u.open,children:h.jsx(YS,{asChild:!0,container:s,children:c})}))})};uw.displayName=op;var Dc="DialogOverlay",cw=w.forwardRef((e,n)=>{const a=ow(Dc,e.__scopeDialog),{forceMount:i=a.forceMount,...s}=e,u=hr(Dc,e.__scopeDialog);return u.modal?h.jsx(Gc,{present:i||u.open,children:h.jsx(Z4,{...s,ref:n})}):null});cw.displayName=Dc;var H4=HS("DialogOverlay.RemoveScroll"),Z4=w.forwardRef((e,n)=>{const{__scopeDialog:a,...i}=e,s=hr(Dc,a);return h.jsx(nw,{as:H4,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(la.div,{"data-state":cp(s.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),Pi="DialogContent",fw=w.forwardRef((e,n)=>{const a=ow(Pi,e.__scopeDialog),{forceMount:i=a.forceMount,...s}=e,u=hr(Pi,e.__scopeDialog);return h.jsx(Gc,{present:i||u.open,children:u.modal?h.jsx(F4,{...s,ref:n}):h.jsx($4,{...s,ref:n})})});fw.displayName=Pi;var F4=w.forwardRef((e,n)=>{const a=hr(Pi,e.__scopeDialog),i=w.useRef(null),s=Zi(n,a.contentRef,i);return w.useEffect(()=>{const u=i.current;if(u)return B4(u)},[]),h.jsx(dw,{...e,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ja(e.onCloseAutoFocus,u=>{var c;u.preventDefault(),(c=a.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Ja(e.onPointerDownOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&u.preventDefault()}),onFocusOutside:Ja(e.onFocusOutside,u=>u.preventDefault())})}),$4=w.forwardRef((e,n)=>{const a=hr(Pi,e.__scopeDialog),i=w.useRef(!1),s=w.useRef(!1);return h.jsx(dw,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,u),u.defaultPrevented||(i.current||(d=a.triggerRef.current)==null||d.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var g,p;(g=e.onInteractOutside)==null||g.call(e,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=u.target;((p=a.triggerRef.current)==null?void 0:p.contains(c))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),dw=w.forwardRef((e,n)=>{const{__scopeDialog:a,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...c}=e,d=hr(Pi,a),g=w.useRef(null),p=Zi(n,g);return WM(),h.jsxs(h.Fragment,{children:[h.jsx(VS,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:h.jsx(FS,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":cp(d.open),...c,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(V4,{titleId:d.titleId}),h.jsx(Y4,{contentRef:g,descriptionId:d.descriptionId})]})]})}),up="DialogTitle",hw=w.forwardRef((e,n)=>{const{__scopeDialog:a,...i}=e,s=hr(up,a);return h.jsx(la.h2,{id:s.titleId,...i,ref:n})});hw.displayName=up;var mw="DialogDescription",pw=w.forwardRef((e,n)=>{const{__scopeDialog:a,...i}=e,s=hr(mw,a);return h.jsx(la.p,{id:s.descriptionId,...i,ref:n})});pw.displayName=mw;var gw="DialogClose",yw=w.forwardRef((e,n)=>{const{__scopeDialog:a,...i}=e,s=hr(gw,a);return h.jsx(la.button,{type:"button",...i,ref:n,onClick:Ja(e.onClick,()=>s.onOpenChange(!1))})});yw.displayName=gw;function cp(e){return e?"open":"closed"}var vw="DialogTitleWarning",[_L,bw]=yM(vw,{contentName:Pi,titleName:up,docsSlug:"dialog"}),V4=({titleId:e})=>{const n=bw(vw),a=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
294
|
+
|
|
295
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
296
|
+
|
|
297
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},Q4="DialogDescriptionWarning",Y4=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bw(Q4).contentName}}.`;return w.useEffect(()=>{var u;const s=(u=e.current)==null?void 0:u.getAttribute("aria-describedby");n&&s&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},G4=iw,K4=sw,X4=uw,J4=cw,W4=fw,eD=hw,tD=pw,nD=yw;const Pl=G4,rD=K4,aD=X4,xw=w.forwardRef(({className:e,...n},a)=>h.jsx(J4,{ref:a,className:Me("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}));xw.displayName="DialogOverlay";const Ii=w.forwardRef(({className:e,children:n,...a},i)=>h.jsxs(aD,{children:[h.jsx(xw,{}),h.jsxs(W4,{ref:i,className:Me("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),...a,children:[n,h.jsxs(nD,{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:[h.jsx(Zk,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ii.displayName="DialogContent";function Hl({className:e,...n}){return h.jsx("div",{className:Me("flex flex-col space-y-1.5 text-center sm:text-left",e),...n})}function Ka({className:e,...n}){return h.jsx("div",{className:Me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n})}const Bi=w.forwardRef(({className:e,...n},a)=>h.jsx(eD,{ref:a,className:Me("text-lg font-semibold leading-none tracking-tight",e),...n}));Bi.displayName="DialogTitle";const iD=w.forwardRef(({className:e,...n},a)=>h.jsx(tD,{ref:a,className:Me("text-sm text-muted-foreground",e),...n}));iD.displayName="DialogDescription";const Gt=w.forwardRef(({className:e,type:n,...a},i)=>h.jsx("input",{type:n,className:Me("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:i,...a}));Gt.displayName="Input";var lD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sD=lD.reduce((e,n)=>{const a=tS(`Primitive.${n}`),i=w.forwardRef((s,u)=>{const{asChild:c,...d}=s,g=c?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(g,{...d,ref:u})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),oD="Label",Sw=w.forwardRef((e,n)=>h.jsx(sD.label,{...e,ref:n,onMouseDown:a=>{var s;a.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));Sw.displayName=oD;var uD=Sw;const Et=w.forwardRef(({className:e,...n},a)=>h.jsx(uD,{ref:a,className:Me("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...n}));Et.displayName="Label";const cD=Object.values(iM);function fD(){const e=tr(),[n,a]=w.useState(!1),[i,s]=w.useState({username:"",displayName:"",role:"member"}),[u,c]=w.useState(null),{data:d,isLoading:g,error:p}=Ge({queryKey:["members"],queryFn:qS}),y=yt({mutationFn:()=>pM({username:i.username,displayName:i.displayName,role:i.role}),onSuccess:C=>{e.invalidateQueries({queryKey:["members"]}),c(C.password)}}),v=yt({mutationFn:gM,onSuccess:()=>e.invalidateQueries({queryKey:["members"]})});function x(){a(!1),s({username:"",displayName:"",role:"member"}),c(null)}function S(C){C.preventDefault(),y.mutate()}function j(C){window.confirm("Delete this member? Their human agent will also be deactivated.")&&v.mutate(C)}return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-6",children:[h.jsx("h1",{className:"text-2xl font-semibold",children:"Members"}),h.jsxs(Pl,{open:n,onOpenChange:C=>C?a(!0):x(),children:[h.jsx(rD,{asChild:!0,children:h.jsxs(qe,{children:[h.jsx(wo,{className:"h-4 w-4 mr-2"}),"Add Member"]})}),h.jsxs(Ii,{children:[h.jsx(Hl,{children:h.jsx(Bi,{children:u?"Member Created":"Create Member"})}),u?h.jsxs("div",{className:"space-y-4",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Member created. Share the password below — it will only be shown once."}),h.jsxs("div",{className:"flex items-center gap-2 rounded-md border p-3 bg-muted",children:[h.jsx("code",{className:"flex-1 text-sm font-mono",children:u}),h.jsx(qe,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText(u),title:"Copy password",children:h.jsx(Hc,{className:"h-4 w-4"})})]}),h.jsx(Ka,{children:h.jsx(qe,{onClick:x,children:"Done"})})]}):h.jsxs("form",{onSubmit:S,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"member-username",children:"Username"}),h.jsx(Gt,{id:"member-username",type:"text",value:i.username,onChange:C=>s({...i,username:C.target.value}),required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"member-name",children:"Display Name"}),h.jsx(Gt,{id:"member-name",value:i.displayName,onChange:C=>s({...i,displayName:C.target.value}),required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"member-role",children:"Role"}),h.jsx("select",{id:"member-role",value:i.role,onChange:C=>s({...i,role:C.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:cD.map(C=>h.jsx("option",{value:C,children:C},C))})]}),y.error instanceof Error&&h.jsx("div",{className:"text-sm text-destructive",children:y.error.message}),h.jsx(Ka,{children:h.jsx(qe,{type:"submit",disabled:y.isPending,children:y.isPending?"Creating...":"Create"})})]})]})]})]}),h.jsx("div",{className:"border rounded-lg",children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Username"}),h.jsx(Se,{children:"Name"}),h.jsx(Se,{children:"Role"}),h.jsx(Se,{children:"Created"}),h.jsx(Se,{className:"w-16"})]})}),h.jsx(zr,{children:g?h.jsx(tt,{children:h.jsx(xe,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):p?h.jsx(tt,{children:h.jsxs(xe,{colSpan:5,className:"text-center py-8 text-destructive",children:["Failed to load members: ",p instanceof Error?p.message:"Unknown error"]})}):(d==null?void 0:d.length)===0?h.jsx(tt,{children:h.jsx(xe,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"No members"})}):d==null?void 0:d.map(C=>h.jsxs(tt,{children:[h.jsx(xe,{className:"font-medium",children:C.username}),h.jsx(xe,{children:C.displayName}),h.jsx(xe,{children:h.jsx(It,{variant:C.role==="admin"?"default":"secondary",children:C.role})}),h.jsx(xe,{className:"text-muted-foreground",children:ln(C.createdAt)}),h.jsx(xe,{children:h.jsx(qe,{variant:"ghost",size:"icon",onClick:()=>j(C.id),disabled:v.isPending,title:"Delete",children:h.jsx(mo,{className:"h-4 w-4"})})})]},C.id))})]})})]})}function dD(){return Ue.get("/admin/system/config")}function hD(e){return Ue.patch("/admin/system/config",e)}const mD={[ra.INBOX_TIMEOUT_SECONDS]:"Inbox Timeout (seconds)",[ra.MAX_RETRY_COUNT]:"Max Retry Count",[ra.POLLING_INTERVAL_SECONDS]:"Polling Interval (seconds)",[ra.PRESENCE_CLEANUP_SECONDS]:"Presence Cleanup (seconds)"},Fx=Object.values(ra);function pD(){const e=tr(),{data:n,isLoading:a}=Ge({queryKey:["system-config"],queryFn:dD}),[i,s]=w.useState({}),[u,c]=w.useState(!1);w.useEffect(()=>{if(!n)return;const p={};for(const y of Fx){const v=n[y]??kh[y]??"";p[y]=String(v)}s(p)},[n]);const d=yt({mutationFn:()=>{const p={};for(const[y,v]of Object.entries(i)){const x=v.trim();if(x==="")p[y]=kh[y]??0;else{const S=Number(x);p[y]=Number.isNaN(S)?x:S}}return hD(p)},onSuccess:()=>{e.invalidateQueries({queryKey:["system-config"]}),c(!0),setTimeout(()=>c(!1),2e3)}}),g=p=>{p.preventDefault(),d.mutate()};return a?h.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-semibold mb-6",children:"Settings"}),h.jsxs(cr,{children:[h.jsx(Cr,{children:h.jsx(Nr,{children:"System Configuration"})}),h.jsx(fr,{children:h.jsxs("form",{onSubmit:g,className:"space-y-4",children:[Fx.map(p=>h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:p,children:mD[p]??p}),h.jsx(Gt,{id:p,value:i[p]??"",onChange:y=>s({...i,[p]:y.target.value})}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:["Default: ",String(kh[p]??"—")]})]},p)),d.error instanceof Error&&h.jsx("div",{className:"text-sm text-destructive",children:d.error.message}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(qe,{type:"submit",disabled:d.isPending,children:d.isPending?"Saving...":"Save Changes"}),u&&h.jsx("span",{className:"text-sm text-green-600",children:"Saved!"})]})]})})]})]})}const $x=[{key:"members",label:"Members"},{key:"clients",label:"Clients"},{key:"settings",label:"Settings"},{key:"bindings",label:"Bindings"}];function gD(){const e=rr(),n=ti(),a=e.hash.replace("#",""),i=$x.some(u=>u.key===a)?a:"members",s=u=>{n({hash:u},{replace:!0})};return h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-semibold mb-4",children:"Admin"}),h.jsx("div",{className:"flex gap-1 border-b border-border mb-6",children:$x.map(u=>h.jsx("button",{type:"button",onClick:()=>s(u.key),className:Me("px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",i===u.key?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:u.label},u.key))}),i==="members"&&h.jsx(fD,{}),i==="clients"&&h.jsx(dT,{}),i==="settings"&&h.jsx(pD,{}),i==="bindings"&&h.jsx(W2,{})]})}function yD(e,n){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const vD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xD={};function Vx(e,n){return(xD.jsx?bD:vD).test(e)}const SD=/[ \t\n\f\r]/g;function wD(e){return typeof e=="object"?e.type==="text"?Qx(e.value):!1:Qx(e)}function Qx(e){return e.replace(SD,"")===""}class Bo{constructor(n,a,i){this.normal=a,this.property=n,i&&(this.space=i)}}Bo.prototype.normal={};Bo.prototype.property={};Bo.prototype.space=void 0;function ww(e,n){const a={},i={};for(const s of e)Object.assign(a,s.property),Object.assign(i,s.normal);return new Bo(a,i,n)}function xm(e){return e.toLowerCase()}class jn{constructor(n,a){this.attribute=a,this.property=n}}jn.prototype.attribute="";jn.prototype.booleanish=!1;jn.prototype.boolean=!1;jn.prototype.commaOrSpaceSeparated=!1;jn.prototype.commaSeparated=!1;jn.prototype.defined=!1;jn.prototype.mustUseProperty=!1;jn.prototype.number=!1;jn.prototype.overloadedBoolean=!1;jn.prototype.property="";jn.prototype.spaceSeparated=!1;jn.prototype.space=void 0;let ED=0;const Be=$i(),Lt=$i(),Sm=$i(),ae=$i(),ht=$i(),Zl=$i(),Un=$i();function $i(){return 2**++ED}const wm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:Lt,commaOrSpaceSeparated:Un,commaSeparated:Zl,number:ae,overloadedBoolean:Sm,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),Lh=Object.keys(wm);class fp extends jn{constructor(n,a,i,s){let u=-1;if(super(n,a),Yx(this,"space",s),typeof i=="number")for(;++u<Lh.length;){const c=Lh[u];Yx(this,Lh[u],(i&wm[c])===wm[c])}}}fp.prototype.defined=!0;function Yx(e,n,a){a&&(e[n]=a)}function cs(e){const n={},a={};for(const[i,s]of Object.entries(e.properties)){const u=new fp(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),n[i]=u,a[xm(i)]=i,a[xm(u.attribute)]=i}return new Bo(n,a,e.space)}const Ew=cs({properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:ht,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:ae,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:ht,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:Lt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Cw(e,n){return n in e?e[n]:n}function Nw(e,n){return Cw(e,n.toLowerCase())}const CD=cs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zl,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:ht,autoFocus:Be,autoPlay:Be,blocking:ht,capture:null,charSet:null,checked:Be,cite:null,className:ht,cols:ae,colSpan:null,content:null,contentEditable:Lt,controls:Be,controlsList:ht,coords:ae|Zl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:Sm,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:ht,height:ae,hidden:Sm,high:ae,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:ht,itemRef:ht,itemScope:Be,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,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:Be,optimum:ae,pattern:null,ping:ht,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:ht,required:Be,reversed:Be,rows:ae,rowSpan:ae,sandbox:ht,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:Lt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Nw}),ND=cs({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:Un,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:ht,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:Zl,g2:Zl,glyphName:Zl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,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:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cw}),_w=cs({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()}}),jw=cs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nw}),kw=cs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),_D={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"},jD=/[A-Z]/g,Gx=/-[a-z]/g,kD=/^data[-\w.:]+$/i;function TD(e,n){const a=xm(n);let i=n,s=jn;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&kD.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(Gx,zD);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!Gx.test(u)){let c=u.replace(jD,AD);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}s=fp}return new s(i,n)}function AD(e){return"-"+e.toLowerCase()}function zD(e){return e.charAt(1).toUpperCase()}const OD=ww([Ew,CD,_w,jw,kw],"html"),dp=ww([Ew,ND,_w,jw,kw],"svg");function RD(e){return e.join(" ").trim()}var Dl={},Ih,Kx;function MD(){if(Kx)return Ih;Kx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,a=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,g=`
|
|
298
|
+
`,p="/",y="*",v="",x="comment",S="declaration";function j(T,k){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];k=k||{};var P=1,U=1;function H(ce){var ne=ce.match(n);ne&&(P+=ne.length);var q=ce.lastIndexOf(g);U=~q?ce.length-q:U+ce.length}function Y(){var ce={line:P,column:U};return function(ne){return ne.position=new L(ce),G(),ne}}function L(ce){this.start=ce,this.end={line:P,column:U},this.source=k.source}L.prototype.content=T;function B(ce){var ne=new Error(k.source+":"+P+":"+U+": "+ce);if(ne.reason=ce,ne.filename=k.source,ne.line=P,ne.column=U,ne.source=T,!k.silent)throw ne}function D(ce){var ne=ce.exec(T);if(ne){var q=ne[0];return H(q),T=T.slice(q.length),ne}}function G(){D(a)}function ie(ce){var ne;for(ce=ce||[];ne=le();)ne!==!1&&ce.push(ne);return ce}function le(){var ce=Y();if(!(p!=T.charAt(0)||y!=T.charAt(1))){for(var ne=2;v!=T.charAt(ne)&&(y!=T.charAt(ne)||p!=T.charAt(ne+1));)++ne;if(ne+=2,v===T.charAt(ne-1))return B("End of comment missing");var q=T.slice(2,ne-2);return U+=2,H(q),T=T.slice(ne),U+=2,ce({type:x,comment:q})}}function se(){var ce=Y(),ne=D(i);if(ne){if(le(),!D(s))return B("property missing ':'");var q=D(u),re=ce({type:S,property:C(ne[0].replace(e,v)),value:q?C(q[0].replace(e,v)):v});return D(c),re}}function Ae(){var ce=[];ie(ce);for(var ne;ne=se();)ne!==!1&&(ce.push(ne),ie(ce));return ce}return G(),Ae()}function C(T){return T?T.replace(d,v):v}return Ih=j,Ih}var Xx;function DD(){if(Xx)return Dl;Xx=1;var e=Dl&&Dl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.default=a;const n=e(MD());function a(i,s){let u=null;if(!i||typeof i!="string")return u;const c=(0,n.default)(i),d=typeof s=="function";return c.forEach(g=>{if(g.type!=="declaration")return;const{property:p,value:y}=g;d?s(p,y,g):y&&(u=u||{},u[p]=y)}),u}return Dl}var oo={},Jx;function UD(){if(Jx)return oo;Jx=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(p){return!p||a.test(p)||e.test(p)},c=function(p,y){return y.toUpperCase()},d=function(p,y){return"".concat(y,"-")},g=function(p,y){return y===void 0&&(y={}),u(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(s,d):p=p.replace(i,d),p.replace(n,c))};return oo.camelCase=g,oo}var uo,Wx;function LD(){if(Wx)return uo;Wx=1;var e=uo&&uo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(DD()),a=UD();function i(s,u){var c={};return!s||typeof s!="string"||(0,n.default)(s,function(d,g){d&&g&&(c[(0,a.camelCase)(d,u)]=g)}),c}return i.default=i,uo=i,uo}var ID=LD();const BD=Ic(ID),Tw=Aw("end"),hp=Aw("start");function Aw(e){return n;function n(a){const i=a&&a.position&&a.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function qD(e){const n=hp(e),a=Tw(e);if(n&&a)return{start:n,end:a}}function go(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?e0(e.position):"start"in e||"end"in e?e0(e):"line"in e||"column"in e?Em(e):""}function Em(e){return t0(e&&e.line)+":"+t0(e&&e.column)}function e0(e){return Em(e&&e.start)+"-"+Em(e&&e.end)}function t0(e){return e&&typeof e=="number"?e:1}class sn extends Error{constructor(n,a,i){super(),typeof a=="string"&&(i=a,a=void 0);let s="",u={},c=!1;if(a&&("line"in a&&"column"in a?u={place:a}:"start"in a&&"end"in a?u={place:a}:"type"in a?u={ancestors:[a],place:a.position}:u={...a}),typeof n=="string"?s=n:!u.cause&&n&&(c=!0,s=n.message,u.cause=n),!u.ruleId&&!u.source&&typeof i=="string"){const g=i.indexOf(":");g===-1?u.ruleId=i:(u.source=i.slice(0,g),u.ruleId=i.slice(g+1))}if(!u.place&&u.ancestors&&u.ancestors){const g=u.ancestors[u.ancestors.length-1];g&&(u.place=g.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=s,this.line=d?d.line:void 0,this.name=go(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}}sn.prototype.file="";sn.prototype.name="";sn.prototype.reason="";sn.prototype.message="";sn.prototype.stack="";sn.prototype.column=void 0;sn.prototype.line=void 0;sn.prototype.ancestors=void 0;sn.prototype.cause=void 0;sn.prototype.fatal=void 0;sn.prototype.place=void 0;sn.prototype.ruleId=void 0;sn.prototype.source=void 0;const mp={}.hasOwnProperty,PD=new Map,HD=/[A-Z]/g,ZD=new Set(["table","tbody","thead","tfoot","tr"]),FD=new Set(["td","th"]),zw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $D(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=WD(a,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");i=JD(a,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?dp:OD,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},u=Ow(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function Ow(e,n,a){if(n.type==="element")return VD(e,n,a);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return QD(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return GD(e,n,a);if(n.type==="mdxjsEsm")return YD(e,n);if(n.type==="root")return KD(e,n,a);if(n.type==="text")return XD(e,n)}function VD(e,n,a){const i=e.schema;let s=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=dp,e.schema=s),e.ancestors.push(n);const u=Mw(e,n.tagName,!1),c=e3(e,n);let d=gp(e,n);return ZD.has(n.tagName)&&(d=d.filter(function(g){return typeof g=="string"?!wD(g):!0})),Rw(e,c,u,n),pp(c,d),e.ancestors.pop(),e.schema=i,e.create(n,u,c,a)}function QD(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ko(e,n.position)}function YD(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);ko(e,n.position)}function GD(e,n,a){const i=e.schema;let s=i;n.name==="svg"&&i.space==="html"&&(s=dp,e.schema=s),e.ancestors.push(n);const u=n.name===null?e.Fragment:Mw(e,n.name,!0),c=t3(e,n),d=gp(e,n);return Rw(e,c,u,n),pp(c,d),e.ancestors.pop(),e.schema=i,e.create(n,u,c,a)}function KD(e,n,a){const i={};return pp(i,gp(e,n)),e.create(n,e.Fragment,i,a)}function XD(e,n){return n.value}function Rw(e,n,a,i){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(n.node=i)}function pp(e,n){if(n.length>0){const a=n.length>1?n:n[0];a&&(e.children=a)}}function JD(e,n,a){return i;function i(s,u,c,d){const p=Array.isArray(c.children)?a:n;return d?p(u,c,d):p(u,c)}}function WD(e,n){return a;function a(i,s,u,c){const d=Array.isArray(u.children),g=hp(i);return n(s,u,c,d,{columnNumber:g?g.column-1:void 0,fileName:e,lineNumber:g?g.line:void 0},void 0)}}function e3(e,n){const a={};let i,s;for(s in n.properties)if(s!=="children"&&mp.call(n.properties,s)){const u=n3(e,s,n.properties[s]);if(u){const[c,d]=u;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&FD.has(n.tagName)?i=d:a[c]=d}}if(i){const u=a.style||(a.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return a}function t3(e,n){const a={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const c=u.expression;c.type;const d=c.properties[0];d.type,Object.assign(a,e.evaluater.evaluateExpression(d.argument))}else ko(e,n.position);else{const s=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,u=e.evaluater.evaluateExpression(d.expression)}else ko(e,n.position);else u=i.value===null?!0:i.value;a[s]=u}return a}function gp(e,n){const a=[];let i=-1;const s=e.passKeys?new Map:PD;for(;++i<n.children.length;){const u=n.children[i];let c;if(e.passKeys){const g=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(g){const p=s.get(g)||0;c=g+"-"+p,s.set(g,p+1)}}const d=Ow(e,u,c);d!==void 0&&a.push(d)}return a}function n3(e,n,a){const i=TD(e.schema,n);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=i.commaSeparated?yD(a):RD(a)),i.property==="style"){let s=typeof a=="object"?a:r3(e,String(a));return e.stylePropertyNameCase==="css"&&(s=a3(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?_D[i.property]||i.property:i.attribute,a]}}function r3(e,n){try{return BD(n,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const i=a,s=new sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=zw+"#cannot-parse-style-attribute",s}}function Mw(e,n,a){let i;if(!a)i={type:"Literal",value:n};else if(n.includes(".")){const s=n.split(".");let u=-1,c;for(;++u<s.length;){const d=Vx(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}i=c}else i=Vx(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const s=i.value;return mp.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);ko(e)}function ko(e,n){const a=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=zw+"#cannot-handle-mdx-estrees-without-createevaluater",a}function a3(e){const n={};let a;for(a in e)mp.call(e,a)&&(n[i3(a)]=e[a]);return n}function i3(e){let n=e.replace(HD,l3);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function l3(e){return"-"+e.toLowerCase()}const Bh={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"]},s3={};function o3(e,n){const a=s3,i=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Dw(e,i,s)}function Dw(e,n,a){if(u3(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return n0(e.children,n,a)}return Array.isArray(e)?n0(e,n,a):""}function n0(e,n,a){const i=[];let s=-1;for(;++s<e.length;)i[s]=Dw(e[s],n,a);return i.join("")}function u3(e){return!!(e&&typeof e=="object")}const r0=document.createElement("i");function yp(e){const n="&"+e+";";r0.innerHTML=n;const a=r0.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===n?!1:a}function Or(e,n,a,i){const s=e.length;let u=0,c;if(n<0?n=-n>s?0:s+n:n=n>s?s:n,a=a>0?a:0,i.length<1e4)c=Array.from(i),c.unshift(n,a),e.splice(...c);else for(a&&e.splice(n,a);u<i.length;)c=i.slice(u,u+1e4),c.unshift(n,0),e.splice(...c),u+=1e4,n+=1e4}function Wn(e,n){return e.length>0?(Or(e,e.length,0,n),e):n}const a0={}.hasOwnProperty;function c3(e){const n={};let a=-1;for(;++a<e.length;)f3(n,e[a]);return n}function f3(e,n){let a;for(a in n){const s=(a0.call(e,a)?e[a]:void 0)||(e[a]={}),u=n[a];let c;if(u)for(c in u){a0.call(s,c)||(s[c]=[]);const d=u[c];d3(s[c],Array.isArray(d)?d:d?[d]:[])}}}function d3(e,n){let a=-1;const i=[];for(;++a<n.length;)(n[a].add==="after"?e:i).push(n[a]);Or(e,0,0,i)}function Uw(e,n){const a=Number.parseInt(e,n);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function Fl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jr=ii(/[A-Za-z]/),In=ii(/[\dA-Za-z]/),h3=ii(/[#-'*+\--9=?A-Z^-~]/);function Cm(e){return e!==null&&(e<32||e===127)}const Nm=ii(/\d/),m3=ii(/[\dA-Fa-f]/),p3=ii(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function Nn(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const g3=ii(new RegExp("\\p{P}|\\p{S}","u")),y3=ii(/\s/);function ii(e){return n;function n(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function fs(e){const n=[];let a=-1,i=0,s=0;for(;++a<e.length;){const u=e.charCodeAt(a);let c="";if(u===37&&In(e.charCodeAt(a+1))&&In(e.charCodeAt(a+2)))s=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(a+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),s=1):c="�"}else c=String.fromCharCode(u);c&&(n.push(e.slice(i,a),encodeURIComponent(c)),i=a+s+1,c=""),s&&(a+=s,s=0)}return n.join("")+e.slice(i)}function mt(e,n,a,i){const s=i?i-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(g){return We(g)?(e.enter(a),d(g)):n(g)}function d(g){return We(g)&&u++<s?(e.consume(g),d):(e.exit(a),n(g))}}const v3={tokenize:b3};function b3(e){const n=e.attempt(this.parser.constructs.contentInitial,i,s);let a;return n;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),mt(e,n,"linePrefix")}function s(d){return e.enter("paragraph"),u(d)}function u(d){const g=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=g),a=g,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 x3={tokenize:S3},i0={tokenize:w3};function S3(e){const n=this,a=[];let i=0,s,u,c;return d;function d(U){if(i<a.length){const H=a[i];return n.containerState=H[1],e.attempt(H[0].continuation,g,p)(U)}return p(U)}function g(U){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,s&&P();const H=n.events.length;let Y=H,L;for(;Y--;)if(n.events[Y][0]==="exit"&&n.events[Y][1].type==="chunkFlow"){L=n.events[Y][1].end;break}k(i);let B=H;for(;B<n.events.length;)n.events[B][1].end={...L},B++;return Or(n.events,Y+1,0,n.events.slice(H)),n.events.length=B,p(U)}return d(U)}function p(U){if(i===a.length){if(!s)return x(U);if(s.currentConstruct&&s.currentConstruct.concrete)return j(U);n.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(i0,y,v)(U)}function y(U){return s&&P(),k(i),x(U)}function v(U){return n.parser.lazy[n.now().line]=i!==a.length,c=n.now().offset,j(U)}function x(U){return n.containerState={},e.attempt(i0,S,j)(U)}function S(U){return i++,a.push([n.currentConstruct,n.containerState]),x(U)}function j(U){if(U===null){s&&P(),k(0),e.consume(U);return}return s=s||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),C(U)}function C(U){if(U===null){T(e.exit("chunkFlow"),!0),k(0),e.consume(U);return}return ke(U)?(e.consume(U),T(e.exit("chunkFlow")),i=0,n.interrupt=void 0,d):(e.consume(U),C)}function T(U,H){const Y=n.sliceStream(U);if(H&&Y.push(null),U.previous=u,u&&(u.next=U),u=U,s.defineSkip(U.start),s.write(Y),n.parser.lazy[U.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const B=n.events.length;let D=B,G,ie;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){if(G){ie=n.events[D][1].end;break}G=!0}for(k(i),L=B;L<n.events.length;)n.events[L][1].end={...ie},L++;Or(n.events,D+1,0,n.events.slice(B)),n.events.length=L}}function k(U){let H=a.length;for(;H-- >U;){const Y=a[H];n.containerState=Y[1],Y[0].exit.call(n,e)}a.length=U}function P(){s.write([null]),u=void 0,s=void 0,n.containerState._closeFlow=void 0}}function w3(e,n,a){return mt(e,e.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function l0(e){if(e===null||Nn(e)||y3(e))return 1;if(g3(e))return 2}function vp(e,n,a){const i=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!i.includes(u)&&(n=u(n,a),i.push(u))}return n}const _m={name:"attention",resolveAll:E3,tokenize:C3};function E3(e,n){let a=-1,i,s,u,c,d,g,p,y;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(i=a;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[i][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;g=e[i][1].end.offset-e[i][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const v={...e[i][1].end},x={...e[a][1].start};s0(v,-g),s0(x,g),c={type:g>1?"strongSequence":"emphasisSequence",start:v,end:{...e[i][1].end}},d={type:g>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:x},u={type:g>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[a][1].start}},s={type:g>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[i][1].end={...c.start},e[a][1].start={...d.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=Wn(p,[["enter",e[i][1],n],["exit",e[i][1],n]])),p=Wn(p,[["enter",s,n],["enter",c,n],["exit",c,n],["enter",u,n]]),p=Wn(p,vp(n.parser.constructs.insideSpan.null,e.slice(i+1,a),n)),p=Wn(p,[["exit",u,n],["enter",d,n],["exit",d,n],["exit",s,n]]),e[a][1].end.offset-e[a][1].start.offset?(y=2,p=Wn(p,[["enter",e[a][1],n],["exit",e[a][1],n]])):y=0,Or(e,i-1,a-i+3,p),a=i+p.length-y-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function C3(e,n){const a=this.parser.constructs.attentionMarkers.null,i=this.previous,s=l0(i);let u;return c;function c(g){return u=g,e.enter("attentionSequence"),d(g)}function d(g){if(g===u)return e.consume(g),d;const p=e.exit("attentionSequence"),y=l0(g),v=!y||y===2&&s||a.includes(g),x=!s||s===2&&y||a.includes(i);return p._open=!!(u===42?v:v&&(s||!x)),p._close=!!(u===42?x:x&&(y||!v)),n(g)}}function s0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const N3={name:"autolink",tokenize:_3};function _3(e,n,a){let i=0;return s;function s(S){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(S),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(S){return jr(S)?(e.consume(S),c):S===64?a(S):p(S)}function c(S){return S===43||S===45||S===46||In(S)?(i=1,d(S)):p(S)}function d(S){return S===58?(e.consume(S),i=0,g):(S===43||S===45||S===46||In(S))&&i++<32?(e.consume(S),d):(i=0,p(S))}function g(S){return S===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(S),e.exit("autolinkMarker"),e.exit("autolink"),n):S===null||S===32||S===60||Cm(S)?a(S):(e.consume(S),g)}function p(S){return S===64?(e.consume(S),y):h3(S)?(e.consume(S),p):a(S)}function y(S){return In(S)?v(S):a(S)}function v(S){return S===46?(e.consume(S),i=0,y):S===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(S),e.exit("autolinkMarker"),e.exit("autolink"),n):x(S)}function x(S){if((S===45||In(S))&&i++<63){const j=S===45?x:v;return e.consume(S),j}return a(S)}}const Jc={partial:!0,tokenize:j3};function j3(e,n,a){return i;function i(u){return We(u)?mt(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||ke(u)?n(u):a(u)}}const Lw={continuation:{tokenize:T3},exit:A3,name:"blockQuote",tokenize:k3};function k3(e,n,a){const i=this;return s;function s(c){if(c===62){const d=i.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 a(c)}function u(c){return We(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function T3(e,n,a){const i=this;return s;function s(c){return We(c)?mt(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(Lw,n,a)(c)}}function A3(e){e.exit("blockQuote")}const Iw={name:"characterEscape",tokenize:z3};function z3(e,n,a){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return p3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):a(u)}}const Bw={name:"characterReference",tokenize:O3};function O3(e,n,a){const i=this;let s=0,u,c;return d;function d(v){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(v),e.exit("characterReferenceMarker"),g}function g(v){return v===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(v),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,c=In,y(v))}function p(v){return v===88||v===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(v),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=m3,y):(e.enter("characterReferenceValue"),u=7,c=Nm,y(v))}function y(v){if(v===59&&s){const x=e.exit("characterReferenceValue");return c===In&&!yp(i.sliceSerialize(x))?a(v):(e.enter("characterReferenceMarker"),e.consume(v),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(v)&&s++<u?(e.consume(v),y):a(v)}}const o0={partial:!0,tokenize:M3},u0={concrete:!0,name:"codeFenced",tokenize:R3};function R3(e,n,a){const i=this,s={partial:!0,tokenize:Y};let u=0,c=0,d;return g;function g(L){return p(L)}function p(L){const B=i.events[i.events.length-1];return u=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,d=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(L)}function y(L){return L===d?(c++,e.consume(L),y):c<3?a(L):(e.exit("codeFencedFenceSequence"),We(L)?mt(e,v,"whitespace")(L):v(L))}function v(L){return L===null||ke(L)?(e.exit("codeFencedFence"),i.interrupt?n(L):e.check(o0,C,H)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(L))}function x(L){return L===null||ke(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),v(L)):We(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mt(e,S,"whitespace")(L)):L===96&&L===d?a(L):(e.consume(L),x)}function S(L){return L===null||ke(L)?v(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),j(L))}function j(L){return L===null||ke(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(L)):L===96&&L===d?a(L):(e.consume(L),j)}function C(L){return e.attempt(s,H,T)(L)}function T(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),k}function k(L){return u>0&&We(L)?mt(e,P,"linePrefix",u+1)(L):P(L)}function P(L){return L===null||ke(L)?e.check(o0,C,H)(L):(e.enter("codeFlowValue"),U(L))}function U(L){return L===null||ke(L)?(e.exit("codeFlowValue"),P(L)):(e.consume(L),U)}function H(L){return e.exit("codeFenced"),n(L)}function Y(L,B,D){let G=0;return ie;function ie(ne){return L.enter("lineEnding"),L.consume(ne),L.exit("lineEnding"),le}function le(ne){return L.enter("codeFencedFence"),We(ne)?mt(L,se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):se(ne)}function se(ne){return ne===d?(L.enter("codeFencedFenceSequence"),Ae(ne)):D(ne)}function Ae(ne){return ne===d?(G++,L.consume(ne),Ae):G>=c?(L.exit("codeFencedFenceSequence"),We(ne)?mt(L,ce,"whitespace")(ne):ce(ne)):D(ne)}function ce(ne){return ne===null||ke(ne)?(L.exit("codeFencedFence"),B(ne)):D(ne)}}}function M3(e,n,a){const i=this;return s;function s(c){return c===null?a(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return i.parser.lazy[i.now().line]?a(c):n(c)}}const qh={name:"codeIndented",tokenize:U3},D3={partial:!0,tokenize:L3};function U3(e,n,a){const i=this;return s;function s(p){return e.enter("codeIndented"),mt(e,u,"linePrefix",5)(p)}function u(p){const y=i.events[i.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(p):a(p)}function c(p){return p===null?g(p):ke(p)?e.attempt(D3,c,g)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||ke(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),d)}function g(p){return e.exit("codeIndented"),n(p)}}function L3(e,n,a){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?a(c):ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):mt(e,u,"linePrefix",5)(c)}function u(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(c):ke(c)?s(c):a(c)}}const I3={name:"codeText",previous:q3,resolve:B3,tokenize:P3};function B3(e){let n=e.length-4,a=3,i,s;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=a;++i<n;)if(e[i][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(i=a-1,n++;++i<=n;)s===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(s=i):(i===n||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),n-=i-s-2,i=s+2),s=void 0);return e}function q3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function P3(e,n,a){let i=0,s,u;return c;function c(v){return e.enter("codeText"),e.enter("codeTextSequence"),d(v)}function d(v){return v===96?(e.consume(v),i++,d):(e.exit("codeTextSequence"),g(v))}function g(v){return v===null?a(v):v===32?(e.enter("space"),e.consume(v),e.exit("space"),g):v===96?(u=e.enter("codeTextSequence"),s=0,y(v)):ke(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("codeTextData"),p(v))}function p(v){return v===null||v===32||v===96||ke(v)?(e.exit("codeTextData"),g(v)):(e.consume(v),p)}function y(v){return v===96?(e.consume(v),s++,y):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(v)):(u.type="codeTextData",p(v))}}class H3{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,a){const i=a??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,a,i){const s=a||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&co(this.left,i),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),co(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),co(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 a=this.left.splice(n,Number.POSITIVE_INFINITY);co(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);co(this.left,a.reverse())}}}function co(e,n){let a=0;if(n.length<1e4)e.push(...n);else for(;a<n.length;)e.push(...n.slice(a,a+1e4)),a+=1e4}function qw(e){const n={};let a=-1,i,s,u,c,d,g,p;const y=new H3(e);for(;++a<y.length;){for(;a in n;)a=n[a];if(i=y.get(a),a&&i[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(g=i[1]._tokenizer.events,u=0,u<g.length&&g[u][1].type==="lineEndingBlank"&&(u+=2),u<g.length&&g[u][1].type==="content"))for(;++u<g.length&&g[u][1].type!=="content";)g[u][1].type==="chunkText"&&(g[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,Z3(y,a)),a=n[a],p=!0);else if(i[1]._container){for(u=a,s=void 0;u--;)if(c=y.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...y.get(s)[1].start},d=y.slice(s,a),d.unshift(i),y.splice(s,a-s+1,d))}}return Or(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!p}function Z3(e,n){const a=e.get(n)[1],i=e.get(n)[2];let s=n-1;const u=[];let c=a._tokenizer;c||(c=i.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,g=[],p={};let y,v,x=-1,S=a,j=0,C=0;const T=[C];for(;S;){for(;e.get(++s)[1]!==S;);u.push(s),S._tokenizer||(y=i.sliceStream(S),S.next||y.push(null),v&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),v=S,S=S.next}for(S=a;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(C=x+1,T.push(C),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):T.pop(),x=T.length;x--;){const k=d.slice(T[x],T[x+1]),P=u.pop();g.push([P,P+k.length-1]),e.splice(P,2,k)}for(g.reverse(),x=-1;++x<g.length;)p[j+g[x][0]]=j+g[x][1],j+=g[x][1]-g[x][0]-1;return p}const F3={resolve:V3,tokenize:Q3},$3={partial:!0,tokenize:Y3};function V3(e){return qw(e),e}function Q3(e,n){let a;return i;function i(d){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?u(d):ke(d)?e.check($3,c,u)(d):(e.consume(d),s)}function u(d){return e.exit("chunkContent"),e.exit("content"),n(d)}function c(d){return e.consume(d),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function Y3(e,n,a){const i=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),mt(e,u,"linePrefix")}function u(c){if(c===null||ke(c))return a(c);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,a,n)(c)}}function Pw(e,n,a,i,s,u,c,d,g){const p=g||Number.POSITIVE_INFINITY;let y=0;return v;function v(k){return k===60?(e.enter(i),e.enter(s),e.enter(u),e.consume(k),e.exit(u),x):k===null||k===32||k===41||Cm(k)?a(k):(e.enter(i),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),C(k))}function x(k){return k===62?(e.enter(u),e.consume(k),e.exit(u),e.exit(s),e.exit(i),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),S(k))}function S(k){return k===62?(e.exit("chunkString"),e.exit(d),x(k)):k===null||k===60||ke(k)?a(k):(e.consume(k),k===92?j:S)}function j(k){return k===60||k===62||k===92?(e.consume(k),S):S(k)}function C(k){return!y&&(k===null||k===41||Nn(k))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(i),n(k)):y<p&&k===40?(e.consume(k),y++,C):k===41?(e.consume(k),y--,C):k===null||k===32||k===40||Cm(k)?a(k):(e.consume(k),k===92?T:C)}function T(k){return k===40||k===41||k===92?(e.consume(k),C):C(k)}}function Hw(e,n,a,i,s,u){const c=this;let d=0,g;return p;function p(S){return e.enter(i),e.enter(s),e.consume(S),e.exit(s),e.enter(u),y}function y(S){return d>999||S===null||S===91||S===93&&!g||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?a(S):S===93?(e.exit(u),e.enter(s),e.consume(S),e.exit(s),e.exit(i),n):ke(S)?(e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===null||S===91||S===93||ke(S)||d++>999?(e.exit("chunkString"),y(S)):(e.consume(S),g||(g=!We(S)),S===92?x:v)}function x(S){return S===91||S===92||S===93?(e.consume(S),d++,v):v(S)}}function Zw(e,n,a,i,s,u){let c;return d;function d(x){return x===34||x===39||x===40?(e.enter(i),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,g):a(x)}function g(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(i),n):(e.enter(u),p(x))}function p(x){return x===c?(e.exit(u),g(c)):x===null?a(x):ke(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),mt(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||ke(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?v:y)}function v(x){return x===c||x===92?(e.consume(x),y):y(x)}}function yo(e,n){let a;return i;function i(s){return ke(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a=!0,i):We(s)?mt(e,i,a?"linePrefix":"lineSuffix")(s):n(s)}}const G3={name:"definition",tokenize:X3},K3={partial:!0,tokenize:J3};function X3(e,n,a){const i=this;let s;return u;function u(S){return e.enter("definition"),c(S)}function c(S){return Hw.call(i,e,d,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return s=Fl(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),g):a(S)}function g(S){return Nn(S)?yo(e,p)(S):p(S)}function p(S){return Pw(e,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function y(S){return e.attempt(K3,v,v)(S)}function v(S){return We(S)?mt(e,x,"whitespace")(S):x(S)}function x(S){return S===null||ke(S)?(e.exit("definition"),i.parser.defined.push(s),n(S)):a(S)}}function J3(e,n,a){return i;function i(d){return Nn(d)?yo(e,s)(d):a(d)}function s(d){return Zw(e,u,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return We(d)?mt(e,c,"whitespace")(d):c(d)}function c(d){return d===null||ke(d)?n(d):a(d)}}const W3={name:"hardBreakEscape",tokenize:e6};function e6(e,n,a){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return ke(u)?(e.exit("hardBreakEscape"),n(u)):a(u)}}const t6={name:"headingAtx",resolve:n6,tokenize:r6};function n6(e,n){let a=e.length-2,i=3,s,u;return e[i][1].type==="whitespace"&&(i+=2),a-2>i&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(i===a-1||a-4>i&&e[a-2][1].type==="whitespace")&&(a-=i+1===a?2:4),a>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[a][1].end},u={type:"chunkText",start:e[i][1].start,end:e[a][1].end,contentType:"text"},Or(e,i,a-i+1,[["enter",s,n],["enter",u,n],["exit",u,n],["exit",s,n]])),e}function r6(e,n,a){let i=0;return s;function s(y){return e.enter("atxHeading"),u(y)}function u(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&i++<6?(e.consume(y),c):y===null||Nn(y)?(e.exit("atxHeadingSequence"),d(y)):a(y)}function d(y){return y===35?(e.enter("atxHeadingSequence"),g(y)):y===null||ke(y)?(e.exit("atxHeading"),n(y)):We(y)?mt(e,d,"whitespace")(y):(e.enter("atxHeadingText"),p(y))}function g(y){return y===35?(e.consume(y),g):(e.exit("atxHeadingSequence"),d(y))}function p(y){return y===null||y===35||Nn(y)?(e.exit("atxHeadingText"),d(y)):(e.consume(y),p)}}const a6=["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"],c0=["pre","script","style","textarea"],i6={concrete:!0,name:"htmlFlow",resolveTo:o6,tokenize:u6},l6={partial:!0,tokenize:f6},s6={partial:!0,tokenize:c6};function o6(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 u6(e,n,a){const i=this;let s,u,c,d,g;return p;function p(_){return y(_)}function y(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),v}function v(_){return _===33?(e.consume(_),x):_===47?(e.consume(_),u=!0,C):_===63?(e.consume(_),s=3,i.interrupt?n:N):jr(_)?(e.consume(_),c=String.fromCharCode(_),T):a(_)}function x(_){return _===45?(e.consume(_),s=2,S):_===91?(e.consume(_),s=5,d=0,j):jr(_)?(e.consume(_),s=4,i.interrupt?n:N):a(_)}function S(_){return _===45?(e.consume(_),i.interrupt?n:N):a(_)}function j(_){const oe="CDATA[";return _===oe.charCodeAt(d++)?(e.consume(_),d===oe.length?i.interrupt?n:se:j):a(_)}function C(_){return jr(_)?(e.consume(_),c=String.fromCharCode(_),T):a(_)}function T(_){if(_===null||_===47||_===62||Nn(_)){const oe=_===47,he=c.toLowerCase();return!oe&&!u&&c0.includes(he)?(s=1,i.interrupt?n(_):se(_)):a6.includes(c.toLowerCase())?(s=6,oe?(e.consume(_),k):i.interrupt?n(_):se(_)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?a(_):u?P(_):U(_))}return _===45||In(_)?(e.consume(_),c+=String.fromCharCode(_),T):a(_)}function k(_){return _===62?(e.consume(_),i.interrupt?n:se):a(_)}function P(_){return We(_)?(e.consume(_),P):ie(_)}function U(_){return _===47?(e.consume(_),ie):_===58||_===95||jr(_)?(e.consume(_),H):We(_)?(e.consume(_),U):ie(_)}function H(_){return _===45||_===46||_===58||_===95||In(_)?(e.consume(_),H):Y(_)}function Y(_){return _===61?(e.consume(_),L):We(_)?(e.consume(_),Y):U(_)}function L(_){return _===null||_===60||_===61||_===62||_===96?a(_):_===34||_===39?(e.consume(_),g=_,B):We(_)?(e.consume(_),L):D(_)}function B(_){return _===g?(e.consume(_),g=null,G):_===null||ke(_)?a(_):(e.consume(_),B)}function D(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Nn(_)?Y(_):(e.consume(_),D)}function G(_){return _===47||_===62||We(_)?U(_):a(_)}function ie(_){return _===62?(e.consume(_),le):a(_)}function le(_){return _===null||ke(_)?se(_):We(_)?(e.consume(_),le):a(_)}function se(_){return _===45&&s===2?(e.consume(_),q):_===60&&s===1?(e.consume(_),re):_===62&&s===4?(e.consume(_),R):_===63&&s===3?(e.consume(_),N):_===93&&s===5?(e.consume(_),Te):ke(_)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(l6,K,Ae)(_)):_===null||ke(_)?(e.exit("htmlFlowData"),Ae(_)):(e.consume(_),se)}function Ae(_){return e.check(s6,ce,K)(_)}function ce(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),ne}function ne(_){return _===null||ke(_)?Ae(_):(e.enter("htmlFlowData"),se(_))}function q(_){return _===45?(e.consume(_),N):se(_)}function re(_){return _===47?(e.consume(_),c="",me):se(_)}function me(_){if(_===62){const oe=c.toLowerCase();return c0.includes(oe)?(e.consume(_),R):se(_)}return jr(_)&&c.length<8?(e.consume(_),c+=String.fromCharCode(_),me):se(_)}function Te(_){return _===93?(e.consume(_),N):se(_)}function N(_){return _===62?(e.consume(_),R):_===45&&s===2?(e.consume(_),N):se(_)}function R(_){return _===null||ke(_)?(e.exit("htmlFlowData"),K(_)):(e.consume(_),R)}function K(_){return e.exit("htmlFlow"),n(_)}}function c6(e,n,a){const i=this;return s;function s(c){return ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):a(c)}function u(c){return i.parser.lazy[i.now().line]?a(c):n(c)}}function f6(e,n,a){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Jc,n,a)}}const d6={name:"htmlText",tokenize:h6};function h6(e,n,a){const i=this;let s,u,c;return d;function d(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),Y):N===63?(e.consume(N),U):jr(N)?(e.consume(N),D):a(N)}function p(N){return N===45?(e.consume(N),y):N===91?(e.consume(N),u=0,j):jr(N)?(e.consume(N),P):a(N)}function y(N){return N===45?(e.consume(N),S):a(N)}function v(N){return N===null?a(N):N===45?(e.consume(N),x):ke(N)?(c=v,re(N)):(e.consume(N),v)}function x(N){return N===45?(e.consume(N),S):v(N)}function S(N){return N===62?q(N):N===45?x(N):v(N)}function j(N){const R="CDATA[";return N===R.charCodeAt(u++)?(e.consume(N),u===R.length?C:j):a(N)}function C(N){return N===null?a(N):N===93?(e.consume(N),T):ke(N)?(c=C,re(N)):(e.consume(N),C)}function T(N){return N===93?(e.consume(N),k):C(N)}function k(N){return N===62?q(N):N===93?(e.consume(N),k):C(N)}function P(N){return N===null||N===62?q(N):ke(N)?(c=P,re(N)):(e.consume(N),P)}function U(N){return N===null?a(N):N===63?(e.consume(N),H):ke(N)?(c=U,re(N)):(e.consume(N),U)}function H(N){return N===62?q(N):U(N)}function Y(N){return jr(N)?(e.consume(N),L):a(N)}function L(N){return N===45||In(N)?(e.consume(N),L):B(N)}function B(N){return ke(N)?(c=B,re(N)):We(N)?(e.consume(N),B):q(N)}function D(N){return N===45||In(N)?(e.consume(N),D):N===47||N===62||Nn(N)?G(N):a(N)}function G(N){return N===47?(e.consume(N),q):N===58||N===95||jr(N)?(e.consume(N),ie):ke(N)?(c=G,re(N)):We(N)?(e.consume(N),G):q(N)}function ie(N){return N===45||N===46||N===58||N===95||In(N)?(e.consume(N),ie):le(N)}function le(N){return N===61?(e.consume(N),se):ke(N)?(c=le,re(N)):We(N)?(e.consume(N),le):G(N)}function se(N){return N===null||N===60||N===61||N===62||N===96?a(N):N===34||N===39?(e.consume(N),s=N,Ae):ke(N)?(c=se,re(N)):We(N)?(e.consume(N),se):(e.consume(N),ce)}function Ae(N){return N===s?(e.consume(N),s=void 0,ne):N===null?a(N):ke(N)?(c=Ae,re(N)):(e.consume(N),Ae)}function ce(N){return N===null||N===34||N===39||N===60||N===61||N===96?a(N):N===47||N===62||Nn(N)?G(N):(e.consume(N),ce)}function ne(N){return N===47||N===62||Nn(N)?G(N):a(N)}function q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),n):a(N)}function re(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),me}function me(N){return We(N)?mt(e,Te,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):Te(N)}function Te(N){return e.enter("htmlTextData"),c(N)}}const bp={name:"labelEnd",resolveAll:y6,resolveTo:v6,tokenize:b6},m6={tokenize:x6},p6={tokenize:S6},g6={tokenize:w6};function y6(e){let n=-1;const a=[];for(;++n<e.length;){const i=e[n][1];if(a.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",n+=s}}return e.length!==a.length&&Or(e,0,e.length,a),e}function v6(e,n){let a=e.length,i=0,s,u,c,d;for(;a--;)if(s=e[a][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=a,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=a);const g={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",g,n],["enter",p,n]],d=Wn(d,e.slice(u+1,u+i+3)),d=Wn(d,[["enter",y,n]]),d=Wn(d,vp(n.parser.constructs.insideSpan.null,e.slice(u+i+4,c-3),n)),d=Wn(d,[["exit",y,n],e[c-2],e[c-1],["exit",p,n]]),d=Wn(d,e.slice(c+1)),d=Wn(d,[["exit",g,n]]),Or(e,u,e.length,d),e}function b6(e,n,a){const i=this;let s=i.events.length,u,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){u=i.events[s][1];break}return d;function d(x){return u?u._inactive?v(x):(c=i.parser.defined.includes(Fl(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),g):a(x)}function g(x){return x===40?e.attempt(m6,y,c?y:v)(x):x===91?e.attempt(p6,y,c?p:v)(x):c?y(x):v(x)}function p(x){return e.attempt(g6,y,v)(x)}function y(x){return n(x)}function v(x){return u._balanced=!0,a(x)}}function x6(e,n,a){return i;function i(v){return e.enter("resource"),e.enter("resourceMarker"),e.consume(v),e.exit("resourceMarker"),s}function s(v){return Nn(v)?yo(e,u)(v):u(v)}function u(v){return v===41?y(v):Pw(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(v)}function c(v){return Nn(v)?yo(e,g)(v):y(v)}function d(v){return a(v)}function g(v){return v===34||v===39||v===40?Zw(e,p,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(v):y(v)}function p(v){return Nn(v)?yo(e,y)(v):y(v)}function y(v){return v===41?(e.enter("resourceMarker"),e.consume(v),e.exit("resourceMarker"),e.exit("resource"),n):a(v)}}function S6(e,n,a){const i=this;return s;function s(d){return Hw.call(i,e,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return i.parser.defined.includes(Fl(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(d):a(d)}function c(d){return a(d)}}function w6(e,n,a){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),n):a(u)}}const E6={name:"labelStartImage",resolveAll:bp.resolveAll,tokenize:C6};function C6(e,n,a){const i=this;return s;function s(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):a(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?a(d):n(d)}}const N6={name:"labelStartLink",resolveAll:bp.resolveAll,tokenize:_6};function _6(e,n,a){const i=this;return s;function s(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 i.parser.constructs?a(c):n(c)}}const Ph={name:"lineEnding",tokenize:j6};function j6(e,n){return a;function a(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),mt(e,n,"linePrefix")}}const Nc={name:"thematicBreak",tokenize:k6};function k6(e,n,a){let i=0,s;return u;function u(p){return e.enter("thematicBreak"),c(p)}function c(p){return s=p,d(p)}function d(p){return p===s?(e.enter("thematicBreakSequence"),g(p)):i>=3&&(p===null||ke(p))?(e.exit("thematicBreak"),n(p)):a(p)}function g(p){return p===s?(e.consume(p),i++,g):(e.exit("thematicBreakSequence"),We(p)?mt(e,d,"whitespace")(p):d(p))}}const wn={continuation:{tokenize:O6},exit:M6,name:"list",tokenize:z6},T6={partial:!0,tokenize:D6},A6={partial:!0,tokenize:R6};function z6(e,n,a){const i=this,s=i.events[i.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(S){const j=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(j==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:Nm(S)){if(i.containerState.type||(i.containerState.type=j,e.enter(j,{_container:!0})),j==="listUnordered")return e.enter("listItemPrefix"),S===42||S===45?e.check(Nc,a,p)(S):p(S);if(!i.interrupt||S===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),g(S)}return a(S)}function g(S){return Nm(S)&&++c<10?(e.consume(S),g):(!i.interrupt||c<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(e.exit("listItemValue"),p(S)):a(S)}function p(S){return e.enter("listItemMarker"),e.consume(S),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,e.check(Jc,i.interrupt?a:y,e.attempt(T6,x,v))}function y(S){return i.containerState.initialBlankLine=!0,u++,x(S)}function v(S){return We(S)?(e.enter("listItemPrefixWhitespace"),e.consume(S),e.exit("listItemPrefixWhitespace"),x):a(S)}function x(S){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(S)}}function O6(e,n,a){const i=this;return i.containerState._closeFlow=void 0,e.check(Jc,s,u);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,mt(e,n,"listItemIndent",i.containerState.size+1)(d)}function u(d){return i.containerState.furtherBlankLines||!We(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(A6,n,c)(d))}function c(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,mt(e,e.attempt(wn,n,a),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function R6(e,n,a){const i=this;return mt(e,s,"listItemIndent",i.containerState.size+1);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(u):a(u)}}function M6(e){e.exit(this.containerState.type)}function D6(e,n,a){const i=this;return mt(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=i.events[i.events.length-1];return!We(u)&&c&&c[1].type==="listItemPrefixWhitespace"?n(u):a(u)}}const f0={name:"setextUnderline",resolveTo:U6,tokenize:L6};function U6(e,n){let a=e.length,i,s,u;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){i=a;break}e[a][1].type==="paragraph"&&(s=a)}else e[a][1].type==="content"&&e.splice(a,1),!u&&e[a][1].type==="definition"&&(u=a);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",u?(e.splice(s,0,["enter",c,n]),e.splice(u+1,0,["exit",e[i][1],n]),e[i][1].end={...e[u][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function L6(e,n,a){const i=this;let s;return u;function u(p){let y=i.events.length,v;for(;y--;)if(i.events[y][1].type!=="lineEnding"&&i.events[y][1].type!=="linePrefix"&&i.events[y][1].type!=="content"){v=i.events[y][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||v)?(e.enter("setextHeadingLine"),s=p,c(p)):a(p)}function c(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===s?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),We(p)?mt(e,g,"lineSuffix")(p):g(p))}function g(p){return p===null||ke(p)?(e.exit("setextHeadingLine"),n(p)):a(p)}}const I6={tokenize:B6};function B6(e){const n=this,a=e.attempt(Jc,i,e.attempt(this.parser.constructs.flowInitial,s,mt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(F3,s)),"linePrefix")));return a;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,a}}const q6={resolveAll:$w()},P6=Fw("string"),H6=Fw("text");function Fw(e){return{resolveAll:$w(e==="text"?Z6:void 0),tokenize:n};function n(a){const i=this,s=this.parser.constructs[e],u=a.attempt(s,c,d);return c;function c(y){return p(y)?u(y):d(y)}function d(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),g}function g(y){return p(y)?(a.exit("data"),u(y)):(a.consume(y),g)}function p(y){if(y===null)return!0;const v=s[y];let x=-1;if(v)for(;++x<v.length;){const S=v[x];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function $w(e){return n;function n(a,i){let s=-1,u;for(;++s<=a.length;)u===void 0?a[s]&&a[s][1].type==="data"&&(u=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==u+2&&(a[u][1].end=a[s-1][1].end,a.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(a,i):a}}function Z6(e,n){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const i=e[a-1][1],s=n.sliceStream(i);let u=s.length,c=-1,d=0,g;for(;u--;){const p=s[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)g=!0,d++;else if(p!==-1){u++;break}}if(n._contentTypeTextTrailing&&a===e.length&&(d=0),d){const p={type:a===e.length||g||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:i.start._bufferIndex+c,_index:i.start._index+u,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(a,0,["enter",p,n],["exit",p,n]),a+=2)}a++}return e}const F6={42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:Lw},$6={91:G3},V6={[-2]:qh,[-1]:qh,32:qh},Q6={35:t6,42:Nc,45:[f0,Nc],60:i6,61:f0,95:Nc,96:u0,126:u0},Y6={38:Bw,92:Iw},G6={[-5]:Ph,[-4]:Ph,[-3]:Ph,33:E6,38:Bw,42:_m,60:[N3,d6],91:N6,92:[W3,Iw],93:bp,95:_m,96:I3},K6={null:[_m,q6]},X6={null:[42,95]},J6={null:[]},W6=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:X6,contentInitial:$6,disable:J6,document:F6,flow:Q6,flowInitial:V6,insideSpan:K6,string:Y6,text:G6},Symbol.toStringTag,{value:"Module"}));function e5(e,n,a){let i={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},u=[];let c=[],d=[];const g={attempt:B(Y),check:B(L),consume:P,enter:U,exit:H,interrupt:B(L,{interrupt:!0})},p={code:null,containerState:{},defineSkip:C,events:[],now:j,parser:e,previous:null,sliceSerialize:x,sliceStream:S,write:v};let y=n.tokenize.call(p,g);return n.resolveAll&&u.push(n),p;function v(le){return c=Wn(c,le),T(),c[c.length-1]!==null?[]:(D(n,0),p.events=vp(u,p.events,p),p.events)}function x(le,se){return n5(S(le),se)}function S(le){return t5(c,le)}function j(){const{_bufferIndex:le,_index:se,line:Ae,column:ce,offset:ne}=i;return{_bufferIndex:le,_index:se,line:Ae,column:ce,offset:ne}}function C(le){s[le.line]=le.column,ie()}function T(){let le;for(;i._index<c.length;){const se=c[i._index];if(typeof se=="string")for(le=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===le&&i._bufferIndex<se.length;)k(se.charCodeAt(i._bufferIndex));else k(se)}}function k(le){y=y(le)}function P(le){ke(le)?(i.line++,i.column=1,i.offset+=le===-3?2:1,ie()):le!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=le}function U(le,se){const Ae=se||{};return Ae.type=le,Ae.start=j(),p.events.push(["enter",Ae,p]),d.push(Ae),Ae}function H(le){const se=d.pop();return se.end=j(),p.events.push(["exit",se,p]),se}function Y(le,se){D(le,se.from)}function L(le,se){se.restore()}function B(le,se){return Ae;function Ae(ce,ne,q){let re,me,Te,N;return Array.isArray(ce)?K(ce):"tokenize"in ce?K([ce]):R(ce);function R(fe){return Oe;function Oe(et){const _e=et!==null&&fe[et],ze=et!==null&&fe.null,vt=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return K(vt)(et)}}function K(fe){return re=fe,me=0,fe.length===0?q:_(fe[me])}function _(fe){return Oe;function Oe(et){return N=G(),Te=fe,fe.partial||(p.currentConstruct=fe),fe.name&&p.parser.constructs.disable.null.includes(fe.name)?he():fe.tokenize.call(se?Object.assign(Object.create(p),se):p,g,oe,he)(et)}}function oe(fe){return le(Te,N),ne}function he(fe){return N.restore(),++me<re.length?_(re[me]):q}}}function D(le,se){le.resolveAll&&!u.includes(le)&&u.push(le),le.resolve&&Or(p.events,se,p.events.length-se,le.resolve(p.events.slice(se),p)),le.resolveTo&&(p.events=le.resolveTo(p.events,p))}function G(){const le=j(),se=p.previous,Ae=p.currentConstruct,ce=p.events.length,ne=Array.from(d);return{from:ce,restore:q};function q(){i=le,p.previous=se,p.currentConstruct=Ae,p.events.length=ce,d=ne,ie()}}function ie(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function t5(e,n){const a=n.start._index,i=n.start._bufferIndex,s=n.end._index,u=n.end._bufferIndex;let c;if(a===s)c=[e[a].slice(i,u)];else{if(c=e.slice(a,s),i>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(i):c.shift()}u>0&&c.push(e[s].slice(0,u))}return c}function n5(e,n){let a=-1;const i=[];let s;for(;++a<e.length;){const u=e[a];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
299
|
+
`;break}case-3:{c=`\r
|
|
300
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,i.push(c)}return i.join("")}function r5(e){const i={constructs:c3([W6,...(e||{}).extensions||[]]),content:s(v3),defined:[],document:s(x3),flow:s(I6),lazy:{},string:s(P6),text:s(H6)};return i;function s(u){return c;function c(d){return e5(i,u,d)}}}function a5(e){for(;!qw(e););return e}const d0=/[\0\t\n\r]/g;function i5(){let e=1,n="",a=!0,i;return s;function s(u,c,d){const g=[];let p,y,v,x,S;for(u=n+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),v=0,n="",a&&(u.charCodeAt(0)===65279&&v++,a=void 0);v<u.length;){if(d0.lastIndex=v,p=d0.exec(u),x=p&&p.index!==void 0?p.index:u.length,S=u.charCodeAt(x),!p){n=u.slice(v);break}if(S===10&&v===x&&i)g.push(-3),i=void 0;else switch(i&&(g.push(-5),i=void 0),v<x&&(g.push(u.slice(v,x)),e+=x-v),S){case 0:{g.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,g.push(-2);e++<y;)g.push(-1);break}case 10:{g.push(-4),e=1;break}default:i=!0,e=1}v=x+1}return d&&(i&&g.push(-5),n&&g.push(n),g.push(null)),g}}const l5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function s5(e){return e.replace(l5,o5)}function o5(e,n,a){if(n)return n;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),u=s===120||s===88;return Uw(a.slice(u?2:1),u?16:10)}return yp(a)||e}const Vw={}.hasOwnProperty;function u5(e,n,a){return n&&typeof n=="object"&&(a=n,n=void 0),c5(a)(a5(r5(a).document().write(i5()(e,n,!0))))}function c5(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(pr),autolinkProtocol:G,autolinkEmail:G,atxHeading:u(sa),blockQuote:u(ze),characterEscape:G,characterReference:G,codeFenced:u(vt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(vt,c),codeText:u(on,c),codeTextData:G,data:G,codeFlowValue:G,definition:u(mr),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(nn),hardBreakEscape:u(oa),hardBreakTrailing:u(oa),htmlFlow:u(li,c),htmlFlowData:G,htmlText:u(li,c),htmlTextData:G,image:u(si),label:c,link:u(pr),listItem:u(ua),listItemValue:x,listOrdered:u(kn,v),listUnordered:u(kn),paragraph:u(oi),reference:_,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(sa),strong:u(Vi),thematicBreak:u(Qi)},exit:{atxHeading:g(),atxHeadingSequence:Y,autolink:g(),autolinkEmail:_e,autolinkProtocol:et,blockQuote:g(),characterEscapeValue:ie,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:fe,characterReference:Oe,codeFenced:g(T),codeFencedFence:C,codeFencedFenceInfo:S,codeFencedFenceMeta:j,codeFlowValue:ie,codeIndented:g(k),codeText:g(ne),codeTextData:ie,data:ie,definition:g(),definitionDestinationString:H,definitionLabelString:P,definitionTitleString:U,emphasis:g(),hardBreakEscape:g(se),hardBreakTrailing:g(se),htmlFlow:g(Ae),htmlFlowData:ie,htmlText:g(ce),htmlTextData:ie,image:g(re),label:Te,labelText:me,lineEnding:le,link:g(q),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:oe,resourceDestinationString:N,resourceTitleString:R,resource:K,setextHeading:g(D),setextHeadingLineSequence:B,setextHeadingText:L,strong:g(),thematicBreak:g()}};Qw(n,(e||{}).mdastExtensions||[]);const a={};return i;function i(J){let ue={type:"root",children:[]};const $={stack:[ue],tokenStack:[],config:n,enter:d,exit:p,buffer:c,resume:y,data:a},Ce=[];let Ve=-1;for(;++Ve<J.length;)if(J[Ve][1].type==="listOrdered"||J[Ve][1].type==="listUnordered")if(J[Ve][0]==="enter")Ce.push(Ve);else{const $t=Ce.pop();Ve=s(J,$t,Ve)}for(Ve=-1;++Ve<J.length;){const $t=n[J[Ve][0]];Vw.call($t,J[Ve][1].type)&&$t[J[Ve][1].type].call(Object.assign({sliceSerialize:J[Ve][2].sliceSerialize},$),J[Ve][1])}if($.tokenStack.length>0){const $t=$.tokenStack[$.tokenStack.length-1];($t[1]||h0).call($,void 0,$t[0])}for(ue.position={start:La(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:La(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<n.transforms.length;)ue=n.transforms[Ve](ue)||ue;return ue}function s(J,ue,$){let Ce=ue-1,Ve=-1,$t=!1,qn,un,qt,mn;for(;++Ce<=$;){const ct=J[Ce];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?Ve++:Ve--,mn=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(qn&&!mn&&!Ve&&!qt&&(qt=Ce),mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mn=void 0}if(!Ve&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||Ve===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(qn){let ca=Ce;for(un=void 0;ca--;){const ir=J[ca];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;un&&(J[un][1].type="lineEndingBlank",$t=!0),ir[1].type="lineEnding",un=ca}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}qt&&(!un||qt<un)&&(qn._spread=!0),qn.end=Object.assign({},un?J[un][1].start:ct[1].end),J.splice(un||Ce,0,["exit",qn,ct[2]]),Ce++,$++}if(ct[1].type==="listItemPrefix"){const ca={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};qn=ca,J.splice(Ce,0,["enter",ca,ct[2]]),Ce++,$++,qt=void 0,mn=!0}}}return J[ue][1]._spread=$t,$}function u(J,ue){return $;function $(Ce){d.call(this,J(Ce),Ce),ue&&ue.call(this,Ce)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(J,ue,$){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ue,$||void 0]),J.position={start:La(ue.start),end:void 0}}function g(J){return ue;function ue($){J&&J.call(this,$),p.call(this,$)}}function p(J,ue){const $=this.stack.pop(),Ce=this.tokenStack.pop();if(Ce)Ce[0].type!==J.type&&(ue?ue.call(this,J,Ce[0]):(Ce[1]||h0).call(this,J,Ce[0]));else throw new Error("Cannot close `"+J.type+"` ("+go({start:J.start,end:J.end})+"): it’s not open");$.position.end=La(J.end)}function y(){return o3(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function x(J){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function S(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=J}function j(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=J}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J.replace(/(\r?\n|\r)$/g,"")}function P(J){const ue=this.resume(),$=this.stack[this.stack.length-1];$.label=ue,$.identifier=Fl(this.sliceSerialize(J)).toLowerCase()}function U(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.title=J}function H(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.url=J}function Y(J){const ue=this.stack[this.stack.length-1];if(!ue.depth){const $=this.sliceSerialize(J).length;ue.depth=$}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function B(J){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function G(J){const $=this.stack[this.stack.length-1].children;let Ce=$[$.length-1];(!Ce||Ce.type!=="text")&&(Ce=Ft(),Ce.position={start:La(J.start),end:void 0},$.push(Ce)),this.stack.push(Ce)}function ie(J){const ue=this.stack.pop();ue.value+=this.sliceSerialize(J),ue.position.end=La(J.end)}function le(J){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=ue.children[ue.children.length-1];$.position.end=La(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ue.type)&&(G.call(this,J),ie.call(this,J))}function se(){this.data.atHardBreak=!0}function Ae(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function ce(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function ne(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.value=J}function q(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ue,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function re(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ue,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function me(J){const ue=this.sliceSerialize(J),$=this.stack[this.stack.length-2];$.label=s5(ue),$.identifier=Fl(ue).toLowerCase()}function Te(){const J=this.stack[this.stack.length-1],ue=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const Ce=J.children;$.children=Ce}else $.alt=ue}function N(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.url=J}function R(){const J=this.resume(),ue=this.stack[this.stack.length-1];ue.title=J}function K(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function oe(J){const ue=this.resume(),$=this.stack[this.stack.length-1];$.label=ue,$.identifier=Fl(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function he(J){this.data.characterReferenceType=J.type}function fe(J){const ue=this.sliceSerialize(J),$=this.data.characterReferenceType;let Ce;$?(Ce=Uw(ue,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ce=yp(ue);const Ve=this.stack[this.stack.length-1];Ve.value+=Ce}function Oe(J){const ue=this.stack.pop();ue.position.end=La(J.end)}function et(J){ie.call(this,J);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(J)}function _e(J){ie.call(this,J);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(J)}function ze(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function on(){return{type:"inlineCode",value:""}}function mr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function nn(){return{type:"emphasis",children:[]}}function sa(){return{type:"heading",depth:0,children:[]}}function oa(){return{type:"break"}}function li(){return{type:"html",value:""}}function si(){return{type:"image",title:null,url:"",alt:null}}function pr(){return{type:"link",title:null,url:"",children:[]}}function kn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function ua(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function oi(){return{type:"paragraph",children:[]}}function Vi(){return{type:"strong",children:[]}}function Ft(){return{type:"text",value:""}}function Qi(){return{type:"thematicBreak"}}}function La(e){return{line:e.line,column:e.column,offset:e.offset}}function Qw(e,n){let a=-1;for(;++a<n.length;){const i=n[a];Array.isArray(i)?Qw(e,i):f5(e,i)}}function f5(e,n){let a;for(a in n)if(Vw.call(n,a))switch(a){case"canContainEols":{const i=n[a];i&&e[a].push(...i);break}case"transforms":{const i=n[a];i&&e[a].push(...i);break}case"enter":case"exit":{const i=n[a];i&&Object.assign(e[a],i);break}}}function h0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+go({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+go({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+go({start:n.start,end:n.end})+") is still open")}function d5(e){const n=this;n.parser=a;function a(i){return u5(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function h5(e,n){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,a),e.applyData(n,a)}function m5(e,n){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,a),[e.applyData(n,a),{type:"text",value:`
|
|
301
|
+
`}]}function p5(e,n){const a=n.value?n.value+`
|
|
302
|
+
`:"",i={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:a}]};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 g5(e,n){const a={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function y5(e,n){const a={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function v5(e,n){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),s=fs(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let c,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=u+1,d+=1,e.footnoteCounts.set(i,d);const g={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,g);const p={type:"element",tagName:"sup",properties:{},children:[g]};return e.patch(n,p),e.applyData(n,p)}function b5(e,n){const a={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function x5(e,n){if(e.options.allowDangerousHtml){const a={type:"raw",value:n.value};return e.patch(n,a),e.applyData(n,a)}}function Yw(e,n){const a=n.referenceType;let i="]";if(a==="collapsed"?i+="[]":a==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const s=e.all(n),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function S5(e,n){const a=String(n.identifier).toUpperCase(),i=e.definitionById.get(a);if(!i)return Yw(e,n);const s={src:fs(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,u),e.applyData(n,u)}function w5(e,n){const a={src:fs(n.url)};n.alt!==null&&n.alt!==void 0&&(a.alt=n.alt),n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,i),e.applyData(n,i)}function E5(e,n){const a={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,a);const i={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(n,i),e.applyData(n,i)}function C5(e,n){const a=String(n.identifier).toUpperCase(),i=e.definitionById.get(a);if(!i)return Yw(e,n);const s={href:fs(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,u),e.applyData(n,u)}function N5(e,n){const a={href:fs(n.url)};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function _5(e,n,a){const i=e.all(n),s=a?j5(a):Gw(n),u={},c=[];if(typeof n.checked=="boolean"){const y=i[0];let v;y&&y.type==="element"&&y.tagName==="p"?v=y:(v={type:"element",tagName:"p",properties:{},children:[]},i.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<i.length;){const y=i[d];(s||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
303
|
+
`}),y.type==="element"&&y.tagName==="p"&&!s?c.push(...y.children):c.push(y)}const g=i[i.length-1];g&&(s||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
304
|
+
`});const p={type:"element",tagName:"li",properties:u,children:c};return e.patch(n,p),e.applyData(n,p)}function j5(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const a=e.children;let i=-1;for(;!n&&++i<a.length;)n=Gw(a[i])}return n}function Gw(e){const n=e.spread;return n??e.children.length>1}function k5(e,n){const a={},i=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(a.start=n.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:a,children:e.wrap(i,!0)};return e.patch(n,u),e.applyData(n,u)}function T5(e,n){const a={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function A5(e,n){const a={type:"root",children:e.wrap(e.all(n))};return e.patch(n,a),e.applyData(n,a)}function z5(e,n){const a={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function O5(e,n){const a=e.all(n),i=a.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(n.children[0],c),s.push(c)}if(a.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},d=hp(n.children[1]),g=Tw(n.children[n.children.length-1]);d&&g&&(c.position={start:d,end:g}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,u),e.applyData(n,u)}function R5(e,n,a){const i=a?a.children:void 0,u=(i?i.indexOf(n):1)===0?"th":"td",c=a&&a.type==="table"?a.align:void 0,d=c?c.length:n.children.length;let g=-1;const p=[];for(;++g<d;){const v=n.children[g],x={},S=c?c[g]:void 0;S&&(x.align=S);let j={type:"element",tagName:u,properties:x,children:[]};v&&(j.children=e.all(v),e.patch(v,j),j=e.applyData(v,j)),p.push(j)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(n,y),e.applyData(n,y)}function M5(e,n){const a={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}const m0=9,p0=32;function D5(e){const n=String(e),a=/\r?\n|\r/g;let i=a.exec(n),s=0;const u=[];for(;i;)u.push(g0(n.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=a.exec(n);return u.push(g0(n.slice(s),s>0,!1)),u.join("")}function g0(e,n,a){let i=0,s=e.length;if(n){let u=e.codePointAt(i);for(;u===m0||u===p0;)i++,u=e.codePointAt(i)}if(a){let u=e.codePointAt(s-1);for(;u===m0||u===p0;)s--,u=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function U5(e,n){const a={type:"text",value:D5(String(n.value))};return e.patch(n,a),e.applyData(n,a)}function L5(e,n){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,a),e.applyData(n,a)}const I5={blockquote:h5,break:m5,code:p5,delete:g5,emphasis:y5,footnoteReference:v5,heading:b5,html:x5,imageReference:S5,image:w5,inlineCode:E5,linkReference:C5,link:N5,listItem:_5,list:k5,paragraph:T5,root:A5,strong:z5,table:O5,tableCell:M5,tableRow:R5,text:U5,thematicBreak:L5,toml:yc,yaml:yc,definition:yc,footnoteDefinition:yc};function yc(){}const Kw=-1,Wc=0,vo=1,Uc=2,xp=3,Sp=4,wp=5,Ep=6,Xw=7,Jw=8,y0=typeof self=="object"?self:globalThis,B5=(e,n)=>{const a=(s,u)=>(e.set(u,s),s),i=s=>{if(e.has(s))return e.get(s);const[u,c]=n[s];switch(u){case Wc:case Kw:return a(c,s);case vo:{const d=a([],s);for(const g of c)d.push(i(g));return d}case Uc:{const d=a({},s);for(const[g,p]of c)d[i(g)]=i(p);return d}case xp:return a(new Date(c),s);case Sp:{const{source:d,flags:g}=c;return a(new RegExp(d,g),s)}case wp:{const d=a(new Map,s);for(const[g,p]of c)d.set(i(g),i(p));return d}case Ep:{const d=a(new Set,s);for(const g of c)d.add(i(g));return d}case Xw:{const{name:d,message:g}=c;return a(new y0[d](g),s)}case Jw:return a(BigInt(c),s);case"BigInt":return a(Object(BigInt(c)),s);case"ArrayBuffer":return a(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return a(new DataView(d),c)}}return a(new y0[u](c),s)};return i},v0=e=>B5(new Map,e)(0),Ul="",{toString:q5}={},{keys:P5}=Object,fo=e=>{const n=typeof e;if(n!=="object"||!e)return[Wc,n];const a=q5.call(e).slice(8,-1);switch(a){case"Array":return[vo,Ul];case"Object":return[Uc,Ul];case"Date":return[xp,Ul];case"RegExp":return[Sp,Ul];case"Map":return[wp,Ul];case"Set":return[Ep,Ul];case"DataView":return[vo,a]}return a.includes("Array")?[vo,a]:a.includes("Error")?[Xw,a]:[Uc,a]},vc=([e,n])=>e===Wc&&(n==="function"||n==="symbol"),H5=(e,n,a,i)=>{const s=(c,d)=>{const g=i.push(c)-1;return a.set(d,g),g},u=c=>{if(a.has(c))return a.get(c);let[d,g]=fo(c);switch(d){case Wc:{let y=c;switch(g){case"bigint":d=Jw,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+g);y=null;break;case"undefined":return s([Kw],c)}return s([d,y],c)}case vo:{if(g){let x=c;return g==="DataView"?x=new Uint8Array(c.buffer):g==="ArrayBuffer"&&(x=new Uint8Array(c)),s([g,[...x]],c)}const y=[],v=s([d,y],c);for(const x of c)y.push(u(x));return v}case Uc:{if(g)switch(g){case"BigInt":return s([g,c.toString()],c);case"Boolean":case"Number":case"String":return s([g,c.valueOf()],c)}if(n&&"toJSON"in c)return u(c.toJSON());const y=[],v=s([d,y],c);for(const x of P5(c))(e||!vc(fo(c[x])))&&y.push([u(x),u(c[x])]);return v}case xp:return s([d,c.toISOString()],c);case Sp:{const{source:y,flags:v}=c;return s([d,{source:y,flags:v}],c)}case wp:{const y=[],v=s([d,y],c);for(const[x,S]of c)(e||!(vc(fo(x))||vc(fo(S))))&&y.push([u(x),u(S)]);return v}case Ep:{const y=[],v=s([d,y],c);for(const x of c)(e||!vc(fo(x)))&&y.push(u(x));return v}}const{message:p}=c;return s([d,{name:g,message:p}],c)};return u},b0=(e,{json:n,lossy:a}={})=>{const i=[];return H5(!(n||a),!!n,new Map,i)(e),i},Lc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?v0(b0(e,n)):structuredClone(e):(e,n)=>v0(b0(e,n));function Z5(e,n){const a=[{type:"text",value:"↩"}];return n>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),a}function F5(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function $5(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||Z5,i=e.options.footnoteBackLabel||F5,s=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let g=-1;for(;++g<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[g]);if(!p)continue;const y=e.all(p),v=String(p.identifier).toUpperCase(),x=fs(v.toLowerCase());let S=0;const j=[],C=e.footnoteCounts.get(v);for(;C!==void 0&&++S<=C;){j.length>0&&j.push({type:"text",value:" "});let P=typeof a=="string"?a:a(g,S);typeof P=="string"&&(P={type:"text",value:P}),j.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(g,S),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const T=y[y.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const P=T.children[T.children.length-1];P&&P.type==="text"?P.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...j)}else y.push(...j);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(y,!0)};e.patch(p,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Lc(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
305
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
306
|
+
`}]}}const Ww=(function(e){if(e==null)return G5;if(typeof e=="function")return ef(e);if(typeof e=="object")return Array.isArray(e)?V5(e):Q5(e);if(typeof e=="string")return Y5(e);throw new Error("Expected function, string, or object as test")});function V5(e){const n=[];let a=-1;for(;++a<e.length;)n[a]=Ww(e[a]);return ef(i);function i(...s){let u=-1;for(;++u<n.length;)if(n[u].apply(this,s))return!0;return!1}}function Q5(e){const n=e;return ef(a);function a(i){const s=i;let u;for(u in e)if(s[u]!==n[u])return!1;return!0}}function Y5(e){return ef(n);function n(a){return a&&a.type===e}}function ef(e){return n;function n(a,i,s){return!!(K5(a)&&e.call(this,a,typeof i=="number"?i:void 0,s||void 0))}}function G5(){return!0}function K5(e){return e!==null&&typeof e=="object"&&"type"in e}const eE=[],X5=!0,x0=!1,J5="skip";function W5(e,n,a,i){let s;typeof n=="function"&&typeof a!="function"?(i=a,a=n):s=n;const u=Ww(s),c=i?-1:1;d(e,void 0,[])();function d(g,p,y){const v=g&&typeof g=="object"?g:{};if(typeof v.type=="string"){const S=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(g.type+(S?"<"+S+">":""))+")"})}return x;function x(){let S=eE,j,C,T;if((!n||u(g,p,y[y.length-1]||void 0))&&(S=eU(a(g,y)),S[0]===x0))return S;if("children"in g&&g.children){const k=g;if(k.children&&S[0]!==J5)for(C=(i?k.children.length:-1)+c,T=y.concat(k);C>-1&&C<k.children.length;){const P=k.children[C];if(j=d(P,C,T)(),j[0]===x0)return j;C=typeof j[1]=="number"?j[1]:C+c}}return S}}}function eU(e){return Array.isArray(e)?e:typeof e=="number"?[X5,e]:e==null?eE:[e]}function tE(e,n,a,i){let s,u,c;typeof n=="function"&&typeof a!="function"?(u=void 0,c=n,s=a):(u=n,c=a,s=i),W5(e,u,d,s);function d(g,p){const y=p[p.length-1],v=y?y.children.indexOf(g):void 0;return c(g,v,y)}}const jm={}.hasOwnProperty,tU={};function nU(e,n){const a=n||tU,i=new Map,s=new Map,u=new Map,c={...I5,...a.handlers},d={all:p,applyData:aU,definitionById:i,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:g,options:a,patch:rU,wrap:lU};return tE(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const v=y.type==="definition"?i:s,x=String(y.identifier).toUpperCase();v.has(x)||v.set(x,y)}}),d;function g(y,v){const x=y.type,S=d.handlers[x];if(jm.call(d.handlers,x)&&S)return S(d,y,v);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in y){const{children:C,...T}=y,k=Lc(T);return k.children=d.all(y),k}return Lc(y)}return(d.options.unknownHandler||iU)(d,y,v)}function p(y){const v=[];if("children"in y){const x=y.children;let S=-1;for(;++S<x.length;){const j=d.one(x[S],y);if(j){if(S&&x[S-1].type==="break"&&(!Array.isArray(j)&&j.type==="text"&&(j.value=S0(j.value)),!Array.isArray(j)&&j.type==="element")){const C=j.children[0];C&&C.type==="text"&&(C.value=S0(C.value))}Array.isArray(j)?v.push(...j):v.push(j)}}}return v}}function rU(e,n){e.position&&(n.position=qD(e))}function aU(e,n){let a=n;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(a.type==="element")a.tagName=i;else{const c="children"in a?a.children:[a];a={type:"element",tagName:i,properties:{},children:c}}a.type==="element"&&u&&Object.assign(a.properties,Lc(u)),"children"in a&&a.children&&s!==null&&s!==void 0&&(a.children=s)}return a}function iU(e,n){const a=n.data||{},i="value"in n&&!(jm.call(a,"hProperties")||jm.call(a,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function lU(e,n){const a=[];let i=-1;for(n&&a.push({type:"text",value:`
|
|
307
|
+
`});++i<e.length;)i&&a.push({type:"text",value:`
|
|
308
|
+
`}),a.push(e[i]);return n&&e.length>0&&a.push({type:"text",value:`
|
|
309
|
+
`}),a}function S0(e){let n=0,a=e.charCodeAt(n);for(;a===9||a===32;)n++,a=e.charCodeAt(n);return e.slice(n)}function w0(e,n){const a=nU(e,n),i=a.one(e,void 0),s=$5(a),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
|
|
310
|
+
`},s),u}function sU(e,n){return e&&"run"in e?async function(a,i){const s=w0(a,{file:i,...n});await e.run(s,i)}:function(a,i){return w0(a,{file:i,...e||n})}}function E0(e){if(e)throw e}var Hh,C0;function oU(){if(C0)return Hh;C0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):n.call(p)==="[object Array]"},u=function(p){if(!p||n.call(p)!=="[object Object]")return!1;var y=e.call(p,"constructor"),v=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!y&&!v)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},c=function(p,y){a&&y.name==="__proto__"?a(p,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):p[y.name]=y.newValue},d=function(p,y){if(y==="__proto__")if(e.call(p,y)){if(i)return i(p,y).value}else return;return p[y]};return Hh=function g(){var p,y,v,x,S,j,C=arguments[0],T=1,k=arguments.length,P=!1;for(typeof C=="boolean"&&(P=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<k;++T)if(p=arguments[T],p!=null)for(y in p)v=d(C,y),x=d(p,y),C!==x&&(P&&x&&(u(x)||(S=s(x)))?(S?(S=!1,j=v&&s(v)?v:[]):j=v&&u(v)?v:{},c(C,{name:y,newValue:g(P,j,x)})):typeof x<"u"&&c(C,{name:y,newValue:x}));return C},Hh}var uU=oU();const Zh=Ic(uU);function km(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 cU(){const e=[],n={run:a,use:i};return n;function a(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(g,...p){const y=e[++u];let v=-1;if(g){c(g);return}for(;++v<s.length;)(p[v]===null||p[v]===void 0)&&(p[v]=s[v]);s=p,y?fU(y,d)(...p):c(null,...p)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),n}}function fU(e,n){let a;return i;function i(...c){const d=e.length>c.length;let g;d&&c.push(s);try{g=e.apply(this,c)}catch(p){const y=p;if(d&&a)throw y;return s(y)}d||(g&&g.then&&typeof g.then=="function"?g.then(u,s):g instanceof Error?s(g):u(g))}function s(c,...d){a||(a=!0,n(c,...d))}function u(c){s(null,c)}}const xr={basename:dU,dirname:hU,extname:mU,join:pU,sep:"/"};function dU(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');qo(e);let a=0,i=-1,s=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){a=s+1;break}}else i<0&&(u=!0,i=s+1);return i<0?"":e.slice(a,i)}if(n===e)return"";let c=-1,d=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){a=s+1;break}}else c<0&&(u=!0,c=s+1),d>-1&&(e.codePointAt(s)===n.codePointAt(d--)?d<0&&(i=s):(d=-1,i=c));return a===i?i=c:i<0&&(i=e.length),e.slice(a,i)}function hU(e){if(qo(e),e.length===0)return".";let n=-1,a=e.length,i;for(;--a;)if(e.codePointAt(a)===47){if(i){n=a;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function mU(e){qo(e);let n=e.length,a=-1,i=0,s=-1,u=0,c;for(;n--;){const d=e.codePointAt(n);if(d===47){if(c){i=n+1;break}continue}a<0&&(c=!0,a=n+1),d===46?s<0?s=n:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||a<0||u===0||u===1&&s===a-1&&s===i+1?"":e.slice(s,a)}function pU(...e){let n=-1,a;for(;++n<e.length;)qo(e[n]),e[n]&&(a=a===void 0?e[n]:a+"/"+e[n]);return a===void 0?".":gU(a)}function gU(e){qo(e);const n=e.codePointAt(0)===47;let a=yU(e,!n);return a.length===0&&!n&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),n?"/"+a:a}function yU(e,n){let a="",i=0,s=-1,u=0,c=-1,d,g;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(a.length<2||i!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(g=a.lastIndexOf("/"),g!==a.length-1){g<0?(a="",i=0):(a=a.slice(0,g),i=a.length-1-a.lastIndexOf("/")),s=c,u=0;continue}}else if(a.length>0){a="",i=0,s=c,u=0;continue}}n&&(a=a.length>0?a+"/..":"..",i=2)}else a.length>0?a+="/"+e.slice(s+1,c):a=e.slice(s+1,c),i=c-s-1;s=c,u=0}else d===46&&u>-1?u++:u=-1}return a}function qo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vU={cwd:bU};function bU(){return"/"}function Tm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function xU(e){if(typeof e=="string")e=new URL(e);else if(!Tm(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 SU(e)}function SU(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const i=n.codePointAt(a+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(n)}const Fh=["history","path","basename","stem","extname","dirname"];class nE{constructor(n){let a;n?Tm(n)?a={path:n}:typeof n=="string"||wU(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":vU.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Fh.length;){const u=Fh[i];u in a&&a[u]!==void 0&&a[u]!==null&&(this[u]=u==="history"?[...a[u]]:a[u])}let s;for(s in a)Fh.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?xr.basename(this.path):void 0}set basename(n){Vh(n,"basename"),$h(n,"basename"),this.path=xr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?xr.dirname(this.path):void 0}set dirname(n){N0(this.basename,"dirname"),this.path=xr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?xr.extname(this.path):void 0}set extname(n){if($h(n,"extname"),N0(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=xr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Tm(n)&&(n=xU(n)),Vh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?xr.basename(this.path,this.extname):void 0}set stem(n){Vh(n,"stem"),$h(n,"stem"),this.path=xr.join(this.dirname||"",n+(this.extname||""))}fail(n,a,i){const s=this.message(n,a,i);throw s.fatal=!0,s}info(n,a,i){const s=this.message(n,a,i);return s.fatal=void 0,s}message(n,a,i){const s=new sn(n,a,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function $h(e,n){if(e&&e.includes(xr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+xr.sep+"`")}function Vh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function N0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function wU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EU=(function(e){const i=this.constructor.prototype,s=i[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),CU={}.hasOwnProperty;class Cp extends EU{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=cU()}copy(){const n=new Cp;let a=-1;for(;++a<this.attachers.length;){const i=this.attachers[a];n.use(...i)}return n.data(Zh(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(Gh("data",this.frozen),this.namespace[n]=a,this):CU.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Gh("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[a,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=a.call(n,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=bc(n),i=this.parser||this.Parser;return Qh("parse",i),i(String(a),a)}process(n,a){const i=this;return this.freeze(),Qh("process",this.parser||this.Parser),Yh("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(u,c){const d=bc(n),g=i.parse(d);i.run(g,d,function(y,v,x){if(y||!v||!x)return p(y);const S=v,j=i.stringify(S,x);jU(j)?x.value=j:x.result=j,p(y,x)});function p(y,v){y||!v?c(y):u?u(v):a(void 0,v)}}}processSync(n){let a=!1,i;return this.freeze(),Qh("processSync",this.parser||this.Parser),Yh("processSync",this.compiler||this.Compiler),this.process(n,s),j0("processSync","process",a),i;function s(u,c){a=!0,E0(u),i=c}}run(n,a,i){_0(n),this.freeze();const s=this.transformers;return!i&&typeof a=="function"&&(i=a,a=void 0),i?u(void 0,i):new Promise(u);function u(c,d){const g=bc(a);s.run(n,g,p);function p(y,v,x){const S=v||n;y?d(y):c?c(S):i(void 0,S,x)}}}runSync(n,a){let i=!1,s;return this.run(n,a,u),j0("runSync","run",i),s;function u(c,d){E0(c),s=d,i=!0}}stringify(n,a){this.freeze();const i=bc(a),s=this.compiler||this.Compiler;return Yh("stringify",s),_0(n),s(n,i)}use(n,...a){const i=this.attachers,s=this.namespace;if(Gh("use",this.frozen),n!=null)if(typeof n=="function")g(n,a);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(p){if(typeof p=="function")g(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[y,...v]=p;g(y,v)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(s.settings=Zh(!0,s.settings,p.settings))}function d(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const v=p[y];u(v)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function g(p,y){let v=-1,x=-1;for(;++v<i.length;)if(i[v][0]===p){x=v;break}if(x===-1)i.push([p,...y]);else if(y.length>0){let[S,...j]=y;const C=i[x][1];km(C)&&km(S)&&(S=Zh(!0,C,S)),i[x]=[p,S,...j]}}}}const NU=new Cp().freeze();function Qh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gh(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 _0(e){if(!km(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function j0(e,n,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function bc(e){return _U(e)?e:new nE(e)}function _U(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jU(e){return typeof e=="string"||kU(e)}function kU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TU="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",k0=[],T0={allowDangerousHtml:!0},AU=/^(https?|ircs?|mailto|xmpp)$/i,zU=[{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 OU(e){const n=RU(e),a=MU(e);return DU(n.runSync(n.parse(a),a),e)}function RU(e){const n=e.rehypePlugins||k0,a=e.remarkPlugins||k0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...T0}:T0;return NU().use(d5).use(a).use(sU,i).use(n)}function MU(e){const n=e.children||"",a=new nE;return typeof n=="string"&&(a.value=n),a}function DU(e,n){const a=n.allowedElements,i=n.allowElement,s=n.components,u=n.disallowedElements,c=n.skipHtml,d=n.unwrapDisallowed,g=n.urlTransform||UU;for(const y of zU)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+TU+y.id,void 0);return tE(e,p),$D(e,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(y,v,x){if(y.type==="raw"&&x&&typeof v=="number")return c?x.children.splice(v,1):x.children[v]={type:"text",value:y.value},v;if(y.type==="element"){let S;for(S in Bh)if(Object.hasOwn(Bh,S)&&Object.hasOwn(y.properties,S)){const j=y.properties[S],C=Bh[S];(C===null||C.includes(y.tagName))&&(y.properties[S]=g(String(j||""),S,y))}}if(y.type==="element"){let S=a?!a.includes(y.tagName):u?u.includes(y.tagName):!1;if(!S&&i&&typeof v=="number"&&(S=!i(y,v,x)),S&&x&&typeof v=="number")return d&&y.children?x.children.splice(v,1,...y.children):x.children.splice(v,1),v}}}function UU(e){const n=e.indexOf(":"),a=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||a!==-1&&n>a||i!==-1&&n>i||AU.test(e.slice(0,n))?e:""}function LU(e){return Ue.get(`/admin/agents/${encodeURIComponent(e)}/tokens`)}function Am(e,n){return Ue.post(`/admin/agents/${encodeURIComponent(e)}/tokens`,n)}function IU(e,n){return Ue.delete(`/admin/agents/${encodeURIComponent(e)}/tokens/${encodeURIComponent(n)}`)}const BU=Object.values(US);function rE(e){var D;const{open:n,onOpenChange:a,onSubmit:i,isPending:s,error:u,mode:c}=e,d=c==="edit"?e.agent:void 0,[g,p]=w.useState(""),[y,v]=w.useState("personal_assistant"),[x,S]=w.useState(""),[j,C]=w.useState(""),[T,k]=w.useState(""),P=c==="create"&&y!=="human",U=Ge({queryKey:["clients-for-provision"],queryFn:Km,enabled:n&&P}),H=y==="human",Y=Ge({queryKey:["agents-for-delegate"],queryFn:async()=>(await Gm({limit:100})).items.filter(ie=>ie.type==="personal_assistant"&&ie.status==="active"),enabled:n&&H});w.useEffect(()=>{n&&(d?(p(d.name??""),v(d.type),S(d.displayName??""),C(d.delegateMention??"")):(p(""),v("personal_assistant"),S(""),C(""),k("")))},[n,d]);const L=G=>{G.preventDefault(),i({name:c==="create"&&g?g:void 0,type:y,displayName:x||null,delegateMention:j||null,clientId:T||null})},B=c==="edit";return h.jsx(Pl,{open:n,onOpenChange:a,children:h.jsxs(Ii,{children:[h.jsx(Hl,{children:h.jsx(Bi,{children:B?"Edit Agent":"New Agent"})}),h.jsxs("form",{onSubmit:L,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"agent-name",children:"Name"}),B?h.jsx(Gt,{id:"agent-name",value:g,disabled:!0,className:"font-mono"}):h.jsx(Gt,{id:"agent-name",value:g,onChange:G=>p(G.target.value),placeholder:"Leave empty to auto-generate",pattern:"^[a-z0-9_-]*$",title:"Only lowercase alphanumeric, hyphens, and underscores",className:"font-mono"})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"agent-type",children:"Type"}),h.jsx("select",{id:"agent-type",value:y,onChange:G=>{const ie=G.target.value;v(ie),ie!=="human"&&C("")},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:BU.map(G=>h.jsx("option",{value:G,children:G},G))})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"agent-display-name",children:"Display Name"}),h.jsx(Gt,{id:"agent-display-name",value:x,onChange:G=>S(G.target.value),placeholder:"Optional",maxLength:200})]}),H&&h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"agent-delegate",children:"Delegate Mention"}),h.jsxs("select",{id:"agent-delegate",value:j,onChange:G=>C(G.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:[h.jsx("option",{value:"",children:"None"}),(D=Y.data)==null?void 0:D.map(G=>h.jsx("option",{value:G.uuid,children:G.displayName?`${G.displayName} (${G.name??G.uuid})`:G.name??G.uuid},G.uuid))]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"The personal assistant that acts on behalf of this agent"})]}),P&&h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"agent-client",children:"Client"}),U.data&&U.data.length>0?h.jsxs("select",{id:"agent-client",value:T,onChange:G=>k(G.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:[h.jsx("option",{value:"",children:"No client (manual binding)"}),U.data.map(G=>h.jsx("option",{value:G.id,children:G.hostname??G.id.slice(0,12)},G.id))]}):h.jsx("p",{className:"text-xs text-muted-foreground",children:"No connected clients. Agent will be created without binding."})]}),u&&h.jsx("div",{className:"text-sm text-destructive",children:u.message}),h.jsx(Ka,{children:h.jsx(qe,{type:"submit",disabled:s,children:s?"Saving...":B?"Save":"Create"})})]})]})})}function aE(){const{data:e}=Ge({queryKey:["members","name-map"],queryFn:qS,staleTime:3e4});return w.useMemo(()=>{const n=new Map;if(e)for(const a of e)n.set(a.id,a.displayName||a.username);return a=>a?n.get(a)??a:"—"},[e])}const qU=Object.values(YR);function PU(){var Vi,Ft,Qi,J,ue;const n=ej().uuid??"",a=ti(),i=tr(),s=dr(),u=aE(),c=Ge({queryKey:["agent",n],queryFn:()=>M2(n),enabled:!!n}),d=Ge({queryKey:["tokens",n],queryFn:()=>LU(n),enabled:!!n&&c.isSuccess&&((Vi=c.data)==null?void 0:Vi.type)!=="human"}),g=Ge({queryKey:["adapters"],queryFn:X1}),p=Ge({queryKey:["adapter-mappings"],queryFn:G1}),{data:y}=Ge({queryKey:["adapter-statuses"],queryFn:K1,refetchInterval:15e3}),v=((Ft=g.data)==null?void 0:Ft.filter($=>$.agentId===n))??[],x=((Qi=p.data)==null?void 0:Qi.filter($=>$.agentId===n))??[],[S,j]=w.useState(!1),[C,T]=w.useState(""),[k,P]=w.useState(null),[U,H]=w.useState(!1),[Y,L]=w.useState(null),[B,D]=w.useState({platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),[G,ie]=w.useState(""),le=yt({mutationFn:()=>L2(n),onSuccess:()=>i.invalidateQueries({queryKey:["agent",n]})}),se=yt({mutationFn:()=>I2(n),onSuccess:()=>i.invalidateQueries({queryKey:["agent",n]})}),Ae=yt({mutationFn:()=>U2(n),onSuccess:()=>a("/agents")}),ce=yt({mutationFn:$=>Am(n,{name:$||void 0}),onSuccess:$=>{P($.token),T(""),i.invalidateQueries({queryKey:["tokens",n]})}}),ne=yt({mutationFn:$=>IU(n,$),onSuccess:()=>i.invalidateQueries({queryKey:["tokens",n]})}),q=yt({mutationFn:async()=>{let $=A0(B);if(!$)throw new Error("Credentials are required");if(B.platform==="kael"&&!$.agentToken){const Ce=await Am(n,{name:"kael-hub-binding"});$={...$,agentToken:Ce.token}}return Y2({platform:B.platform,agentId:n,credentials:$,status:B.status})},onSuccess:()=>{i.invalidateQueries({queryKey:["adapters"]}),i.invalidateQueries({queryKey:["tokens",n]}),on()}}),re=yt({mutationFn:()=>{if(!Y)throw new Error("No adapter selected");const $={status:B.status},Ce=A0(B);return Ce&&($.credentials=Ce),G2(Y,$)},onSuccess:()=>{i.invalidateQueries({queryKey:["adapters"]}),on()}}),me=yt({mutationFn:K2,onSuccess:()=>i.invalidateQueries({queryKey:["adapters"]})}),Te=yt({mutationFn:()=>V2({platform:B.platform,externalUserId:B.externalUserId,agentId:n,boundVia:"manual",displayName:B.displayName||void 0}),onSuccess:()=>{i.invalidateQueries({queryKey:["adapter-mappings"]}),on()}}),N=yt({mutationFn:Q2,onSuccess:()=>i.invalidateQueries({queryKey:["adapter-mappings"]})}),[R,K]=w.useState(!1),_=yt({mutationFn:$=>ix(n,{displayName:$.displayName,delegateMention:$.delegateMention}),onSuccess:()=>{K(!1),i.invalidateQueries({queryKey:["agent",n]}),i.invalidateQueries({queryKey:["agents"]})}}),oe=yt({mutationFn:()=>q2(n)}),[he,fe]=w.useState(!1),[Oe,et]=w.useState(""),_e=yt({mutationFn:$=>ix(n,{profile:$||null}),onSuccess:()=>{fe(!1),i.invalidateQueries({queryKey:["agent",n]})}}),ze=c.data,vt=(ze==null?void 0:ze.type)==="human";function on(){H(!1),L(null),D({platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),ie("")}function mr($){L($.id),D({platform:$.platform,feishuAppId:"",feishuAppSecret:"",credentialsJson:"",status:$.status,externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""}),H(!0)}function nn($){if($.preventDefault(),ie(""),vt){if(!B.externalUserId)return;Te.mutate();return}if(B.platform==="feishu"){if(!Y&&(!B.feishuAppId||!B.feishuAppSecret)){ie("App ID and App Secret are required");return}}else if(B.platform==="kael"){if(!Y&&(!B.kaelUserId||!B.kaelProjectId)){ie("User ID and Project ID are required");return}}else{const Ce=B.credentialsJson.trim();if(!Y&&!Ce){ie("Credentials are required");return}if(Ce)try{JSON.parse(Ce)}catch{ie("Invalid JSON");return}}Y?re.mutate():q.mutate()}if(c.isLoading)return h.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(c.error)return h.jsxs("div",{className:"text-destructive",children:["Failed to load agent: ",c.error instanceof Error?c.error.message:"Unknown error"]});if(!ze)return h.jsx("div",{className:"text-muted-foreground",children:"Agent not found"});const sa=()=>{window.confirm("Are you sure you want to delete this agent? This cannot be undone.")&&Ae.mutate()},oa=$=>{$.preventDefault(),ce.mutate(C)},li=q.error??re.error??Te.error,si=q.isPending||re.isPending||Te.isPending,pr=ze.metadata,kn=pr==null?void 0:pr.tree,ua=kn==null?void 0:kn.role,oi=kn==null?void 0:kn.domains;return h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx(qe,{variant:"ghost",size:"icon",onClick:()=>a("/agents"),children:h.jsx(T1,{className:"h-4 w-4"})}),h.jsxs("div",{className:"flex-1",children:[h.jsx("h1",{className:"text-2xl font-semibold",children:ze.displayName??ze.name}),h.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:ze.name})]}),ze.status==="active"&&h.jsxs(qe,{variant:"outline",size:"sm",onClick:()=>K(!0),children:[h.jsx(Ch,{className:"h-4 w-4 mr-2"}),"Edit"]}),!vt&&ze.status==="active"&&h.jsxs(qe,{variant:"outline",size:"sm",onClick:()=>{oe.reset(),oe.mutate()},disabled:oe.isPending,children:[h.jsx(Ok,{className:"h-4 w-4 mr-2"}),oe.isPending?"Testing...":"Test Connection"]}),ze.status==="active"&&h.jsx(qe,{variant:"outline",size:"sm",onClick:()=>{window.confirm("Suspend this agent? All tokens will be revoked.")&&le.mutate()},disabled:le.isPending,children:le.isPending?"Suspending...":"Suspend"}),ze.status==="suspended"&&h.jsxs(h.Fragment,{children:[h.jsx(qe,{variant:"outline",size:"sm",onClick:()=>se.mutate(),disabled:se.isPending,children:se.isPending?"Reactivating...":"Reactivate"}),h.jsxs(qe,{variant:"destructive",size:"sm",onClick:sa,children:[h.jsx(mo,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]}),(oe.data||oe.error)&&h.jsx(FU,{result:oe.data??{status:"error",message:"Failed to reach server"},onDismiss:()=>oe.reset()}),h.jsxs(cr,{children:[h.jsx(Cr,{children:h.jsx(Nr,{children:"Agent Info"})}),h.jsx(fr,{children:h.jsxs("dl",{className:"grid grid-cols-2 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Display Name"}),h.jsx("dd",{children:ze.displayName??"—"})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Type"}),h.jsx("dd",{children:h.jsx(It,{variant:"secondary",children:ze.type})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Status"}),h.jsx("dd",{children:h.jsx(It,{variant:ze.status==="active"?"default":"destructive",children:ze.status})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Inbox ID"}),h.jsx("dd",{className:"font-mono",children:ze.inboxId})]}),ze.delegateMention&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Delegate Mention"}),h.jsx("dd",{className:"font-mono",children:s(ze.delegateMention)})]}),ze.managerId&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Owner"}),h.jsx("dd",{children:u(ze.managerId)})]}),ua&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Role"}),h.jsx("dd",{children:ua})]}),oi&&oi.length>0&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Domains"}),h.jsx("dd",{className:"flex flex-wrap gap-1",children:oi.map($=>h.jsx(It,{variant:"outline",children:$},$))})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Created"}),h.jsx("dd",{children:ln(ze.createdAt)})]})]})})]}),(()=>{const $=ze,Ce=$.runtimeState,Ve=$.runtimeType,$t=$.activeSessions,qn=$.clientId;return Ce?h.jsxs(cr,{children:[h.jsx(Cr,{children:h.jsx(Nr,{children:"Runtime"})}),h.jsx(fr,{children:h.jsxs("dl",{className:"grid grid-cols-2 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Runtime Type"}),h.jsx("dd",{children:Ve??"—"})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"State"}),h.jsx("dd",{children:h.jsx(It,{variant:Ce==="error"?"destructive":Ce==="working"?"default":"secondary",children:Ce})})]}),$t!==null&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Sessions"}),h.jsxs("dd",{children:[$t," active"]})]}),qn&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-muted-foreground mb-1",children:"Client"}),h.jsx("dd",{className:"font-mono text-xs",children:qn})]})]})})]}):null})(),h.jsxs(cr,{children:[h.jsxs(Cr,{className:"flex flex-row items-center justify-between",children:[h.jsx(Nr,{children:"Profile"}),ze.status==="active"&&h.jsxs(qe,{variant:"outline",size:"sm",onClick:()=>{et(ze.profile??""),fe(!0)},children:[h.jsx(Ch,{className:"h-4 w-4 mr-2"}),"Edit"]})]}),h.jsx(fr,{children:ze.profile?h.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none max-h-64 overflow-auto bg-muted rounded p-4",children:h.jsx(OU,{children:ze.profile})}):h.jsx("p",{className:"text-sm text-muted-foreground",children:"No profile"})})]}),h.jsx(Pl,{open:he,onOpenChange:fe,children:h.jsxs(Ii,{children:[h.jsx(Hl,{children:h.jsx(Bi,{children:"Edit Profile"})}),h.jsxs("form",{onSubmit:$=>{$.preventDefault(),_e.mutate(Oe)},className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"profile-editor",children:"Markdown"}),h.jsx("textarea",{id:"profile-editor",value:Oe,onChange:$=>et($.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..."})]}),_e.error instanceof Error&&h.jsx("div",{className:"text-sm text-destructive",children:_e.error.message}),h.jsx(Ka,{children:h.jsx(qe,{type:"submit",disabled:_e.isPending,children:_e.isPending?"Saving...":"Save"})})]})]})}),h.jsxs(cr,{children:[h.jsxs(Cr,{className:"flex flex-row items-center justify-between",children:[h.jsxs(Nr,{className:"flex items-center gap-2",children:[vt?h.jsx(Sk,{className:"h-4 w-4"}):h.jsx(dk,{className:"h-4 w-4"}),"Platform Bindings"]}),h.jsxs(qe,{size:"sm",onClick:()=>H(!0),children:[h.jsx(wo,{className:"h-4 w-4 mr-2"}),vt?"Bind User":"Bind Bot"]})]}),h.jsx(fr,{children:vt?h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Platform"}),h.jsx(Se,{children:"External User ID"}),h.jsx(Se,{children:"Display Name"}),h.jsx(Se,{children:"Bound Via"}),h.jsx(Se,{children:"Created"}),h.jsx(Se,{className:"w-16"})]})}),h.jsx(zr,{children:x.length===0?h.jsx(tt,{children:h.jsx(xe,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):x.map($=>h.jsxs(tt,{children:[h.jsx(xe,{children:h.jsx(It,{variant:"secondary",children:$.platform})}),h.jsx(xe,{className:"font-mono text-sm",children:$.externalUserId}),h.jsx(xe,{children:$.displayName??"—"}),h.jsx(xe,{children:h.jsx(It,{variant:"outline",children:$.boundVia??"—"})}),h.jsx(xe,{className:"text-muted-foreground",children:ln($.createdAt)}),h.jsx(xe,{children:h.jsx(qe,{variant:"ghost",size:"icon",onClick:()=>{window.confirm("Remove this binding?")&&N.mutate($.id)},disabled:N.isPending,children:h.jsx(mo,{className:"h-4 w-4"})})})]},$.id))})]}):h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Platform"}),h.jsx(Se,{children:"Status"}),h.jsx(Se,{children:"Connection"}),h.jsx(Se,{children:"Created"}),h.jsx(Se,{className:"w-24"})]})}),h.jsx(zr,{children:v.length===0?h.jsx(tt,{children:h.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):v.map($=>{const Ce=y==null?void 0:y.find($t=>$t.configId===$.id),Ve=$.platform==="kael"?$.status==="active":!!(Ce!=null&&Ce.connected);return h.jsxs(tt,{children:[h.jsx(xe,{children:h.jsx(It,{variant:"secondary",children:$.platform})}),h.jsx(xe,{children:h.jsx(It,{variant:$.status==="active"?"default":"destructive",children:$.status})}),h.jsx(xe,{children:h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:Me("inline-block h-2 w-2 rounded-full",Ve?"bg-green-500":"bg-gray-300")}),h.jsx("span",{className:"text-xs text-muted-foreground",children:Ve?"Online":"Offline"})]})}),h.jsx(xe,{className:"text-muted-foreground",children:ln($.createdAt)}),h.jsx(xe,{children:h.jsxs("div",{className:"flex gap-1",children:[h.jsx(qe,{variant:"ghost",size:"icon",onClick:()=>mr($),title:"Edit",children:h.jsx(Ch,{className:"h-4 w-4"})}),h.jsx(qe,{variant:"ghost",size:"icon",onClick:()=>{window.confirm("Remove this bot binding?")&&me.mutate($.id)},disabled:me.isPending,title:"Delete",children:h.jsx(mo,{className:"h-4 w-4"})})]})})]},$.id)})})]})})]}),!vt&&h.jsxs(cr,{children:[h.jsxs(Cr,{className:"flex flex-row items-center justify-between",children:[h.jsxs(Nr,{className:"flex items-center gap-2",children:[h.jsx(bk,{className:"h-4 w-4"}),"Tokens"]}),h.jsxs(qe,{size:"sm",onClick:()=>{P(null),T(""),j(!0)},children:[h.jsx(wo,{className:"h-4 w-4 mr-2"}),"Create Token"]})]}),h.jsx(fr,{children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Name"}),h.jsx(Se,{children:"Created"}),h.jsx(Se,{children:"Last Used"}),h.jsx(Se,{children:"Expires"}),h.jsx(Se,{className:"w-20"})]})}),h.jsx(zr,{children:((J=d.data)==null?void 0:J.length)===0?h.jsx(tt,{children:h.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No tokens"})}):(ue=d.data)==null?void 0:ue.map($=>h.jsxs(tt,{children:[h.jsx(xe,{children:$.name??"—"}),h.jsx(xe,{className:"text-muted-foreground",children:ln($.createdAt)}),h.jsx(xe,{className:"text-muted-foreground",children:ln($.lastUsedAt)}),h.jsx(xe,{className:"text-muted-foreground",children:$.revokedAt?h.jsx(It,{variant:"destructive",children:"Revoked"}):$.expiresAt?ln($.expiresAt):"Never"}),h.jsx(xe,{children:!$.revokedAt&&h.jsx(qe,{variant:"ghost",size:"sm",onClick:()=>ne.mutate($.id),disabled:ne.isPending,children:h.jsx(mo,{className:"h-4 w-4"})})})]},$.id))})]})})]}),h.jsx(Pl,{open:U,onOpenChange:$=>$?H(!0):on(),children:h.jsxs(Ii,{children:[h.jsx(Hl,{children:h.jsx(Bi,{children:vt?"Bind External User":Y?"Edit Bot Binding":"Bind Bot"})}),h.jsxs("form",{onSubmit:nn,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"binding-platform",children:"Platform"}),h.jsx("select",{id:"binding-platform",value:B.platform,onChange:$=>D({...B,platform:$.target.value}),disabled:!!Y,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:qU.map($=>h.jsx("option",{value:$,children:$},$))})]}),vt?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"binding-ext-id",children:"External User ID"}),h.jsx(Gt,{id:"binding-ext-id",value:B.externalUserId,onChange:$=>D({...B,externalUserId:$.target.value}),placeholder:"ou_xxxxxxxx...",className:"font-mono",required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"binding-name",children:"Display Name (optional)"}),h.jsx(Gt,{id:"binding-name",value:B.displayName,onChange:$=>D({...B,displayName:$.target.value})})]})]}):h.jsxs(h.Fragment,{children:[B.platform==="feishu"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"space-y-2",children:[h.jsxs(Et,{htmlFor:"feishu-app-id",children:["App ID",Y?" — leave empty to keep existing":""]}),h.jsx(Gt,{id:"feishu-app-id",value:B.feishuAppId,onChange:$=>D({...B,feishuAppId:$.target.value}),placeholder:"cli_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs(Et,{htmlFor:"feishu-app-secret",children:["App Secret",Y?" — leave empty to keep existing":""]}),h.jsx(Gt,{id:"feishu-app-secret",type:"password",autoComplete:"new-password",value:B.feishuAppSecret,onChange:$=>D({...B,feishuAppSecret:$.target.value}),placeholder:"••••••••"})]})]}):B.platform==="kael"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"space-y-2",children:[h.jsxs(Et,{htmlFor:"kael-user-id",children:["User ID",Y?" — leave empty to keep existing":""]}),h.jsx(Gt,{id:"kael-user-id",value:B.kaelUserId,onChange:$=>D({...B,kaelUserId:$.target.value}),placeholder:"user_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs(Et,{htmlFor:"kael-project-id",children:["Project ID",Y?" — leave empty to keep existing":""]}),h.jsx(Gt,{id:"kael-project-id",value:B.kaelProjectId,onChange:$=>D({...B,kaelProjectId:$.target.value}),placeholder:"proj_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),!Y&&h.jsx("p",{className:"text-sm text-muted-foreground",children:"Agent Token will be created automatically when you save."})]}):h.jsxs("div",{className:"space-y-2",children:[h.jsxs(Et,{htmlFor:"binding-creds",children:["Credentials (JSON)",Y?" — leave empty to keep existing":""]}),h.jsx("textarea",{id:"binding-creds",value:B.credentialsJson,onChange:$=>D({...B,credentialsJson:$.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": "..."}'})]}),G&&h.jsx("p",{className:"text-sm text-destructive",children:G}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"binding-status",children:"Status"}),h.jsxs("select",{id:"binding-status",value:B.status,onChange:$=>D({...B,status:$.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:[h.jsx("option",{value:"active",children:"active"}),h.jsx("option",{value:"inactive",children:"inactive"})]})]})]}),li instanceof Error&&h.jsx("div",{className:"text-sm text-destructive",children:li.message}),h.jsx(Ka,{children:h.jsx(qe,{type:"submit",disabled:si,children:si?"Saving...":Y?"Update":"Create"})})]})]})}),ze.status==="active"&&h.jsx(rE,{mode:"edit",agent:ze,open:R,onOpenChange:K,onSubmit:$=>_.mutate($),isPending:_.isPending,error:_.error instanceof Error?_.error:null}),!vt&&h.jsx(Pl,{open:S,onOpenChange:$=>{j($),$||P(null)},children:h.jsxs(Ii,{children:[h.jsx(Hl,{children:h.jsx(Bi,{children:k?"Token Created":"Create Token"})}),k?h.jsxs("div",{className:"space-y-4",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy this token now. It will not be shown again."}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Gt,{value:k,readOnly:!0,className:"font-mono text-xs"}),h.jsx(qe,{variant:"outline",size:"icon",onClick:()=>navigator.clipboard.writeText(k),children:h.jsx(Hc,{className:"h-4 w-4"})})]}),h.jsx(Ka,{children:h.jsx(qe,{onClick:()=>j(!1),children:"Done"})})]}):h.jsxs("form",{onSubmit:oa,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{children:"Name (optional)"}),h.jsx(Gt,{value:C,onChange:$=>T($.target.value),placeholder:"e.g. production"})]}),ce.error instanceof Error&&h.jsx("div",{className:"text-sm text-destructive",children:ce.error.message}),h.jsx(Ka,{children:h.jsx(qe,{type:"submit",disabled:ce.isPending,children:ce.isPending?"Creating...":"Create"})})]})]})})]})}const HU={success:"Connected",timeout:"Timed out",offline:"Offline",stale:"Stale",error:"Error"},ZU={connected:{icon:"●",color:"text-green-500",label:"Connected"},stale:{icon:"◐",color:"text-yellow-500",label:"Stale"},disconnected:{icon:"○",color:"text-gray-400",label:"Disconnected"}};function FU({result:e,onDismiss:n}){const a={success:"border-l-green-500",timeout:"border-l-yellow-500",offline:"border-l-gray-400",stale:"border-l-yellow-500",error:"border-l-red-500"}[e.status],i=e.status==="success"?"default":e.status==="timeout"||e.status==="stale"?"secondary":"destructive",s=e.connection,u=s?ZU[s.health]:null;return h.jsx(cr,{className:Me("border-l-4",a),children:h.jsx(fr,{className:"pt-4",children:h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(It,{variant:i,children:HU[e.status]}),e.responseTime!=null&&h.jsxs("span",{className:"text-xs text-muted-foreground",children:[(e.responseTime/1e3).toFixed(1),"s"]})]}),e.message&&h.jsx("p",{className:"text-sm text-muted-foreground",children:e.message}),s&&h.jsxs("div",{className:"text-xs space-y-1 border-t pt-2 mt-1",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[u&&h.jsxs("span",{className:u.color,children:[u.icon," ",u.label]}),s.runtimeState&&h.jsxs("span",{className:"text-muted-foreground",children:["runtime: ",s.runtimeState]})]}),s.client?h.jsxs("div",{className:"text-muted-foreground",children:["Client: ",s.client.hostname??s.client.id,s.client.os&&` (${s.client.os})`,s.client.sdkVersion&&` · SDK ${s.client.sdkVersion}`]}):h.jsx("div",{className:"text-muted-foreground",children:"No client bound"}),s.lastSeenAt&&h.jsxs("div",{className:"text-muted-foreground",children:["Last seen: ",new Date(s.lastSeenAt).toLocaleString()]})]}),e.responseContent&&h.jsx("p",{className:"text-sm mt-2 whitespace-pre-wrap bg-muted rounded p-2 max-h-40 overflow-auto",children:e.responseContent})]}),h.jsx(qe,{variant:"ghost",size:"sm",onClick:n,children:"Dismiss"})]})})})}function A0(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 $U=Object.values(US);function z0(e){return[...e].sort((n,a)=>{const i=(n.name??n.displayName??"").toLowerCase(),s=(a.name??a.displayName??"").toLowerCase();return i.localeCompare(s)})}function VU(){const e=ti(),n=tr(),{memberId:a}=Uo(),[i,s]=w.useState(),[u,c]=w.useState(""),[d,g]=w.useState(!1),[p,y]=w.useState(null),[v,x]=w.useState(!1),S=dr(),j=aE(),{data:C,isLoading:T,error:k}=Ge({queryKey:["agents",i,u],queryFn:()=>Gm({limit:100,cursor:i,type:u||void 0})}),{myAgents:P,teamAgents:U}=w.useMemo(()=>{if(!(C!=null&&C.items))return{myAgents:[],teamAgents:[]};const D=[],G=[];for(const ie of C.items)a&&ie.managerId===a?D.push(ie):G.push(ie);return{myAgents:z0(D),teamAgents:z0(G)}},[C,a]),H=yt({mutationFn:async D=>{const G=await D2({name:D.name,type:D.type,displayName:D.displayName??void 0,delegateMention:D.delegateMention??void 0});if(D.type==="human")return{agent:G,token:null,provisioned:!1};if(D.clientId)return await B2(G.uuid,D.clientId),{agent:G,token:null,provisioned:!0};const ie=await Am(G.uuid,{name:"default"});return{agent:G,token:ie.token,provisioned:!1}},onSuccess:({agent:D,token:G,provisioned:ie})=>{g(!1),n.invalidateQueries({queryKey:["agents"]}),n.invalidateQueries({queryKey:["activity"]}),ie?e(`/agents/${D.uuid}`):G?(y({agent:D,token:G,provisioned:!1}),x(!1)):e(`/agents/${D.uuid}`)}});function Y(D){const ie=D.runtimeState,le={idle:"bg-green-500",working:"bg-blue-500",error:"bg-red-500"};return h.jsxs(tt,{className:"cursor-pointer",onClick:()=>e(`/agents/${D.uuid}`),children:[h.jsx(xe,{className:"font-mono text-sm",children:D.name}),h.jsx(xe,{children:D.displayName??"—"}),h.jsx(xe,{children:h.jsx(It,{variant:"secondary",children:D.type})}),h.jsx(xe,{className:"font-mono text-sm text-muted-foreground",children:D.delegateMention?S(D.delegateMention):"—"}),h.jsx(xe,{className:"text-sm text-muted-foreground",children:j(D.managerId)}),h.jsx(xe,{children:ie?h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:Me("inline-block h-2 w-2 rounded-full",le[ie]??"bg-gray-300")}),h.jsx("span",{className:"text-xs text-muted-foreground",children:ie})]}):h.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-gray-300",title:"not running"})}),h.jsx(xe,{children:h.jsx(It,{variant:D.status==="active"?"default":"destructive",children:D.status})}),h.jsx(xe,{className:"text-muted-foreground",children:ln(D.createdAt)})]},D.uuid)}const L=p!=null&&p.token?`first-tree-hub agent add ${p.agent.name??p.agent.uuid} --token ${p.token}`:"",B=()=>{navigator.clipboard.writeText(L),x(!0),setTimeout(()=>x(!1),2e3)};return h.jsxs("div",{className:"space-y-8",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("h1",{className:"text-2xl font-semibold",children:"Agents"}),h.jsxs("select",{value:u,onChange:D=>{c(D.target.value),s(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:[h.jsx("option",{value:"",children:"All types"}),$U.map(D=>h.jsx("option",{value:D,children:D},D))]})]}),T?h.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading..."}):k?h.jsxs("div",{className:"text-center py-8 text-destructive",children:["Failed to load agents: ",k instanceof Error?k.message:"Unknown error"]}):h.jsxs(h.Fragment,{children:[h.jsxs("section",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"text-lg font-medium",children:"My Agents"}),h.jsxs(qe,{size:"sm",onClick:()=>g(!0),children:[h.jsx(wo,{className:"h-4 w-4 mr-2"}),"New Agent"]})]}),h.jsx("div",{className:"border rounded-lg",children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Name"}),h.jsx(Se,{children:"Display Name"}),h.jsx(Se,{children:"Type"}),h.jsx(Se,{children:"Delegate"}),h.jsx(Se,{children:"Owner"}),h.jsx(Se,{children:"Runtime"}),h.jsx(Se,{children:"Status"}),h.jsx(Se,{children:"Created"})]})}),h.jsx(zr,{children:P.length===0?h.jsx(tt,{children:h.jsx(xe,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"No agents yet — create one to get started"})}):P.map(D=>Y(D))})]})})]}),U.length>0&&h.jsxs("section",{children:[h.jsx("h2",{className:"text-lg font-medium mb-3",children:"Team Agents"}),h.jsx("div",{className:"border rounded-lg",children:h.jsxs(Tr,{children:[h.jsx(Ar,{children:h.jsxs(tt,{children:[h.jsx(Se,{children:"Name"}),h.jsx(Se,{children:"Display Name"}),h.jsx(Se,{children:"Type"}),h.jsx(Se,{children:"Delegate"}),h.jsx(Se,{children:"Owner"}),h.jsx(Se,{children:"Runtime"}),h.jsx(Se,{children:"Status"}),h.jsx(Se,{children:"Created"})]})}),h.jsx(zr,{children:U.map(D=>Y(D))})]})})]})]}),(C==null?void 0:C.nextCursor)&&h.jsx("div",{className:"flex justify-end",children:h.jsx(qe,{variant:"outline",onClick:()=>s(C.nextCursor??void 0),children:"Next Page"})}),h.jsx(rE,{mode:"create",open:d,onOpenChange:g,onSubmit:D=>H.mutate(D),isPending:H.isPending,error:H.error instanceof Error?H.error:null}),h.jsx(Pl,{open:p!==null,onOpenChange:D=>{if(!D){const G=p==null?void 0:p.agent.uuid;y(null),G&&e(`/agents/${G}`)}},children:h.jsxs(Ii,{children:[h.jsx(Hl,{children:h.jsx(Bi,{children:"Agent Created"})}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Run this command in your terminal to bind the agent to your client:"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("code",{className:"flex-1 bg-muted rounded-md px-3 py-2 text-xs font-mono break-all select-all",children:L}),h.jsx(qe,{variant:"outline",size:"icon",className:"shrink-0",onClick:B,children:v?h.jsx(A1,{className:"h-4 w-4 text-green-600"}):h.jsx(Hc,{className:"h-4 w-4"})})]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Copy this token now. It will not be shown again."})]}),h.jsx(Ka,{children:h.jsx(qe,{onClick:()=>{const D=p==null?void 0:p.agent.uuid;y(null),D&&e(`/agents/${D}`)},children:"Done"})})]})})]})}function QU(){const{isAuthenticated:e,login:n}=Uo(),[a,i]=w.useState(""),[s,u]=w.useState(""),[c,d]=w.useState(null),[g,p]=w.useState(!1);if(e)return h.jsx(g1,{to:"/",replace:!0});const y=async v=>{v.preventDefault(),d(null),p(!0);try{await n(a,s)}catch(x){d(x instanceof Error?x.message:"Login failed")}finally{p(!1)}};return h.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:h.jsxs(cr,{className:"w-full max-w-sm",children:[h.jsxs(Cr,{className:"text-center",children:[h.jsx(Nr,{className:"text-2xl",children:"First Tree"}),h.jsx(W1,{children:"Sign in to your workspace"})]}),h.jsx(fr,{children:h.jsxs("form",{onSubmit:y,className:"space-y-4",children:[c&&h.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:c}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"username",children:"Username"}),h.jsx(Gt,{id:"username",value:a,onChange:v=>i(v.target.value),required:!0,autoFocus:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Et,{htmlFor:"password",children:"Password"}),h.jsx(Gt,{id:"password",type:"password",value:s,onChange:v=>u(v.target.value),required:!0})]}),h.jsx(qe,{type:"submit",className:"w-full",disabled:g,children:g?"Signing in...":"Sign in"})]})})]})})}function YU(e,n){return Ue.post(`/admin/chats/${encodeURIComponent(e)}/messages`,{format:"text",content:n})}function GU(e){return Ue.post(`/admin/agents/${encodeURIComponent(e)}/chats`,{})}function KU(e,n){const a=new URLSearchParams;a.set("limit",String(n.limit)),n!=null&&n.cursor&&a.set("cursor",n.cursor);const i=a.toString();return Ue.get(`/admin/chats/${encodeURIComponent(e)}/messages${i?`?${i}`:""}`)}function iE(){return Ue.get("/admin/overview")}function Np(e,n){const i=new URLSearchParams().toString();return Ue.get(`/admin/sessions/agents/${e}${i?`?${i}`:""}`)}function XU(e,n){return Ue.post(`/admin/sessions/agents/${e}/${n}/suspend`)}function JU(e,n){return Ue.post(`/admin/sessions/agents/${e}/${n}/resume`)}function WU(e,n){return Ue.post(`/admin/sessions/agents/${e}/${n}/terminate`)}const eL=2e3,tL=3e4;function nL(e){const{onMessage:n,enabled:a=!0}={},i=tr(),s=w.useRef(null),u=w.useRef(0),c=w.useRef(null),d=w.useRef(!1),g=w.useRef(n);g.current=n;const p=w.useRef(i);p.current=i,w.useEffect(()=>{if(!a)return;d.current=!1;function y(){const v=Vm();if(!(v!=null&&v.accessToken))return;const S=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws/admin?token=${v.accessToken}`,j=new WebSocket(S);s.current=j,j.onmessage=C=>{var T;try{const k=JSON.parse(C.data);(T=g.current)==null||T.call(g,k),k.type==="notification"?p.current.invalidateQueries({queryKey:["notifications"]}):k.type==="session:state"&&(p.current.invalidateQueries({queryKey:["activity"]}),p.current.invalidateQueries({queryKey:["sessions"]}))}catch{}},j.onopen=()=>{u.current=0},j.onclose=()=>{if(s.current=null,!d.current){u.current++;const C=Math.min(eL*2**(u.current-1),tL);c.current=setTimeout(()=>{c.current=null,d.current||y()},C)}}}return y(),()=>{d.current=!0,c.current&&(clearTimeout(c.current),c.current=null),s.current&&(s.current.close(1e3,"unmount"),s.current=null)}},[a])}function lE(){const{data:e}=Ge({queryKey:["clients"],queryFn:Km,staleTime:1e4,refetchInterval:1e4});return w.useMemo(()=>{const n=e??[],a=new Map;for(const i of n)a.set(i.id,i);return{resolve:i=>i?a.get(i)??null:null,clients:n,connectedClients:n.filter(i=>i.status==="connected")}},[e])}function rL(){const[e,n]=E1(),a=e.get("a"),i=e.get("c"),[s,u]=w.useState(!0);nL();const c=w.useCallback(p=>{n(p?{a:p}:{})},[n]),d=w.useCallback((p,y)=>{n({a:p,c:y})},[n]),g=w.useCallback(()=>{a&&n({a})},[a,n]);return h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsx(cL,{selectedAgentId:a,selectedChatId:i,onSelectAgent:c,onSelectChat:d}),h.jsx("div",{className:"flex-1 flex flex-col overflow-hidden border-x border-border",children:h.jsx(fL,{selectedAgentId:a,selectedChatId:i,onSelectChat:d,onClearChat:g})}),s?h.jsxs("div",{className:"w-80 shrink-0 flex flex-col overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[h.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:i?"Session":a?"Agent Info":"Dashboard"}),h.jsx("button",{type:"button",onClick:()=>u(!1),className:"text-muted-foreground hover:text-foreground",children:h.jsx(jk,{className:"h-4 w-4"})})]}),h.jsx(pL,{selectedAgentId:a,selectedChatId:i})]}):h.jsx("div",{className:"shrink-0 border-l border-border flex items-start pt-2 px-1",children:h.jsx("button",{type:"button",onClick:()=>u(!0),className:"text-muted-foreground hover:text-foreground p-1",children:h.jsx(Tk,{className:"h-4 w-4"})})})]})}const aL={error:0,blocked:1,working:2,idle:3};function O0(e,n){return n?e?aL[e]??4:4:5}const iL={idle:"bg-green-500",working:"bg-green-500 animate-pulse",blocked:"bg-yellow-500",error:"bg-red-500"};function lL({runtimeState:e,clientId:n}){if(!n||!e)return h.jsx("span",{className:"h-2 w-2 rounded-full bg-gray-400 shrink-0 mt-1.5"});const a=iL[e]??"bg-gray-400";return h.jsx("span",{className:`h-2 w-2 rounded-full ${a} shrink-0 mt-1.5`})}function sL({state:e}){if(!e)return h.jsx("span",{className:"text-xs text-muted-foreground",children:"offline"});const n={idle:"text-green-600",working:"text-blue-600",blocked:"text-yellow-600",error:"text-red-600"};return h.jsx("span",{className:Me("text-xs font-medium",n[e]??"text-muted-foreground"),children:e})}function oL({state:e}){const n={active:"border-green-500/50 text-green-600 bg-green-500/10",suspended:"border-yellow-500/50 text-yellow-600 bg-yellow-500/10",evicted:"border-muted text-muted-foreground"};return h.jsx(It,{variant:"outline",className:Me("text-xs",n[e]),children:e})}function uL({msg:e,myAgentId:n}){if(!n||e.senderId!==n)return null;const a=e.deliveryStatus??"sent";return a==="acked"?h.jsx("span",{className:"text-blue-500 text-xs ml-1",title:"Agent has started processing",children:"✓✓"}):a==="delivered"?h.jsx("span",{className:"text-muted-foreground text-xs ml-1",title:"Delivered to agent inbox",children:"✓✓"}):h.jsx("span",{className:"text-muted-foreground text-xs ml-1",title:"Sent",children:"✓"})}function cL({selectedAgentId:e,selectedChatId:n,onSelectAgent:a,onSelectChat:i}){const s=dr(),{resolve:u}=lE(),c=tr(),{data:d}=Ge({queryKey:["activity"],queryFn:Lo,refetchInterval:1e4}),g=[...(d==null?void 0:d.agents)??[]].sort((v,x)=>O0(v.runtimeState,v.clientId)-O0(x.runtimeState,x.clientId)),{data:p}=Ge({queryKey:["agent-sessions",e],queryFn:()=>e?Np(e):Promise.resolve([]),enabled:!!e,refetchInterval:1e4}),y=yt({mutationFn:v=>GU(v),onSuccess:(v,x)=>{c.invalidateQueries({queryKey:["agent-sessions",x]}),i(x,v.id)}});return h.jsxs("aside",{className:"w-60 shrink-0 flex flex-col overflow-y-auto bg-card",children:[h.jsx("div",{className:"px-3 py-2 border-b border-border",children:h.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Agents"})}),h.jsxs("div",{className:"flex-1 overflow-y-auto py-1",children:[g.length===0&&h.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground text-center",children:"No agents"}),g.map(v=>{var S;const x=e===v.agentId;return h.jsxs("div",{children:[h.jsxs("button",{type:"button",onClick:()=>a(x?null:v.agentId),className:Me("w-full flex items-start gap-2 px-3 py-1.5 text-left transition-colors",x?"bg-accent":"hover:bg-accent/50"),children:[h.jsx(lL,{runtimeState:v.runtimeState,clientId:v.clientId}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-sm font-medium truncate flex-1",children:s(v.agentId)}),h.jsx(sL,{state:v.runtimeState})]}),h.jsx("span",{className:"text-xs text-muted-foreground truncate block",children:v.clientId?((S=u(v.clientId))==null?void 0:S.hostname)??v.clientId.slice(0,8):"disconnected"})]})]}),x&&h.jsxs("div",{className:"pl-5 pr-2 py-1 space-y-0.5",children:[(!p||p.length===0)&&h.jsx("div",{className:"text-xs text-muted-foreground py-1 pl-2",children:"No active sessions"}),p==null?void 0:p.map(j=>h.jsxs("button",{type:"button",onClick:()=>i(v.agentId,j.chatId),className:Me("w-full flex items-center gap-1.5 px-2 py-1 rounded text-left text-xs transition-colors",n===j.chatId?"bg-primary/10 text-foreground":"text-muted-foreground hover:bg-accent/50"),children:[h.jsx(z1,{className:"h-3 w-3 shrink-0"}),h.jsxs("span",{className:"truncate flex-1",children:[j.chatId.slice(0,8),"..."]}),h.jsx("span",{className:Me("h-1.5 w-1.5 rounded-full shrink-0",j.state==="active"&&"bg-green-500",j.state==="suspended"&&"bg-yellow-500",j.state==="evicted"&&"bg-gray-400"),title:j.state})]},j.chatId)),h.jsxs("button",{type:"button",onClick:()=>y.mutate(v.agentId),disabled:y.isPending,className:"w-full flex items-center gap-1.5 px-2 py-1 rounded text-xs text-muted-foreground hover:bg-accent/50 transition-colors",children:[h.jsx(wo,{className:"h-3 w-3"}),"New Chat"]})]})]},v.agentId)})]})]})}function fL({selectedAgentId:e,selectedChatId:n,onSelectChat:a,onClearChat:i}){return n&&e?h.jsx(mL,{agentId:e,chatId:n,onBack:i}):e?h.jsx(hL,{agentId:e,onSelectChat:a}):h.jsx(dL,{})}function dL(){const e=dr(),{data:n}=Ge({queryKey:["overview"],queryFn:iE,refetchInterval:3e4}),{data:a}=Ge({queryKey:["activity"],queryFn:Lo,refetchInterval:1e4}),{data:i}=Ge({queryKey:["notifications","feed"],queryFn:()=>Eo({limit:20}),refetchInterval:1e4});return h.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Activity"}),h.jsx("div",{className:"grid grid-cols-4 gap-3 mb-6",children:[{label:"Agents",value:(n==null?void 0:n.agents)??0},{label:"Online",value:(n==null?void 0:n.onlineAgents)??0},{label:"Working",value:(a==null?void 0:a.byState.working)??0},{label:"Blocked",value:(a==null?void 0:a.byState.blocked)??0}].map(s=>h.jsxs("div",{className:"rounded-lg border border-border p-3",children:[h.jsx("div",{className:"text-xs text-muted-foreground",children:s.label}),h.jsx("div",{className:"text-xl font-bold",children:s.value})]},s.label))}),h.jsxs("div",{className:"space-y-1",children:[(!(i!=null&&i.items)||i.items.length===0)&&h.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"No recent activity"}),i==null?void 0:i.items.map(s=>h.jsxs("div",{className:Me("flex items-start gap-2 px-3 py-2 rounded-md text-sm",!s.read&&"bg-accent/20"),children:[h.jsx(Bk,{className:Me("h-4 w-4 mt-0.5 shrink-0",s.severity==="high"&&"text-red-500",s.severity==="medium"&&"text-yellow-500",s.severity==="low"&&"text-muted-foreground")}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"font-medium",children:s.agentId?e(s.agentId):""})," ",h.jsx("span",{className:"text-muted-foreground",children:s.message})]}),h.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:ln(s.createdAt)})]},s.id))]})]})}function hL({agentId:e,onSelectChat:n}){const a=dr(),{data:i}=Ge({queryKey:["agent-sessions-all",e],queryFn:()=>Np(e),refetchInterval:1e4}),s=(i==null?void 0:i.filter(d=>d.state==="active"))??[],u=(i==null?void 0:i.length)??0,c=(i==null?void 0:i.filter(d=>d.runtimeState==="error"))??[];return h.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[h.jsx("h2",{className:"text-lg font-semibold mb-1",children:a(e)}),h.jsx("p",{className:"text-sm text-muted-foreground mb-4 font-mono",children:e}),h.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[h.jsxs("div",{className:"rounded-lg border border-border p-3",children:[h.jsx("div",{className:"text-xs text-muted-foreground",children:"Active"}),h.jsx("div",{className:"text-xl font-bold",children:s.length})]}),h.jsxs("div",{className:"rounded-lg border border-border p-3",children:[h.jsx("div",{className:"text-xs text-muted-foreground",children:"Total"}),h.jsx("div",{className:"text-xl font-bold",children:u})]}),h.jsxs("div",{className:"rounded-lg border border-border p-3",children:[h.jsx("div",{className:"text-xs text-muted-foreground",children:"Error"}),h.jsx("div",{className:"text-xl font-bold text-red-600",children:c.length})]})]}),h.jsx("h3",{className:"text-sm font-medium mb-2",children:"All Sessions"}),h.jsx("div",{className:"border rounded-lg overflow-hidden",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[h.jsx("th",{className:"text-left px-3 py-2 font-medium text-muted-foreground",children:"Chat"}),h.jsx("th",{className:"text-left px-3 py-2 font-medium text-muted-foreground",children:"State"}),h.jsx("th",{className:"text-left px-3 py-2 font-medium text-muted-foreground",children:"Messages"}),h.jsx("th",{className:"text-left px-3 py-2 font-medium text-muted-foreground",children:"Last Active"})]})}),h.jsxs("tbody",{children:[(!i||i.length===0)&&h.jsx("tr",{children:h.jsx("td",{colSpan:4,className:"px-3 py-6 text-center text-muted-foreground",children:"No sessions"})}),i==null?void 0:i.map(d=>h.jsxs("tr",{className:"border-b border-border last:border-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:()=>n(e,d.chatId),children:[h.jsxs("td",{className:"px-3 py-2 font-mono text-xs",children:[d.chatId.slice(0,12),"..."]}),h.jsx("td",{className:"px-3 py-2",children:h.jsx(oL,{state:d.state})}),h.jsx("td",{className:"px-3 py-2 text-muted-foreground text-xs",children:d.messageCount}),h.jsx("td",{className:"px-3 py-2 text-muted-foreground text-xs",children:ln(d.lastActivityAt)})]},d.chatId))]})]})})]})}function mL({agentId:e,chatId:n,onBack:a}){var S;const i=tr(),s=dr(),{agentId:u}=Uo(),[c,d]=w.useState(""),g=w.useRef(null),{data:p}=Ge({queryKey:["chat-messages",n],queryFn:()=>KU(n,{limit:50}),refetchInterval:5e3}),y=yt({mutationFn:j=>YU(n,j),onSuccess:()=>{d(""),i.invalidateQueries({queryKey:["chat-messages",n]})}}),v=()=>{const j=c.trim();j&&y.mutate(j)},x=((S=p==null?void 0:p.items)==null?void 0:S.length)??0;return w.useEffect(()=>{var j;x>0&&((j=g.current)==null||j.scrollIntoView({behavior:"smooth"}))},[x]),h.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border shrink-0",children:[h.jsx("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-foreground",children:h.jsx(T1,{className:"h-4 w-4"})}),h.jsx("span",{className:"text-sm font-medium",children:s(e)}),h.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:[n.slice(0,8),"..."]})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[(!(p!=null&&p.items)||p.items.length===0)&&h.jsxs("div",{className:"text-sm text-muted-foreground text-center py-8",children:[h.jsx(Nk,{className:"h-8 w-8 mx-auto mb-2 opacity-30"}),"Send a message to start the conversation"]}),[...(p==null?void 0:p.items)??[]].reverse().map(j=>h.jsxs("div",{className:"rounded-md border border-border p-3",children:[h.jsxs("div",{className:"flex items-center justify-between mb-1",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-sm font-medium",children:s(j.senderId)}),j.source&&h.jsx(It,{variant:"outline",className:"text-[10px] opacity-70 px-1 py-0",children:j.source})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-xs text-muted-foreground",children:ln(j.createdAt)}),h.jsx(uL,{msg:j,myAgentId:u})]})]}),h.jsx("div",{className:"text-sm",children:j.format==="text"?h.jsx("p",{className:"whitespace-pre-wrap",children:typeof j.content=="string"?j.content:JSON.stringify(j.content)}):h.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-auto max-h-40",children:JSON.stringify(j.content,null,2)})})]},j.id)),h.jsx("div",{ref:g})]}),h.jsxs("div",{className:"shrink-0 border-t border-border p-3 flex gap-2",children:[h.jsx(Gt,{placeholder:"Type a message...",value:c,onChange:j=>d(j.target.value),onKeyDown:j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),v())},disabled:y.isPending}),h.jsx(qe,{size:"icon",onClick:v,disabled:y.isPending||!c.trim(),children:h.jsx(Dk,{className:"h-4 w-4"})})]}),y.isError&&h.jsx("p",{className:"text-destructive text-xs px-3 pb-2",children:y.error instanceof Error?y.error.message:"Failed to send"})]})}function pL({selectedAgentId:e,selectedChatId:n}){return n&&e?h.jsx(SL,{agentId:e,chatId:n}):e?h.jsx(xL,{agentId:e}):h.jsx(gL,{})}function gL(){const e=dr(),{data:n}=Ge({queryKey:["overview"],queryFn:iE,refetchInterval:3e4}),{data:a}=Ge({queryKey:["activity"],queryFn:Lo,refetchInterval:1e4}),{data:i}=Ge({queryKey:["notifications","context"],queryFn:()=>Eo({limit:5}),refetchInterval:3e4});return h.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-4",children:[h.jsx("div",{className:"space-y-2",children:[{label:"Clients",value:(a==null?void 0:a.clients)??0},{label:"Agents",value:(n==null?void 0:n.agents)??0},{label:"Online",value:(n==null?void 0:n.onlineAgents)??0},{label:"Working",value:(a==null?void 0:a.byState.working)??0},{label:"Idle",value:(a==null?void 0:a.byState.idle)??0},{label:"Blocked",value:(a==null?void 0:a.byState.blocked)??0},{label:"Error",value:(a==null?void 0:a.byState.error)??0}].map(s=>h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"text-muted-foreground",children:s.label}),h.jsx("span",{className:"font-medium",children:s.value})]},s.label))}),h.jsxs("div",{className:"border-t border-border pt-3",children:[h.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Notifications"}),!(i!=null&&i.items)||i.items.length===0?h.jsx("div",{className:"text-xs text-muted-foreground text-center py-3",children:"No notifications"}):h.jsx("div",{className:"space-y-2",children:i.items.map(s=>h.jsxs("div",{className:Me("text-xs",!s.read&&"font-medium"),children:[h.jsx("span",{className:Me(s.severity==="high"&&"text-red-500",s.severity==="medium"&&"text-yellow-500"),children:s.agentId?e(s.agentId):"System"})," ",h.jsx("span",{className:"text-muted-foreground",children:s.message})]},s.id))})]})]})}function yL(e){if(!e)return"—";const n=Date.now()-new Date(e).getTime(),a=Math.floor(n/6e4);if(a<60)return`${a}m`;const i=Math.floor(a/60);return i<24?`${i}h ${a%60}m`:`${Math.floor(i/24)}d ${i%24}h`}const vL={agent_error:"Error",session_error:"Error",agent_blocked:"Blocked",agent_stale:"Stale",agent_disconnected:"Disconnected",agent_connected:"Connected",agent_needs_decision:"Decision",session_completed:"Completed"};function bL({notifications:e,agentId:n}){const[,a]=E1(),i=tr(),s=yt({mutationFn:u=>Y1(u),onSuccess:()=>{i.invalidateQueries({queryKey:["notifications","agent",n]})}});return h.jsx("div",{className:"space-y-1",children:e.map(u=>{const c=!!u.chatId,d=vL[u.type]??u.type;return h.jsxs("button",{type:"button",className:Me("w-full flex items-start gap-1.5 px-2 py-1.5 rounded text-xs text-left transition-colors",!u.read&&"bg-accent/30",c&&"cursor-pointer hover:bg-accent/50"),onClick:()=>{u.read||s.mutate(u.id),c&&a({a:n,c:u.chatId})},children:[h.jsx("span",{className:Me("h-1.5 w-1.5 rounded-full mt-1 shrink-0",u.read?"bg-transparent":"bg-primary")}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:Me("font-medium",u.severity==="high"&&"text-red-500",u.severity==="medium"&&"text-yellow-600",u.severity==="low"&&"text-muted-foreground"),children:d}),h.jsx("span",{className:"text-muted-foreground ml-auto shrink-0",children:ln(u.createdAt)})]}),h.jsx("span",{className:"text-muted-foreground line-clamp-2",children:u.message})]})]},u.id)})})}function xL({agentId:e}){var d;const n=dr(),{resolve:a}=lE(),{data:i}=Ge({queryKey:["activity"],queryFn:Lo,refetchInterval:1e4}),s=(d=i==null?void 0:i.agents)==null?void 0:d.find(g=>g.agentId===e),u=a(s==null?void 0:s.clientId),{data:c}=Ge({queryKey:["notifications","agent",e],queryFn:()=>Eo({agentId:e,limit:5}),refetchInterval:3e4});return h.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-4",children:[h.jsx("div",{className:"space-y-2",children:[{label:"Name",value:n(e)},{label:"Status",value:(s==null?void 0:s.runtimeState)??"offline"},{label:"Runtime",value:(s==null?void 0:s.runtimeType)??"—"},{label:"Active",value:String((s==null?void 0:s.activeSessions)??0)},{label:"Total",value:String((s==null?void 0:s.totalSessions)??0)}].map(g=>h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"text-muted-foreground",children:g.label}),h.jsx("span",{className:"font-medium",children:g.value})]},g.label))}),h.jsxs("div",{className:"border-t border-border pt-3",children:[h.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Client"}),u?h.jsx("div",{className:"space-y-2",children:[{label:"Hostname",value:u.hostname??"—"},{label:"OS",value:u.os??"—"},{label:"SDK",value:u.sdkVersion??"—"},{label:"Connected",value:yL(u.connectedAt)}].map(g=>h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"text-muted-foreground",children:g.label}),h.jsx("span",{className:"font-medium",children:g.value})]},g.label))}):h.jsx("div",{className:"text-xs text-muted-foreground",children:"disconnected"})]}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("a",{href:`/agents/${e}`,className:"text-xs text-primary hover:underline",children:"Manage Agent →"}),h.jsx("a",{href:"/admin#clients",className:"text-xs text-primary hover:underline",children:"Admin: Clients →"})]}),h.jsxs("div",{className:"border-t border-border pt-3",children:[h.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Notifications"}),!(c!=null&&c.items)||c.items.length===0?h.jsx("div",{className:"text-xs text-muted-foreground text-center py-3",children:"No notifications for this agent"}):h.jsx(bL,{notifications:c.items,agentId:e})]})]})}function SL({agentId:e,chatId:n}){const a=tr(),{data:i}=Ge({queryKey:["session",e,n],queryFn:()=>Np(e).then(x=>x.find(S=>S.chatId===n)??null),refetchInterval:5e3}),s=yt({mutationFn:()=>XU(e,n),onSuccess:()=>a.invalidateQueries({queryKey:["session",e,n]})}),u=yt({mutationFn:()=>JU(e,n),onSuccess:()=>a.invalidateQueries({queryKey:["session",e,n]})}),c=yt({mutationFn:()=>WU(e,n),onSuccess:()=>a.invalidateQueries({queryKey:["session",e,n]})}),d=(i==null?void 0:i.state)==="active",g=(i==null?void 0:i.state)==="suspended",p=(i==null?void 0:i.state)==="evicted",y=i!=null&&i.startedAt?new Date(i.startedAt):null,v=y?Math.floor((Date.now()-y.getTime())/6e4):null;return h.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-3",children:[h.jsx("div",{className:"space-y-2 mb-3",children:[{label:"State",value:(i==null?void 0:i.state)??"—"},{label:"Runtime",value:(i==null?void 0:i.runtimeState)??"—"},{label:"Started",value:i!=null&&i.startedAt?ln(i.startedAt):"—"},{label:"Duration",value:v!==null?`${v} min`:"—"},{label:"Messages",value:String((i==null?void 0:i.messageCount)??0)}].map(x=>h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{className:"text-muted-foreground",children:x.label}),h.jsx("span",{className:"font-medium",children:x.value})]},x.label))}),h.jsxs("div",{className:"flex gap-2 mb-3",children:[d&&h.jsx(qe,{variant:"outline",size:"sm",onClick:()=>s.mutate(),disabled:s.isPending,children:"Suspend"}),g&&h.jsx(qe,{variant:"outline",size:"sm",onClick:()=>u.mutate(),disabled:u.isPending,children:"Resume"}),!p&&h.jsx(qe,{variant:"destructive",size:"sm",onClick:()=>{window.confirm("Terminate this session?")&&c.mutate()},disabled:c.isPending,children:"Terminate"})]}),h.jsxs("div",{className:"border-t border-border pt-3 flex-1 overflow-y-auto",children:[h.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Session Info"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Chat ID: ",h.jsxs("span",{className:"font-mono",children:[n.slice(0,12),"..."]})]})]})]})}const wL=new r_({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});function EL(){return h.jsx(a_,{client:wL,children:h.jsx(Wj,{children:h.jsx(qj,{children:h.jsxs(pj,{children:[h.jsx(Ba,{path:"/login",element:h.jsx(QU,{})}),h.jsx(Ba,{element:h.jsx(ek,{}),children:h.jsxs(Ba,{element:h.jsx($2,{}),children:[h.jsx(Ba,{index:!0,element:h.jsx(rL,{})}),h.jsx(Ba,{path:"agents",element:h.jsx(VU,{})}),h.jsx(Ba,{path:"agents/:uuid",element:h.jsx(PU,{})}),h.jsx(Ba,{path:"admin",element:h.jsx(gD,{})})]})})]})})})})}const sE=document.getElementById("root");if(!sE)throw new Error("Root element not found");ON.createRoot(sE).render(h.jsx(w.StrictMode,{children:h.jsx(EL,{})}));
|