@langgraph-js/ui 1.1.0 → 1.2.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/LICENSE +201 -201
- package/README.md +6 -6
- package/cli.mjs +36 -36
- package/dist/assets/{index-CCaE6qp1.js → index-BHPbGlnP.js} +33 -33
- package/dist/assets/index-Du4LMUX2.css +1 -0
- package/dist/index.html +14 -14
- package/index.html +22 -22
- package/package.json +9 -8
- package/src/chat/Chat.tsx +164 -150
- package/src/chat/FileUpload/index.ts +105 -105
- package/src/chat/chat.css +403 -388
- package/src/chat/components/FileList.css +128 -115
- package/src/chat/components/FileList.tsx +73 -70
- package/src/chat/components/HistoryList.tsx +192 -192
- package/src/chat/components/JsonEditorPopup.css +81 -0
- package/src/chat/components/JsonEditorPopup.tsx +57 -0
- package/src/chat/components/MessageAI.tsx +24 -24
- package/src/chat/components/MessageHuman.tsx +55 -55
- package/src/chat/components/MessageTool.tsx +46 -46
- package/src/chat/components/UsageMetadata.tsx +40 -40
- package/src/chat/context/ChatContext.tsx +29 -29
- package/src/chat/context/ExtraParamsContext.tsx +42 -0
- package/src/chat/store/index.ts +24 -24
- package/src/chat/tools.ts +33 -33
- package/src/chat/types.ts +16 -16
- package/src/hooks/useLocalStorage.ts +27 -27
- package/src/index.ts +1 -1
- package/src/login/Login.css +93 -93
- package/src/login/Login.tsx +92 -92
- package/test/App.tsx +9 -9
- package/test/main.tsx +5 -5
- package/test/vite-env.d.ts +1 -1
- package/tsconfig.json +21 -21
- package/tsconfig.node.json +9 -9
- package/vite.config.ts +17 -17
- package/dist/assets/index-CBfok6qC.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $b=Object.defineProperty;var Kb=(t,i,r)=>i in t?$b(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r;var $p=(t,i,r)=>Kb(t,typeof i!="symbol"?i+"":i,r);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function Dl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vc={exports:{}},nl={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var Pb=Object.defineProperty;var Fb=(t,i,r)=>i in t?Pb(t,i,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Kp;function Jb(){if(Kp)return nl;Kp=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:t,type:a,key:c,ref:s!==void 0?s:null,props:o}}return nl.Fragment=i,nl.jsx=r,nl.jsxs=r,nl}var Jp;function Wb(){return Jp||(Jp=1,Vc.exports=Jb()),Vc.exports}var B=Wb(),Yc={exports:{}},il={},Ic={exports:{}},Gc={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* scheduler.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var Pb=Object.defineProperty;var Fb=(t,i,r)=>i in t?Pb(t,i,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Wp;function e1(){return Wp||(Wp=1,function(t){function i(L,J){var ce=L.length;L.push(J);e:for(;0<ce;){var ze=ce-1>>>1,b=L[ze];if(0<s(b,J))L[ze]=J,L[ce]=b,ce=ze;else break e}}function r(L){return L.length===0?null:L[0]}function a(L){if(L.length===0)return null;var J=L[0],ce=L.pop();if(ce!==J){L[0]=ce;e:for(var ze=0,b=L.length,Y=b>>>1;ze<Y;){var W=2*(ze+1)-1,k=L[W],ue=W+1,Ee=L[ue];if(0>s(k,ce))ue<b&&0>s(Ee,k)?(L[ze]=Ee,L[ue]=ce,ze=ue):(L[ze]=k,L[W]=ce,ze=W);else if(ue<b&&0>s(Ee,ce))L[ze]=Ee,L[ue]=ce,ze=ue;else break e}}return J}function s(L,J){var ce=L.sortIndex-J.sortIndex;return ce!==0?ce:L.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();t.unstable_now=function(){return c.now()-h}}var p=[],m=[],g=1,y=null,x=3,S=!1,w=!1,M=!1,U=!1,z=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function F(L){for(var J=r(m);J!==null;){if(J.callback===null)a(m);else if(J.startTime<=L)a(m),J.sortIndex=J.expirationTime,i(p,J);else break;J=r(m)}}function G(L){if(M=!1,F(L),!w)if(r(p)!==null)w=!0,N||(N=!0,te());else{var J=r(m);J!==null&&se(G,J.startTime-L)}}var N=!1,he=-1,Se=5,_e=-1;function j(){return U?!0:!(t.unstable_now()-_e<Se)}function re(){if(U=!1,N){var L=t.unstable_now();_e=L;var J=!0;try{e:{w=!1,M&&(M=!1,P(he),he=-1),S=!0;var ce=x;try{t:{for(F(L),y=r(p);y!==null&&!(y.expirationTime>L&&j());){var ze=y.callback;if(typeof ze=="function"){y.callback=null,x=y.priorityLevel;var b=ze(y.expirationTime<=L);if(L=t.unstable_now(),typeof b=="function"){y.callback=b,F(L),J=!0;break t}y===r(p)&&a(p),F(L)}else a(p);y=r(p)}if(y!==null)J=!0;else{var Y=r(m);Y!==null&&se(G,Y.startTime-L),J=!1}}break e}finally{y=null,x=ce,S=!1}J=void 0}}finally{J?te():N=!1}}}var te;if(typeof H=="function")te=function(){H(re)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ie=le.port2;le.port1.onmessage=re,te=function(){ie.postMessage(null)}}else te=function(){z(re,0)};function se(L,J){he=z(function(){L(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Se=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(L){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var ce=x;x=J;try{return L()}finally{x=ce}},t.unstable_requestPaint=function(){U=!0},t.unstable_runWithPriority=function(L,J){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ce=x;x=L;try{return J()}finally{x=ce}},t.unstable_scheduleCallback=function(L,J,ce){var ze=t.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ze+ce:ze):ce=ze,L){case 1:var b=-1;break;case 2:b=250;break;case 5:b=1073741823;break;case 4:b=1e4;break;default:b=5e3}return b=ce+b,L={id:g++,callback:J,priorityLevel:L,startTime:ce,expirationTime:b,sortIndex:-1},ce>ze?(L.sortIndex=ce,i(m,L),r(p)===null&&L===r(m)&&(M?(P(he),he=-1):M=!0,se(G,ce-ze))):(L.sortIndex=b,i(p,L),w||S||(w=!0,N||(N=!0,te()))),L},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(L){var J=x;return function(){var ce=x;x=J;try{return L.apply(this,arguments)}finally{x=ce}}}}(Gc)),Gc}var eg;function t1(){return eg||(eg=1,Ic.exports=e1()),Ic.exports}var Pc={exports:{}},Te={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var Pb=Object.defineProperty;var Fb=(t,i,r)=>i in t?Pb(t,i,{enumerable:!0,config
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var tg;function n1(){if(tg)return Te;tg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function x(b){return b===null||typeof b!="object"?null:(b=y&&b[y]||b["@@iterator"],typeof b=="function"?b:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,M={};function U(b,Y,W){this.props=b,this.context=Y,this.refs=M,this.updater=W||S}U.prototype.isReactComponent={},U.prototype.setState=function(b,Y){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,Y,"setState")},U.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function z(){}z.prototype=U.prototype;function P(b,Y,W){this.props=b,this.context=Y,this.refs=M,this.updater=W||S}var H=P.prototype=new z;H.constructor=P,w(H,U.prototype),H.isPureReactComponent=!0;var F=Array.isArray,G={H:null,A:null,T:null,S:null,V:null},N=Object.prototype.hasOwnProperty;function he(b,Y,W,k,ue,Ee){return W=Ee.ref,{$$typeof:t,type:b,key:Y,ref:W!==void 0?W:null,props:Ee}}function Se(b,Y){return he(b.type,Y,void 0,void 0,void 0,b.props)}function _e(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function j(b){var Y={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(W){return Y[W]})}var re=/\/+/g;function te(b,Y){return typeof b=="object"&&b!==null&&b.key!=null?j(""+b.key):Y.toString(36)}function le(){}function ie(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(le,le):(b.status="pending",b.then(function(Y){b.status==="pending"&&(b.status="fulfilled",b.value=Y)},function(Y){b.status==="pending"&&(b.status="rejected",b.reason=Y)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function se(b,Y,W,k,ue){var Ee=typeof b;(Ee==="undefined"||Ee==="boolean")&&(b=null);var oe=!1;if(b===null)oe=!0;else switch(Ee){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(b.$$typeof){case t:case i:oe=!0;break;case g:return oe=b._init,se(oe(b._payload),Y,W,k,ue)}}if(oe)return ue=ue(b),oe=k===""?"."+te(b,0):k,F(ue)?(W="",oe!=null&&(W=oe.replace(re,"$&/")+"/"),se(ue,Y,W,"",function(Et){return Et})):ue!=null&&(_e(ue)&&(ue=Se(ue,W+(ue.key==null||b&&b.key===ue.key?"":(""+ue.key).replace(re,"$&/")+"/")+oe)),Y.push(ue)),1;oe=0;var ot=k===""?".":k+":";if(F(b))for(var Ue=0;Ue<b.length;Ue++)k=b[Ue],Ee=ot+te(k,Ue),oe+=se(k,Y,W,Ee,ue);else if(Ue=x(b),typeof Ue=="function")for(b=Ue.call(b),Ue=0;!(k=b.next()).done;)k=k.value,Ee=ot+te(k,Ue++),oe+=se(k,Y,W,Ee,ue);else if(Ee==="object"){if(typeof b.then=="function")return se(ie(b),Y,W,k,ue);throw Y=String(b),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return oe}function L(b,Y,W){if(b==null)return b;var k=[],ue=0;return se(b,k,"","",function(Ee){return Y.call(W,Ee,ue++)}),k}function J(b){if(b._status===-1){var Y=b._result;Y=Y(),Y.then(function(W){(b._status===0||b._status===-1)&&(b._status=1,b._result=W)},function(W){(b._status===0||b._status===-1)&&(b._status=2,b._result=W)}),b._status===-1&&(b._status=0,b._result=Y)}if(b._status===1)return b._result.default;throw b._result}var ce=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)};function ze(){}return Te.Children={map:L,forEach:function(b,Y,W){L(b,function(){Y.apply(this,arguments)},W)},count:function(b){var Y=0;return L(b,function(){Y++}),Y},toArray:function(b){return L(b,function(Y){return Y})||[]},only:function(b){if(!_e(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},Te.Component=U,Te.Fragment=r,Te.Profiler=s,Te.PureComponent=P,Te.StrictMode=a,Te.Suspense=p,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Te.__COMPILER_RUNTIME={__proto__:null,c:function(b){return G.H.useMemoCache(b)}},Te.cache=function(b){return function(){return b.apply(null,arguments)}},Te.cloneElement=function(b,Y,W){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var k=w({},b.props),ue=b.key,Ee=void 0;if(Y!=null)for(oe in Y.ref!==void 0&&(Ee=void 0),Y.key!==void 0&&(ue=""+Y.key),Y)!N.call(Y,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&Y.ref===void 0||(k[oe]=Y[oe]);var oe=arguments.length-2;if(oe===1)k.children=W;else if(1<oe){for(var ot=Array(oe),Ue=0;Ue<oe;Ue++)ot[Ue]=arguments[Ue+2];k.children=ot}return he(b.type,ue,void 0,void 0,Ee,k)},Te.createContext=function(b){return b={$$typeof:c,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:o,_context:b},b},Te.createElement=function(b,Y,W){var k,ue={},Ee=null;if(Y!=null)for(k in Y.key!==void 0&&(Ee=""+Y.key),Y)N.call(Y,k)&&k!=="key"&&k!=="__self"&&k!=="__source"&&(ue[k]=Y[k]);var oe=arguments.length-2;if(oe===1)ue.children=W;else if(1<oe){for(var ot=Array(oe),Ue=0;Ue<oe;Ue++)ot[Ue]=arguments[Ue+2];ue.children=ot}if(b&&b.defaultProps)for(k in oe=b.defaultProps,oe)ue[k]===void 0&&(ue[k]=oe[k]);return he(b,Ee,void 0,void 0,null,ue)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(b){return{$$typeof:h,render:b}},Te.isValidElement=_e,Te.lazy=function(b){return{$$typeof:g,_payload:{_status:-1,_result:b},_init:J}},Te.memo=function(b,Y){return{$$typeof:m,type:b,compare:Y===void 0?null:Y}},Te.startTransition=function(b){var Y=G.T,W={};G.T=W;try{var k=b(),ue=G.S;ue!==null&&ue(W,k),typeof k=="object"&&k!==null&&typeof k.then=="function"&&k.then(ze,ce)}catch(Ee){ce(Ee)}finally{G.T=Y}},Te.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Te.use=function(b){return G.H.use(b)},Te.useActionState=function(b,Y,W){return G.H.useActionState(b,Y,W)},Te.useCallback=function(b,Y){return G.H.useCallback(b,Y)},Te.useContext=function(b){return G.H.useContext(b)},Te.useDebugValue=function(){},Te.useDeferredValue=function(b,Y){return G.H.useDeferredValue(b,Y)},Te.useEffect=function(b,Y,W){var k=G.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return k.useEffect(b,Y)},Te.useId=function(){return G.H.useId()},Te.useImperativeHandle=function(b,Y,W){return G.H.useImperativeHandle(b,Y,W)},Te.useInsertionEffect=function(b,Y){return G.H.useInsertionEffect(b,Y)},Te.useLayoutEffect=function(b,Y){return G.H.useLayoutEffect(b,Y)},Te.useMemo=function(b,Y){return G.H.useMemo(b,Y)},Te.useOptimistic=function(b,Y){return G.H.useOptimistic(b,Y)},Te.useReducer=function(b,Y,W){return G.H.useReducer(b,Y,W)},Te.useRef=function(b){return G.H.useRef(b)},Te.useState=function(b){return G.H.useState(b)},Te.useSyncExternalStore=function(b,Y,W){return G.H.useSyncExternalStore(b,Y,W)},Te.useTransition=function(){return G.H.useTransition()},Te.version="19.1.0",Te}var ng;function Zf(){return ng||(ng=1,Pc.exports=n1()),Pc.exports}var Qc={exports:{}},St={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var Pb=Object.defineProperty;var Fb=(t,i,r)=>i in t?Pb(t,i,{enumerable:!0,config
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var ig;function i1(){if(ig)return St;ig=1;var t=Zf();function i(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(p,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,St.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return o(p,m,null,g)},St.flushSync=function(p){var m=c.T,g=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=m,a.p=g,a.d.f()}},St.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},St.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},St.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:S}):g==="script"&&a.d.X(p,{crossOrigin:y,integrity:x,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},St.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},St.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin);a.d.L(p,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},St.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},St.requestFormReset=function(p){a.d.r(p)},St.unstable_batchedUpdates=function(p,m){return p(m)},St.useFormState=function(p,m,g){return c.H.useFormState(p,m,g)},St.useFormStatus=function(){return c.H.useHostTransitionStatus()},St.version="19.1.0",St}var rg;function r1(){if(rg)return Qc.exports;rg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Qc.exports=i1(),Qc.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,47 +38,47 @@ var Pb=Object.defineProperty;var Fb=(t,i,r)=>i in t?Pb(t,i,{enumerable:!0,config
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var rg;function i1(){if(rg)return il;rg=1;var t=Wb(),i=Hf(),r=n1();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(o(e)!==e)throw Error(a(188))}function p(e){var n=e.alternate;if(!n){if(n=o(e),n===null)throw Error(a(188));return n!==e?null:e}for(var l=e,u=n;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(u=f.return,u!==null){l=u;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return h(f),e;if(d===u)return h(f),n;d=d.sibling}throw Error(a(188))}if(l.return!==u.return)l=f,u=d;else{for(var v=!1,_=f.child;_;){if(_===l){v=!0,l=f,u=d;break}if(_===u){v=!0,u=f,l=d;break}_=_.sibling}if(!v){for(_=d.child;_;){if(_===l){v=!0,l=d,u=f;break}if(_===u){v=!0,u=d,l=f;break}_=_.sibling}if(!v)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:n}function m(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=m(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),Q=Symbol.for("react.consumer"),B=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),he=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),xe=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ie(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case j:return"Profiler";case C:return"StrictMode";case G:return"Suspense";case N:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case B:return(e.displayName||"Context")+".Provider";case Q:return(e._context.displayName||"Context")+".Consumer";case F:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case he:return n=e.displayName||null,n!==null?n:ie(e.type)||"Memo";case Se:n=e._payload,e=e._init;try{return ie(e(n))}catch{}}return null}var se=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ze=[],b=-1;function Y(e){return{current:e}}function W(e){0>b||(e.current=ze[b],ze[b]=null,b--)}function k(e,n){b++,ze[b]=e.current,e.current=n}var ue=Y(null),Ee=Y(null),oe=Y(null),st=Y(null);function Ue(e,n){switch(k(oe,n),k(Ee,e),k(ue,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?kp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=kp(n),e=Tp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ue),k(ue,e)}function wt(){W(ue),W(Ee),W(oe)}function Sn(e){e.memoizedState!==null&&k(st,e);var n=ue.current,l=Tp(n,e.type);n!==l&&(k(Ee,e),k(ue,l))}function Nn(e){Ee.current===e&&(W(ue),W(Ee)),st.current===e&&(W(st),Ka._currentValue=ce)}var na=Object.prototype.hasOwnProperty,ia=t.unstable_scheduleCallback,ra=t.unstable_cancelCallback,Bl=t.unstable_shouldYield,Hl=t.unstable_requestPaint,Ht=t.unstable_now,Es=t.unstable_getCurrentPriorityLevel,aa=t.unstable_ImmediatePriority,la=t.unstable_UserBlockingPriority,nr=t.unstable_NormalPriority,As=t.unstable_LowPriority,Zl=t.unstable_IdlePriority,Cs=t.log,Os=t.unstable_setDisableYieldValue,H=null,P=null;function me(e){if(typeof Cs=="function"&&Os(e),P&&typeof P.setStrictMode=="function")try{P.setStrictMode(H,e)}catch{}}var ve=Math.clz32?Math.clz32:jn,qe=Math.log,Zt=Math.LN2;function jn(e){return e>>>=0,e===0?32:31-(qe(e)/Zt|0)|0}var Mt=256,kn=4194304;function qt(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,n,l){var u=e.pendingLanes;if(u===0)return 0;var f=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var _=u&134217727;return _!==0?(u=_&~d,u!==0?f=qt(u):(v&=_,v!==0?f=qt(v):l||(l=_&~e,l!==0&&(f=qt(l))))):(_=u&~d,_!==0?f=qt(_):v!==0?f=qt(v):l||(l=u&~e,l!==0&&(f=qt(l)))),f===0?0:n!==0&&n!==f&&(n&d)===0&&(d=f&-f,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:f}function Jt(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function cn(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 lh(){var e=Mt;return Mt<<=1,(Mt&4194048)===0&&(Mt=256),e}function uh(){var e=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),e}function zs(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function ua(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Lv(e,n,l,u,f,d){var v=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var _=e.entanglements,T=e.expirationTimes,z=e.hiddenUpdates;for(l=v&~l;0<l;){var Z=31-ve(l),I=1<<Z;_[Z]=0,T[Z]=-1;var R=z[Z];if(R!==null)for(z[Z]=null,Z=0;Z<R.length;Z++){var D=R[Z];D!==null&&(D.lane&=-536870913)}l&=~I}u!==0&&sh(e,u,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function sh(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-ve(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|l&4194090}function oh(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var u=31-ve(l),f=1<<u;f&n|e[u]&n&&(e[u]|=n),l&=~f}}function Ms(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Rs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ch(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Yp(e.type))}function Uv(e,n){var l=J.p;try{return J.p=e,n()}finally{J.p=l}}var ti=Math.random().toString(36).slice(2),bt="__reactFiber$"+ti,Rt="__reactProps$"+ti,ir="__reactContainer$"+ti,Ds="__reactEvents$"+ti,Bv="__reactListeners$"+ti,Hv="__reactHandles$"+ti,fh="__reactResources$"+ti,sa="__reactMarker$"+ti;function Ns(e){delete e[bt],delete e[Rt],delete e[Ds],delete e[Bv],delete e[Hv]}function rr(e){var n=e[bt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[ir]||l[bt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=Cp(e);e!==null;){if(l=e[bt])return l;e=Cp(e)}return n}e=l,l=e.parentNode}return null}function ar(e){if(e=e[bt]||e[ir]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function oa(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function lr(e){var n=e[fh];return n||(n=e[fh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ht(e){e[sa]=!0}var hh=new Set,dh={};function Mi(e,n){ur(e,n),ur(e+"Capture",n)}function ur(e,n){for(dh[e]=n,e=0;e<n.length;e++)hh.add(n[e])}var Zv=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]*$"),mh={},ph={};function qv(e){return na.call(ph,e)?!0:na.call(mh,e)?!1:Zv.test(e)?ph[e]=!0:(mh[e]=!0,!1)}function ql(e,n,l){if(qv(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function Vl(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Ln(e,n,l,u){if(u===null)e.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+u)}}var js,gh;function sr(e){if(js===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);js=n&&n[1]||"",gh=-1<l.stack.indexOf(`
|
|
41
|
+
*/var ag;function a1(){if(ag)return il;ag=1;var t=t1(),i=Zf(),r=r1();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(o(e)!==e)throw Error(a(188))}function p(e){var n=e.alternate;if(!n){if(n=o(e),n===null)throw Error(a(188));return n!==e?null:e}for(var l=e,u=n;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(u=f.return,u!==null){l=u;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return h(f),e;if(d===u)return h(f),n;d=d.sibling}throw Error(a(188))}if(l.return!==u.return)l=f,u=d;else{for(var v=!1,_=f.child;_;){if(_===l){v=!0,l=f,u=d;break}if(_===u){v=!0,u=f,l=d;break}_=_.sibling}if(!v){for(_=d.child;_;){if(_===l){v=!0,l=d,u=f;break}if(_===u){v=!0,u=d,l=f;break}_=_.sibling}if(!v)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:n}function m(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=m(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),P=Symbol.for("react.consumer"),H=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),he=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),_e=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ie(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case U:return"Profiler";case M:return"StrictMode";case G:return"Suspense";case N:return"SuspenseList";case _e:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case H:return(e.displayName||"Context")+".Provider";case P:return(e._context.displayName||"Context")+".Consumer";case F:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case he:return n=e.displayName||null,n!==null?n:ie(e.type)||"Memo";case Se:n=e._payload,e=e._init;try{return ie(e(n))}catch{}}return null}var se=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ze=[],b=-1;function Y(e){return{current:e}}function W(e){0>b||(e.current=ze[b],ze[b]=null,b--)}function k(e,n){b++,ze[b]=e.current,e.current=n}var ue=Y(null),Ee=Y(null),oe=Y(null),ot=Y(null);function Ue(e,n){switch(k(oe,n),k(Ee,e),k(ue,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Tp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Tp(n),e=wp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ue),k(ue,e)}function Et(){W(ue),W(Ee),W(oe)}function Sn(e){e.memoizedState!==null&&k(ot,e);var n=ue.current,l=wp(n,e.type);n!==l&&(k(Ee,e),k(ue,l))}function Nn(e){Ee.current===e&&(W(ue),W(Ee)),ot.current===e&&(W(ot),Ka._currentValue=ce)}var na=Object.prototype.hasOwnProperty,ia=t.unstable_scheduleCallback,ra=t.unstable_cancelCallback,Bl=t.unstable_shouldYield,Hl=t.unstable_requestPaint,Ht=t.unstable_now,Es=t.unstable_getCurrentPriorityLevel,aa=t.unstable_ImmediatePriority,la=t.unstable_UserBlockingPriority,nr=t.unstable_NormalPriority,As=t.unstable_LowPriority,Zl=t.unstable_IdlePriority,Cs=t.log,Os=t.unstable_setDisableYieldValue,Z=null,X=null;function me(e){if(typeof Cs=="function"&&Os(e),X&&typeof X.setStrictMode=="function")try{X.setStrictMode(Z,e)}catch{}}var ve=Math.clz32?Math.clz32:jn,qe=Math.log,Zt=Math.LN2;function jn(e){return e>>>=0,e===0?32:31-(qe(e)/Zt|0)|0}var Mt=256,kn=4194304;function qt(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ht(e,n,l){var u=e.pendingLanes;if(u===0)return 0;var f=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var _=u&134217727;return _!==0?(u=_&~d,u!==0?f=qt(u):(v&=_,v!==0?f=qt(v):l||(l=_&~e,l!==0&&(f=qt(l))))):(_=u&~d,_!==0?f=qt(_):v!==0?f=qt(v):l||(l=u&~e,l!==0&&(f=qt(l)))),f===0?0:n!==0&&n!==f&&(n&d)===0&&(d=f&-f,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:f}function Jt(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function cn(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 uh(){var e=Mt;return Mt<<=1,(Mt&4194048)===0&&(Mt=256),e}function sh(){var e=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),e}function zs(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function ua(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Bv(e,n,l,u,f,d){var v=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var _=e.entanglements,T=e.expirationTimes,O=e.hiddenUpdates;for(l=v&~l;0<l;){var q=31-ve(l),I=1<<q;_[q]=0,T[q]=-1;var R=O[q];if(R!==null)for(O[q]=null,q=0;q<R.length;q++){var D=R[q];D!==null&&(D.lane&=-536870913)}l&=~I}u!==0&&oh(e,u,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function oh(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-ve(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|l&4194090}function ch(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var u=31-ve(l),f=1<<u;f&n|e[u]&n&&(e[u]|=n),l&=~f}}function Ms(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Rs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function fh(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Ip(e.type))}function Hv(e,n){var l=J.p;try{return J.p=e,n()}finally{J.p=l}}var ti=Math.random().toString(36).slice(2),xt="__reactFiber$"+ti,Rt="__reactProps$"+ti,ir="__reactContainer$"+ti,Ds="__reactEvents$"+ti,Zv="__reactListeners$"+ti,qv="__reactHandles$"+ti,hh="__reactResources$"+ti,sa="__reactMarker$"+ti;function Ns(e){delete e[xt],delete e[Rt],delete e[Ds],delete e[Zv],delete e[qv]}function rr(e){var n=e[xt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[ir]||l[xt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=Op(e);e!==null;){if(l=e[xt])return l;e=Op(e)}return n}e=l,l=e.parentNode}return null}function ar(e){if(e=e[xt]||e[ir]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function oa(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function lr(e){var n=e[hh];return n||(n=e[hh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function dt(e){e[sa]=!0}var dh=new Set,mh={};function Mi(e,n){ur(e,n),ur(e+"Capture",n)}function ur(e,n){for(mh[e]=n,e=0;e<n.length;e++)dh.add(n[e])}var Vv=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]*$"),ph={},gh={};function Yv(e){return na.call(gh,e)?!0:na.call(ph,e)?!1:Vv.test(e)?gh[e]=!0:(ph[e]=!0,!1)}function ql(e,n,l){if(Yv(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function Vl(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Ln(e,n,l,u){if(u===null)e.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+u)}}var js,yh;function sr(e){if(js===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);js=n&&n[1]||"",yh=-1<l.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+js+e+
|
|
44
|
-
`),
|
|
45
|
-
`);for(f=u=0;u<T.length&&!T[u].includes("DetermineComponentFrameRoot");)u++;for(;f<
|
|
46
|
-
`+T[u].replace(" at new "," at ");return e.displayName&&
|
|
43
|
+
`+js+e+yh}var Ls=!1;function Us(e,n){if(!e||Ls)return"";Ls=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(D){var R=D}Reflect.construct(e,[],I)}else{try{I.call()}catch(D){R=D}e.call(I.prototype)}}else{try{throw Error()}catch(D){R=D}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(D){if(D&&R&&typeof D.stack=="string")return[D.stack,R.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),v=d[0],_=d[1];if(v&&_){var T=v.split(`
|
|
44
|
+
`),O=_.split(`
|
|
45
|
+
`);for(f=u=0;u<T.length&&!T[u].includes("DetermineComponentFrameRoot");)u++;for(;f<O.length&&!O[f].includes("DetermineComponentFrameRoot");)f++;if(u===T.length||f===O.length)for(u=T.length-1,f=O.length-1;1<=u&&0<=f&&T[u]!==O[f];)f--;for(;1<=u&&0<=f;u--,f--)if(T[u]!==O[f]){if(u!==1||f!==1)do if(u--,f--,0>f||T[u]!==O[f]){var q=`
|
|
46
|
+
`+T[u].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=u&&0<=f);break}}}finally{Ls=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?sr(l):""}function Iv(e){switch(e.tag){case 26:case 27:case 5:return sr(e.type);case 16:return sr("Lazy");case 13:return sr("Suspense");case 19:return sr("SuspenseList");case 0:case 15:return Us(e.type,!1);case 11:return Us(e.type.render,!1);case 1:return Us(e.type,!0);case 31:return sr("Activity");default:return""}}function vh(e){try{var n="";do n+=Iv(e),e=e.return;while(e);return n}catch(l){return`
|
|
47
47
|
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}function Wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vh(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Yv(e){var n=vh(e)?"checked":"value",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),u=""+e[n];if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,d=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){u=""+v,d.call(this,v)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return u},setValue:function(v){u=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Yl(e){e._valueTracker||(e._valueTracker=Yv(e))}function bh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),u="";return e&&(u=vh(e)?e.checked?"true":"false":e.value),e=u,e!==l?(n.setValue(e),!0):!1}function Il(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Iv=/[\n"\\]/g;function en(e){return e.replace(Iv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Bs(e,n,l,u,f,d,v,_){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Wt(n)):e.value!==""+Wt(n)&&(e.value=""+Wt(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Hs(e,v,Wt(n)):l!=null?Hs(e,v,Wt(l)):u!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Wt(_):e.removeAttribute("name")}function _h(e,n,l,u,f,d,v,_){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null))return;l=l!=null?""+Wt(l):"",n=n!=null?""+Wt(n):l,_||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=_?e.checked:!!u,e.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function Hs(e,n,l){n==="number"&&Il(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function or(e,n,l,u){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&u&&(e[l].defaultSelected=!0)}else{for(l=""+Wt(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function xh(e,n,l){if(n!=null&&(n=""+Wt(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+Wt(l):""}function Sh(e,n,l,u){if(n==null){if(u!=null){if(l!=null)throw Error(a(92));if(se(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),n=l}l=Wt(n),e.defaultValue=l,u=e.textContent,u===l&&u!==""&&u!==null&&(e.value=u)}function cr(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var Gv=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 kh(e,n,l){var u=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,l):typeof l!="number"||l===0||Gv.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function Th(e,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var f in n)u=n[f],n.hasOwnProperty(f)&&l[f]!==u&&kh(e,f,u)}else for(var d in n)n.hasOwnProperty(d)&&kh(e,d,n[d])}function Zs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Qv=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"]]),Xv=/^[\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 Gl(e){return Xv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var qs=null;function Vs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fr=null,hr=null;function wh(e){var n=ar(e);if(n&&(e=n.stateNode)){var l=e[Rt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Bs(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+en(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var u=l[n];if(u!==e&&u.form===e.form){var f=u[Rt]||null;if(!f)throw Error(a(90));Bs(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)u=l[n],u.form===e.form&&bh(u)}break e;case"textarea":xh(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&or(e,!!l.multiple,n,!1)}}}var Ys=!1;function Eh(e,n,l){if(Ys)return e(n,l);Ys=!0;try{var u=e(n);return u}finally{if(Ys=!1,(fr!==null||hr!==null)&&(zu(),fr&&(n=fr,e=hr,hr=fr=null,wh(n),e)))for(n=0;n<e.length;n++)wh(e[n])}}function ca(e,n){var l=e.stateNode;if(l===null)return null;var u=l[Rt]||null;if(u===null)return null;l=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Is=!1;if(Un)try{var fa={};Object.defineProperty(fa,"passive",{get:function(){Is=!0}}),window.addEventListener("test",fa,fa),window.removeEventListener("test",fa,fa)}catch{Is=!1}var ni=null,Gs=null,Ql=null;function Ah(){if(Ql)return Ql;var e,n=Gs,l=n.length,u,f="value"in ni?ni.value:ni.textContent,d=f.length;for(e=0;e<l&&n[e]===f[e];e++);var v=l-e;for(u=1;u<=v&&n[l-u]===f[d-u];u++);return Ql=f.slice(e,1<u?1-u:void 0)}function Xl(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Pl(){return!0}function Ch(){return!1}function Dt(e){function n(l,u,f,d,v){this._reactName=l,this._targetInst=f,this.type=u,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(l=e[_],this[_]=l?l(d):d[_]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Pl:Ch,this.isPropagationStopped=Ch,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Pl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),n}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fl=Dt(Ri),ha=g({},Ri,{view:0,detail:0}),Pv=Dt(ha),Qs,Xs,da,$l=g({},ha,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==da&&(da&&e.type==="mousemove"?(Qs=e.screenX-da.screenX,Xs=e.screenY-da.screenY):Xs=Qs=0,da=e),Qs)},movementY:function(e){return"movementY"in e?e.movementY:Xs}}),Oh=Dt($l),Fv=g({},$l,{dataTransfer:0}),$v=Dt(Fv),Kv=g({},ha,{relatedTarget:0}),Ps=Dt(Kv),Jv=g({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),Wv=Dt(Jv),e0=g({},Ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),t0=Dt(e0),n0=g({},Ri,{data:0}),zh=Dt(n0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},a0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=a0[e])?!!n[e]:!1}function Fs(){return l0}var u0=g({},ha,{key:function(e){if(e.key){var n=i0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fs,charCode:function(e){return e.type==="keypress"?Xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),s0=Dt(u0),o0=g({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mh=Dt(o0),c0=g({},ha,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fs}),f0=Dt(c0),h0=g({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),d0=Dt(h0),m0=g({},$l,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),p0=Dt(m0),g0=g({},Ri,{newState:0,oldState:0}),y0=Dt(g0),v0=[9,13,27,32],$s=Un&&"CompositionEvent"in window,ma=null;Un&&"documentMode"in document&&(ma=document.documentMode);var b0=Un&&"TextEvent"in window&&!ma,Rh=Un&&(!$s||ma&&8<ma&&11>=ma),Dh=" ",Nh=!1;function jh(e,n){switch(e){case"keyup":return v0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function _0(e,n){switch(e){case"compositionend":return Lh(n);case"keypress":return n.which!==32?null:(Nh=!0,Dh);case"textInput":return e=n.data,e===Dh&&Nh?null:e;default:return null}}function x0(e,n){if(dr)return e==="compositionend"||!$s&&jh(e,n)?(e=Ah(),Ql=Gs=ni=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Rh&&n.locale!=="ko"?null:n.data;default:return null}}var S0={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 Uh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!S0[e.type]:n==="textarea"}function Bh(e,n,l,u){fr?hr?hr.push(u):hr=[u]:fr=u,n=Lu(n,"onChange"),0<n.length&&(l=new Fl("onChange","change",null,l,u),e.push({event:l,listeners:n}))}var pa=null,ga=null;function k0(e){vp(e,0)}function Kl(e){var n=oa(e);if(bh(n))return e}function Hh(e,n){if(e==="change")return n}var Zh=!1;if(Un){var Ks;if(Un){var Js="oninput"in document;if(!Js){var qh=document.createElement("div");qh.setAttribute("oninput","return;"),Js=typeof qh.oninput=="function"}Ks=Js}else Ks=!1;Zh=Ks&&(!document.documentMode||9<document.documentMode)}function Vh(){pa&&(pa.detachEvent("onpropertychange",Yh),ga=pa=null)}function Yh(e){if(e.propertyName==="value"&&Kl(ga)){var n=[];Bh(n,ga,e,Vs(e)),Eh(k0,n)}}function T0(e,n,l){e==="focusin"?(Vh(),pa=n,ga=l,pa.attachEvent("onpropertychange",Yh)):e==="focusout"&&Vh()}function w0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kl(ga)}function E0(e,n){if(e==="click")return Kl(n)}function A0(e,n){if(e==="input"||e==="change")return Kl(n)}function C0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Vt=typeof Object.is=="function"?Object.is:C0;function ya(e,n){if(Vt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),u=Object.keys(n);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var f=l[u];if(!na.call(n,f)||!Vt(e[f],n[f]))return!1}return!0}function Ih(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gh(e,n){var l=Ih(e);e=0;for(var u;l;){if(l.nodeType===3){if(u=e+l.textContent.length,e<=n&&u>=n)return{node:l,offset:n-e};e=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ih(l)}}function Qh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Qh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Il(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=Il(e.document)}return n}function Ws(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var O0=Un&&"documentMode"in document&&11>=document.documentMode,mr=null,eo=null,va=null,to=!1;function Ph(e,n,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;to||mr==null||mr!==Il(u)||(u=mr,"selectionStart"in u&&Ws(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),va&&ya(va,u)||(va=u,u=Lu(eo,"onSelect"),0<u.length&&(n=new Fl("onSelect","select",null,n,l),e.push({event:n,listeners:u}),n.target=mr)))}function Di(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var pr={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")},no={},Fh={};Un&&(Fh=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function Ni(e){if(no[e])return no[e];if(!pr[e])return e;var n=pr[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Fh)return no[e]=n[l];return e}var $h=Ni("animationend"),Kh=Ni("animationiteration"),Jh=Ni("animationstart"),z0=Ni("transitionrun"),M0=Ni("transitionstart"),R0=Ni("transitioncancel"),Wh=Ni("transitionend"),ed=new Map,io="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(" ");io.push("scrollEnd");function fn(e,n){ed.set(e,n),Mi(n,[e])}var td=new WeakMap;function tn(e,n){if(typeof e=="object"&&e!==null){var l=td.get(e);return l!==void 0?l:(n={value:e,source:n,stack:yh(n)},td.set(e,n),n)}return{value:e,source:n,stack:yh(n)}}var nn=[],gr=0,ro=0;function Jl(){for(var e=gr,n=ro=gr=0;n<e;){var l=nn[n];nn[n++]=null;var u=nn[n];nn[n++]=null;var f=nn[n];nn[n++]=null;var d=nn[n];if(nn[n++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}d!==0&&nd(l,f,d)}}function Wl(e,n,l,u){nn[gr++]=e,nn[gr++]=n,nn[gr++]=l,nn[gr++]=u,ro|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function ao(e,n,l,u){return Wl(e,n,l,u),eu(e)}function yr(e,n){return Wl(e,null,null,n),eu(e)}function nd(e,n,l){e.lanes|=l;var u=e.alternate;u!==null&&(u.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,u=d.alternate,u!==null&&(u.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&n!==null&&(f=31-ve(l),e=d.hiddenUpdates,u=e[f],u===null?e[f]=[n]:u.push(n),n.lane=l|536870912),d):null}function eu(e){if(50<Ya)throw Ya=0,hc=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var vr={};function D0(e,n,l,u){this.tag=e,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=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,n,l,u){return new D0(e,n,l,u)}function lo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bn(e,n){var l=e.alternate;return l===null?(l=Yt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function id(e,n){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function tu(e,n,l,u,f,d){var v=0;if(u=e,typeof e=="function")lo(e)&&(v=1);else if(typeof e=="string")v=jb(e,l,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xe:return e=Yt(31,l,n,f),e.elementType=xe,e.lanes=d,e;case w:return ji(l.children,f,d,n);case C:v=8,f|=24;break;case j:return e=Yt(12,l,n,f|2),e.elementType=j,e.lanes=d,e;case G:return e=Yt(13,l,n,f),e.elementType=G,e.lanes=d,e;case N:return e=Yt(19,l,n,f),e.elementType=N,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:case B:v=10;break e;case Q:v=9;break e;case F:v=11;break e;case he:v=14;break e;case Se:v=16,u=null;break e}v=29,l=Error(a(130,e===null?"null":typeof e,"")),u=null}return n=Yt(v,l,n,f),n.elementType=e,n.type=u,n.lanes=d,n}function ji(e,n,l,u){return e=Yt(7,e,u,n),e.lanes=l,e}function uo(e,n,l){return e=Yt(6,e,null,n),e.lanes=l,e}function so(e,n,l){return n=Yt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var br=[],_r=0,nu=null,iu=0,rn=[],an=0,Li=null,Hn=1,Zn="";function Ui(e,n){br[_r++]=iu,br[_r++]=nu,nu=e,iu=n}function rd(e,n,l){rn[an++]=Hn,rn[an++]=Zn,rn[an++]=Li,Li=e;var u=Hn;e=Zn;var f=32-ve(u)-1;u&=~(1<<f),l+=1;var d=32-ve(n)+f;if(30<d){var v=f-f%5;d=(u&(1<<v)-1).toString(32),u>>=v,f-=v,Hn=1<<32-ve(n)+f|l<<f|u,Zn=d+e}else Hn=1<<d|l<<f|u,Zn=e}function oo(e){e.return!==null&&(Ui(e,1),rd(e,1,0))}function co(e){for(;e===nu;)nu=br[--_r],br[_r]=null,iu=br[--_r],br[_r]=null;for(;e===Li;)Li=rn[--an],rn[an]=null,Zn=rn[--an],rn[an]=null,Hn=rn[--an],rn[an]=null}var Et=null,tt=null,He=!1,Bi=null,Tn=!1,fo=Error(a(519));function Hi(e){var n=Error(a(418,""));throw xa(tn(n,e)),fo}function ad(e){var n=e.stateNode,l=e.type,u=e.memoizedProps;switch(n[bt]=e,n[Rt]=u,l){case"dialog":Re("cancel",n),Re("close",n);break;case"iframe":case"object":case"embed":Re("load",n);break;case"video":case"audio":for(l=0;l<Ga.length;l++)Re(Ga[l],n);break;case"source":Re("error",n);break;case"img":case"image":case"link":Re("error",n),Re("load",n);break;case"details":Re("toggle",n);break;case"input":Re("invalid",n),_h(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Yl(n);break;case"select":Re("invalid",n);break;case"textarea":Re("invalid",n),Sh(n,u.value,u.defaultValue,u.children),Yl(n)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||u.suppressHydrationWarning===!0||Sp(n.textContent,l)?(u.popover!=null&&(Re("beforetoggle",n),Re("toggle",n)),u.onScroll!=null&&Re("scroll",n),u.onScrollEnd!=null&&Re("scrollend",n),u.onClick!=null&&(n.onclick=Uu),n=!0):n=!1,n||Hi(e)}function ld(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:Et=Et.return}}function ba(e){if(e!==Et)return!1;if(!He)return ld(e),He=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Cc(e.type,e.memoizedProps)),l=!l),l&&tt&&Hi(e),ld(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8)if(l=e.data,l==="/$"){if(n===0){tt=dn(e.nextSibling);break e}n--}else l!=="$"&&l!=="$!"&&l!=="$?"||n++;e=e.nextSibling}tt=null}}else n===27?(n=tt,vi(e.type)?(e=Rc,Rc=null,tt=e):tt=n):tt=Et?dn(e.stateNode.nextSibling):null;return!0}function _a(){tt=Et=null,He=!1}function ud(){var e=Bi;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Bi=null),e}function xa(e){Bi===null?Bi=[e]:Bi.push(e)}var ho=Y(null),Zi=null,qn=null;function ii(e,n,l){k(ho,n._currentValue),n._currentValue=l}function Vn(e){e._currentValue=ho.current,W(ho)}function mo(e,n,l){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===l)break;e=e.return}}function po(e,n,l,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var v=f.child;d=d.firstContext;e:for(;d!==null;){var _=d;d=f;for(var T=0;T<n.length;T++)if(_.context===n[T]){d.lanes|=l,_=d.alternate,_!==null&&(_.lanes|=l),mo(d.return,l,e),u||(v=null);break e}d=_.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(a(341));v.lanes|=l,d=v.alternate,d!==null&&(d.lanes|=l),mo(v,l,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function Sa(e,n,l,u){e=null;for(var f=n,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var _=f.type;Vt(f.pendingProps.value,v.value)||(e!==null?e.push(_):e=[_])}}else if(f===st.current){if(v=f.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ka):e=[Ka])}f=f.return}e!==null&&po(n,e,l,u),n.flags|=262144}function ru(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){Zi=e,qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return sd(Zi,e)}function au(e,n){return Zi===null&&qi(e),sd(e,n)}function sd(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},qn===null){if(e===null)throw Error(a(308));qn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else qn=qn.next=n;return l}var N0=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},j0=t.unstable_scheduleCallback,L0=t.unstable_NormalPriority,ot={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function go(){return{controller:new N0,data:new Map,refCount:0}}function ka(e){e.refCount--,e.refCount===0&&j0(L0,function(){e.controller.abort()})}var Ta=null,yo=0,xr=0,Sr=null;function U0(e,n){if(Ta===null){var l=Ta=[];yo=0,xr=bc(),Sr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return yo++,n.then(od,od),n}function od(){if(--yo===0&&Ta!==null){Sr!==null&&(Sr.status="fulfilled");var e=Ta;Ta=null,xr=0,Sr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function B0(e,n){var l=[],u={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(u.status="rejected",u.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),u}var cd=U.S;U.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&U0(e,n),cd!==null&&cd(e,n)};var Vi=Y(null);function vo(){var e=Vi.current;return e!==null?e:$e.pooledCache}function lu(e,n){n===null?k(Vi,Vi.current):k(Vi,n.pool)}function fd(){var e=vo();return e===null?null:{parent:ot._currentValue,pool:e}}var wa=Error(a(460)),hd=Error(a(474)),uu=Error(a(542)),bo={then:function(){}};function dd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function su(){}function md(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(su,su),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,gd(e),e;default:if(typeof n.status=="string")n.then(su,su);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=u}},function(u){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,gd(e),e}throw Ea=n,wa}}var Ea=null;function pd(){if(Ea===null)throw Error(a(459));var e=Ea;return Ea=null,e}function gd(e){if(e===wa||e===uu)throw Error(a(483))}var ri=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xo(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function li(e,n,l){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ve&2)!==0){var f=u.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),u.pending=n,n=eu(e),nd(e,null,l),n}return Wl(e,u,n,l),eu(e)}function Aa(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,l|=u,n.lanes=l,oh(e,l)}}function So(e,n){var l=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=v:d=d.next=v,l=l.next}while(l!==null);d===null?f=d=n:d=d.next=n}else f=d=n;l={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var ko=!1;function Ca(){if(ko){var e=Sr;if(e!==null)throw e}}function Oa(e,n,l,u){ko=!1;var f=e.updateQueue;ri=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var T=_,z=T.next;T.next=null,v===null?d=z:v.next=z,v=T;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,_=Z.lastBaseUpdate,_!==v&&(_===null?Z.firstBaseUpdate=z:_.next=z,Z.lastBaseUpdate=T))}if(d!==null){var I=f.baseState;v=0,Z=z=T=null,_=d;do{var R=_.lane&-536870913,D=R!==_.lane;if(D?(Ne&R)===R:(u&R)===R){R!==0&&R===xr&&(ko=!0),Z!==null&&(Z=Z.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var be=e,ge=_;R=n;var Xe=l;switch(ge.tag){case 1:if(be=ge.payload,typeof be=="function"){I=be.call(Xe,I,R);break e}I=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=ge.payload,R=typeof be=="function"?be.call(Xe,I,R):be,R==null)break e;I=g({},I,R);break e;case 2:ri=!0}}R=_.callback,R!==null&&(e.flags|=64,D&&(e.flags|=8192),D=f.callbacks,D===null?f.callbacks=[R]:D.push(R))}else D={lane:R,tag:_.tag,payload:_.payload,callback:_.callback,next:null},Z===null?(z=Z=D,T=I):Z=Z.next=D,v|=R;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;D=_,_=D.next,D.next=null,f.lastBaseUpdate=D,f.shared.pending=null}}while(!0);Z===null&&(T=I),f.baseState=T,f.firstBaseUpdate=z,f.lastBaseUpdate=Z,d===null&&(f.shared.lanes=0),mi|=v,e.lanes=v,e.memoizedState=I}}function yd(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function vd(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)yd(l[e],n)}var kr=Y(null),ou=Y(0);function bd(e,n){e=Fn,k(ou,e),k(kr,n),Fn=e|n.baseLanes}function To(){k(ou,Fn),k(kr,kr.current)}function wo(){Fn=ou.current,W(kr),W(ou)}var ui=0,Ce=null,Ge=null,at=null,cu=!1,Tr=!1,Yi=!1,fu=0,za=0,wr=null,H0=0;function it(){throw Error(a(321))}function Eo(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Vt(e[l],n[l]))return!1;return!0}function Ao(e,n,l,u,f,d){return ui=d,Ce=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?nm:im,Yi=!1,d=l(u,f),Yi=!1,Tr&&(d=xd(n,l,u,f)),_d(e),d}function _d(e){U.H=yu;var n=Ge!==null&&Ge.next!==null;if(ui=0,at=Ge=Ce=null,cu=!1,za=0,wr=null,n)throw Error(a(300));e===null||dt||(e=e.dependencies,e!==null&&ru(e)&&(dt=!0))}function xd(e,n,l,u){Ce=e;var f=0;do{if(Tr&&(wr=null),za=0,Tr=!1,25<=f)throw Error(a(301));if(f+=1,at=Ge=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}U.H=Q0,d=n(l,u)}while(Tr);return d}function Z0(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?Ma(n):n,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(Ce.flags|=1024),n}function Co(){var e=fu!==0;return fu=0,e}function Oo(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function zo(e){if(cu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}cu=!1}ui=0,at=Ge=Ce=null,Tr=!1,za=fu=0,wr=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Ce.memoizedState=at=e:at=at.next=e,at}function lt(){if(Ge===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var n=at===null?Ce.memoizedState:at.next;if(n!==null)at=n,Ge=e;else{if(e===null)throw Ce.alternate===null?Error(a(467)):Error(a(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},at===null?Ce.memoizedState=at=e:at=at.next=e}return at}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ma(e){var n=za;return za+=1,wr===null&&(wr=[]),e=md(wr,e,n),n=Ce,(at===null?n.memoizedState:at.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?nm:im),e}function hu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ma(e);if(e.$$typeof===B)return _t(e)}throw Error(a(438,String(e)))}function Ro(e){var n=null,l=Ce.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var u=Ce.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Mo(),Ce.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),u=0;u<e;u++)l[u]=L;return n.index++,l}function Yn(e,n){return typeof n=="function"?n(e):n}function du(e){var n=lt();return Do(n,Ge,e)}function Do(e,n,l){var u=e.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var f=e.baseQueue,d=u.pending;if(d!==null){if(f!==null){var v=f.next;f.next=d.next,d.next=v}n.baseQueue=f=d,u.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{n=f.next;var _=v=null,T=null,z=n,Z=!1;do{var I=z.lane&-536870913;if(I!==z.lane?(Ne&I)===I:(ui&I)===I){var R=z.revertLane;if(R===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),I===xr&&(Z=!0);else if((ui&R)===R){z=z.next,R===xr&&(Z=!0);continue}else I={lane:0,revertLane:z.revertLane,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},T===null?(_=T=I,v=d):T=T.next=I,Ce.lanes|=R,mi|=R;I=z.action,Yi&&l(d,I),d=z.hasEagerState?z.eagerState:l(d,I)}else R={lane:I,revertLane:z.revertLane,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},T===null?(_=T=R,v=d):T=T.next=R,Ce.lanes|=I,mi|=I;z=z.next}while(z!==null&&z!==n);if(T===null?v=d:T.next=_,!Vt(d,e.memoizedState)&&(dt=!0,Z&&(l=Sr,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=T,u.lastRenderedState=d}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function No(e){var n=lt(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var u=l.dispatch,f=l.pending,d=n.memoizedState;if(f!==null){l.pending=null;var v=f=f.next;do d=e(d,v.action),v=v.next;while(v!==f);Vt(d,n.memoizedState)||(dt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,u]}function Sd(e,n,l){var u=Ce,f=lt(),d=He;if(d){if(l===void 0)throw Error(a(407));l=l()}else l=n();var v=!Vt((Ge||f).memoizedState,l);v&&(f.memoizedState=l,dt=!0),f=f.queue;var _=wd.bind(null,u,f,e);if(Ra(2048,8,_,[e]),f.getSnapshot!==n||v||at!==null&&at.memoizedState.tag&1){if(u.flags|=2048,Er(9,mu(),Td.bind(null,u,f,l,n),null),$e===null)throw Error(a(349));d||(ui&124)!==0||kd(u,n,l)}return l}function kd(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ce.updateQueue,n===null?(n=Mo(),Ce.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function Td(e,n,l,u){n.value=l,n.getSnapshot=u,Ed(n)&&Ad(e)}function wd(e,n,l){return l(function(){Ed(n)&&Ad(e)})}function Ed(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Vt(e,l)}catch{return!0}}function Ad(e){var n=yr(e,2);n!==null&&Pt(n,e,2)}function jo(e){var n=Nt();if(typeof e=="function"){var l=e;if(e=l(),Yi){me(!0);try{l()}finally{me(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:e},n}function Cd(e,n,l,u){return e.baseState=l,Do(e,Ge,typeof u=="function"?u:Yn)}function q0(e,n,l,u,f){if(gu(e))throw Error(a(485));if(e=n.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};U.T!==null?l(!0):d.isTransition=!1,u(d),l=n.pending,l===null?(d.next=n.pending=d,Od(n,d)):(d.next=l.next,n.pending=l.next=d)}}function Od(e,n){var l=n.action,u=n.payload,f=e.state;if(n.isTransition){var d=U.T,v={};U.T=v;try{var _=l(f,u),T=U.S;T!==null&&T(v,_),zd(e,n,_)}catch(z){Lo(e,n,z)}finally{U.T=d}}else try{d=l(f,u),zd(e,n,d)}catch(z){Lo(e,n,z)}}function zd(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Md(e,n,u)},function(u){return Lo(e,n,u)}):Md(e,n,l)}function Md(e,n,l){n.status="fulfilled",n.value=l,Rd(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,Od(e,l)))}function Lo(e,n,l){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=l,Rd(n),n=n.next;while(n!==u)}e.action=null}function Rd(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Dd(e,n){return n}function Nd(e,n){if(He){var l=$e.formState;if(l!==null){e:{var u=Ce;if(He){if(tt){t:{for(var f=tt,d=Tn;f.nodeType!==8;){if(!d){f=null;break t}if(f=dn(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){tt=dn(f.nextSibling),u=f.data==="F!";break e}}Hi(u)}u=!1}u&&(n=l[0])}}return l=Nt(),l.memoizedState=l.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dd,lastRenderedState:n},l.queue=u,l=Wd.bind(null,Ce,u),u.dispatch=l,u=jo(!1),d=qo.bind(null,Ce,!1,u.queue),u=Nt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,l=q0.bind(null,Ce,f,d,l),f.dispatch=l,u.memoizedState=e,[n,l,!1]}function jd(e){var n=lt();return Ld(n,Ge,e)}function Ld(e,n,l){if(n=Do(e,n,Dd)[0],e=du(Yn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Ma(n)}catch(v){throw v===wa?uu:v}else u=n;n=lt();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Ce.flags|=2048,Er(9,mu(),V0.bind(null,f,l),null)),[u,d,e]}function V0(e,n){e.action=n}function Ud(e){var n=lt(),l=Ge;if(l!==null)return Ld(n,l,e);lt(),n=n.memoizedState,l=lt();var u=l.queue.dispatch;return l.memoizedState=e,[n,u,!1]}function Er(e,n,l,u){return e={tag:e,create:l,deps:u,inst:n,next:null},n=Ce.updateQueue,n===null&&(n=Mo(),Ce.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(u=l.next,l.next=e,e.next=u,n.lastEffect=e),e}function mu(){return{destroy:void 0,resource:void 0}}function Bd(){return lt().memoizedState}function pu(e,n,l,u){var f=Nt();u=u===void 0?null:u,Ce.flags|=e,f.memoizedState=Er(1|n,mu(),l,u)}function Ra(e,n,l,u){var f=lt();u=u===void 0?null:u;var d=f.memoizedState.inst;Ge!==null&&u!==null&&Eo(u,Ge.memoizedState.deps)?f.memoizedState=Er(n,d,l,u):(Ce.flags|=e,f.memoizedState=Er(1|n,d,l,u))}function Hd(e,n){pu(8390656,8,e,n)}function Zd(e,n){Ra(2048,8,e,n)}function qd(e,n){return Ra(4,2,e,n)}function Vd(e,n){return Ra(4,4,e,n)}function Yd(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Id(e,n,l){l=l!=null?l.concat([e]):null,Ra(4,4,Yd.bind(null,n,e),l)}function Uo(){}function Gd(e,n){var l=lt();n=n===void 0?null:n;var u=l.memoizedState;return n!==null&&Eo(n,u[1])?u[0]:(l.memoizedState=[e,n],e)}function Qd(e,n){var l=lt();n=n===void 0?null:n;var u=l.memoizedState;if(n!==null&&Eo(n,u[1]))return u[0];if(u=e(),Yi){me(!0);try{e()}finally{me(!1)}}return l.memoizedState=[u,n],u}function Bo(e,n,l){return l===void 0||(ui&1073741824)!==0?e.memoizedState=n:(e.memoizedState=l,e=Fm(),Ce.lanes|=e,mi|=e,l)}function Xd(e,n,l,u){return Vt(l,n)?l:kr.current!==null?(e=Bo(e,l,u),Vt(e,n)||(dt=!0),e):(ui&42)===0?(dt=!0,e.memoizedState=l):(e=Fm(),Ce.lanes|=e,mi|=e,n)}function Pd(e,n,l,u,f){var d=J.p;J.p=d!==0&&8>d?d:8;var v=U.T,_={};U.T=_,qo(e,!1,n,l);try{var T=f(),z=U.S;if(z!==null&&z(_,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var Z=B0(T,u);Da(e,n,Z,Xt(e))}else Da(e,n,u,Xt(e))}catch(I){Da(e,n,{then:function(){},status:"rejected",reason:I},Xt())}finally{J.p=d,U.T=v}}function Y0(){}function Ho(e,n,l,u){if(e.tag!==5)throw Error(a(476));var f=Fd(e).queue;Pd(e,f,n,ce,l===null?Y0:function(){return $d(e),l(u)})}function Fd(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:ce},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function $d(e){var n=Fd(e).next.queue;Da(e,n,{},Xt())}function Zo(){return _t(Ka)}function Kd(){return lt().memoizedState}function Jd(){return lt().memoizedState}function I0(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=Xt();e=ai(l);var u=li(n,e,l);u!==null&&(Pt(u,n,l),Aa(u,n,l)),n={cache:go()},e.payload=n;return}n=n.return}}function G0(e,n,l){var u=Xt();l={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},gu(e)?em(n,l):(l=ao(e,n,l,u),l!==null&&(Pt(l,e,u),tm(l,n,u)))}function Wd(e,n,l){var u=Xt();Da(e,n,l,u)}function Da(e,n,l,u){var f={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(gu(e))em(n,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,_=d(v,l);if(f.hasEagerState=!0,f.eagerState=_,Vt(_,v))return Wl(e,n,f,0),$e===null&&Jl(),!1}catch{}finally{}if(l=ao(e,n,f,u),l!==null)return Pt(l,e,u),tm(l,n,u),!0}return!1}function qo(e,n,l,u){if(u={lane:2,revertLane:bc(),action:u,hasEagerState:!1,eagerState:null,next:null},gu(e)){if(n)throw Error(a(479))}else n=ao(e,l,u,2),n!==null&&Pt(n,e,2)}function gu(e){var n=e.alternate;return e===Ce||n!==null&&n===Ce}function em(e,n){Tr=cu=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function tm(e,n,l){if((l&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,l|=u,n.lanes=l,oh(e,l)}}var yu={readContext:_t,use:hu,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it},nm={readContext:_t,use:hu,useCallback:function(e,n){return Nt().memoizedState=[e,n===void 0?null:n],e},useContext:_t,useEffect:Hd,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,pu(4194308,4,Yd.bind(null,n,e),l)},useLayoutEffect:function(e,n){return pu(4194308,4,e,n)},useInsertionEffect:function(e,n){pu(4,2,e,n)},useMemo:function(e,n){var l=Nt();n=n===void 0?null:n;var u=e();if(Yi){me(!0);try{e()}finally{me(!1)}}return l.memoizedState=[u,n],u},useReducer:function(e,n,l){var u=Nt();if(l!==void 0){var f=l(n);if(Yi){me(!0);try{l(n)}finally{me(!1)}}}else f=n;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=G0.bind(null,Ce,e),[u.memoizedState,e]},useRef:function(e){var n=Nt();return e={current:e},n.memoizedState=e},useState:function(e){e=jo(e);var n=e.queue,l=Wd.bind(null,Ce,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Uo,useDeferredValue:function(e,n){var l=Nt();return Bo(l,e,n)},useTransition:function(){var e=jo(!1);return e=Pd.bind(null,Ce,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var u=Ce,f=Nt();if(He){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),$e===null)throw Error(a(349));(Ne&124)!==0||kd(u,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,Hd(wd.bind(null,u,d,e),[e]),u.flags|=2048,Er(9,mu(),Td.bind(null,u,d,l,n),null),l},useId:function(){var e=Nt(),n=$e.identifierPrefix;if(He){var l=Zn,u=Hn;l=(u&~(1<<32-ve(u)-1)).toString(32)+l,n="«"+n+"R"+l,l=fu++,0<l&&(n+="H"+l.toString(32)),n+="»"}else l=H0++,n="«"+n+"r"+l.toString(32)+"»";return e.memoizedState=n},useHostTransitionStatus:Zo,useFormState:Nd,useActionState:Nd,useOptimistic:function(e){var n=Nt();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=qo.bind(null,Ce,!0,l),l.dispatch=n,[e,n]},useMemoCache:Ro,useCacheRefresh:function(){return Nt().memoizedState=I0.bind(null,Ce)}},im={readContext:_t,use:hu,useCallback:Gd,useContext:_t,useEffect:Zd,useImperativeHandle:Id,useInsertionEffect:qd,useLayoutEffect:Vd,useMemo:Qd,useReducer:du,useRef:Bd,useState:function(){return du(Yn)},useDebugValue:Uo,useDeferredValue:function(e,n){var l=lt();return Xd(l,Ge.memoizedState,e,n)},useTransition:function(){var e=du(Yn)[0],n=lt().memoizedState;return[typeof e=="boolean"?e:Ma(e),n]},useSyncExternalStore:Sd,useId:Kd,useHostTransitionStatus:Zo,useFormState:jd,useActionState:jd,useOptimistic:function(e,n){var l=lt();return Cd(l,Ge,e,n)},useMemoCache:Ro,useCacheRefresh:Jd},Q0={readContext:_t,use:hu,useCallback:Gd,useContext:_t,useEffect:Zd,useImperativeHandle:Id,useInsertionEffect:qd,useLayoutEffect:Vd,useMemo:Qd,useReducer:No,useRef:Bd,useState:function(){return No(Yn)},useDebugValue:Uo,useDeferredValue:function(e,n){var l=lt();return Ge===null?Bo(l,e,n):Xd(l,Ge.memoizedState,e,n)},useTransition:function(){var e=No(Yn)[0],n=lt().memoizedState;return[typeof e=="boolean"?e:Ma(e),n]},useSyncExternalStore:Sd,useId:Kd,useHostTransitionStatus:Zo,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,n){var l=lt();return Ge!==null?Cd(l,Ge,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ro,useCacheRefresh:Jd},Ar=null,Na=0;function vu(e){var n=Na;return Na+=1,Ar===null&&(Ar=[]),md(Ar,e,n)}function ja(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function bu(e,n){throw n.$$typeof===y?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function rm(e){var n=e._init;return n(e._payload)}function am(e){function n(A,E){if(e){var O=A.deletions;O===null?(A.deletions=[E],A.flags|=16):O.push(E)}}function l(A,E){if(!e)return null;for(;E!==null;)n(A,E),E=E.sibling;return null}function u(A){for(var E=new Map;A!==null;)A.key!==null?E.set(A.key,A):E.set(A.index,A),A=A.sibling;return E}function f(A,E){return A=Bn(A,E),A.index=0,A.sibling=null,A}function d(A,E,O){return A.index=O,e?(O=A.alternate,O!==null?(O=O.index,O<E?(A.flags|=67108866,E):O):(A.flags|=67108866,E)):(A.flags|=1048576,E)}function v(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function _(A,E,O,V){return E===null||E.tag!==6?(E=uo(O,A.mode,V),E.return=A,E):(E=f(E,O),E.return=A,E)}function T(A,E,O,V){var ae=O.type;return ae===w?Z(A,E,O.props.children,V,O.key):E!==null&&(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Se&&rm(ae)===E.type)?(E=f(E,O.props),ja(E,O),E.return=A,E):(E=tu(O.type,O.key,O.props,null,A.mode,V),ja(E,O),E.return=A,E)}function z(A,E,O,V){return E===null||E.tag!==4||E.stateNode.containerInfo!==O.containerInfo||E.stateNode.implementation!==O.implementation?(E=so(O,A.mode,V),E.return=A,E):(E=f(E,O.children||[]),E.return=A,E)}function Z(A,E,O,V,ae){return E===null||E.tag!==7?(E=ji(O,A.mode,V,ae),E.return=A,E):(E=f(E,O),E.return=A,E)}function I(A,E,O){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=uo(""+E,A.mode,O),E.return=A,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case S:return O=tu(E.type,E.key,E.props,null,A.mode,O),ja(O,E),O.return=A,O;case x:return E=so(E,A.mode,O),E.return=A,E;case Se:var V=E._init;return E=V(E._payload),I(A,E,O)}if(se(E)||te(E))return E=ji(E,A.mode,O,null),E.return=A,E;if(typeof E.then=="function")return I(A,vu(E),O);if(E.$$typeof===B)return I(A,au(A,E),O);bu(A,E)}return null}function R(A,E,O,V){var ae=E!==null?E.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return ae!==null?null:_(A,E,""+O,V);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case S:return O.key===ae?T(A,E,O,V):null;case x:return O.key===ae?z(A,E,O,V):null;case Se:return ae=O._init,O=ae(O._payload),R(A,E,O,V)}if(se(O)||te(O))return ae!==null?null:Z(A,E,O,V,null);if(typeof O.then=="function")return R(A,E,vu(O),V);if(O.$$typeof===B)return R(A,E,au(A,O),V);bu(A,O)}return null}function D(A,E,O,V,ae){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return A=A.get(O)||null,_(E,A,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case S:return A=A.get(V.key===null?O:V.key)||null,T(E,A,V,ae);case x:return A=A.get(V.key===null?O:V.key)||null,z(E,A,V,ae);case Se:var Oe=V._init;return V=Oe(V._payload),D(A,E,O,V,ae)}if(se(V)||te(V))return A=A.get(O)||null,Z(E,A,V,ae,null);if(typeof V.then=="function")return D(A,E,O,vu(V),ae);if(V.$$typeof===B)return D(A,E,O,au(E,V),ae);bu(E,V)}return null}function be(A,E,O,V){for(var ae=null,Oe=null,de=E,ye=E=0,pt=null;de!==null&&ye<O.length;ye++){de.index>ye?(pt=de,de=null):pt=de.sibling;var Be=R(A,de,O[ye],V);if(Be===null){de===null&&(de=pt);break}e&&de&&Be.alternate===null&&n(A,de),E=d(Be,E,ye),Oe===null?ae=Be:Oe.sibling=Be,Oe=Be,de=pt}if(ye===O.length)return l(A,de),He&&Ui(A,ye),ae;if(de===null){for(;ye<O.length;ye++)de=I(A,O[ye],V),de!==null&&(E=d(de,E,ye),Oe===null?ae=de:Oe.sibling=de,Oe=de);return He&&Ui(A,ye),ae}for(de=u(de);ye<O.length;ye++)pt=D(de,A,ye,O[ye],V),pt!==null&&(e&&pt.alternate!==null&&de.delete(pt.key===null?ye:pt.key),E=d(pt,E,ye),Oe===null?ae=pt:Oe.sibling=pt,Oe=pt);return e&&de.forEach(function(ki){return n(A,ki)}),He&&Ui(A,ye),ae}function ge(A,E,O,V){if(O==null)throw Error(a(151));for(var ae=null,Oe=null,de=E,ye=E=0,pt=null,Be=O.next();de!==null&&!Be.done;ye++,Be=O.next()){de.index>ye?(pt=de,de=null):pt=de.sibling;var ki=R(A,de,Be.value,V);if(ki===null){de===null&&(de=pt);break}e&&de&&ki.alternate===null&&n(A,de),E=d(ki,E,ye),Oe===null?ae=ki:Oe.sibling=ki,Oe=ki,de=pt}if(Be.done)return l(A,de),He&&Ui(A,ye),ae;if(de===null){for(;!Be.done;ye++,Be=O.next())Be=I(A,Be.value,V),Be!==null&&(E=d(Be,E,ye),Oe===null?ae=Be:Oe.sibling=Be,Oe=Be);return He&&Ui(A,ye),ae}for(de=u(de);!Be.done;ye++,Be=O.next())Be=D(de,A,ye,Be.value,V),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?ye:Be.key),E=d(Be,E,ye),Oe===null?ae=Be:Oe.sibling=Be,Oe=Be);return e&&de.forEach(function(Xb){return n(A,Xb)}),He&&Ui(A,ye),ae}function Xe(A,E,O,V){if(typeof O=="object"&&O!==null&&O.type===w&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case S:e:{for(var ae=O.key;E!==null;){if(E.key===ae){if(ae=O.type,ae===w){if(E.tag===7){l(A,E.sibling),V=f(E,O.props.children),V.return=A,A=V;break e}}else if(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Se&&rm(ae)===E.type){l(A,E.sibling),V=f(E,O.props),ja(V,O),V.return=A,A=V;break e}l(A,E);break}else n(A,E);E=E.sibling}O.type===w?(V=ji(O.props.children,A.mode,V,O.key),V.return=A,A=V):(V=tu(O.type,O.key,O.props,null,A.mode,V),ja(V,O),V.return=A,A=V)}return v(A);case x:e:{for(ae=O.key;E!==null;){if(E.key===ae)if(E.tag===4&&E.stateNode.containerInfo===O.containerInfo&&E.stateNode.implementation===O.implementation){l(A,E.sibling),V=f(E,O.children||[]),V.return=A,A=V;break e}else{l(A,E);break}else n(A,E);E=E.sibling}V=so(O,A.mode,V),V.return=A,A=V}return v(A);case Se:return ae=O._init,O=ae(O._payload),Xe(A,E,O,V)}if(se(O))return be(A,E,O,V);if(te(O)){if(ae=te(O),typeof ae!="function")throw Error(a(150));return O=ae.call(O),ge(A,E,O,V)}if(typeof O.then=="function")return Xe(A,E,vu(O),V);if(O.$$typeof===B)return Xe(A,E,au(A,O),V);bu(A,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,E!==null&&E.tag===6?(l(A,E.sibling),V=f(E,O),V.return=A,A=V):(l(A,E),V=uo(O,A.mode,V),V.return=A,A=V),v(A)):l(A,E)}return function(A,E,O,V){try{Na=0;var ae=Xe(A,E,O,V);return Ar=null,ae}catch(de){if(de===wa||de===uu)throw de;var Oe=Yt(29,de,null,A.mode);return Oe.lanes=V,Oe.return=A,Oe}finally{}}}var Cr=am(!0),lm=am(!1),ln=Y(null),wn=null;function si(e){var n=e.alternate;k(ct,ct.current&1),k(ln,e),wn===null&&(n===null||kr.current!==null||n.memoizedState!==null)&&(wn=e)}function um(e){if(e.tag===22){if(k(ct,ct.current),k(ln,e),wn===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(wn=e)}}else oi()}function oi(){k(ct,ct.current),k(ln,ln.current)}function In(e){W(ln),wn===e&&(wn=null),W(ct)}var ct=Y(0);function _u(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Mc(l)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Vo(e,n,l,u){n=e.memoizedState,l=l(u,n),l=l==null?n:g({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Yo={enqueueSetState:function(e,n,l){e=e._reactInternals;var u=Xt(),f=ai(u);f.payload=n,l!=null&&(f.callback=l),n=li(e,f,u),n!==null&&(Pt(n,e,u),Aa(n,e,u))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var u=Xt(),f=ai(u);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=li(e,f,u),n!==null&&(Pt(n,e,u),Aa(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=Xt(),u=ai(l);u.tag=2,n!=null&&(u.callback=n),n=li(e,u,l),n!==null&&(Pt(n,e,l),Aa(n,e,l))}};function sm(e,n,l,u,f,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,v):n.prototype&&n.prototype.isPureReactComponent?!ya(l,u)||!ya(f,d):!0}function om(e,n,l,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,u),n.state!==e&&Yo.enqueueReplaceState(n,n.state,null)}function Ii(e,n){var l=n;if("ref"in n){l={};for(var u in n)u!=="ref"&&(l[u]=n[u])}if(e=e.defaultProps){l===n&&(l=g({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}var xu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function cm(e){xu(e)}function fm(e){console.error(e)}function hm(e){xu(e)}function Su(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function dm(e,n,l){try{var u=e.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Io(e,n,l){return l=ai(l),l.tag=3,l.payload={element:null},l.callback=function(){Su(e,n)},l}function mm(e){return e=ai(e),e.tag=3,e}function pm(e,n,l,u){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=u.value;e.payload=function(){return f(d)},e.callback=function(){dm(n,l,u)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){dm(n,l,u),typeof f!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function X0(e,n,l,u,f){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=l.alternate,n!==null&&Sa(n,l,f,!0),l=ln.current,l!==null){switch(l.tag){case 13:return wn===null?mc():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,u===bo?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([u]):n.add(u),gc(e,u,f)),!1;case 22:return l.flags|=65536,u===bo?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([u]):l.add(u)),gc(e,u,f)),!1}throw Error(a(435,l.tag))}return gc(e,u,f),mc(),!1}if(He)return n=ln.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==fo&&(e=Error(a(422),{cause:u}),xa(tn(e,l)))):(u!==fo&&(n=Error(a(423),{cause:u}),xa(tn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=tn(u,l),f=Io(e.stateNode,u,f),So(e,f),nt!==4&&(nt=2)),!1;var d=Error(a(520),{cause:u});if(d=tn(d,l),Va===null?Va=[d]:Va.push(d),nt!==4&&(nt=2),n===null)return!0;u=tn(u,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Io(l.stateNode,u,e),So(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(pi===null||!pi.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=mm(f),pm(f,e,l,u),So(l,f),!1}l=l.return}while(l!==null);return!1}var gm=Error(a(461)),dt=!1;function gt(e,n,l,u){n.child=e===null?lm(n,null,l,u):Cr(n,e.child,l,u)}function ym(e,n,l,u,f){l=l.render;var d=n.ref;if("ref"in u){var v={};for(var _ in u)_!=="ref"&&(v[_]=u[_])}else v=u;return qi(n),u=Ao(e,n,l,v,d,f),_=Co(),e!==null&&!dt?(Oo(e,n,f),Gn(e,n,f)):(He&&_&&oo(n),n.flags|=1,gt(e,n,u,f),n.child)}function vm(e,n,l,u,f){if(e===null){var d=l.type;return typeof d=="function"&&!lo(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,bm(e,n,d,u,f)):(e=tu(l.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!Jo(e,f)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:ya,l(v,u)&&e.ref===n.ref)return Gn(e,n,f)}return n.flags|=1,e=Bn(d,u),e.ref=n.ref,e.return=n,n.child=e}function bm(e,n,l,u,f){if(e!==null){var d=e.memoizedProps;if(ya(d,u)&&e.ref===n.ref)if(dt=!1,n.pendingProps=u=d,Jo(e,f))(e.flags&131072)!==0&&(dt=!0);else return n.lanes=e.lanes,Gn(e,n,f)}return Go(e,n,l,u,f)}function _m(e,n,l){var u=n.pendingProps,f=u.children,d=e!==null?e.memoizedState:null;if(u.mode==="hidden"){if((n.flags&128)!==0){if(u=d!==null?d.baseLanes|l:l,e!==null){for(f=n.child=e.child,d=0;f!==null;)d=d|f.lanes|f.childLanes,f=f.sibling;n.childLanes=d&~u}else n.childLanes=0,n.child=null;return xm(e,n,u,l)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&lu(n,d!==null?d.cachePool:null),d!==null?bd(n,d):To(),um(n);else return n.lanes=n.childLanes=536870912,xm(e,n,d!==null?d.baseLanes|l:l,l)}else d!==null?(lu(n,d.cachePool),bd(n,d),oi(),n.memoizedState=null):(e!==null&&lu(n,null),To(),oi());return gt(e,n,f,l),n.child}function xm(e,n,l,u){var f=vo();return f=f===null?null:{parent:ot._currentValue,pool:f},n.memoizedState={baseLanes:l,cachePool:f},e!==null&&lu(n,null),To(),um(n),e!==null&&Sa(e,n,u,!0),null}function ku(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function Go(e,n,l,u,f){return qi(n),l=Ao(e,n,l,u,void 0,f),u=Co(),e!==null&&!dt?(Oo(e,n,f),Gn(e,n,f)):(He&&u&&oo(n),n.flags|=1,gt(e,n,l,f),n.child)}function Sm(e,n,l,u,f,d){return qi(n),n.updateQueue=null,l=xd(n,u,l,f),_d(e),u=Co(),e!==null&&!dt?(Oo(e,n,d),Gn(e,n,d)):(He&&u&&oo(n),n.flags|=1,gt(e,n,l,d),n.child)}function km(e,n,l,u,f){if(qi(n),n.stateNode===null){var d=vr,v=l.contextType;typeof v=="object"&&v!==null&&(d=_t(v)),d=new l(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Yo,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},_o(n),v=l.contextType,d.context=typeof v=="object"&&v!==null?_t(v):vr,d.state=n.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(Vo(n,l,v,u),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Yo.enqueueReplaceState(d,d.state,null),Oa(n,u,d,f),Ca(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var _=n.memoizedProps,T=Ii(l,_);d.props=T;var z=d.context,Z=l.contextType;v=vr,typeof Z=="object"&&Z!==null&&(v=_t(Z));var I=l.getDerivedStateFromProps;Z=typeof I=="function"||typeof d.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,Z||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(_||z!==v)&&om(n,d,u,v),ri=!1;var R=n.memoizedState;d.state=R,Oa(n,u,d,f),Ca(),z=n.memoizedState,_||R!==z||ri?(typeof I=="function"&&(Vo(n,l,I,u),z=n.memoizedState),(T=ri||sm(n,l,T,u,R,z,v))?(Z||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=z),d.props=u,d.state=z,d.context=v,u=T):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,xo(e,n),v=n.memoizedProps,Z=Ii(l,v),d.props=Z,I=n.pendingProps,R=d.context,z=l.contextType,T=vr,typeof z=="object"&&z!==null&&(T=_t(z)),_=l.getDerivedStateFromProps,(z=typeof _=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==I||R!==T)&&om(n,d,u,T),ri=!1,R=n.memoizedState,d.state=R,Oa(n,u,d,f),Ca();var D=n.memoizedState;v!==I||R!==D||ri||e!==null&&e.dependencies!==null&&ru(e.dependencies)?(typeof _=="function"&&(Vo(n,l,_,u),D=n.memoizedState),(Z=ri||sm(n,l,Z,u,R,D,T)||e!==null&&e.dependencies!==null&&ru(e.dependencies))?(z||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,D,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,D,T)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=D),d.props=u,d.state=D,d.context=T,u=Z):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,ku(e,n),u=(n.flags&128)!==0,d||u?(d=n.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&u?(n.child=Cr(n,e.child,null,f),n.child=Cr(n,null,l,f)):gt(e,n,l,f),n.memoizedState=d.state,e=n.child):e=Gn(e,n,f),e}function Tm(e,n,l,u){return _a(),n.flags|=256,gt(e,n,l,u),n.child}var Qo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xo(e){return{baseLanes:e,cachePool:fd()}}function Po(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=un),e}function wm(e,n,l){var u=n.pendingProps,f=!1,d=(n.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(ct.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(He){if(f?si(n):oi(),He){var _=tt,T;if(T=_){e:{for(T=_,_=Tn;T.nodeType!==8;){if(!_){_=null;break e}if(T=dn(T.nextSibling),T===null){_=null;break e}}_=T}_!==null?(n.memoizedState={dehydrated:_,treeContext:Li!==null?{id:Hn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},T=Yt(18,null,null,0),T.stateNode=_,T.return=n,n.child=T,Et=n,tt=null,T=!0):T=!1}T||Hi(n)}if(_=n.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Mc(_)?n.lanes=32:n.lanes=536870912,null;In(n)}return _=u.children,u=u.fallback,f?(oi(),f=n.mode,_=Tu({mode:"hidden",children:_},f),u=ji(u,f,l,null),_.return=n,u.return=n,_.sibling=u,n.child=_,f=n.child,f.memoizedState=Xo(l),f.childLanes=Po(e,v,l),n.memoizedState=Qo,u):(si(n),Fo(n,_))}if(T=e.memoizedState,T!==null&&(_=T.dehydrated,_!==null)){if(d)n.flags&256?(si(n),n.flags&=-257,n=$o(e,n,l)):n.memoizedState!==null?(oi(),n.child=e.child,n.flags|=128,n=null):(oi(),f=u.fallback,_=n.mode,u=Tu({mode:"visible",children:u.children},_),f=ji(f,_,l,null),f.flags|=2,u.return=n,f.return=n,u.sibling=f,n.child=u,Cr(n,e.child,null,l),u=n.child,u.memoizedState=Xo(l),u.childLanes=Po(e,v,l),n.memoizedState=Qo,n=f);else if(si(n),Mc(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var z=v.dgst;v=z,u=Error(a(419)),u.stack="",u.digest=v,xa({value:u,source:null,stack:null}),n=$o(e,n,l)}else if(dt||Sa(e,n,l,!1),v=(l&e.childLanes)!==0,dt||v){if(v=$e,v!==null&&(u=l&-l,u=(u&42)!==0?1:Ms(u),u=(u&(v.suspendedLanes|l))!==0?0:u,u!==0&&u!==T.retryLane))throw T.retryLane=u,yr(e,u),Pt(v,e,u),gm;_.data==="$?"||mc(),n=$o(e,n,l)}else _.data==="$?"?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,tt=dn(_.nextSibling),Et=n,He=!0,Bi=null,Tn=!1,e!==null&&(rn[an++]=Hn,rn[an++]=Zn,rn[an++]=Li,Hn=e.id,Zn=e.overflow,Li=n),n=Fo(n,u.children),n.flags|=4096);return n}return f?(oi(),f=u.fallback,_=n.mode,T=e.child,z=T.sibling,u=Bn(T,{mode:"hidden",children:u.children}),u.subtreeFlags=T.subtreeFlags&65011712,z!==null?f=Bn(z,f):(f=ji(f,_,l,null),f.flags|=2),f.return=n,u.return=n,u.sibling=f,n.child=u,u=f,f=n.child,_=e.child.memoizedState,_===null?_=Xo(l):(T=_.cachePool,T!==null?(z=ot._currentValue,T=T.parent!==z?{parent:z,pool:z}:T):T=fd(),_={baseLanes:_.baseLanes|l,cachePool:T}),f.memoizedState=_,f.childLanes=Po(e,v,l),n.memoizedState=Qo,u):(si(n),l=e.child,e=l.sibling,l=Bn(l,{mode:"visible",children:u.children}),l.return=n,l.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=l,n.memoizedState=null,l)}function Fo(e,n){return n=Tu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Tu(e,n){return e=Yt(22,e,null,n),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function $o(e,n,l){return Cr(n,e.child,null,l),e=Fo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Em(e,n,l){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),mo(e.return,n,l)}function Ko(e,n,l,u,f){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:f}:(d.isBackwards=n,d.rendering=null,d.renderingStartTime=0,d.last=u,d.tail=l,d.tailMode=f)}function Am(e,n,l){var u=n.pendingProps,f=u.revealOrder,d=u.tail;if(gt(e,n,u.children,l),u=ct.current,(u&2)!==0)u=u&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Em(e,l,n);else if(e.tag===19)Em(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=1}switch(k(ct,u),f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&_u(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),Ko(n,!1,f,l,d);break;case"backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&_u(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Ko(n,!0,l,null,d);break;case"together":Ko(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Gn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),mi|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Sa(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,l=Bn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Bn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function Jo(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ru(e)))}function P0(e,n,l){switch(n.tag){case 3:Ue(n,n.stateNode.containerInfo),ii(n,ot,e.memoizedState.cache),_a();break;case 27:case 5:Sn(n);break;case 4:Ue(n,n.stateNode.containerInfo);break;case 10:ii(n,n.type,n.memoizedProps.value);break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(si(n),n.flags|=128,null):(l&n.child.childLanes)!==0?wm(e,n,l):(si(n),e=Gn(e,n,l),e!==null?e.sibling:null);si(n);break;case 19:var f=(e.flags&128)!==0;if(u=(l&n.childLanes)!==0,u||(Sa(e,n,l,!1),u=(l&n.childLanes)!==0),f){if(u)return Am(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),k(ct,ct.current),u)break;return null;case 22:case 23:return n.lanes=0,_m(e,n,l);case 24:ii(n,ot,e.memoizedState.cache)}return Gn(e,n,l)}function Cm(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)dt=!0;else{if(!Jo(e,l)&&(n.flags&128)===0)return dt=!1,P0(e,n,l);dt=(e.flags&131072)!==0}else dt=!1,He&&(n.flags&1048576)!==0&&rd(n,iu,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var u=n.elementType,f=u._init;if(u=f(u._payload),n.type=u,typeof u=="function")lo(u)?(e=Ii(u,e),n.tag=1,n=km(null,n,u,e,l)):(n.tag=0,n=Go(null,n,u,e,l));else{if(u!=null){if(f=u.$$typeof,f===F){n.tag=11,n=ym(null,n,u,e,l);break e}else if(f===he){n.tag=14,n=vm(null,n,u,e,l);break e}}throw n=ie(u)||u,Error(a(306,n,""))}}return n;case 0:return Go(e,n,n.type,n.pendingProps,l);case 1:return u=n.type,f=Ii(u,n.pendingProps),km(e,n,u,f,l);case 3:e:{if(Ue(n,n.stateNode.containerInfo),e===null)throw Error(a(387));u=n.pendingProps;var d=n.memoizedState;f=d.element,xo(e,n),Oa(n,u,null,l);var v=n.memoizedState;if(u=v.cache,ii(n,ot,u),u!==d.cache&&po(n,[ot],l,!0),Ca(),u=v.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=Tm(e,n,u,l);break e}else if(u!==f){f=tn(Error(a(424)),n),xa(f),n=Tm(e,n,u,l);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(tt=dn(e.firstChild),Et=n,He=!0,Bi=null,Tn=!0,l=lm(n,null,u,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(_a(),u===f){n=Gn(e,n,l);break e}gt(e,n,u,l)}n=n.child}return n;case 26:return ku(e,n),e===null?(l=Rp(n.type,null,n.pendingProps,null))?n.memoizedState=l:He||(l=n.type,e=n.pendingProps,u=Bu(oe.current).createElement(l),u[bt]=n,u[Rt]=e,vt(u,l,e),ht(u),n.stateNode=u):n.memoizedState=Rp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Sn(n),e===null&&He&&(u=n.stateNode=Op(n.type,n.pendingProps,oe.current),Et=n,Tn=!0,f=tt,vi(n.type)?(Rc=f,tt=dn(u.firstChild)):tt=f),gt(e,n,n.pendingProps.children,l),ku(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&He&&((f=u=tt)&&(u=Sb(u,n.type,n.pendingProps,Tn),u!==null?(n.stateNode=u,Et=n,tt=dn(u.firstChild),Tn=!1,f=!0):f=!1),f||Hi(n)),Sn(n),f=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,u=d.children,Cc(f,d)?u=null:v!==null&&Cc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Ao(e,n,Z0,null,null,l),Ka._currentValue=f),ku(e,n),gt(e,n,u,l),n.child;case 6:return e===null&&He&&((e=l=tt)&&(l=kb(l,n.pendingProps,Tn),l!==null?(n.stateNode=l,Et=n,tt=null,e=!0):e=!1),e||Hi(n)),null;case 13:return wm(e,n,l);case 4:return Ue(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Cr(n,null,u,l):gt(e,n,u,l),n.child;case 11:return ym(e,n,n.type,n.pendingProps,l);case 7:return gt(e,n,n.pendingProps,l),n.child;case 8:return gt(e,n,n.pendingProps.children,l),n.child;case 12:return gt(e,n,n.pendingProps.children,l),n.child;case 10:return u=n.pendingProps,ii(n,n.type,u.value),gt(e,n,u.children,l),n.child;case 9:return f=n.type._context,u=n.pendingProps.children,qi(n),f=_t(f),u=u(f),n.flags|=1,gt(e,n,u,l),n.child;case 14:return vm(e,n,n.type,n.pendingProps,l);case 15:return bm(e,n,n.type,n.pendingProps,l);case 19:return Am(e,n,l);case 31:return u=n.pendingProps,l=n.mode,u={mode:u.mode,children:u.children},e===null?(l=Tu(u,l),l.ref=n.ref,n.child=l,l.return=n,n=l):(l=Bn(e.child,u),l.ref=n.ref,n.child=l,l.return=n,n=l),n;case 22:return _m(e,n,l);case 24:return qi(n),u=_t(ot),e===null?(f=vo(),f===null&&(f=$e,d=go(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:u,cache:f},_o(n),ii(n,ot,f)):((e.lanes&l)!==0&&(xo(e,n),Oa(n,null,null,l),Ca()),f=e.memoizedState,d=n.memoizedState,f.parent!==u?(f={parent:u,cache:u},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),ii(n,ot,u)):(u=d.cache,ii(n,ot,u),u!==f.cache&&po(n,[ot],l,!0))),gt(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function Qn(e){e.flags|=4}function Om(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Up(n)){if(n=ln.current,n!==null&&((Ne&4194048)===Ne?wn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||n!==wn))throw Ea=bo,hd;e.flags|=8192}}function wu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?uh():536870912,e.lanes|=n,Rr|=n)}function La(e,n){if(!He)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function We(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,u=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=l,n}function F0(e,n,l){var u=n.pendingProps;switch(co(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(n),null;case 1:return We(n),null;case 3:return l=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Vn(ot),wt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ba(n)?Qn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ud())),We(n),null;case 26:return l=n.memoizedState,e===null?(Qn(n),l!==null?(We(n),Om(n,l)):(We(n),n.flags&=-16777217)):l?l!==e.memoizedState?(Qn(n),We(n),Om(n,l)):(We(n),n.flags&=-16777217):(e.memoizedProps!==u&&Qn(n),We(n),n.flags&=-16777217),null;case 27:Nn(n),l=oe.current;var f=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Qn(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return We(n),null}e=ue.current,ba(n)?ad(n):(e=Op(f,u,l),n.stateNode=e,Qn(n))}return We(n),null;case 5:if(Nn(n),l=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Qn(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return We(n),null}if(e=ue.current,ba(n))ad(n);else{switch(f=Bu(oe.current),e){case 1:e=f.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:e=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":e=f.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":e=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof u.is=="string"?f.createElement("select",{is:u.is}):f.createElement("select"),u.multiple?e.multiple=!0:u.size&&(e.size=u.size);break;default:e=typeof u.is=="string"?f.createElement(l,{is:u.is}):f.createElement(l)}}e[bt]=n,e[Rt]=u;e:for(f=n.child;f!==null;){if(f.tag===5||f.tag===6)e.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===n)break e;for(;f.sibling===null;){if(f.return===null||f.return===n)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}n.stateNode=e;e:switch(vt(e,l,u),l){case"button":case"input":case"select":case"textarea":e=!!u.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Qn(n)}}return We(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&Qn(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(a(166));if(e=oe.current,ba(n)){if(e=n.stateNode,l=n.memoizedProps,u=null,f=Et,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}e[bt]=n,e=!!(e.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Sp(e.nodeValue,l)),e||Hi(n)}else e=Bu(e).createTextNode(u),e[bt]=n,n.stateNode=e}return We(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ba(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[bt]=n}else _a(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;We(n),f=!1}else f=ud(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(In(n),n):(In(n),null)}if(In(n),(n.flags&128)!==0)return n.lanes=l,n;if(l=u!==null,e=e!==null&&e.memoizedState!==null,l){u=n.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool);var d=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==f&&(u.flags|=2048)}return l!==e&&l&&(n.child.flags|=8192),wu(n,n.updateQueue),We(n),null;case 4:return wt(),e===null&&kc(n.stateNode.containerInfo),We(n),null;case 10:return Vn(n.type),We(n),null;case 19:if(W(ct),f=n.memoizedState,f===null)return We(n),null;if(u=(n.flags&128)!==0,d=f.rendering,d===null)if(u)La(f,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=_u(e),d!==null){for(n.flags|=128,La(f,!1),e=d.updateQueue,n.updateQueue=e,wu(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)id(l,e),l=l.sibling;return k(ct,ct.current&1|2),n.child}e=e.sibling}f.tail!==null&&Ht()>Cu&&(n.flags|=128,u=!0,La(f,!1),n.lanes=4194304)}else{if(!u)if(e=_u(d),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,wu(n,e),La(f,!0),f.tail===null&&f.tailMode==="hidden"&&!d.alternate&&!He)return We(n),null}else 2*Ht()-f.renderingStartTime>Cu&&l!==536870912&&(n.flags|=128,u=!0,La(f,!1),n.lanes=4194304);f.isBackwards?(d.sibling=n.child,n.child=d):(e=f.last,e!==null?e.sibling=d:n.child=d,f.last=d)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ht(),n.sibling=null,e=ct.current,k(ct,u?e&1|2:e&1),n):(We(n),null);case 22:case 23:return In(n),wo(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(l&536870912)!==0&&(n.flags&128)===0&&(We(n),n.subtreeFlags&6&&(n.flags|=8192)):We(n),l=n.updateQueue,l!==null&&wu(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==l&&(n.flags|=2048),e!==null&&W(Vi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Vn(ot),We(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function $0(e,n){switch(co(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Vn(ot),wt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Nn(n),null;case 13:if(In(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));_a()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return W(ct),null;case 4:return wt(),null;case 10:return Vn(n.type),null;case 22:case 23:return In(n),wo(),e!==null&&W(Vi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Vn(ot),null;case 25:return null;default:return null}}function zm(e,n){switch(co(n),n.tag){case 3:Vn(ot),wt();break;case 26:case 27:case 5:Nn(n);break;case 4:wt();break;case 13:In(n);break;case 19:W(ct);break;case 10:Vn(n.type);break;case 22:case 23:In(n),wo(),e!==null&&W(Vi);break;case 24:Vn(ot)}}function Ua(e,n){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var f=u.next;l=f;do{if((l.tag&e)===e){u=void 0;var d=l.create,v=l.inst;u=d(),v.destroy=u}l=l.next}while(l!==f)}}catch(_){Pe(n,n.return,_)}}function ci(e,n,l){try{var u=n.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var d=f.next;u=d;do{if((u.tag&e)===e){var v=u.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,f=n;var T=l,z=_;try{z()}catch(Z){Pe(f,T,Z)}}}u=u.next}while(u!==d)}}catch(Z){Pe(n,n.return,Z)}}function Mm(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{vd(n,l)}catch(u){Pe(e,e.return,u)}}}function Rm(e,n,l){l.props=Ii(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(u){Pe(e,n,u)}}function Ba(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof l=="function"?e.refCleanup=l(u):l.current=u}}catch(f){Pe(e,n,f)}}function En(e,n){var l=e.ref,u=e.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(f){Pe(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){Pe(e,n,f)}else l.current=null}function Dm(e){var n=e.type,l=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(f){Pe(e,e.return,f)}}function Wo(e,n,l){try{var u=e.stateNode;yb(u,e.type,l,n),u[Rt]=n}catch(f){Pe(e,e.return,f)}}function Nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&vi(e.type)||e.tag===4}function ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&vi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tc(e,n,l){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Uu));else if(u!==4&&(u===27&&vi(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(tc(e,n,l),e=e.sibling;e!==null;)tc(e,n,l),e=e.sibling}function Eu(e,n,l){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(u!==4&&(u===27&&vi(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Eu(e,n,l),e=e.sibling;e!==null;)Eu(e,n,l),e=e.sibling}function jm(e){var n=e.stateNode,l=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);vt(n,u,l),n[bt]=e,n[Rt]=l}catch(d){Pe(e,e.return,d)}}var Xn=!1,rt=!1,nc=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,mt=null;function K0(e,n){if(e=e.containerInfo,Ec=Iu,e=Xh(e),Ws(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var f=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var v=0,_=-1,T=-1,z=0,Z=0,I=e,R=null;t:for(;;){for(var D;I!==l||f!==0&&I.nodeType!==3||(_=v+f),I!==d||u!==0&&I.nodeType!==3||(T=v+u),I.nodeType===3&&(v+=I.nodeValue.length),(D=I.firstChild)!==null;)R=I,I=D;for(;;){if(I===e)break t;if(R===l&&++z===f&&(_=v),R===d&&++Z===u&&(T=v),(D=I.nextSibling)!==null)break;I=R,R=I.parentNode}I=D}l=_===-1||T===-1?null:{start:_,end:T}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ac={focusedElem:e,selectionRange:l},Iu=!1,mt=n;mt!==null;)if(n=mt,e=n.child,(n.subtreeFlags&1024)!==0&&e!==null)e.return=n,mt=e;else for(;mt!==null;){switch(n=mt,d=n.alternate,e=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,f=d.memoizedProps,d=d.memoizedState,u=l.stateNode;try{var be=Ii(l.type,f,l.elementType===l.type);e=u.getSnapshotBeforeUpdate(be,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Pe(l,l.return,ge)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)zc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=n.sibling,e!==null){e.return=n.return,mt=e;break}mt=n.return}}function Um(e,n,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:fi(e,l),u&4&&Ua(5,l);break;case 1:if(fi(e,l),u&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(v){Pe(l,l.return,v)}else{var f=Ii(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Pe(l,l.return,v)}}u&64&&Mm(l),u&512&&Ba(l,l.return);break;case 3:if(fi(e,l),u&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{vd(e,n)}catch(v){Pe(l,l.return,v)}}break;case 27:n===null&&u&4&&jm(l);case 26:case 5:fi(e,l),n===null&&u&4&&Dm(l),u&512&&Ba(l,l.return);break;case 12:fi(e,l);break;case 13:fi(e,l),u&4&&Zm(e,l),u&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=lb.bind(null,l),Tb(e,l))));break;case 22:if(u=l.memoizedState!==null||Xn,!u){n=n!==null&&n.memoizedState!==null||rt,f=Xn;var d=rt;Xn=u,(rt=n)&&!d?hi(e,l,(l.subtreeFlags&8772)!==0):fi(e,l),Xn=f,rt=d}break;case 30:break;default:fi(e,l)}}function Bm(e){var n=e.alternate;n!==null&&(e.alternate=null,Bm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ns(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,jt=!1;function Pn(e,n,l){for(l=l.child;l!==null;)Hm(e,n,l),l=l.sibling}function Hm(e,n,l){if(P&&typeof P.onCommitFiberUnmount=="function")try{P.onCommitFiberUnmount(H,l)}catch{}switch(l.tag){case 26:rt||En(l,n),Pn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:rt||En(l,n);var u=Je,f=jt;vi(l.type)&&(Je=l.stateNode,jt=!1),Pn(e,n,l),Xa(l.stateNode),Je=u,jt=f;break;case 5:rt||En(l,n);case 6:if(u=Je,f=jt,Je=null,Pn(e,n,l),Je=u,jt=f,Je!==null)if(jt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(l.stateNode)}catch(d){Pe(l,n,d)}else try{Je.removeChild(l.stateNode)}catch(d){Pe(l,n,d)}break;case 18:Je!==null&&(jt?(e=Je,Ap(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),tl(e)):Ap(Je,l.stateNode));break;case 4:u=Je,f=jt,Je=l.stateNode.containerInfo,jt=!0,Pn(e,n,l),Je=u,jt=f;break;case 0:case 11:case 14:case 15:rt||ci(2,l,n),rt||ci(4,l,n),Pn(e,n,l);break;case 1:rt||(En(l,n),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Rm(l,n,u)),Pn(e,n,l);break;case 21:Pn(e,n,l);break;case 22:rt=(u=rt)||l.memoizedState!==null,Pn(e,n,l),rt=u;break;default:Pn(e,n,l)}}function Zm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{tl(e)}catch(l){Pe(n,n.return,l)}}function J0(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Lm),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Lm),n;default:throw Error(a(435,e.tag))}}function ic(e,n){var l=J0(e);n.forEach(function(u){var f=ub.bind(null,e,u);l.has(u)||(l.add(u),u.then(f,f))})}function It(e,n){var l=n.deletions;if(l!==null)for(var u=0;u<l.length;u++){var f=l[u],d=e,v=n,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(vi(_.type)){Je=_.stateNode,jt=!1;break e}break;case 5:Je=_.stateNode,jt=!1;break e;case 3:case 4:Je=_.stateNode.containerInfo,jt=!0;break e}_=_.return}if(Je===null)throw Error(a(160));Hm(d,v,f),Je=null,jt=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)qm(n,e),n=n.sibling}var hn=null;function qm(e,n){var l=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(n,e),Gt(e),u&4&&(ci(3,e,e.return),Ua(3,e),ci(5,e,e.return));break;case 1:It(n,e),Gt(e),u&512&&(rt||l===null||En(l,l.return)),u&64&&Xn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var f=hn;if(It(n,e),Gt(e),u&512&&(rt||l===null||En(l,l.return)),u&4){var d=l!==null?l.memoizedState:null;if(u=e.memoizedState,l===null)if(u===null)if(e.stateNode===null){e:{u=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":d=f.getElementsByTagName("title")[0],(!d||d[sa]||d[bt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(u),f.head.insertBefore(d,f.querySelector("head > title"))),vt(d,u,l),d[bt]=e,ht(d),u=d;break e;case"link":var v=jp("link","href",f).get(u+(l.href||""));if(v){for(var _=0;_<v.length;_++)if(d=v[_],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(_,1);break t}}d=f.createElement(u),vt(d,u,l),f.head.appendChild(d);break;case"meta":if(v=jp("meta","content",f).get(u+(l.content||""))){for(_=0;_<v.length;_++)if(d=v[_],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(_,1);break t}}d=f.createElement(u),vt(d,u,l),f.head.appendChild(d);break;default:throw Error(a(468,u))}d[bt]=e,ht(d),u=d}e.stateNode=u}else Lp(f,e.type,e.stateNode);else e.stateNode=Np(f,u,e.memoizedProps);else d!==u?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,u===null?Lp(f,e.type,e.stateNode):Np(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&Wo(e,e.memoizedProps,l.memoizedProps)}break;case 27:It(n,e),Gt(e),u&512&&(rt||l===null||En(l,l.return)),l!==null&&u&4&&Wo(e,e.memoizedProps,l.memoizedProps);break;case 5:if(It(n,e),Gt(e),u&512&&(rt||l===null||En(l,l.return)),e.flags&32){f=e.stateNode;try{cr(f,"")}catch(D){Pe(e,e.return,D)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,Wo(e,f,l!==null?l.memoizedProps:f)),u&1024&&(nc=!0);break;case 6:if(It(n,e),Gt(e),u&4){if(e.stateNode===null)throw Error(a(162));u=e.memoizedProps,l=e.stateNode;try{l.nodeValue=u}catch(D){Pe(e,e.return,D)}}break;case 3:if(qu=null,f=hn,hn=Hu(n.containerInfo),It(n,e),hn=f,Gt(e),u&4&&l!==null&&l.memoizedState.isDehydrated)try{tl(n.containerInfo)}catch(D){Pe(e,e.return,D)}nc&&(nc=!1,Vm(e));break;case 4:u=hn,hn=Hu(e.stateNode.containerInfo),It(n,e),Gt(e),hn=u;break;case 12:It(n,e),Gt(e);break;case 13:It(n,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(oc=Ht()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ic(e,u)));break;case 22:f=e.memoizedState!==null;var T=l!==null&&l.memoizedState!==null,z=Xn,Z=rt;if(Xn=z||f,rt=Z||T,It(n,e),rt=Z,Xn=z,Gt(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||T||Xn||rt||Gi(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){T=l=n;try{if(d=T.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=T.stateNode;var I=T.memoizedProps.style,R=I!=null&&I.hasOwnProperty("display")?I.display:null;_.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(D){Pe(T,T.return,D)}}}else if(n.tag===6){if(l===null){T=n;try{T.stateNode.nodeValue=f?"":T.memoizedProps}catch(D){Pe(T,T.return,D)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,ic(e,l))));break;case 19:It(n,e),Gt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ic(e,u)));break;case 30:break;case 21:break;default:It(n,e),Gt(e)}}function Gt(e){var n=e.flags;if(n&2){try{for(var l,u=e.return;u!==null;){if(Nm(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,d=ec(e);Eu(e,d,f);break;case 5:var v=l.stateNode;l.flags&32&&(cr(v,""),l.flags&=-33);var _=ec(e);Eu(e,_,v);break;case 3:case 4:var T=l.stateNode.containerInfo,z=ec(e);tc(e,z,T);break;default:throw Error(a(161))}}catch(Z){Pe(e,e.return,Z)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Vm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Vm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function fi(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Um(e,n.alternate,n),n=n.sibling}function Gi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ci(4,n,n.return),Gi(n);break;case 1:En(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Rm(n,n.return,l),Gi(n);break;case 27:Xa(n.stateNode);case 26:case 5:En(n,n.return),Gi(n);break;case 22:n.memoizedState===null&&Gi(n);break;case 30:Gi(n);break;default:Gi(n)}e=e.sibling}}function hi(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,f=e,d=n,v=d.flags;switch(d.tag){case 0:case 11:case 15:hi(f,d,l),Ua(4,d);break;case 1:if(hi(f,d,l),u=d,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(z){Pe(u,u.return,z)}if(u=d,f=u.updateQueue,f!==null){var _=u.stateNode;try{var T=f.shared.hiddenCallbacks;if(T!==null)for(f.shared.hiddenCallbacks=null,f=0;f<T.length;f++)yd(T[f],_)}catch(z){Pe(u,u.return,z)}}l&&v&64&&Mm(d),Ba(d,d.return);break;case 27:jm(d);case 26:case 5:hi(f,d,l),l&&u===null&&v&4&&Dm(d),Ba(d,d.return);break;case 12:hi(f,d,l);break;case 13:hi(f,d,l),l&&v&4&&Zm(f,d);break;case 22:d.memoizedState===null&&hi(f,d,l),Ba(d,d.return);break;case 30:break;default:hi(f,d,l)}n=n.sibling}}function rc(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ka(l))}function ac(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ka(e))}function An(e,n,l,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ym(e,n,l,u),n=n.sibling}function Ym(e,n,l,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:An(e,n,l,u),f&2048&&Ua(9,n);break;case 1:An(e,n,l,u);break;case 3:An(e,n,l,u),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ka(e)));break;case 12:if(f&2048){An(e,n,l,u),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,_=d.onPostCommit;typeof _=="function"&&_(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Pe(n,n.return,T)}}else An(e,n,l,u);break;case 13:An(e,n,l,u);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?An(e,n,l,u):Ha(e,n):d._visibility&2?An(e,n,l,u):(d._visibility|=2,Or(e,n,l,u,(n.subtreeFlags&10256)!==0)),f&2048&&rc(v,n);break;case 24:An(e,n,l,u),f&2048&&ac(n.alternate,n);break;default:An(e,n,l,u)}}function Or(e,n,l,u,f){for(f=f&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var d=e,v=n,_=l,T=u,z=v.flags;switch(v.tag){case 0:case 11:case 15:Or(d,v,_,T,f),Ua(8,v);break;case 23:break;case 22:var Z=v.stateNode;v.memoizedState!==null?Z._visibility&2?Or(d,v,_,T,f):Ha(d,v):(Z._visibility|=2,Or(d,v,_,T,f)),f&&z&2048&&rc(v.alternate,v);break;case 24:Or(d,v,_,T,f),f&&z&2048&&ac(v.alternate,v);break;default:Or(d,v,_,T,f)}n=n.sibling}}function Ha(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,u=n,f=u.flags;switch(u.tag){case 22:Ha(l,u),f&2048&&rc(u.alternate,u);break;case 24:Ha(l,u),f&2048&&ac(u.alternate,u);break;default:Ha(l,u)}n=n.sibling}}var Za=8192;function zr(e){if(e.subtreeFlags&Za)for(e=e.child;e!==null;)Im(e),e=e.sibling}function Im(e){switch(e.tag){case 26:zr(e),e.flags&Za&&e.memoizedState!==null&&Ub(hn,e.memoizedState,e.memoizedProps);break;case 5:zr(e);break;case 3:case 4:var n=hn;hn=Hu(e.stateNode.containerInfo),zr(e),hn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Za,Za=16777216,zr(e),Za=n):zr(e));break;default:zr(e)}}function Gm(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function qa(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var u=n[l];mt=u,Xm(u,e)}Gm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qm(e),e=e.sibling}function Qm(e){switch(e.tag){case 0:case 11:case 15:qa(e),e.flags&2048&&ci(9,e,e.return);break;case 3:qa(e);break;case 12:qa(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Au(e)):qa(e);break;default:qa(e)}}function Au(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var u=n[l];mt=u,Xm(u,e)}Gm(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ci(8,n,n.return),Au(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Au(n));break;default:Au(n)}e=e.sibling}}function Xm(e,n){for(;mt!==null;){var l=mt;switch(l.tag){case 0:case 11:case 15:ci(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:ka(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,mt=u;else e:for(l=e;mt!==null;){u=mt;var f=u.sibling,d=u.return;if(Bm(u),u===l){mt=null;break e}if(f!==null){f.return=d,mt=f;break e}mt=d}}}var W0={getCacheForType:function(e){var n=_t(ot),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l}},eb=typeof WeakMap=="function"?WeakMap:Map,Ve=0,$e=null,Me=null,Ne=0,Ye=0,Qt=null,di=!1,Mr=!1,lc=!1,Fn=0,nt=0,mi=0,Qi=0,uc=0,un=0,Rr=0,Va=null,Lt=null,sc=!1,oc=0,Cu=1/0,Ou=null,pi=null,yt=0,gi=null,Dr=null,Nr=0,cc=0,fc=null,Pm=null,Ya=0,hc=null;function Xt(){if((Ve&2)!==0&&Ne!==0)return Ne&-Ne;if(U.T!==null){var e=xr;return e!==0?e:bc()}return ch()}function Fm(){un===0&&(un=(Ne&536870912)===0||He?lh():536870912);var e=ln.current;return e!==null&&(e.flags|=32),un}function Pt(e,n,l){(e===$e&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(jr(e,0),yi(e,Ne,un,!1)),ua(e,l),((Ve&2)===0||e!==$e)&&(e===$e&&((Ve&2)===0&&(Qi|=l),nt===4&&yi(e,Ne,un,!1)),Cn(e))}function $m(e,n,l){if((Ve&6)!==0)throw Error(a(327));var u=!l&&(n&124)===0&&(n&e.expiredLanes)===0||Jt(e,n),f=u?ib(e,n):pc(e,n,!0),d=u;do{if(f===0){Mr&&!u&&yi(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!tb(l)){f=pc(e,n,!1),d=!1;continue}if(f===2){if(d=n,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var _=e;f=Va;var T=_.current.memoizedState.isDehydrated;if(T&&(jr(_,v).flags|=256),v=pc(_,v,!1),v!==2){if(lc&&!T){_.errorRecoveryDisabledLanes|=d,Qi|=d,f=4;break e}d=Lt,Lt=f,d!==null&&(Lt===null?Lt=d:Lt.push.apply(Lt,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){jr(e,0),yi(e,n,0,!0);break}e:{switch(u=e,d=f,d){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:yi(u,n,un,!di);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(f=oc+300-Ht(),10<f)){if(yi(u,n,un,!di),ft(u,0,!0)!==0)break e;u.timeoutHandle=wp(Km.bind(null,u,l,Lt,Ou,sc,n,un,Qi,Rr,di,d,2,-0,0),f);break e}Km(u,l,Lt,Ou,sc,n,un,Qi,Rr,di,d,0,-0,0)}}break}while(!0);Cn(e)}function Km(e,n,l,u,f,d,v,_,T,z,Z,I,R,D){if(e.timeoutHandle=-1,I=n.subtreeFlags,(I&8192||(I&16785408)===16785408)&&($a={stylesheets:null,count:0,unsuspend:Lb},Im(n),I=Bb(),I!==null)){e.cancelPendingCommit=I(rp.bind(null,e,n,d,l,u,f,v,_,T,Z,1,R,D)),yi(e,d,v,!z);return}rp(e,n,d,l,u,f,v,_,T)}function tb(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var f=l[u],d=f.getSnapshot;f=f.value;try{if(!Vt(d(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function yi(e,n,l,u){n&=~uc,n&=~Qi,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var f=n;0<f;){var d=31-ve(f),v=1<<d;u[d]=-1,f&=~v}l!==0&&sh(e,l,n)}function zu(){return(Ve&6)===0?(Ia(0),!1):!0}function dc(){if(Me!==null){if(Ye===0)var e=Me.return;else e=Me,qn=Zi=null,zo(e),Ar=null,Na=0,e=Me;for(;e!==null;)zm(e.alternate,e),e=e.return;Me=null}}function jr(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,bb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),dc(),$e=e,Me=l=Bn(e.current,null),Ne=n,Ye=0,Qt=null,di=!1,Mr=Jt(e,n),lc=!1,Rr=un=uc=Qi=mi=nt=0,Lt=Va=null,sc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var f=31-ve(u),d=1<<f;n|=e[f],u&=~d}return Fn=n,Jl(),l}function Jm(e,n){Ce=null,U.H=yu,n===wa||n===uu?(n=pd(),Ye=3):n===hd?(n=pd(),Ye=4):Ye=n===gm?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Qt=n,Me===null&&(nt=1,Su(e,tn(n,e.current)))}function Wm(){var e=U.H;return U.H=yu,e===null?yu:e}function ep(){var e=U.A;return U.A=W0,e}function mc(){nt=4,di||(Ne&4194048)!==Ne&&ln.current!==null||(Mr=!0),(mi&134217727)===0&&(Qi&134217727)===0||$e===null||yi($e,Ne,un,!1)}function pc(e,n,l){var u=Ve;Ve|=2;var f=Wm(),d=ep();($e!==e||Ne!==n)&&(Ou=null,jr(e,n)),n=!1;var v=nt;e:do try{if(Ye!==0&&Me!==null){var _=Me,T=Qt;switch(Ye){case 8:dc(),v=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(n=!0);var z=Ye;if(Ye=0,Qt=null,Lr(e,_,T,z),l&&Mr){v=0;break e}break;default:z=Ye,Ye=0,Qt=null,Lr(e,_,T,z)}}nb(),v=nt;break}catch(Z){Jm(e,Z)}while(!0);return n&&e.shellSuspendCounter++,qn=Zi=null,Ve=u,U.H=f,U.A=d,Me===null&&($e=null,Ne=0,Jl()),v}function nb(){for(;Me!==null;)tp(Me)}function ib(e,n){var l=Ve;Ve|=2;var u=Wm(),f=ep();$e!==e||Ne!==n?(Ou=null,Cu=Ht()+500,jr(e,n)):Mr=Jt(e,n);e:do try{if(Ye!==0&&Me!==null){n=Me;var d=Qt;t:switch(Ye){case 1:Ye=0,Qt=null,Lr(e,n,d,1);break;case 2:case 9:if(dd(d)){Ye=0,Qt=null,np(n);break}n=function(){Ye!==2&&Ye!==9||$e!==e||(Ye=7),Cn(e)},d.then(n,n);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:dd(d)?(Ye=0,Qt=null,np(n)):(Ye=0,Qt=null,Lr(e,n,d,7));break;case 5:var v=null;switch(Me.tag){case 26:v=Me.memoizedState;case 5:case 27:var _=Me;if(!v||Up(v)){Ye=0,Qt=null;var T=_.sibling;if(T!==null)Me=T;else{var z=_.return;z!==null?(Me=z,Mu(z)):Me=null}break t}}Ye=0,Qt=null,Lr(e,n,d,5);break;case 6:Ye=0,Qt=null,Lr(e,n,d,6);break;case 8:dc(),nt=6;break e;default:throw Error(a(462))}}rb();break}catch(Z){Jm(e,Z)}while(!0);return qn=Zi=null,U.H=u,U.A=f,Ve=l,Me!==null?0:($e=null,Ne=0,Jl(),nt)}function rb(){for(;Me!==null&&!Bl();)tp(Me)}function tp(e){var n=Cm(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,n===null?Mu(e):Me=n}function np(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=Sm(l,n,n.pendingProps,n.type,void 0,Ne);break;case 11:n=Sm(l,n,n.pendingProps,n.type.render,n.ref,Ne);break;case 5:zo(n);default:zm(l,n),n=Me=id(n,Fn),n=Cm(l,n,Fn)}e.memoizedProps=e.pendingProps,n===null?Mu(e):Me=n}function Lr(e,n,l,u){qn=Zi=null,zo(n),Ar=null,Na=0;var f=n.return;try{if(X0(e,f,n,l,Ne)){nt=1,Su(e,tn(l,e.current)),Me=null;return}}catch(d){if(f!==null)throw Me=f,d;nt=1,Su(e,tn(l,e.current)),Me=null;return}n.flags&32768?(He||u===1?e=!0:Mr||(Ne&536870912)!==0?e=!1:(di=e=!0,(u===2||u===9||u===3||u===6)&&(u=ln.current,u!==null&&u.tag===13&&(u.flags|=16384))),ip(n,e)):Mu(n)}function Mu(e){var n=e;do{if((n.flags&32768)!==0){ip(n,di);return}e=n.return;var l=F0(n.alternate,n,Fn);if(l!==null){Me=l;return}if(n=n.sibling,n!==null){Me=n;return}Me=n=e}while(n!==null);nt===0&&(nt=5)}function ip(e,n){do{var l=$0(e.alternate,e);if(l!==null){l.flags&=32767,Me=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Me=e;return}Me=e=l}while(e!==null);nt=6,Me=null}function rp(e,n,l,u,f,d,v,_,T){e.cancelPendingCommit=null;do Ru();while(yt!==0);if((Ve&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(d=n.lanes|n.childLanes,d|=ro,Lv(e,l,d,v,_,T),e===$e&&(Me=$e=null,Ne=0),Dr=n,gi=e,Nr=l,cc=d,fc=f,Pm=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sb(nr,function(){return op(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=U.T,U.T=null,f=J.p,J.p=2,v=Ve,Ve|=4;try{K0(e,n,l)}finally{Ve=v,J.p=f,U.T=u}}yt=1,ap(),lp(),up()}}function ap(){if(yt===1){yt=0;var e=gi,n=Dr,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var u=J.p;J.p=2;var f=Ve;Ve|=4;try{qm(n,e);var d=Ac,v=Xh(e.containerInfo),_=d.focusedElem,T=d.selectionRange;if(v!==_&&_&&_.ownerDocument&&Qh(_.ownerDocument.documentElement,_)){if(T!==null&&Ws(_)){var z=T.start,Z=T.end;if(Z===void 0&&(Z=z),"selectionStart"in _)_.selectionStart=z,_.selectionEnd=Math.min(Z,_.value.length);else{var I=_.ownerDocument||document,R=I&&I.defaultView||window;if(R.getSelection){var D=R.getSelection(),be=_.textContent.length,ge=Math.min(T.start,be),Xe=T.end===void 0?ge:Math.min(T.end,be);!D.extend&&ge>Xe&&(v=Xe,Xe=ge,ge=v);var A=Gh(_,ge),E=Gh(_,Xe);if(A&&E&&(D.rangeCount!==1||D.anchorNode!==A.node||D.anchorOffset!==A.offset||D.focusNode!==E.node||D.focusOffset!==E.offset)){var O=I.createRange();O.setStart(A.node,A.offset),D.removeAllRanges(),ge>Xe?(D.addRange(O),D.extend(E.node,E.offset)):(O.setEnd(E.node,E.offset),D.addRange(O))}}}}for(I=[],D=_;D=D.parentNode;)D.nodeType===1&&I.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<I.length;_++){var V=I[_];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Iu=!!Ec,Ac=Ec=null}finally{Ve=f,J.p=u,U.T=l}}e.current=n,yt=2}}function lp(){if(yt===2){yt=0;var e=gi,n=Dr,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var u=J.p;J.p=2;var f=Ve;Ve|=4;try{Um(e,n.alternate,n)}finally{Ve=f,J.p=u,U.T=l}}yt=3}}function up(){if(yt===4||yt===3){yt=0,Hl();var e=gi,n=Dr,l=Nr,u=Pm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?yt=5:(yt=0,Dr=gi=null,sp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(pi=null),Rs(l),n=n.stateNode,P&&typeof P.onCommitFiberRoot=="function")try{P.onCommitFiberRoot(H,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=U.T,f=J.p,J.p=2,U.T=null;try{for(var d=e.onRecoverableError,v=0;v<u.length;v++){var _=u[v];d(_.value,{componentStack:_.stack})}}finally{U.T=n,J.p=f}}(Nr&3)!==0&&Ru(),Cn(e),f=e.pendingLanes,(l&4194090)!==0&&(f&42)!==0?e===hc?Ya++:(Ya=0,hc=e):Ya=0,Ia(0)}}function sp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,ka(n)))}function Ru(e){return ap(),lp(),up(),op()}function op(){if(yt!==5)return!1;var e=gi,n=cc;cc=0;var l=Rs(Nr),u=U.T,f=J.p;try{J.p=32>l?32:l,U.T=null,l=fc,fc=null;var d=gi,v=Nr;if(yt=0,Dr=gi=null,Nr=0,(Ve&6)!==0)throw Error(a(331));var _=Ve;if(Ve|=4,Qm(d.current),Ym(d,d.current,v,l),Ve=_,Ia(0,!1),P&&typeof P.onPostCommitFiberRoot=="function")try{P.onPostCommitFiberRoot(H,d)}catch{}return!0}finally{J.p=f,U.T=u,sp(e,n)}}function cp(e,n,l){n=tn(l,n),n=Io(e.stateNode,n,2),e=li(e,n,2),e!==null&&(ua(e,2),Cn(e))}function Pe(e,n,l){if(e.tag===3)cp(e,e,l);else for(;n!==null;){if(n.tag===3){cp(n,e,l);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(pi===null||!pi.has(u))){e=tn(l,e),l=mm(2),u=li(n,l,2),u!==null&&(pm(l,u,n,e),ua(u,2),Cn(u));break}}n=n.return}}function gc(e,n,l){var u=e.pingCache;if(u===null){u=e.pingCache=new eb;var f=new Set;u.set(n,f)}else f=u.get(n),f===void 0&&(f=new Set,u.set(n,f));f.has(l)||(lc=!0,f.add(l),e=ab.bind(null,e,n,l),n.then(e,e))}function ab(e,n,l){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Ne&l)===l&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>Ht()-oc?(Ve&2)===0&&jr(e,0):uc|=l,Rr===Ne&&(Rr=0)),Cn(e)}function fp(e,n){n===0&&(n=uh()),e=yr(e,n),e!==null&&(ua(e,n),Cn(e))}function lb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),fp(e,l)}function ub(e,n){var l=0;switch(e.tag){case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(n),fp(e,l)}function sb(e,n){return ia(e,n)}var Du=null,Ur=null,yc=!1,Nu=!1,vc=!1,Xi=0;function Cn(e){e!==Ur&&e.next===null&&(Ur===null?Du=Ur=e:Ur=Ur.next=e),Nu=!0,yc||(yc=!0,cb())}function Ia(e,n){if(!vc&&Nu){vc=!0;do for(var l=!1,u=Du;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var d=0;else{var v=u.suspendedLanes,_=u.pingedLanes;d=(1<<31-ve(42|e)+1)-1,d&=f&~(v&~_),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,pp(u,d))}else d=Ne,d=ft(u,u===$e?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||Jt(u,d)||(l=!0,pp(u,d));u=u.next}while(l);vc=!1}}function ob(){hp()}function hp(){Nu=yc=!1;var e=0;Xi!==0&&(vb()&&(e=Xi),Xi=0);for(var n=Ht(),l=null,u=Du;u!==null;){var f=u.next,d=dp(u,n);d===0?(u.next=null,l===null?Du=f:l.next=f,f===null&&(Ur=l)):(l=u,(e!==0||(d&3)!==0)&&(Nu=!0)),u=f}Ia(e)}function dp(e,n){for(var l=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-ve(d),_=1<<v,T=f[v];T===-1?((_&l)===0||(_&u)!==0)&&(f[v]=cn(_,n)):T<=n&&(e.expiredLanes|=_),d&=~_}if(n=$e,l=Ne,l=ft(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,l===0||e===n&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&ra(u),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Jt(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(u!==null&&ra(u),Rs(l)){case 2:case 8:l=la;break;case 32:l=nr;break;case 268435456:l=Zl;break;default:l=nr}return u=mp.bind(null,e),l=ia(l,u),e.callbackPriority=n,e.callbackNode=l,n}return u!==null&&u!==null&&ra(u),e.callbackPriority=2,e.callbackNode=null,2}function mp(e,n){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Ru()&&e.callbackNode!==l)return null;var u=Ne;return u=ft(e,e===$e?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:($m(e,u,n),dp(e,Ht()),e.callbackNode!=null&&e.callbackNode===l?mp.bind(null,e):null)}function pp(e,n){if(Ru())return null;$m(e,n,!0)}function cb(){_b(function(){(Ve&6)!==0?ia(aa,ob):hp()})}function bc(){return Xi===0&&(Xi=lh()),Xi}function gp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gl(""+e)}function yp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function fb(e,n,l,u,f){if(n==="submit"&&l&&l.stateNode===f){var d=gp((f[Rt]||null).action),v=u.submitter;v&&(n=(n=v[Rt]||null)?gp(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var _=new Fl("action","action",null,u,f);e.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Xi!==0){var T=v?yp(f,v):new FormData(f);Ho(l,{pending:!0,data:T,method:f.method,action:d},null,T)}}else typeof d=="function"&&(_.preventDefault(),T=v?yp(f,v):new FormData(f),Ho(l,{pending:!0,data:T,method:f.method,action:d},d,T))},currentTarget:f}]})}}for(var _c=0;_c<io.length;_c++){var xc=io[_c],hb=xc.toLowerCase(),db=xc[0].toUpperCase()+xc.slice(1);fn(hb,"on"+db)}fn($h,"onAnimationEnd"),fn(Kh,"onAnimationIteration"),fn(Jh,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(z0,"onTransitionRun"),fn(M0,"onTransitionStart"),fn(R0,"onTransitionCancel"),fn(Wh,"onTransitionEnd"),ur("onMouseEnter",["mouseout","mouseover"]),ur("onMouseLeave",["mouseout","mouseover"]),ur("onPointerEnter",["pointerout","pointerover"]),ur("onPointerLeave",["pointerout","pointerover"]),Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ga="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(" "),mb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ga));function vp(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var u=e[l],f=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var v=u.length-1;0<=v;v--){var _=u[v],T=_.instance,z=_.currentTarget;if(_=_.listener,T!==d&&f.isPropagationStopped())break e;d=_,f.currentTarget=z;try{d(f)}catch(Z){xu(Z)}f.currentTarget=null,d=T}else for(v=0;v<u.length;v++){if(_=u[v],T=_.instance,z=_.currentTarget,_=_.listener,T!==d&&f.isPropagationStopped())break e;d=_,f.currentTarget=z;try{d(f)}catch(Z){xu(Z)}f.currentTarget=null,d=T}}}}function Re(e,n){var l=n[Ds];l===void 0&&(l=n[Ds]=new Set);var u=e+"__bubble";l.has(u)||(bp(n,e,2,!1),l.add(u))}function Sc(e,n,l){var u=0;n&&(u|=4),bp(l,e,u,n)}var ju="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[ju]){e[ju]=!0,hh.forEach(function(l){l!=="selectionchange"&&(mb.has(l)||Sc(l,!1,e),Sc(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ju]||(n[ju]=!0,Sc("selectionchange",!1,n))}}function bp(e,n,l,u){switch(Yp(n)){case 2:var f=qb;break;case 8:f=Vb;break;default:f=Uc}l=f.bind(null,n,l,e),f=void 0,!Is||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Tc(e,n,l,u,f){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var _=u.stateNode.containerInfo;if(_===f)break;if(v===4)for(v=u.return;v!==null;){var T=v.tag;if((T===3||T===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;_!==null;){if(v=rr(_),v===null)return;if(T=v.tag,T===5||T===6||T===26||T===27){u=d=v;continue e}_=_.parentNode}}u=u.return}Eh(function(){var z=d,Z=Vs(l),I=[];e:{var R=ed.get(e);if(R!==void 0){var D=Fl,be=e;switch(e){case"keypress":if(Xl(l)===0)break e;case"keydown":case"keyup":D=s0;break;case"focusin":be="focus",D=Ps;break;case"focusout":be="blur",D=Ps;break;case"beforeblur":case"afterblur":D=Ps;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":D=Oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=$v;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=f0;break;case $h:case Kh:case Jh:D=Wv;break;case Wh:D=d0;break;case"scroll":case"scrollend":D=Pv;break;case"wheel":D=p0;break;case"copy":case"cut":case"paste":D=t0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Mh;break;case"toggle":case"beforetoggle":D=y0}var ge=(n&4)!==0,Xe=!ge&&(e==="scroll"||e==="scrollend"),A=ge?R!==null?R+"Capture":null:R;ge=[];for(var E=z,O;E!==null;){var V=E;if(O=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||O===null||A===null||(V=ca(E,A),V!=null&&ge.push(Qa(E,V,O))),Xe)break;E=E.return}0<ge.length&&(R=new D(R,be,null,l,Z),I.push({event:R,listeners:ge}))}}if((n&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",R&&l!==qs&&(be=l.relatedTarget||l.fromElement)&&(rr(be)||be[ir]))break e;if((D||R)&&(R=Z.window===Z?Z:(R=Z.ownerDocument)?R.defaultView||R.parentWindow:window,D?(be=l.relatedTarget||l.toElement,D=z,be=be?rr(be):null,be!==null&&(Xe=o(be),ge=be.tag,be!==Xe||ge!==5&&ge!==27&&ge!==6)&&(be=null)):(D=null,be=z),D!==be)){if(ge=Oh,V="onMouseLeave",A="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ge=Mh,V="onPointerLeave",A="onPointerEnter",E="pointer"),Xe=D==null?R:oa(D),O=be==null?R:oa(be),R=new ge(V,E+"leave",D,l,Z),R.target=Xe,R.relatedTarget=O,V=null,rr(Z)===z&&(ge=new ge(A,E+"enter",be,l,Z),ge.target=O,ge.relatedTarget=Xe,V=ge),Xe=V,D&&be)t:{for(ge=D,A=be,E=0,O=ge;O;O=Br(O))E++;for(O=0,V=A;V;V=Br(V))O++;for(;0<E-O;)ge=Br(ge),E--;for(;0<O-E;)A=Br(A),O--;for(;E--;){if(ge===A||A!==null&&ge===A.alternate)break t;ge=Br(ge),A=Br(A)}ge=null}else ge=null;D!==null&&_p(I,R,D,ge,!1),be!==null&&Xe!==null&&_p(I,Xe,be,ge,!0)}}e:{if(R=z?oa(z):window,D=R.nodeName&&R.nodeName.toLowerCase(),D==="select"||D==="input"&&R.type==="file")var ae=Hh;else if(Uh(R))if(Zh)ae=A0;else{ae=w0;var Oe=T0}else D=R.nodeName,!D||D.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?z&&Zs(z.elementType)&&(ae=Hh):ae=E0;if(ae&&(ae=ae(e,z))){Bh(I,ae,l,Z);break e}Oe&&Oe(e,R,z),e==="focusout"&&z&&R.type==="number"&&z.memoizedProps.value!=null&&Hs(R,"number",R.value)}switch(Oe=z?oa(z):window,e){case"focusin":(Uh(Oe)||Oe.contentEditable==="true")&&(mr=Oe,eo=z,va=null);break;case"focusout":va=eo=mr=null;break;case"mousedown":to=!0;break;case"contextmenu":case"mouseup":case"dragend":to=!1,Ph(I,l,Z);break;case"selectionchange":if(O0)break;case"keydown":case"keyup":Ph(I,l,Z)}var de;if($s)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else dr?jh(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(Rh&&l.locale!=="ko"&&(dr||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&dr&&(de=Ah()):(ni=Z,Gs="value"in ni?ni.value:ni.textContent,dr=!0)),Oe=Lu(z,ye),0<Oe.length&&(ye=new zh(ye,e,null,l,Z),I.push({event:ye,listeners:Oe}),de?ye.data=de:(de=Lh(l),de!==null&&(ye.data=de)))),(de=b0?_0(e,l):x0(e,l))&&(ye=Lu(z,"onBeforeInput"),0<ye.length&&(Oe=new zh("onBeforeInput","beforeinput",null,l,Z),I.push({event:Oe,listeners:ye}),Oe.data=de)),fb(I,e,z,l,Z)}vp(I,n)})}function Qa(e,n,l){return{instance:e,listener:n,currentTarget:l}}function Lu(e,n){for(var l=n+"Capture",u=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=ca(e,l),f!=null&&u.unshift(Qa(e,f,d)),f=ca(e,n),f!=null&&u.push(Qa(e,f,d))),e.tag===3)return u;e=e.return}return[]}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _p(e,n,l,u,f){for(var d=n._reactName,v=[];l!==null&&l!==u;){var _=l,T=_.alternate,z=_.stateNode;if(_=_.tag,T!==null&&T===u)break;_!==5&&_!==26&&_!==27||z===null||(T=z,f?(z=ca(l,d),z!=null&&v.unshift(Qa(l,z,T))):f||(z=ca(l,d),z!=null&&v.push(Qa(l,z,T)))),l=l.return}v.length!==0&&e.push({event:n,listeners:v})}var pb=/\r\n?/g,gb=/\u0000|\uFFFD/g;function xp(e){return(typeof e=="string"?e:""+e).replace(pb,`
|
|
49
|
-
`).replace(gb,"")}function Sp(e,n){return n=xp(n),xp(e)===n}function Uu(){}function Qe(e,n,l,u,f,d){switch(l){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||cr(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&cr(e,""+u);break;case"className":Vl(e,"class",u);break;case"tabIndex":Vl(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(e,l,u);break;case"style":Th(e,u,d);break;case"data":if(n!=="object"){Vl(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(l);break}u=Gl(""+u),e.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){e.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 d=="function"&&(l==="formAction"?(n!=="input"&&Qe(e,n,"name",f.name,f,null),Qe(e,n,"formEncType",f.formEncType,f,null),Qe(e,n,"formMethod",f.formMethod,f,null),Qe(e,n,"formTarget",f.formTarget,f,null)):(Qe(e,n,"encType",f.encType,f,null),Qe(e,n,"method",f.method,f,null),Qe(e,n,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(l);break}u=Gl(""+u),e.setAttribute(l,u);break;case"onClick":u!=null&&(e.onclick=Uu);break;case"onScroll":u!=null&&Re("scroll",e);break;case"onScrollEnd":u!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}l=Gl(""+u),e.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":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(l,""+u):e.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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":u===!0?e.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(l,u):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(l,u):e.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(l):e.setAttribute(l,u);break;case"popover":Re("beforetoggle",e),Re("toggle",e),ql(e,"popover",u);break;case"xlinkActuate":Ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ln(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ln(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ln(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ln(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ql(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Qv.get(l)||l,ql(e,l,u))}}function wc(e,n,l,u,f,d){switch(l){case"style":Th(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"children":typeof u=="string"?cr(e,u):(typeof u=="number"||typeof u=="bigint")&&cr(e,""+u);break;case"onScroll":u!=null&&Re("scroll",e);break;case"onScrollEnd":u!=null&&Re("scrollend",e);break;case"onClick":u!=null&&(e.onclick=Uu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),d=e[Rt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,f),typeof u=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,u,f);break e}l in e?e[l]=u:u===!0?e.setAttribute(l,""):ql(e,l,u)}}}function vt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var u=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var v=l[d];if(v!=null)switch(d){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Qe(e,n,d,v,l,null)}}f&&Qe(e,n,"srcSet",l.srcSet,l,null),u&&Qe(e,n,"src",l.src,l,null);return;case"input":Re("invalid",e);var _=d=v=f=null,T=null,z=null;for(u in l)if(l.hasOwnProperty(u)){var Z=l[u];if(Z!=null)switch(u){case"name":f=Z;break;case"type":v=Z;break;case"checked":T=Z;break;case"defaultChecked":z=Z;break;case"value":d=Z;break;case"defaultValue":_=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,n));break;default:Qe(e,n,u,Z,l,null)}}_h(e,d,_,T,z,v,f,!1),Yl(e);return;case"select":Re("invalid",e),u=v=d=null;for(f in l)if(l.hasOwnProperty(f)&&(_=l[f],_!=null))switch(f){case"value":d=_;break;case"defaultValue":v=_;break;case"multiple":u=_;default:Qe(e,n,f,_,l,null)}n=d,l=v,e.multiple=!!u,n!=null?or(e,!!u,n,!1):l!=null&&or(e,!!u,l,!0);return;case"textarea":Re("invalid",e),d=f=u=null;for(v in l)if(l.hasOwnProperty(v)&&(_=l[v],_!=null))switch(v){case"value":u=_;break;case"defaultValue":f=_;break;case"children":d=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:Qe(e,n,v,_,l,null)}Sh(e,u,f,d),Yl(e);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(u=l[T],u!=null))switch(T){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Qe(e,n,T,u,l,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(u=0;u<Ga.length;u++)Re(Ga[u],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in l)if(l.hasOwnProperty(z)&&(u=l[z],u!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Qe(e,n,z,u,l,null)}return;default:if(Zs(n)){for(Z in l)l.hasOwnProperty(Z)&&(u=l[Z],u!==void 0&&wc(e,n,Z,u,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(u=l[_],u!=null&&Qe(e,n,_,u,l,null))}function yb(e,n,l,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,v=null,_=null,T=null,z=null,Z=null;for(D in l){var I=l[D];if(l.hasOwnProperty(D)&&I!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":T=I;default:u.hasOwnProperty(D)||Qe(e,n,D,null,u,I)}}for(var R in u){var D=u[R];if(I=l[R],u.hasOwnProperty(R)&&(D!=null||I!=null))switch(R){case"type":d=D;break;case"name":f=D;break;case"checked":z=D;break;case"defaultChecked":Z=D;break;case"value":v=D;break;case"defaultValue":_=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(a(137,n));break;default:D!==I&&Qe(e,n,R,D,u,I)}}Bs(e,v,_,T,z,Z,d,f);return;case"select":D=v=_=R=null;for(d in l)if(T=l[d],l.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":D=T;default:u.hasOwnProperty(d)||Qe(e,n,d,null,u,T)}for(f in u)if(d=u[f],T=l[f],u.hasOwnProperty(f)&&(d!=null||T!=null))switch(f){case"value":R=d;break;case"defaultValue":_=d;break;case"multiple":v=d;default:d!==T&&Qe(e,n,f,d,u,T)}n=_,l=v,u=D,R!=null?or(e,!!l,R,!1):!!u!=!!l&&(n!=null?or(e,!!l,n,!0):or(e,!!l,l?[]:"",!1));return;case"textarea":D=R=null;for(_ in l)if(f=l[_],l.hasOwnProperty(_)&&f!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Qe(e,n,_,null,u,f)}for(v in u)if(f=u[v],d=l[v],u.hasOwnProperty(v)&&(f!=null||d!=null))switch(v){case"value":R=f;break;case"defaultValue":D=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==d&&Qe(e,n,v,f,u,d)}xh(e,R,D);return;case"option":for(var be in l)if(R=l[be],l.hasOwnProperty(be)&&R!=null&&!u.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:Qe(e,n,be,null,u,R)}for(T in u)if(R=u[T],D=l[T],u.hasOwnProperty(T)&&R!==D&&(R!=null||D!=null))switch(T){case"selected":e.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:Qe(e,n,T,R,u,D)}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 ge in l)R=l[ge],l.hasOwnProperty(ge)&&R!=null&&!u.hasOwnProperty(ge)&&Qe(e,n,ge,null,u,R);for(z in u)if(R=u[z],D=l[z],u.hasOwnProperty(z)&&R!==D&&(R!=null||D!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(a(137,n));break;default:Qe(e,n,z,R,u,D)}return;default:if(Zs(n)){for(var Xe in l)R=l[Xe],l.hasOwnProperty(Xe)&&R!==void 0&&!u.hasOwnProperty(Xe)&&wc(e,n,Xe,void 0,u,R);for(Z in u)R=u[Z],D=l[Z],!u.hasOwnProperty(Z)||R===D||R===void 0&&D===void 0||wc(e,n,Z,R,u,D);return}}for(var A in l)R=l[A],l.hasOwnProperty(A)&&R!=null&&!u.hasOwnProperty(A)&&Qe(e,n,A,null,u,R);for(I in u)R=u[I],D=l[I],!u.hasOwnProperty(I)||R===D||R==null&&D==null||Qe(e,n,I,R,u,D)}var Ec=null,Ac=null;function Bu(e){return e.nodeType===9?e:e.ownerDocument}function kp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Cc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Oc=null;function vb(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var wp=typeof setTimeout=="function"?setTimeout:void 0,bb=typeof clearTimeout=="function"?clearTimeout:void 0,Ep=typeof Promise=="function"?Promise:void 0,_b=typeof queueMicrotask=="function"?queueMicrotask:typeof Ep<"u"?function(e){return Ep.resolve(null).then(e).catch(xb)}:wp;function xb(e){setTimeout(function(){throw e})}function vi(e){return e==="head"}function Ap(e,n){var l=n,u=0,f=0;do{var d=l.nextSibling;if(e.removeChild(l),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(0<u&&8>u){l=u;var v=e.ownerDocument;if(l&1&&Xa(v.documentElement),l&2&&Xa(v.body),l&4)for(l=v.head,Xa(l),v=l.firstChild;v;){var _=v.nextSibling,T=v.nodeName;v[sa]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=_}}if(f===0){e.removeChild(d),tl(n);return}f--}else l==="$"||l==="$?"||l==="$!"?f++:u=l.charCodeAt(0)-48;else u=0;l=d}while(l);tl(n)}function zc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":zc(l),Ns(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Sb(e,n,l,u){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[sa])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=dn(e.nextSibling),e===null)break}return null}function kb(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=dn(e.nextSibling),e===null))return null;return e}function Mc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Tb(e,n){var l=e.ownerDocument;if(e.data!=="$?"||l.readyState==="complete")n();else{var u=function(){n(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function dn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return e}var Rc=null;function Cp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"){if(n===0)return e;n--}else l==="/$"&&n++}e=e.previousSibling}return null}function Op(e,n,l){switch(n=Bu(l),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Xa(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ns(e)}var sn=new Map,zp=new Set;function Hu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $n=J.d;J.d={f:wb,r:Eb,D:Ab,C:Cb,L:Ob,m:zb,X:Rb,S:Mb,M:Db};function wb(){var e=$n.f(),n=zu();return e||n}function Eb(e){var n=ar(e);n!==null&&n.tag===5&&n.type==="form"?$d(n):$n.r(e)}var Hr=typeof document>"u"?null:document;function Mp(e,n,l){var u=Hr;if(u&&typeof n=="string"&&n){var f=en(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),zp.has(f)||(zp.add(f),e={rel:e,crossOrigin:l,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),vt(n,"link",e),ht(n),u.head.appendChild(n)))}}function Ab(e){$n.D(e),Mp("dns-prefetch",e,null)}function Cb(e,n){$n.C(e,n),Mp("preconnect",e,n)}function Ob(e,n,l){$n.L(e,n,l);var u=Hr;if(u&&e&&n){var f='link[rel="preload"][as="'+en(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+en(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+en(l.imageSizes)+'"]')):f+='[href="'+en(e)+'"]';var d=f;switch(n){case"style":d=Zr(e);break;case"script":d=qr(e)}sn.has(d)||(e=g({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),sn.set(d,e),u.querySelector(f)!==null||n==="style"&&u.querySelector(Pa(d))||n==="script"&&u.querySelector(Fa(d))||(n=u.createElement("link"),vt(n,"link",e),ht(n),u.head.appendChild(n)))}}function zb(e,n){$n.m(e,n);var l=Hr;if(l&&e){var u=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+en(u)+'"][href="'+en(e)+'"]',d=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=qr(e)}if(!sn.has(d)&&(e=g({rel:"modulepreload",href:e},n),sn.set(d,e),l.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Fa(d)))return}u=l.createElement("link"),vt(u,"link",e),ht(u),l.head.appendChild(u)}}}function Mb(e,n,l){$n.S(e,n,l);var u=Hr;if(u&&e){var f=lr(u).hoistableStyles,d=Zr(e);n=n||"default";var v=f.get(d);if(!v){var _={loading:0,preload:null};if(v=u.querySelector(Pa(d)))_.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},l),(l=sn.get(d))&&Dc(e,l);var T=v=u.createElement("link");ht(T),vt(T,"link",e),T._p=new Promise(function(z,Z){T.onload=z,T.onerror=Z}),T.addEventListener("load",function(){_.loading|=1}),T.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Zu(v,n,u)}v={type:"stylesheet",instance:v,count:1,state:_},f.set(d,v)}}}function Rb(e,n){$n.X(e,n);var l=Hr;if(l&&e){var u=lr(l).hoistableScripts,f=qr(e),d=u.get(f);d||(d=l.querySelector(Fa(f)),d||(e=g({src:e,async:!0},n),(n=sn.get(f))&&Nc(e,n),d=l.createElement("script"),ht(d),vt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(f,d))}}function Db(e,n){$n.M(e,n);var l=Hr;if(l&&e){var u=lr(l).hoistableScripts,f=qr(e),d=u.get(f);d||(d=l.querySelector(Fa(f)),d||(e=g({src:e,async:!0,type:"module"},n),(n=sn.get(f))&&Nc(e,n),d=l.createElement("script"),ht(d),vt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(f,d))}}function Rp(e,n,l,u){var f=(f=oe.current)?Hu(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Zr(l.href),l=lr(f).hoistableStyles,u=l.get(n),u||(u={type:"style",instance:null,count:0,state:null},l.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Zr(l.href);var d=lr(f).hoistableStyles,v=d.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=f.querySelector(Pa(e)))&&!d._p&&(v.instance=d,v.state.loading=5),sn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},sn.set(e,l),d||Nb(f,e,l,v.state))),n&&u===null)throw Error(a(528,""));return v}if(n&&u!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qr(l),l=lr(f).hoistableScripts,u=l.get(n),u||(u={type:"script",instance:null,count:0,state:null},l.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Zr(e){return'href="'+en(e)+'"'}function Pa(e){return'link[rel="stylesheet"]['+e+"]"}function Dp(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Nb(e,n,l,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),vt(n,"link",l),ht(n),e.head.appendChild(n))}function qr(e){return'[src="'+en(e)+'"]'}function Fa(e){return"script[async]"+e}function Np(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+en(l.href)+'"]');if(u)return n.instance=u,ht(u),u;var f=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),ht(u),vt(u,"style",f),Zu(u,l.precedence,e),n.instance=u;case"stylesheet":f=Zr(l.href);var d=e.querySelector(Pa(f));if(d)return n.state.loading|=4,n.instance=d,ht(d),d;u=Dp(l),(f=sn.get(f))&&Dc(u,f),d=(e.ownerDocument||e).createElement("link"),ht(d);var v=d;return v._p=new Promise(function(_,T){v.onload=_,v.onerror=T}),vt(d,"link",u),n.state.loading|=4,Zu(d,l.precedence,e),n.instance=d;case"script":return d=qr(l.src),(f=e.querySelector(Fa(d)))?(n.instance=f,ht(f),f):(u=l,(f=sn.get(d))&&(u=g({},l),Nc(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),vt(f,"link",u),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Zu(u,l.precedence,e));return n.instance}function Zu(e,n,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,d=f,v=0;v<u.length;v++){var _=u[v];if(_.dataset.precedence===n)d=_;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function Dc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Nc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var qu=null;function jp(e,n,l){if(qu===null){var u=new Map,f=qu=new Map;f.set(l,u)}else f=qu,u=f.get(l),u||(u=new Map,f.set(l,u));if(u.has(e))return u;for(u.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[sa]||d[bt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(n)||"";v=e+v;var _=u.get(v);_?_.push(d):u.set(v,[d])}}return u}function Lp(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function jb(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Up(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var $a=null;function Lb(){}function Ub(e,n,l){if($a===null)throw Error(a(475));var u=$a;if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var f=Zr(l.href),d=e.querySelector(Pa(f));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(u.count++,u=Vu.bind(u),e.then(u,u)),n.state.loading|=4,n.instance=d,ht(d);return}d=e.ownerDocument||e,l=Dp(l),(f=sn.get(f))&&Dc(l,f),d=d.createElement("link"),ht(d);var v=d;v._p=new Promise(function(_,T){v.onload=_,v.onerror=T}),vt(d,"link",l),n.instance=d}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(u.count++,n=Vu.bind(u),e.addEventListener("load",n),e.addEventListener("error",n))}}function Bb(){if($a===null)throw Error(a(475));var e=$a;return e.stylesheets&&e.count===0&&jc(e,e.stylesheets),0<e.count?function(n){var l=setTimeout(function(){if(e.stylesheets&&jc(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l)}}:null}function Vu(){if(this.count--,this.count===0){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yu=null;function jc(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yu=new Map,n.forEach(Hb,e),Yu=null,Vu.call(e))}function Hb(e,n){if(!(n.state.loading&4)){var l=Yu.get(e);if(l)var u=l.get(null);else{l=new Map,Yu.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var v=f[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),u=v)}u&&l.set(null,u)}f=n.instance,v=f.getAttribute("data-precedence"),d=l.get(v)||u,d===u&&l.set(null,f),l.set(v,f),this.count++,u=Vu.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Ka={$$typeof:B,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function Zb(e,n,l,u,f,d,v,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zs(0),this.hiddenUpdates=zs(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Bp(e,n,l,u,f,d,v,_,T,z,Z,I){return e=new Zb(e,n,l,v,_,T,z,I),n=1,d===!0&&(n|=24),d=Yt(3,null,null,n),e.current=d,d.stateNode=e,n=go(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:l,cache:n},_o(d),e}function Hp(e){return e?(e=vr,e):vr}function Zp(e,n,l,u,f,d){f=Hp(f),u.context===null?u.context=f:u.pendingContext=f,u=ai(n),u.payload={element:l},d=d===void 0?null:d,d!==null&&(u.callback=d),l=li(e,u,n),l!==null&&(Pt(l,e,n),Aa(l,e,n))}function qp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function Lc(e,n){qp(e,n),(e=e.alternate)&&qp(e,n)}function Vp(e){if(e.tag===13){var n=yr(e,67108864);n!==null&&Pt(n,e,67108864),Lc(e,67108864)}}var Iu=!0;function qb(e,n,l,u){var f=U.T;U.T=null;var d=J.p;try{J.p=2,Uc(e,n,l,u)}finally{J.p=d,U.T=f}}function Vb(e,n,l,u){var f=U.T;U.T=null;var d=J.p;try{J.p=8,Uc(e,n,l,u)}finally{J.p=d,U.T=f}}function Uc(e,n,l,u){if(Iu){var f=Bc(u);if(f===null)Tc(e,n,u,Gu,l),Ip(e,u);else if(Ib(f,e,n,l,u))u.stopPropagation();else if(Ip(e,u),n&4&&-1<Yb.indexOf(e)){for(;f!==null;){var d=ar(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=qt(d.pendingLanes);if(v!==0){var _=d;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var T=1<<31-ve(v);_.entanglements[1]|=T,v&=~T}Cn(d),(Ve&6)===0&&(Cu=Ht()+500,Ia(0))}}break;case 13:_=yr(d,2),_!==null&&Pt(_,d,2),zu(),Lc(d,2)}if(d=Bc(u),d===null&&Tc(e,n,u,Gu,l),d===f)break;f=d}f!==null&&u.stopPropagation()}else Tc(e,n,u,null,l)}}function Bc(e){return e=Vs(e),Hc(e)}var Gu=null;function Hc(e){if(Gu=null,e=rr(e),e!==null){var n=o(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=c(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Gu=e,null}function Yp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Es()){case aa:return 2;case la:return 8;case nr:case As:return 32;case Zl:return 268435456;default:return 32}default:return 32}}var Zc=!1,bi=null,_i=null,xi=null,Ja=new Map,Wa=new Map,Si=[],Yb="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 Ip(e,n){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":xi=null;break;case"pointerover":case"pointerout":Ja.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wa.delete(n.pointerId)}}function el(e,n,l,u,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:u,nativeEvent:d,targetContainers:[f]},n!==null&&(n=ar(n),n!==null&&Vp(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function Ib(e,n,l,u,f){switch(n){case"focusin":return bi=el(bi,e,n,l,u,f),!0;case"dragenter":return _i=el(_i,e,n,l,u,f),!0;case"mouseover":return xi=el(xi,e,n,l,u,f),!0;case"pointerover":var d=f.pointerId;return Ja.set(d,el(Ja.get(d)||null,e,n,l,u,f)),!0;case"gotpointercapture":return d=f.pointerId,Wa.set(d,el(Wa.get(d)||null,e,n,l,u,f)),!0}return!1}function Gp(e){var n=rr(e.target);if(n!==null){var l=o(n);if(l!==null){if(n=l.tag,n===13){if(n=c(l),n!==null){e.blockedOn=n,Uv(e.priority,function(){if(l.tag===13){var u=Xt();u=Ms(u);var f=yr(l,u);f!==null&&Pt(f,l,u),Lc(l,u)}});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=Bc(e.nativeEvent);if(l===null){l=e.nativeEvent;var u=new l.constructor(l.type,l);qs=u,l.target.dispatchEvent(u),qs=null}else return n=ar(l),n!==null&&Vp(n),e.blockedOn=l,!1;n.shift()}return!0}function Qp(e,n,l){Qu(e)&&l.delete(n)}function Gb(){Zc=!1,bi!==null&&Qu(bi)&&(bi=null),_i!==null&&Qu(_i)&&(_i=null),xi!==null&&Qu(xi)&&(xi=null),Ja.forEach(Qp),Wa.forEach(Qp)}function Xu(e,n){e.blockedOn===n&&(e.blockedOn=null,Zc||(Zc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Gb)))}var Pu=null;function Xp(e){Pu!==e&&(Pu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pu===e&&(Pu=null);for(var n=0;n<e.length;n+=3){var l=e[n],u=e[n+1],f=e[n+2];if(typeof u!="function"){if(Hc(u||l)===null)continue;break}var d=ar(l);d!==null&&(e.splice(n,3),n-=3,Ho(d,{pending:!0,data:f,method:l.method,action:u},u,f))}}))}function tl(e){function n(T){return Xu(T,e)}bi!==null&&Xu(bi,e),_i!==null&&Xu(_i,e),xi!==null&&Xu(xi,e),Ja.forEach(n),Wa.forEach(n);for(var l=0;l<Si.length;l++){var u=Si[l];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Si.length&&(l=Si[0],l.blockedOn===null);)Gp(l),l.blockedOn===null&&Si.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var f=l[u],d=l[u+1],v=f[Rt]||null;if(typeof d=="function")v||Xp(l);else if(v){var _=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[Rt]||null)_=v.formAction;else if(Hc(f)!==null)continue}else _=v.action;typeof _=="function"?l[u+1]=_:(l.splice(u,3),u-=3),Xp(l)}}}function qc(e){this._internalRoot=e}Fu.prototype.render=qc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,u=Xt();Zp(l,u,e,n,null,null)},Fu.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Zp(e.current,2,null,e,null,null),zu(),n[ir]=null}};function Fu(e){this._internalRoot=e}Fu.prototype.unstable_scheduleHydration=function(e){if(e){var n=ch();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Si.length&&n!==0&&n<Si[l].priority;l++);Si.splice(l,0,e),l===0&&Gp(e)}};var Pp=i.version;if(Pp!=="19.1.0")throw Error(a(527,Pp,"19.1.0"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=p(n),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var Qb={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{H=$u.inject(Qb),P=$u}catch{}}return il.createRoot=function(e,n){if(!s(e))throw Error(a(299));var l=!1,u="",f=cm,d=fm,v=hm,_=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(_=n.unstable_transitionCallbacks)),n=Bp(e,1,!1,null,null,l,u,f,d,v,_,null),e[ir]=n.current,kc(e),new qc(n)},il.hydrateRoot=function(e,n,l){if(!s(e))throw Error(a(299));var u=!1,f="",d=cm,v=fm,_=hm,T=null,z=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(T=l.unstable_transitionCallbacks),l.formState!==void 0&&(z=l.formState)),n=Bp(e,1,!0,n,l??null,u,f,d,v,_,T,z),n.context=Hp(null),l=n.current,u=Xt(),u=Ms(u),f=ai(u),f.callback=null,li(l,f,u),l=u,n.current.lanes=l,ua(n,l),Cn(n),e[ir]=n.current,kc(e),new Fu(n)},il.version="19.1.0",il}var ag;function r1(){if(ag)return Yc.exports;ag=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Yc.exports=i1(),Yc.exports}var a1=r1();const l1=Dl(a1);var Ot=Hf();const u1=({content:t})=>{const i=()=>typeof t=="string"?q.jsx("div",{className:"message-text",children:t}):Array.isArray(t)?t.map((r,a)=>{switch(r.type){case"text":return q.jsx("div",{className:"message-text",children:r.text},a);case"image_url":return q.jsx("div",{className:"message-image",children:q.jsx("img",{src:r.image_url.url,alt:"用户上传的图片",style:{maxWidth:"200px",borderRadius:"4px"}})},a);case"audio":return q.jsx("div",{className:"message-audio",children:q.jsx("audio",{controls:!0,src:r.audio_url,children:"您的浏览器不支持音频播放"})},a);default:return q.jsx("div",{className:"message-text",children:JSON.stringify(r)},a)}}):q.jsx("div",{className:"message-text",children:JSON.stringify(t)});return q.jsx("div",{className:"message human",children:q.jsx("div",{className:"message-content",children:i()})})},Zf=({usage_metadata:t,spend_time:i,response_metadata:r})=>{const a=s=>s.toString();return q.jsxs("div",{className:"message-meta",children:[q.jsxs("div",{className:"token-info",children:[q.jsxs("span",{className:"token-item",children:[q.jsx("span",{className:"token-emoji",children:"📥"}),a(t.input_tokens||0)]}),q.jsxs("span",{className:"token-item",children:[q.jsx("span",{className:"token-emoji",children:"📤"}),a(t.output_tokens||0)]}),q.jsxs("span",{className:"token-item",children:[q.jsx("span",{className:"token-emoji",children:"📊"}),a(t.total_tokens||0)]})]}),q.jsx("div",{children:r==null?void 0:r.model_name}),q.jsx("span",{className:"message-time",children:i?`${(i/1e3).toFixed(2)}s`:""})]})};var rl={exports:{}},Pc={},Fc,lg;function s1(){if(lg)return Fc;lg=1;function t(i,r){typeof r=="boolean"&&(r={forever:r}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=r||{},this._maxRetryTime=r&&r.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return Fc=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var r=new Date().getTime();if(i&&r-this._operationStart>=this._maxRetryTime)return this._errors.push(i),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var a=this._timeouts.shift();if(a===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),a=this._cachedTimeouts.slice(-1);else return!1;var s=this;return this._timer=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},a),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(i,r){this._fn=i,r&&(r.timeout&&(this._operationTimeout=r.timeout),r.cb&&(this._operationTimeoutCb=r.cb));var a=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){a._operationTimeoutCb()},a._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)},t.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},r=null,a=0,s=0;s<this._errors.length;s++){var o=this._errors[s],c=o.message,h=(i[c]||0)+1;i[c]=h,h>=a&&(r=o,a=h)}return r},Fc}var ug;function o1(){return ug||(ug=1,function(t){var i=s1();t.operation=function(r){var a=t.timeouts(r);return new i(a,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(r){if(r instanceof Array)return[].concat(r);var a={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var s in r)a[s]=r[s];if(a.minTimeout>a.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],c=0;c<a.retries;c++)o.push(this.createTimeout(c,a));return r&&r.forever&&!o.length&&o.push(this.createTimeout(c,a)),o.sort(function(h,p){return h-p}),o},t.createTimeout=function(r,a){var s=a.randomize?Math.random()+1:1,o=Math.round(s*Math.max(a.minTimeout,1)*Math.pow(a.factor,r));return o=Math.min(o,a.maxTimeout),o},t.wrap=function(r,a,s){if(a instanceof Array&&(s=a,a=null),!s){s=[];for(var o in r)typeof r[o]=="function"&&s.push(o)}for(var c=0;c<s.length;c++){var h=s[c],p=r[h];r[h]=(function(g){var y=t.operation(a),S=Array.prototype.slice.call(arguments,1),x=S.pop();S.push(function(w){y.retry(w)||(w&&(arguments[0]=y.mainError()),x.apply(this,arguments))}),y.attempt(function(){g.apply(r,S)})}).bind(r,p),r[h].options=a}}}(Pc)),Pc}var $c,sg;function c1(){return sg||(sg=1,$c=o1()),$c}var og;function f1(){if(og)return rl.exports;og=1;const t=c1(),i=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class r extends Error{constructor(h){super(),h instanceof Error?(this.originalError=h,{message:h}=h):(this.originalError=new Error(h),this.originalError.stack=this.stack),this.name="AbortError",this.message=h}}const a=(c,h,p)=>{const m=p.retries-(h-1);return c.attemptNumber=h,c.retriesLeft=m,c},s=c=>i.includes(c),o=(c,h)=>new Promise((p,m)=>{h={onFailedAttempt:()=>{},retries:10,...h};const g=t.operation(h);g.attempt(async y=>{try{p(await c(y))}catch(S){if(!(S instanceof Error)){m(new TypeError(`Non-error was thrown: "${S}". You should only throw errors.`));return}if(S instanceof r)g.stop(),m(S.originalError);else if(S instanceof TypeError&&!s(S.message))g.stop(),m(S);else{a(S,y,h);try{await h.onFailedAttempt(S)}catch(x){m(x);return}g.retry(S)||m(g.mainError())}}})});return rl.exports=o,rl.exports.default=o,rl.exports.AbortError=r,rl.exports}var h1=f1();const d1=Dl(h1);var Ku={},Kc={exports:{}},cg;function m1(){return cg||(cg=1,function(t){var i=Object.prototype.hasOwnProperty,r="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1));function s(p,m,g){this.fn=p,this.context=m,this.once=g||!1}function o(p,m,g,y,S){if(typeof g!="function")throw new TypeError("The listener must be a function");var x=new s(g,y||p,S),w=r?r+m:m;return p._events[w]?p._events[w].fn?p._events[w]=[p._events[w],x]:p._events[w].push(x):(p._events[w]=x,p._eventsCount++),p}function c(p,m){--p._eventsCount===0?p._events=new a:delete p._events[m]}function h(){this._events=new a,this._eventsCount=0}h.prototype.eventNames=function(){var m=[],g,y;if(this._eventsCount===0)return m;for(y in g=this._events)i.call(g,y)&&m.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},h.prototype.listeners=function(m){var g=r?r+m:m,y=this._events[g];if(!y)return[];if(y.fn)return[y.fn];for(var S=0,x=y.length,w=new Array(x);S<x;S++)w[S]=y[S].fn;return w},h.prototype.listenerCount=function(m){var g=r?r+m:m,y=this._events[g];return y?y.fn?1:y.length:0},h.prototype.emit=function(m,g,y,S,x,w){var C=r?r+m:m;if(!this._events[C])return!1;var j=this._events[C],M=arguments.length,Q,B;if(j.fn){switch(j.once&&this.removeListener(m,j.fn,void 0,!0),M){case 1:return j.fn.call(j.context),!0;case 2:return j.fn.call(j.context,g),!0;case 3:return j.fn.call(j.context,g,y),!0;case 4:return j.fn.call(j.context,g,y,S),!0;case 5:return j.fn.call(j.context,g,y,S,x),!0;case 6:return j.fn.call(j.context,g,y,S,x,w),!0}for(B=1,Q=new Array(M-1);B<M;B++)Q[B-1]=arguments[B];j.fn.apply(j.context,Q)}else{var F=j.length,G;for(B=0;B<F;B++)switch(j[B].once&&this.removeListener(m,j[B].fn,void 0,!0),M){case 1:j[B].fn.call(j[B].context);break;case 2:j[B].fn.call(j[B].context,g);break;case 3:j[B].fn.call(j[B].context,g,y);break;case 4:j[B].fn.call(j[B].context,g,y,S);break;default:if(!Q)for(G=1,Q=new Array(M-1);G<M;G++)Q[G-1]=arguments[G];j[B].fn.apply(j[B].context,Q)}}return!0},h.prototype.on=function(m,g,y){return o(this,m,g,y,!1)},h.prototype.once=function(m,g,y){return o(this,m,g,y,!0)},h.prototype.removeListener=function(m,g,y,S){var x=r?r+m:m;if(!this._events[x])return this;if(!g)return c(this,x),this;var w=this._events[x];if(w.fn)w.fn===g&&(!S||w.once)&&(!y||w.context===y)&&c(this,x);else{for(var C=0,j=[],M=w.length;C<M;C++)(w[C].fn!==g||S&&!w[C].once||y&&w[C].context!==y)&&j.push(w[C]);j.length?this._events[x]=j.length===1?j[0]:j:c(this,x)}return this},h.prototype.removeAllListeners=function(m){var g;return m?(g=r?r+m:m,this._events[g]&&c(this,g)):(this._events=new a,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=r,h.EventEmitter=h,t.exports=h}(Kc)),Kc.exports}var al={exports:{}},Jc,fg;function p1(){return fg||(fg=1,Jc=(t,i)=>(i=i||(()=>{}),t.then(r=>new Promise(a=>{a(i())}).then(()=>r),r=>new Promise(a=>{a(i())}).then(()=>{throw r})))),Jc}var hg;function g1(){if(hg)return al.exports;hg=1;const t=p1();class i extends Error{constructor(s){super(s),this.name="TimeoutError"}}const r=(a,s,o)=>new Promise((c,h)=>{if(typeof s!="number"||s<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(s===1/0){c(a);return}const p=setTimeout(()=>{if(typeof o=="function"){try{c(o())}catch(y){h(y)}return}const m=typeof o=="string"?o:`Promise timed out after ${s} milliseconds`,g=o instanceof Error?o:new i(m);typeof a.cancel=="function"&&a.cancel(),h(g)},s);t(a.then(c,h),()=>{clearTimeout(p)})});return al.exports=r,al.exports.default=r,al.exports.TimeoutError=i,al.exports}var Ju={},Wu={},dg;function y1(){if(dg)return Wu;dg=1,Object.defineProperty(Wu,"__esModule",{value:!0});function t(i,r,a){let s=0,o=i.length;for(;o>0;){const c=o/2|0;let h=s+c;a(i[h],r)<=0?(s=++h,o-=c+1):o=c}return s}return Wu.default=t,Wu}var mg;function v1(){if(mg)return Ju;mg=1,Object.defineProperty(Ju,"__esModule",{value:!0});const t=y1();class i{constructor(){this._queue=[]}enqueue(a,s){s=Object.assign({priority:0},s);const o={priority:s.priority,run:a};if(this.size&&this._queue[this.size-1].priority>=s.priority){this._queue.push(o);return}const c=t.default(this._queue,o,(h,p)=>p.priority-h.priority);this._queue.splice(c,0,o)}dequeue(){const a=this._queue.shift();return a==null?void 0:a.run}filter(a){return this._queue.filter(s=>s.priority===a.priority).map(s=>s.run)}get size(){return this._queue.length}}return Ju.default=i,Ju}var pg;function b1(){if(pg)return Ku;pg=1,Object.defineProperty(Ku,"__esModule",{value:!0});const t=m1(),i=g1(),r=v1(),a=()=>{},s=new i.TimeoutError;class o extends t{constructor(h){var p,m,g,y;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=a,this._resolveIdle=a,h=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},h),!(typeof h.intervalCap=="number"&&h.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(m=(p=h.intervalCap)===null||p===void 0?void 0:p.toString())!==null&&m!==void 0?m:""}\` (${typeof h.intervalCap})`);if(h.interval===void 0||!(Number.isFinite(h.interval)&&h.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(y=(g=h.interval)===null||g===void 0?void 0:g.toString())!==null&&y!==void 0?y:""}\` (${typeof h.interval})`);this._carryoverConcurrencyCount=h.carryoverConcurrencyCount,this._isIntervalIgnored=h.intervalCap===1/0||h.interval===0,this._intervalCap=h.intervalCap,this._interval=h.interval,this._queue=new h.queueClass,this._queueClass=h.queueClass,this.concurrency=h.concurrency,this._timeout=h.timeout,this._throwOnTimeout=h.throwOnTimeout===!0,this._isPaused=h.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=a,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=a,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const h=Date.now();if(this._intervalId===void 0){const p=this._intervalEnd-h;if(p<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},p)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const h=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const p=this._queue.dequeue();return p?(this.emit("active"),p(),h&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(h){if(!(typeof h=="number"&&h>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${h}\` (${typeof h})`);this._concurrency=h,this._processQueue()}async add(h,p={}){return new Promise((m,g)=>{const y=async()=>{this._pendingCount++,this._intervalCount++;try{const S=this._timeout===void 0&&p.timeout===void 0?h():i.default(Promise.resolve(h()),p.timeout===void 0?this._timeout:p.timeout,()=>{(p.throwOnTimeout===void 0?this._throwOnTimeout:p.throwOnTimeout)&&g(s)});m(await S)}catch(S){g(S)}this._next()};this._queue.enqueue(y,p),this._tryToStartAnother(),this.emit("add")})}async addAll(h,p){return Promise.all(h.map(async m=>this.add(m,p)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(h=>{const p=this._resolveEmpty;this._resolveEmpty=()=>{p(),h()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(h=>{const p=this._resolveIdle;this._resolveIdle=()=>{p(),h()}})}get size(){return this._queue.size}sizeBy(h){return this._queue.filter(h).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(h){this._timeout=h}}return Ku.default=o,Ku}var _1=b1();const Wc=Dl(_1),x1=(...t)=>fetch(...t),S1=Symbol.for("lg:fetch_implementation"),k1=()=>globalThis[S1]??x1,T1=[400,401,402,403,404,405,406,407,408,409,422];function w1(t){return t==null||typeof t!="object"?!1:"status"in t&&"statusText"in t&&"text"in t}class gl extends Error{constructor(i,r,a){super(`HTTP ${i}: ${r}`),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=i,this.text=r,this.response=a}static async fromResponse(i,r){try{return new gl(i.status,await i.text(),r!=null&&r.includeResponse?i:void 0)}catch{return new gl(i.status,i.statusText,r!=null&&r.includeResponse?i:void 0)}}}class E1{constructor(i){Object.defineProperty(this,"maxConcurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxRetries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onFailedResponseHook",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"customFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxConcurrency=i.maxConcurrency??1/0,this.maxRetries=i.maxRetries??4,"default"in Wc?this.queue=new Wc.default({concurrency:this.maxConcurrency}):this.queue=new Wc({concurrency:this.maxConcurrency}),this.onFailedResponseHook=i==null?void 0:i.onFailedResponseHook,this.customFetch=i.fetch}call(i,...r){const a=this.onFailedResponseHook;return this.queue.add(()=>d1(()=>i(...r).catch(async s=>{throw s instanceof Error?s:w1(s)?await gl.fromResponse(s,{includeResponse:!!a}):new Error(s)}),{async onFailedAttempt(s){if(s.message.startsWith("Cancel")||s.message.startsWith("TimeoutError")||s.message.startsWith("AbortError")||(s==null?void 0:s.code)==="ECONNABORTED")throw s;if(s instanceof gl){if(T1.includes(s.status))throw s;a&&s.response&&await a(s.response)}},retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0})}callWithOptions(i,r,...a){return i.signal?Promise.race([this.call(r,...a),new Promise((s,o)=>{var c;(c=i.signal)==null||c.addEventListener("abort",()=>{o(new Error("AbortError"))})})]):this.call(r,...a)}fetch(...i){const r=this.customFetch??k1();return this.call(()=>r(...i).then(a=>a.ok?a:Promise.reject(a)))}}var ef={};function A1(t){try{return typeof process<"u"?ef==null?void 0:ef[t]:void 0}catch{return}}function C1(...t){const i=t.filter(a=>a!=null);if(i.length===0)return;if(i.length===1)return i[0];const r=new AbortController;for(const a of t){if(a!=null&&a.aborted)return r.abort(a.reason),r.signal;a==null||a.addEventListener("abort",()=>r.abort(a.reason),{once:!0})}return r.signal}const cl=13,Tf=10,O1=0,gg=58,z1=32,M1=[cl,Tf];class yg extends TransformStream{constructor(){let i=[],r=!1;super({start(){i=[],r=!1},transform(a,s){let o=a;if(r&&(o=as([[cl],o]),r=!1),o.length>0&&o.at(-1)===cl&&(r=!0,o=o.subarray(0,-1)),!o.length)return;const c=M1.includes(o.at(-1)),h=o.length-1,{lines:p}=o.reduce((m,g,y)=>(m.from>y||((g===cl||g===Tf)&&(m.lines.push(o.subarray(m.from,y)),g===cl&&o[y+1]===Tf?m.from=y+2:m.from=y+1),y===h&&m.from<=h&&m.lines.push(o.subarray(m.from))),m),{lines:[],from:0});if(p.length===1&&!c){i.push(p[0]);return}i.length&&(i.push(p[0]),p[0]=as(i),i=[]),c||p.length&&(i=[p.pop()]);for(const m of p)s.enqueue(m)},flush(a){i.length&&a.enqueue(as(i))}})}}class vg extends TransformStream{constructor(){let i="",r=[],a="",s=null;const o=new TextDecoder;super({transform(c,h){if(!c.length){if(!i&&!r.length&&!a&&s==null)return;const y={event:i,data:r.length?bg(o,r):null};i="",r=[],s=null,h.enqueue(y);return}if(c[0]===gg)return;const p=c.indexOf(gg);if(p===-1)return;const m=o.decode(c.subarray(0,p));let g=c.subarray(p+1);if(g[0]===z1&&(g=g.subarray(1)),m==="event")i=o.decode(g);else if(m==="data")r.push(g);else if(m==="id")g.indexOf(O1)===-1&&(a=o.decode(g));else if(m==="retry"){const y=Number.parseInt(o.decode(g));Number.isNaN(y)||(s=y)}},flush(c){i&&c.enqueue({event:i,data:r.length?bg(o,r):null})}})}}function as(t){const i=t.reduce((s,o)=>s+o.length,0);let r=new Uint8Array(i),a=0;for(const s of t)r.set(s,a),a+=s.length;return r}function bg(t,i){return JSON.parse(t.decode(as(i)))}class yl extends ReadableStream{constructor(){super(...arguments),Object.defineProperty(this,"reader",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}ensureReader(){this.reader||(this.reader=this.getReader())}async next(){this.ensureReader();try{const i=await this.reader.read();return i.done?(this.reader.releaseLock(),{done:!0,value:void 0}):{done:!1,value:i.value}}catch(i){throw this.reader.releaseLock(),i}}async return(){if(this.ensureReader(),this.locked){const i=this.reader.cancel();this.reader.releaseLock(),await i}return{done:!0,value:void 0}}async throw(i){if(this.ensureReader(),this.locked){const r=this.reader.cancel();this.reader.releaseLock(),await r}throw i}async[Symbol.asyncDispose](){await this.return()}[Symbol.asyncIterator](){return this}static fromReadableStream(i){const r=i.getReader();return new yl({start(a){return s();function s(){return r.read().then(({done:o,value:c})=>{if(o){a.close();return}return a.enqueue(c),s()})}},cancel(){r.releaseLock()}})}static fromAsyncGenerator(i){return new yl({async pull(r){const{value:a,done:s}=await i.next();s&&r.close(),r.enqueue(a)},async cancel(r){await i.return(r)}})}}function R1(t){if(t)return t;const i=["LANGGRAPH","LANGSMITH","LANGCHAIN"];for(const r of i){const a=A1(`${r}_API_KEY`);if(a)return a.trim().replace(/^["']|["']$/g,"")}}class Wr{constructor(i){var o;Object.defineProperty(this,"asyncCaller",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timeoutMs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"defaultHeaders",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r={maxRetries:4,maxConcurrency:4,...i==null?void 0:i.callerOptions};let a="http://localhost:8123";if(!(i!=null&&i.apiUrl)&&typeof globalThis=="object"&&globalThis!=null){const c=Symbol.for("langgraph_api:fetch"),h=Symbol.for("langgraph_api:url"),p=globalThis;p[c]&&(r.fetch??(r.fetch=p[c])),p[h]&&(a=p[h])}this.asyncCaller=new E1(r),this.timeoutMs=i==null?void 0:i.timeoutMs,this.apiUrl=((o=i==null?void 0:i.apiUrl)==null?void 0:o.replace(/\/$/,""))||a,this.defaultHeaders=(i==null?void 0:i.defaultHeaders)||{};const s=R1(i==null?void 0:i.apiKey);s&&(this.defaultHeaders["X-Api-Key"]=s)}prepareFetchOptions(i,r){const a={...r,headers:{...this.defaultHeaders,...r==null?void 0:r.headers}};a.json&&(a.body=JSON.stringify(a.json),a.headers={...a.headers,"Content-Type":"application/json"},delete a.json);let s=null;typeof(r==null?void 0:r.timeoutMs)<"u"?r.timeoutMs!=null&&(s=AbortSignal.timeout(r.timeoutMs)):this.timeoutMs!=null&&(s=AbortSignal.timeout(this.timeoutMs)),a.signal=C1(s,a.signal);const o=new URL(`${this.apiUrl}${i}`);if(a.params){for(const[c,h]of Object.entries(a.params)){if(h==null)continue;let p=typeof h=="string"||typeof h=="number"?h.toString():JSON.stringify(h);o.searchParams.append(c,p)}delete a.params}return[o,a]}async fetch(i,r){const a=await this.asyncCaller.fetch(...this.prepareFetchOptions(i,r));if(!(a.status===202||a.status===204))return a.json()}}class D1 extends Wr{async createForThread(i,r,a){const s={schedule:a==null?void 0:a.schedule,input:a==null?void 0:a.input,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,webhook:a==null?void 0:a.webhook,multitask_strategy:a==null?void 0:a.multitaskStrategy,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring};return this.fetch(`/threads/${i}/runs/crons`,{method:"POST",json:s})}async create(i,r){const a={schedule:r==null?void 0:r.schedule,input:r==null?void 0:r.input,config:r==null?void 0:r.config,metadata:r==null?void 0:r.metadata,assistant_id:i,interrupt_before:r==null?void 0:r.interruptBefore,interrupt_after:r==null?void 0:r.interruptAfter,webhook:r==null?void 0:r.webhook,multitask_strategy:r==null?void 0:r.multitaskStrategy,if_not_exists:r==null?void 0:r.ifNotExists,checkpoint_during:r==null?void 0:r.checkpointDuring};return this.fetch("/runs/crons",{method:"POST",json:a})}async delete(i){await this.fetch(`/runs/crons/${i}`,{method:"DELETE"})}async search(i){return this.fetch("/runs/crons/search",{method:"POST",json:{assistant_id:(i==null?void 0:i.assistantId)??void 0,thread_id:(i==null?void 0:i.threadId)??void 0,limit:(i==null?void 0:i.limit)??10,offset:(i==null?void 0:i.offset)??0}})}}class N1 extends Wr{async get(i){return this.fetch(`/assistants/${i}`)}async getGraph(i,r){return this.fetch(`/assistants/${i}/graph`,{params:{xray:r==null?void 0:r.xray}})}async getSchemas(i){return this.fetch(`/assistants/${i}/schemas`)}async getSubgraphs(i,r){return r!=null&&r.namespace?this.fetch(`/assistants/${i}/subgraphs/${r.namespace}`,{params:{recurse:r==null?void 0:r.recurse}}):this.fetch(`/assistants/${i}/subgraphs`,{params:{recurse:r==null?void 0:r.recurse}})}async create(i){return this.fetch("/assistants",{method:"POST",json:{graph_id:i.graphId,config:i.config,metadata:i.metadata,assistant_id:i.assistantId,if_exists:i.ifExists,name:i.name,description:i.description}})}async update(i,r){return this.fetch(`/assistants/${i}`,{method:"PATCH",json:{graph_id:r.graphId,config:r.config,metadata:r.metadata,name:r.name,description:r.description}})}async delete(i){return this.fetch(`/assistants/${i}`,{method:"DELETE"})}async search(i){return this.fetch("/assistants/search",{method:"POST",json:{graph_id:(i==null?void 0:i.graphId)??void 0,metadata:(i==null?void 0:i.metadata)??void 0,limit:(i==null?void 0:i.limit)??10,offset:(i==null?void 0:i.offset)??0,sort_by:(i==null?void 0:i.sortBy)??void 0,sort_order:(i==null?void 0:i.sortOrder)??void 0}})}async getVersions(i,r){return this.fetch(`/assistants/${i}/versions`,{method:"POST",json:{metadata:(r==null?void 0:r.metadata)??void 0,limit:(r==null?void 0:r.limit)??10,offset:(r==null?void 0:r.offset)??0}})}async setLatest(i,r){return this.fetch(`/assistants/${i}/latest`,{method:"POST",json:{version:r}})}}class j1 extends Wr{async get(i){return this.fetch(`/threads/${i}`)}async create(i){var r;return this.fetch("/threads",{method:"POST",json:{metadata:{...i==null?void 0:i.metadata,graph_id:i==null?void 0:i.graphId},thread_id:i==null?void 0:i.threadId,if_exists:i==null?void 0:i.ifExists,supersteps:(r=i==null?void 0:i.supersteps)==null?void 0:r.map(a=>({updates:a.updates.map(s=>({values:s.values,command:s.command,as_node:s.asNode}))}))}})}async copy(i){return this.fetch(`/threads/${i}/copy`,{method:"POST"})}async update(i,r){return this.fetch(`/threads/${i}`,{method:"PATCH",json:{metadata:r==null?void 0:r.metadata}})}async delete(i){return this.fetch(`/threads/${i}`,{method:"DELETE"})}async search(i){return this.fetch("/threads/search",{method:"POST",json:{metadata:(i==null?void 0:i.metadata)??void 0,limit:(i==null?void 0:i.limit)??10,offset:(i==null?void 0:i.offset)??0,status:i==null?void 0:i.status,sort_by:i==null?void 0:i.sortBy,sort_order:i==null?void 0:i.sortOrder}})}async getState(i,r,a){return r!=null?typeof r!="string"?this.fetch(`/threads/${i}/state/checkpoint`,{method:"POST",json:{checkpoint:r,subgraphs:a==null?void 0:a.subgraphs}}):this.fetch(`/threads/${i}/state/${r}`,{params:{subgraphs:a==null?void 0:a.subgraphs}}):this.fetch(`/threads/${i}/state`,{params:{subgraphs:a==null?void 0:a.subgraphs}})}async updateState(i,r){return this.fetch(`/threads/${i}/state`,{method:"POST",json:{values:r.values,checkpoint_id:r.checkpointId,checkpoint:r.checkpoint,as_node:r==null?void 0:r.asNode}})}async patchState(i,r){var s;let a;if(typeof i!="string"){if(typeof((s=i.configurable)==null?void 0:s.thread_id)!="string")throw new Error("Thread ID is required when updating state with a config.");a=i.configurable.thread_id}else a=i;return this.fetch(`/threads/${a}/state`,{method:"PATCH",json:{metadata:r}})}async getHistory(i,r){return this.fetch(`/threads/${i}/history`,{method:"POST",json:{limit:(r==null?void 0:r.limit)??10,before:r==null?void 0:r.before,metadata:r==null?void 0:r.metadata,checkpoint:r==null?void 0:r.checkpoint}})}}class L1 extends Wr{async*stream(i,r,a){const s={input:a==null?void 0:a.input,command:a==null?void 0:a.command,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,stream_mode:a==null?void 0:a.streamMode,stream_subgraphs:a==null?void 0:a.streamSubgraphs,feedback_keys:a==null?void 0:a.feedbackKeys,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,checkpoint:a==null?void 0:a.checkpoint,checkpoint_id:a==null?void 0:a.checkpointId,webhook:a==null?void 0:a.webhook,multitask_strategy:a==null?void 0:a.multitaskStrategy,on_completion:a==null?void 0:a.onCompletion,on_disconnect:a==null?void 0:a.onDisconnect,after_seconds:a==null?void 0:a.afterSeconds,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring},o=i==null?"/runs/stream":`/threads/${i}/runs/stream`,h=((await this.asyncCaller.fetch(...this.prepareFetchOptions(o,{method:"POST",json:s,timeoutMs:null,signal:a==null?void 0:a.signal}))).body||new ReadableStream({start:p=>p.close()})).pipeThrough(new yg).pipeThrough(new vg);yield*yl.fromReadableStream(h)}async create(i,r,a){const s={input:a==null?void 0:a.input,command:a==null?void 0:a.command,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,stream_mode:a==null?void 0:a.streamMode,stream_subgraphs:a==null?void 0:a.streamSubgraphs,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,webhook:a==null?void 0:a.webhook,checkpoint:a==null?void 0:a.checkpoint,checkpoint_id:a==null?void 0:a.checkpointId,multitask_strategy:a==null?void 0:a.multitaskStrategy,after_seconds:a==null?void 0:a.afterSeconds,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring};return this.fetch(`/threads/${i}/runs`,{method:"POST",json:s,signal:a==null?void 0:a.signal})}async createBatch(i){const r=i.map(a=>({...a,assistant_id:a.assistantId})).map(a=>Object.fromEntries(Object.entries(a).filter(([s,o])=>o!==void 0)));return this.fetch("/runs/batch",{method:"POST",json:r})}async wait(i,r,a){var p,m;const s={input:a==null?void 0:a.input,command:a==null?void 0:a.command,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,checkpoint:a==null?void 0:a.checkpoint,checkpoint_id:a==null?void 0:a.checkpointId,webhook:a==null?void 0:a.webhook,multitask_strategy:a==null?void 0:a.multitaskStrategy,on_completion:a==null?void 0:a.onCompletion,on_disconnect:a==null?void 0:a.onDisconnect,after_seconds:a==null?void 0:a.afterSeconds,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring},o=i==null?"/runs/wait":`/threads/${i}/runs/wait`,c=await this.fetch(o,{method:"POST",json:s,timeoutMs:null,signal:a==null?void 0:a.signal});if(((a==null?void 0:a.raiseError)!==void 0?a.raiseError:!0)&&"__error__"in c&&typeof c.__error__=="object"&&c.__error__&&"error"in c.__error__&&"message"in c.__error__)throw new Error(`${(p=c.__error__)==null?void 0:p.error}: ${(m=c.__error__)==null?void 0:m.message}`);return c}async list(i,r){return this.fetch(`/threads/${i}/runs`,{params:{limit:(r==null?void 0:r.limit)??10,offset:(r==null?void 0:r.offset)??0,status:(r==null?void 0:r.status)??void 0}})}async get(i,r){return this.fetch(`/threads/${i}/runs/${r}`)}async cancel(i,r,a=!1,s="interrupt"){return this.fetch(`/threads/${i}/runs/${r}/cancel`,{method:"POST",params:{wait:a?"1":"0",action:s}})}async join(i,r,a){return this.fetch(`/threads/${i}/runs/${r}/join`,{timeoutMs:null,signal:a==null?void 0:a.signal})}async*joinStream(i,r,a){const s=typeof a=="object"&&a!=null&&a instanceof AbortSignal?{signal:a}:a,c=((await this.asyncCaller.fetch(...this.prepareFetchOptions(`/threads/${i}/runs/${r}/stream`,{method:"GET",timeoutMs:null,signal:s==null?void 0:s.signal,params:{cancel_on_disconnect:s!=null&&s.cancelOnDisconnect?"1":"0",stream_mode:s==null?void 0:s.streamMode}}))).body||new ReadableStream({start:h=>h.close()})).pipeThrough(new yg).pipeThrough(new vg);yield*yl.fromReadableStream(c)}async delete(i,r){return this.fetch(`/threads/${i}/runs/${r}`,{method:"DELETE"})}}class U1 extends Wr{async putItem(i,r,a,s){i.forEach(c=>{if(c.includes("."))throw new Error(`Invalid namespace label '${c}'. Namespace labels cannot contain periods ('.')`)});const o={namespace:i,key:r,value:a,index:s==null?void 0:s.index,ttl:s==null?void 0:s.ttl};return this.fetch("/store/items",{method:"PUT",json:o})}async getItem(i,r,a){i.forEach(c=>{if(c.includes("."))throw new Error(`Invalid namespace label '${c}'. Namespace labels cannot contain periods ('.')`)});const s={namespace:i.join("."),key:r};(a==null?void 0:a.refreshTtl)!==void 0&&(s.refresh_ttl=a.refreshTtl);const o=await this.fetch("/store/items",{params:s});return o?{...o,createdAt:o.created_at,updatedAt:o.updated_at}:null}async deleteItem(i,r){return i.forEach(a=>{if(a.includes("."))throw new Error(`Invalid namespace label '${a}'. Namespace labels cannot contain periods ('.')`)}),this.fetch("/store/items",{method:"DELETE",json:{namespace:i,key:r}})}async searchItems(i,r){const a={namespace_prefix:i,filter:r==null?void 0:r.filter,limit:(r==null?void 0:r.limit)??10,offset:(r==null?void 0:r.offset)??0,query:r==null?void 0:r.query,refresh_ttl:r==null?void 0:r.refreshTtl};return{items:(await this.fetch("/store/items/search",{method:"POST",json:a})).items.map(o=>({...o,createdAt:o.created_at,updatedAt:o.updated_at}))}}async listNamespaces(i){const r={prefix:i==null?void 0:i.prefix,suffix:i==null?void 0:i.suffix,max_depth:i==null?void 0:i.maxDepth,limit:(i==null?void 0:i.limit)??100,offset:(i==null?void 0:i.offset)??0};return this.fetch("/store/namespaces",{method:"POST",json:r})}}class Fi extends Wr{static getOrCached(i,r){if(Fi.promiseCache[i]!=null)return Fi.promiseCache[i];const a=r();return Fi.promiseCache[i]=a,a}async getComponent(i,r){return Fi.getOrCached(`${this.apiUrl}-${i}-${r}`,async()=>(await this.asyncCaller.fetch(...this.prepareFetchOptions(`/ui/${i}`,{headers:{Accept:"text/html","Content-Type":"application/json"},method:"POST",json:{name:r}}))).text())}}Object.defineProperty(Fi,"promiseCache",{enumerable:!0,configurable:!0,writable:!0,value:{}});class B1{constructor(i){Object.defineProperty(this,"assistants",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threads",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"crons",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"~ui",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.assistants=new N1(i),this.threads=new j1(i),this.runs=new L1(i),this.crons=new D1(i),this.store=new U1(i),this["~ui"]=new Fi(i)}}var je;(function(t){t.assertEqual=s=>s;function i(s){}t.assertIs=i;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const o={};for(const c of s)o[c]=c;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),c={};for(const h of o)c[h]=s[h];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.push(c);return o},t.find=(s,o)=>{for(const c of s)if(o(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function a(s,o=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}t.joinValues=a,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(je||(je={}));var wf;(function(t){t.mergeShapes=(i,r)=>({...i,...r})})(wf||(wf={}));const ne=je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jn=t=>{switch(typeof t){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(t)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(t)?ne.array:t===null?ne.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ne.promise:typeof Map<"u"&&t instanceof Map?ne.map:typeof Set<"u"&&t instanceof Set?ne.set:typeof Date<"u"&&t instanceof Date?ne.date:ne.object;default:return ne.unknown}},X=je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),H1=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class $t extends Error{get errors(){return this.issues}constructor(i){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=i}format(i){const r=i||function(o){return o.message},a={_errors:[]},s=o=>{for(const c of o.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)a._errors.push(r(c));else{let h=a,p=0;for(;p<c.path.length;){const m=c.path[p];p===c.path.length-1?(h[m]=h[m]||{_errors:[]},h[m]._errors.push(r(c))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),a}static assert(i){if(!(i instanceof $t))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=r=>r.message){const r={},a=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(i(s))):a.push(i(s));return{formErrors:a,fieldErrors:r}}get formErrors(){return this.flatten()}}$t.create=t=>new $t(t);const Fr=(t,i)=>{let r;switch(t.code){case X.invalid_type:t.received===ne.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case X.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,je.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:r=`Unrecognized key(s) in object: ${je.joinValues(t.keys,", ")}`;break;case X.invalid_union:r="Invalid input";break;case X.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${je.joinValues(t.options)}`;break;case X.invalid_enum_value:r=`Invalid enum value. Expected ${je.joinValues(t.options)}, received '${t.received}'`;break;case X.invalid_arguments:r="Invalid function arguments";break;case X.invalid_return_type:r="Invalid function return type";break;case X.invalid_date:r="Invalid date";break;case X.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:je.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case X.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case X.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case X.custom:r="Invalid input";break;case X.invalid_intersection_types:r="Intersection results could not be merged";break;case X.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case X.not_finite:r="Number must be finite";break;default:r=i.defaultError,je.assertNever(t)}return{message:r}};let my=Fr;function Z1(t){my=t}function us(){return my}const ss=t=>{const{data:i,path:r,errorMaps:a,issueData:s}=t,o=[...r,...s.path||[]],c={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let h="";const p=a.filter(m=>!!m).slice().reverse();for(const m of p)h=m(c,{data:i,defaultError:h}).message;return{...s,path:o,message:h}},q1=[];function ee(t,i){const r=us(),a=ss({issueData:i,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Fr?void 0:Fr].filter(s=>!!s)});t.common.issues.push(a)}class kt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,r){const a=[];for(const s of r){if(s.status==="aborted")return _e;s.status==="dirty"&&i.dirty(),a.push(s.value)}return{status:i.value,value:a}}static async mergeObjectAsync(i,r){const a=[];for(const s of r){const o=await s.key,c=await s.value;a.push({key:o,value:c})}return kt.mergeObjectSync(i,a)}static mergeObjectSync(i,r){const a={};for(const s of r){const{key:o,value:c}=s;if(o.status==="aborted"||c.status==="aborted")return _e;o.status==="dirty"&&i.dirty(),c.status==="dirty"&&i.dirty(),o.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(a[o.value]=c.value)}return{status:i.value,value:a}}}const _e=Object.freeze({status:"aborted"}),Qr=t=>({status:"dirty",value:t}),zt=t=>({status:"valid",value:t}),Ef=t=>t.status==="aborted",Af=t=>t.status==="dirty",Ki=t=>t.status==="valid",vl=t=>typeof Promise<"u"&&t instanceof Promise;function os(t,i,r,a){if(typeof i=="function"?t!==i||!0:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i.get(t)}function py(t,i,r,a,s){if(typeof i=="function"?t!==i||!0:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i.set(t,r),r}var fe;(function(t){t.errToObj=i=>typeof i=="string"?{message:i}:i||{},t.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(fe||(fe={}));var fl,hl;class Mn{constructor(i,r,a,s){this._cachedPath=[],this.parent=i,this.data=r,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const _g=(t,i)=>{if(Ki(i))return{success:!0,data:i.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new $t(t.common.issues);return this._error=r,this._error}}};function Te(t){if(!t)return{};const{errorMap:i,invalid_type_error:r,required_error:a,description:s}=t;if(i&&(r||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:s}:{errorMap:(c,h)=>{var p,m;const{message:g}=t;return c.code==="invalid_enum_value"?{message:g??h.defaultError}:typeof h.data>"u"?{message:(p=g??a)!==null&&p!==void 0?p:h.defaultError}:c.code!=="invalid_type"?{message:h.defaultError}:{message:(m=g??r)!==null&&m!==void 0?m:h.defaultError}},description:s}}class Ae{get description(){return this._def.description}_getType(i){return Jn(i.data)}_getOrReturnCtx(i,r){return r||{common:i.parent.common,data:i.data,parsedType:Jn(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new kt,ctx:{common:i.parent.common,data:i.data,parsedType:Jn(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const r=this._parse(i);if(vl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(i){const r=this._parse(i);return Promise.resolve(r)}parse(i,r){const a=this.safeParse(i,r);if(a.success)return a.data;throw a.error}safeParse(i,r){var a;const s={common:{issues:[],async:(a=r==null?void 0:r.async)!==null&&a!==void 0?a:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)},o=this._parseSync({data:i,path:s.path,parent:s});return _g(s,o)}"~validate"(i){var r,a;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)};if(!this["~standard"].async)try{const o=this._parseSync({data:i,path:[],parent:s});return Ki(o)?{value:o.value}:{issues:s.common.issues}}catch(o){!((a=(r=o==null?void 0:o.message)===null||r===void 0?void 0:r.toLowerCase())===null||a===void 0)&&a.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:i,path:[],parent:s}).then(o=>Ki(o)?{value:o.value}:{issues:s.common.issues})}async parseAsync(i,r){const a=await this.safeParseAsync(i,r);if(a.success)return a.data;throw a.error}async safeParseAsync(i,r){const a={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)},s=this._parse({data:i,path:a.path,parent:a}),o=await(vl(s)?s:Promise.resolve(s));return _g(a,o)}refine(i,r){const a=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const c=i(s),h=()=>o.addIssue({code:X.custom,...a(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(h(),!1)):c?!0:(h(),!1)})}refinement(i,r){return this._refinement((a,s)=>i(a)?!0:(s.addIssue(typeof r=="function"?r(a,s):r),!1))}_refinement(i){return new xn({schema:this,typeName:K.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return bn.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vn.create(this)}promise(){return Kr.create(this,this._def)}or(i){return Sl.create([this,i],this._def)}and(i){return kl.create(this,i,this._def)}transform(i){return new xn({...Te(this._def),schema:this,typeName:K.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const r=typeof i=="function"?i:()=>i;return new Cl({...Te(this._def),innerType:this,defaultValue:r,typeName:K.ZodDefault})}brand(){return new qf({typeName:K.ZodBranded,type:this,...Te(this._def)})}catch(i){const r=typeof i=="function"?i:()=>i;return new Ol({...Te(this._def),innerType:this,catchValue:r,typeName:K.ZodCatch})}describe(i){const r=this.constructor;return new r({...this._def,description:i})}pipe(i){return Nl.create(this,i)}readonly(){return zl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const V1=/^c[^\s-]{8,}$/i,Y1=/^[0-9a-z]+$/,I1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,G1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Q1=/^[a-z0-9_-]{21}$/i,X1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,P1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,F1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tf;const K1=/^(?:(?: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])$/,J1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,W1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,e_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,t_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,n_=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gy="((\\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])))",i_=new RegExp(`^${gy}$`);function yy(t){let i="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?i=`${i}\\.\\d{${t.precision}}`:t.precision==null&&(i=`${i}(\\.\\d+)?`),i}function r_(t){return new RegExp(`^${yy(t)}$`)}function vy(t){let i=`${gy}T${yy(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${r.join("|")})`,new RegExp(`^${i}$`)}function a_(t,i){return!!((i==="v4"||!i)&&K1.test(t)||(i==="v6"||!i)&&W1.test(t))}function l_(t,i){if(!X1.test(t))return!1;try{const[r]=t.split("."),a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(a));return!(typeof s!="object"||s===null||!s.typ||!s.alg||i&&s.alg!==i)}catch{return!1}}function u_(t,i){return!!((i==="v4"||!i)&&J1.test(t)||(i==="v6"||!i)&&e_.test(t))}class yn extends Ae{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==ne.string){const o=this._getOrReturnCtx(i);return ee(o,{code:X.invalid_type,expected:ne.string,received:o.parsedType}),_e}const a=new kt;let s;for(const o of this._def.checks)if(o.kind==="min")i.data.length<o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:X.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")i.data.length>o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:X.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const c=i.data.length>o.value,h=i.data.length<o.value;(c||h)&&(s=this._getOrReturnCtx(i,s),c?ee(s,{code:X.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&ee(s,{code:X.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")F1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"email",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")tf||(tf=new RegExp($1,"u")),tf.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"emoji",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")G1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"uuid",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")Q1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"nanoid",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")V1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"cuid",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")Y1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"cuid2",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")I1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"ulid",code:X.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(i.data)}catch{s=this._getOrReturnCtx(i,s),ee(s,{validation:"url",code:X.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"regex",code:X.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?i.data=i.data.trim():o.kind==="includes"?i.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(i,s),ee(s,{code:X.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?i.data=i.data.toLowerCase():o.kind==="toUpperCase"?i.data=i.data.toUpperCase():o.kind==="startsWith"?i.data.startsWith(o.value)||(s=this._getOrReturnCtx(i,s),ee(s,{code:X.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?i.data.endsWith(o.value)||(s=this._getOrReturnCtx(i,s),ee(s,{code:X.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?vy(o).test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{code:X.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?i_.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{code:X.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?r_(o).test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{code:X.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?P1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"duration",code:X.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?a_(i.data,o.version)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"ip",code:X.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?l_(i.data,o.alg)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"jwt",code:X.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?u_(i.data,o.version)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"cidr",code:X.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?t_.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"base64",code:X.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?n_.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"base64url",code:X.invalid_string,message:o.message}),a.dirty()):je.assertNever(o);return{status:a.value,value:i.data}}_regex(i,r,a){return this.refinement(s=>i.test(s),{validation:r,code:X.invalid_string,...fe.errToObj(a)})}_addCheck(i){return new yn({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...fe.errToObj(i)})}url(i){return this._addCheck({kind:"url",...fe.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...fe.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...fe.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...fe.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...fe.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...fe.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...fe.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...fe.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...fe.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...fe.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...fe.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...fe.errToObj(i)})}datetime(i){var r,a;return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(r=i==null?void 0:i.offset)!==null&&r!==void 0?r:!1,local:(a=i==null?void 0:i.local)!==null&&a!==void 0?a:!1,...fe.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...fe.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...fe.errToObj(i)})}regex(i,r){return this._addCheck({kind:"regex",regex:i,...fe.errToObj(r)})}includes(i,r){return this._addCheck({kind:"includes",value:i,position:r==null?void 0:r.position,...fe.errToObj(r==null?void 0:r.message)})}startsWith(i,r){return this._addCheck({kind:"startsWith",value:i,...fe.errToObj(r)})}endsWith(i,r){return this._addCheck({kind:"endsWith",value:i,...fe.errToObj(r)})}min(i,r){return this._addCheck({kind:"min",value:i,...fe.errToObj(r)})}max(i,r){return this._addCheck({kind:"max",value:i,...fe.errToObj(r)})}length(i,r){return this._addCheck({kind:"length",value:i,...fe.errToObj(r)})}nonempty(i){return this.min(1,fe.errToObj(i))}trim(){return new yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i}get maxLength(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i}}yn.create=t=>{var i;return new yn({checks:[],typeName:K.ZodString,coerce:(i=t==null?void 0:t.coerce)!==null&&i!==void 0?i:!1,...Te(t)})};function s_(t,i){const r=(t.toString().split(".")[1]||"").length,a=(i.toString().split(".")[1]||"").length,s=r>a?r:a,o=parseInt(t.toFixed(s).replace(".","")),c=parseInt(i.toFixed(s).replace(".",""));return o%c/Math.pow(10,s)}class Ei extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==ne.number){const o=this._getOrReturnCtx(i);return ee(o,{code:X.invalid_type,expected:ne.number,received:o.parsedType}),_e}let a;const s=new kt;for(const o of this._def.checks)o.kind==="int"?je.isInteger(i.data)||(a=this._getOrReturnCtx(i,a),ee(a,{code:X.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?i.data<o.value:i.data<=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:X.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?i.data>o.value:i.data>=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:X.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?s_(i.data,o.value)!==0&&(a=this._getOrReturnCtx(i,a),ee(a,{code:X.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(i.data)||(a=this._getOrReturnCtx(i,a),ee(a,{code:X.not_finite,message:o.message}),s.dirty()):je.assertNever(o);return{status:s.value,value:i.data}}gte(i,r){return this.setLimit("min",i,!0,fe.toString(r))}gt(i,r){return this.setLimit("min",i,!1,fe.toString(r))}lte(i,r){return this.setLimit("max",i,!0,fe.toString(r))}lt(i,r){return this.setLimit("max",i,!1,fe.toString(r))}setLimit(i,r,a,s){return new Ei({...this._def,checks:[...this._def.checks,{kind:i,value:r,inclusive:a,message:fe.toString(s)}]})}_addCheck(i){return new Ei({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:fe.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(i)})}multipleOf(i,r){return this._addCheck({kind:"multipleOf",value:i,message:fe.toString(r)})}finite(i){return this._addCheck({kind:"finite",message:fe.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(i)})}get minValue(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i}get maxValue(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&je.isInteger(i.value))}get isFinite(){let i=null,r=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(i===null||a.value<i)&&(i=a.value)}return Number.isFinite(r)&&Number.isFinite(i)}}Ei.create=t=>new Ei({checks:[],typeName:K.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class Ai extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==ne.bigint)return this._getInvalidInput(i);let a;const s=new kt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?i.data<o.value:i.data<=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:X.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?i.data>o.value:i.data>=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:X.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?i.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:X.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):je.assertNever(o);return{status:s.value,value:i.data}}_getInvalidInput(i){const r=this._getOrReturnCtx(i);return ee(r,{code:X.invalid_type,expected:ne.bigint,received:r.parsedType}),_e}gte(i,r){return this.setLimit("min",i,!0,fe.toString(r))}gt(i,r){return this.setLimit("min",i,!1,fe.toString(r))}lte(i,r){return this.setLimit("max",i,!0,fe.toString(r))}lt(i,r){return this.setLimit("max",i,!1,fe.toString(r))}setLimit(i,r,a,s){return new Ai({...this._def,checks:[...this._def.checks,{kind:i,value:r,inclusive:a,message:fe.toString(s)}]})}_addCheck(i){return new Ai({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(i)})}multipleOf(i,r){return this._addCheck({kind:"multipleOf",value:i,message:fe.toString(r)})}get minValue(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i}get maxValue(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i}}Ai.create=t=>{var i;return new Ai({checks:[],typeName:K.ZodBigInt,coerce:(i=t==null?void 0:t.coerce)!==null&&i!==void 0?i:!1,...Te(t)})};class bl extends Ae{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==ne.boolean){const a=this._getOrReturnCtx(i);return ee(a,{code:X.invalid_type,expected:ne.boolean,received:a.parsedType}),_e}return zt(i.data)}}bl.create=t=>new bl({typeName:K.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class Ji extends Ae{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==ne.date){const o=this._getOrReturnCtx(i);return ee(o,{code:X.invalid_type,expected:ne.date,received:o.parsedType}),_e}if(isNaN(i.data.getTime())){const o=this._getOrReturnCtx(i);return ee(o,{code:X.invalid_date}),_e}const a=new kt;let s;for(const o of this._def.checks)o.kind==="min"?i.data.getTime()<o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:X.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?i.data.getTime()>o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:X.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):je.assertNever(o);return{status:a.value,value:new Date(i.data.getTime())}}_addCheck(i){return new Ji({...this._def,checks:[...this._def.checks,i]})}min(i,r){return this._addCheck({kind:"min",value:i.getTime(),message:fe.toString(r)})}max(i,r){return this._addCheck({kind:"max",value:i.getTime(),message:fe.toString(r)})}get minDate(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i!=null?new Date(i):null}}Ji.create=t=>new Ji({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:K.ZodDate,...Te(t)});class cs extends Ae{_parse(i){if(this._getType(i)!==ne.symbol){const a=this._getOrReturnCtx(i);return ee(a,{code:X.invalid_type,expected:ne.symbol,received:a.parsedType}),_e}return zt(i.data)}}cs.create=t=>new cs({typeName:K.ZodSymbol,...Te(t)});class _l extends Ae{_parse(i){if(this._getType(i)!==ne.undefined){const a=this._getOrReturnCtx(i);return ee(a,{code:X.invalid_type,expected:ne.undefined,received:a.parsedType}),_e}return zt(i.data)}}_l.create=t=>new _l({typeName:K.ZodUndefined,...Te(t)});class xl extends Ae{_parse(i){if(this._getType(i)!==ne.null){const a=this._getOrReturnCtx(i);return ee(a,{code:X.invalid_type,expected:ne.null,received:a.parsedType}),_e}return zt(i.data)}}xl.create=t=>new xl({typeName:K.ZodNull,...Te(t)});class $r extends Ae{constructor(){super(...arguments),this._any=!0}_parse(i){return zt(i.data)}}$r.create=t=>new $r({typeName:K.ZodAny,...Te(t)});class $i extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(i){return zt(i.data)}}$i.create=t=>new $i({typeName:K.ZodUnknown,...Te(t)});class Wn extends Ae{_parse(i){const r=this._getOrReturnCtx(i);return ee(r,{code:X.invalid_type,expected:ne.never,received:r.parsedType}),_e}}Wn.create=t=>new Wn({typeName:K.ZodNever,...Te(t)});class fs extends Ae{_parse(i){if(this._getType(i)!==ne.undefined){const a=this._getOrReturnCtx(i);return ee(a,{code:X.invalid_type,expected:ne.void,received:a.parsedType}),_e}return zt(i.data)}}fs.create=t=>new fs({typeName:K.ZodVoid,...Te(t)});class vn extends Ae{_parse(i){const{ctx:r,status:a}=this._processInputParams(i),s=this._def;if(r.parsedType!==ne.array)return ee(r,{code:X.invalid_type,expected:ne.array,received:r.parsedType}),_e;if(s.exactLength!==null){const c=r.data.length>s.exactLength.value,h=r.data.length<s.exactLength.value;(c||h)&&(ee(r,{code:c?X.too_big:X.too_small,minimum:h?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ee(r,{code:X.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ee(r,{code:X.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),r.common.async)return Promise.all([...r.data].map((c,h)=>s.type._parseAsync(new Mn(r,c,r.path,h)))).then(c=>kt.mergeArray(a,c));const o=[...r.data].map((c,h)=>s.type._parseSync(new Mn(r,c,r.path,h)));return kt.mergeArray(a,o)}get element(){return this._def.type}min(i,r){return new vn({...this._def,minLength:{value:i,message:fe.toString(r)}})}max(i,r){return new vn({...this._def,maxLength:{value:i,message:fe.toString(r)}})}length(i,r){return new vn({...this._def,exactLength:{value:i,message:fe.toString(r)}})}nonempty(i){return this.min(1,i)}}vn.create=(t,i)=>new vn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:K.ZodArray,...Te(i)});function Ir(t){if(t instanceof et){const i={};for(const r in t.shape){const a=t.shape[r];i[r]=bn.create(Ir(a))}return new et({...t._def,shape:()=>i})}else return t instanceof vn?new vn({...t._def,type:Ir(t.element)}):t instanceof bn?bn.create(Ir(t.unwrap())):t instanceof Oi?Oi.create(Ir(t.unwrap())):t instanceof Rn?Rn.create(t.items.map(i=>Ir(i))):t}class et extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),r=je.objectKeys(i);return this._cached={shape:i,keys:r}}_parse(i){if(this._getType(i)!==ne.object){const m=this._getOrReturnCtx(i);return ee(m,{code:X.invalid_type,expected:ne.object,received:m.parsedType}),_e}const{status:a,ctx:s}=this._processInputParams(i),{shape:o,keys:c}=this._getCached(),h=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const m in s.data)c.includes(m)||h.push(m);const p=[];for(const m of c){const g=o[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:g._parse(new Mn(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof Wn){const m=this._def.unknownKeys;if(m==="passthrough")for(const g of h)p.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(m==="strict")h.length>0&&(ee(s,{code:X.unrecognized_keys,keys:h}),a.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const g of h){const y=s.data[g];p.push({key:{status:"valid",value:g},value:m._parse(new Mn(s,y,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const g of p){const y=await g.key,S=await g.value;m.push({key:y,value:S,alwaysSet:g.alwaysSet})}return m}).then(m=>kt.mergeObjectSync(a,m)):kt.mergeObjectSync(a,p)}get shape(){return this._def.shape()}strict(i){return fe.errToObj,new et({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(r,a)=>{var s,o,c,h;const p=(c=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,a).message)!==null&&c!==void 0?c:a.defaultError;return r.code==="unrecognized_keys"?{message:(h=fe.errToObj(i).message)!==null&&h!==void 0?h:p}:{message:p}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(i){return new et({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new et({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:K.ZodObject})}setKey(i,r){return this.augment({[i]:r})}catchall(i){return new et({...this._def,catchall:i})}pick(i){const r={};return je.objectKeys(i).forEach(a=>{i[a]&&this.shape[a]&&(r[a]=this.shape[a])}),new et({...this._def,shape:()=>r})}omit(i){const r={};return je.objectKeys(this.shape).forEach(a=>{i[a]||(r[a]=this.shape[a])}),new et({...this._def,shape:()=>r})}deepPartial(){return Ir(this)}partial(i){const r={};return je.objectKeys(this.shape).forEach(a=>{const s=this.shape[a];i&&!i[a]?r[a]=s:r[a]=s.optional()}),new et({...this._def,shape:()=>r})}required(i){const r={};return je.objectKeys(this.shape).forEach(a=>{if(i&&!i[a])r[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof bn;)o=o._def.innerType;r[a]=o}}),new et({...this._def,shape:()=>r})}keyof(){return by(je.objectKeys(this.shape))}}et.create=(t,i)=>new et({shape:()=>t,unknownKeys:"strip",catchall:Wn.create(),typeName:K.ZodObject,...Te(i)});et.strictCreate=(t,i)=>new et({shape:()=>t,unknownKeys:"strict",catchall:Wn.create(),typeName:K.ZodObject,...Te(i)});et.lazycreate=(t,i)=>new et({shape:t,unknownKeys:"strip",catchall:Wn.create(),typeName:K.ZodObject,...Te(i)});class Sl extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i),a=this._def.options;function s(o){for(const h of o)if(h.result.status==="valid")return h.result;for(const h of o)if(h.result.status==="dirty")return r.common.issues.push(...h.ctx.common.issues),h.result;const c=o.map(h=>new $t(h.ctx.common.issues));return ee(r,{code:X.invalid_union,unionErrors:c}),_e}if(r.common.async)return Promise.all(a.map(async o=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(s);{let o;const c=[];for(const p of a){const m={...r,common:{...r.common,issues:[]},parent:null},g=p._parseSync({data:r.data,path:r.path,parent:m});if(g.status==="valid")return g;g.status==="dirty"&&!o&&(o={result:g,ctx:m}),m.common.issues.length&&c.push(m.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const h=c.map(p=>new $t(p));return ee(r,{code:X.invalid_union,unionErrors:h}),_e}}get options(){return this._def.options}}Sl.create=(t,i)=>new Sl({options:t,typeName:K.ZodUnion,...Te(i)});const Kn=t=>t instanceof wl?Kn(t.schema):t instanceof xn?Kn(t.innerType()):t instanceof El?[t.value]:t instanceof Ci?t.options:t instanceof Al?je.objectValues(t.enum):t instanceof Cl?Kn(t._def.innerType):t instanceof _l?[void 0]:t instanceof xl?[null]:t instanceof bn?[void 0,...Kn(t.unwrap())]:t instanceof Oi?[null,...Kn(t.unwrap())]:t instanceof qf||t instanceof zl?Kn(t.unwrap()):t instanceof Ol?Kn(t._def.innerType):[];class bs extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i);if(r.parsedType!==ne.object)return ee(r,{code:X.invalid_type,expected:ne.object,received:r.parsedType}),_e;const a=this.discriminator,s=r.data[a],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(ee(r,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),_e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(i,r,a){const s=new Map;for(const o of r){const c=Kn(o.shape[i]);if(!c.length)throw new Error(`A discriminator value for key \`${i}\` could not be extracted from all schema options`);for(const h of c){if(s.has(h))throw new Error(`Discriminator property ${String(i)} has duplicate value ${String(h)}`);s.set(h,o)}}return new bs({typeName:K.ZodDiscriminatedUnion,discriminator:i,options:r,optionsMap:s,...Te(a)})}}function Cf(t,i){const r=Jn(t),a=Jn(i);if(t===i)return{valid:!0,data:t};if(r===ne.object&&a===ne.object){const s=je.objectKeys(i),o=je.objectKeys(t).filter(h=>s.indexOf(h)!==-1),c={...t,...i};for(const h of o){const p=Cf(t[h],i[h]);if(!p.valid)return{valid:!1};c[h]=p.data}return{valid:!0,data:c}}else if(r===ne.array&&a===ne.array){if(t.length!==i.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const c=t[o],h=i[o],p=Cf(c,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return r===ne.date&&a===ne.date&&+t==+i?{valid:!0,data:t}:{valid:!1}}class kl extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i),s=(o,c)=>{if(Ef(o)||Ef(c))return _e;const h=Cf(o.value,c.value);return h.valid?((Af(o)||Af(c))&&r.dirty(),{status:r.value,value:h.data}):(ee(a,{code:X.invalid_intersection_types}),_e)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,c])=>s(o,c)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}kl.create=(t,i,r)=>new kl({left:t,right:i,typeName:K.ZodIntersection,...Te(r)});class Rn extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.array)return ee(a,{code:X.invalid_type,expected:ne.array,received:a.parsedType}),_e;if(a.data.length<this._def.items.length)return ee(a,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&a.data.length>this._def.items.length&&(ee(a,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...a.data].map((c,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Mn(a,c,a.path,h)):null}).filter(c=>!!c);return a.common.async?Promise.all(o).then(c=>kt.mergeArray(r,c)):kt.mergeArray(r,o)}get items(){return this._def.items}rest(i){return new Rn({...this._def,rest:i})}}Rn.create=(t,i)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:t,typeName:K.ZodTuple,rest:null,...Te(i)})};class Tl extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.object)return ee(a,{code:X.invalid_type,expected:ne.object,received:a.parsedType}),_e;const s=[],o=this._def.keyType,c=this._def.valueType;for(const h in a.data)s.push({key:o._parse(new Mn(a,h,a.path,h)),value:c._parse(new Mn(a,a.data[h],a.path,h)),alwaysSet:h in a.data});return a.common.async?kt.mergeObjectAsync(r,s):kt.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(i,r,a){return r instanceof Ae?new Tl({keyType:i,valueType:r,typeName:K.ZodRecord,...Te(a)}):new Tl({keyType:yn.create(),valueType:i,typeName:K.ZodRecord,...Te(r)})}}class hs extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.map)return ee(a,{code:X.invalid_type,expected:ne.map,received:a.parsedType}),_e;const s=this._def.keyType,o=this._def.valueType,c=[...a.data.entries()].map(([h,p],m)=>({key:s._parse(new Mn(a,h,a.path,[m,"key"])),value:o._parse(new Mn(a,p,a.path,[m,"value"]))}));if(a.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const p of c){const m=await p.key,g=await p.value;if(m.status==="aborted"||g.status==="aborted")return _e;(m.status==="dirty"||g.status==="dirty")&&r.dirty(),h.set(m.value,g.value)}return{status:r.value,value:h}})}else{const h=new Map;for(const p of c){const m=p.key,g=p.value;if(m.status==="aborted"||g.status==="aborted")return _e;(m.status==="dirty"||g.status==="dirty")&&r.dirty(),h.set(m.value,g.value)}return{status:r.value,value:h}}}}hs.create=(t,i,r)=>new hs({valueType:i,keyType:t,typeName:K.ZodMap,...Te(r)});class Wi extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.set)return ee(a,{code:X.invalid_type,expected:ne.set,received:a.parsedType}),_e;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(ee(a,{code:X.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(ee(a,{code:X.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function c(p){const m=new Set;for(const g of p){if(g.status==="aborted")return _e;g.status==="dirty"&&r.dirty(),m.add(g.value)}return{status:r.value,value:m}}const h=[...a.data.values()].map((p,m)=>o._parse(new Mn(a,p,a.path,m)));return a.common.async?Promise.all(h).then(p=>c(p)):c(h)}min(i,r){return new Wi({...this._def,minSize:{value:i,message:fe.toString(r)}})}max(i,r){return new Wi({...this._def,maxSize:{value:i,message:fe.toString(r)}})}size(i,r){return this.min(i,r).max(i,r)}nonempty(i){return this.min(1,i)}}Wi.create=(t,i)=>new Wi({valueType:t,minSize:null,maxSize:null,typeName:K.ZodSet,...Te(i)});class Xr extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(i){const{ctx:r}=this._processInputParams(i);if(r.parsedType!==ne.function)return ee(r,{code:X.invalid_type,expected:ne.function,received:r.parsedType}),_e;function a(h,p){return ss({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,us(),Fr].filter(m=>!!m),issueData:{code:X.invalid_arguments,argumentsError:p}})}function s(h,p){return ss({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,us(),Fr].filter(m=>!!m),issueData:{code:X.invalid_return_type,returnTypeError:p}})}const o={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof Kr){const h=this;return zt(async function(...p){const m=new $t([]),g=await h._def.args.parseAsync(p,o).catch(x=>{throw m.addIssue(a(p,x)),m}),y=await Reflect.apply(c,this,g);return await h._def.returns._def.type.parseAsync(y,o).catch(x=>{throw m.addIssue(s(y,x)),m})})}else{const h=this;return zt(function(...p){const m=h._def.args.safeParse(p,o);if(!m.success)throw new $t([a(p,m.error)]);const g=Reflect.apply(c,this,m.data),y=h._def.returns.safeParse(g,o);if(!y.success)throw new $t([s(g,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...i){return new Xr({...this._def,args:Rn.create(i).rest($i.create())})}returns(i){return new Xr({...this._def,returns:i})}implement(i){return this.parse(i)}strictImplement(i){return this.parse(i)}static create(i,r,a){return new Xr({args:i||Rn.create([]).rest($i.create()),returns:r||$i.create(),typeName:K.ZodFunction,...Te(a)})}}class wl extends Ae{get schema(){return this._def.getter()}_parse(i){const{ctx:r}=this._processInputParams(i);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}wl.create=(t,i)=>new wl({getter:t,typeName:K.ZodLazy,...Te(i)});class El extends Ae{_parse(i){if(i.data!==this._def.value){const r=this._getOrReturnCtx(i);return ee(r,{received:r.data,code:X.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:i.data}}get value(){return this._def.value}}El.create=(t,i)=>new El({value:t,typeName:K.ZodLiteral,...Te(i)});function by(t,i){return new Ci({values:t,typeName:K.ZodEnum,...Te(i)})}class Ci extends Ae{constructor(){super(...arguments),fl.set(this,void 0)}_parse(i){if(typeof i.data!="string"){const r=this._getOrReturnCtx(i),a=this._def.values;return ee(r,{expected:je.joinValues(a),received:r.parsedType,code:X.invalid_type}),_e}if(os(this,fl)||py(this,fl,new Set(this._def.values)),!os(this,fl).has(i.data)){const r=this._getOrReturnCtx(i),a=this._def.values;return ee(r,{received:r.data,code:X.invalid_enum_value,options:a}),_e}return zt(i.data)}get options(){return this._def.values}get enum(){const i={};for(const r of this._def.values)i[r]=r;return i}get Values(){const i={};for(const r of this._def.values)i[r]=r;return i}get Enum(){const i={};for(const r of this._def.values)i[r]=r;return i}extract(i,r=this._def){return Ci.create(i,{...this._def,...r})}exclude(i,r=this._def){return Ci.create(this.options.filter(a=>!i.includes(a)),{...this._def,...r})}}fl=new WeakMap;Ci.create=by;class Al extends Ae{constructor(){super(...arguments),hl.set(this,void 0)}_parse(i){const r=je.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(i);if(a.parsedType!==ne.string&&a.parsedType!==ne.number){const s=je.objectValues(r);return ee(a,{expected:je.joinValues(s),received:a.parsedType,code:X.invalid_type}),_e}if(os(this,hl)||py(this,hl,new Set(je.getValidEnumValues(this._def.values))),!os(this,hl).has(i.data)){const s=je.objectValues(r);return ee(a,{received:a.data,code:X.invalid_enum_value,options:s}),_e}return zt(i.data)}get enum(){return this._def.values}}hl=new WeakMap;Al.create=(t,i)=>new Al({values:t,typeName:K.ZodNativeEnum,...Te(i)});class Kr extends Ae{unwrap(){return this._def.type}_parse(i){const{ctx:r}=this._processInputParams(i);if(r.parsedType!==ne.promise&&r.common.async===!1)return ee(r,{code:X.invalid_type,expected:ne.promise,received:r.parsedType}),_e;const a=r.parsedType===ne.promise?r.data:Promise.resolve(r.data);return zt(a.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Kr.create=(t,i)=>new Kr({type:t,typeName:K.ZodPromise,...Te(i)});class xn extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===K.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:r,ctx:a}=this._processInputParams(i),s=this._def.effect||null,o={addIssue:c=>{ee(a,c),c.fatal?r.abort():r.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const c=s.transform(a.data,o);if(a.common.async)return Promise.resolve(c).then(async h=>{if(r.value==="aborted")return _e;const p=await this._def.schema._parseAsync({data:h,path:a.path,parent:a});return p.status==="aborted"?_e:p.status==="dirty"||r.value==="dirty"?Qr(p.value):p});{if(r.value==="aborted")return _e;const h=this._def.schema._parseSync({data:c,path:a.path,parent:a});return h.status==="aborted"?_e:h.status==="dirty"||r.value==="dirty"?Qr(h.value):h}}if(s.type==="refinement"){const c=h=>{const p=s.refinement(h,o);if(a.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(a.common.async===!1){const h=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return h.status==="aborted"?_e:(h.status==="dirty"&&r.dirty(),c(h.value),{status:r.value,value:h.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(h=>h.status==="aborted"?_e:(h.status==="dirty"&&r.dirty(),c(h.value).then(()=>({status:r.value,value:h.value}))))}if(s.type==="transform")if(a.common.async===!1){const c=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Ki(c))return c;const h=s.transform(c.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:h}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(c=>Ki(c)?Promise.resolve(s.transform(c.value,o)).then(h=>({status:r.value,value:h})):c);je.assertNever(s)}}xn.create=(t,i,r)=>new xn({schema:t,typeName:K.ZodEffects,effect:i,...Te(r)});xn.createWithPreprocess=(t,i,r)=>new xn({schema:i,effect:{type:"preprocess",transform:t},typeName:K.ZodEffects,...Te(r)});class bn extends Ae{_parse(i){return this._getType(i)===ne.undefined?zt(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}bn.create=(t,i)=>new bn({innerType:t,typeName:K.ZodOptional,...Te(i)});class Oi extends Ae{_parse(i){return this._getType(i)===ne.null?zt(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}Oi.create=(t,i)=>new Oi({innerType:t,typeName:K.ZodNullable,...Te(i)});class Cl extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i);let a=r.data;return r.parsedType===ne.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Cl.create=(t,i)=>new Cl({innerType:t,typeName:K.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,...Te(i)});class Ol extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i),a={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return vl(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new $t(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new $t(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ol.create=(t,i)=>new Ol({innerType:t,typeName:K.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,...Te(i)});class ds extends Ae{_parse(i){if(this._getType(i)!==ne.nan){const a=this._getOrReturnCtx(i);return ee(a,{code:X.invalid_type,expected:ne.nan,received:a.parsedType}),_e}return{status:"valid",value:i.data}}}ds.create=t=>new ds({typeName:K.ZodNaN,...Te(t)});const o_=Symbol("zod_brand");class qf extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i),a=r.data;return this._def.type._parse({data:a,path:r.path,parent:r})}unwrap(){return this._def.type}}class Nl extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?_e:o.status==="dirty"?(r.dirty(),Qr(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?_e:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(i,r){return new Nl({in:i,out:r,typeName:K.ZodPipeline})}}class zl extends Ae{_parse(i){const r=this._def.innerType._parse(i),a=s=>(Ki(s)&&(s.value=Object.freeze(s.value)),s);return vl(r)?r.then(s=>a(s)):a(r)}unwrap(){return this._def.innerType}}zl.create=(t,i)=>new zl({innerType:t,typeName:K.ZodReadonly,...Te(i)});function xg(t,i){const r=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function _y(t,i={},r){return t?$r.create().superRefine((a,s)=>{var o,c;const h=t(a);if(h instanceof Promise)return h.then(p=>{var m,g;if(!p){const y=xg(i,a),S=(g=(m=y.fatal)!==null&&m!==void 0?m:r)!==null&&g!==void 0?g:!0;s.addIssue({code:"custom",...y,fatal:S})}});if(!h){const p=xg(i,a),m=(c=(o=p.fatal)!==null&&o!==void 0?o:r)!==null&&c!==void 0?c:!0;s.addIssue({code:"custom",...p,fatal:m})}}):$r.create()}const c_={object:et.lazycreate};var K;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(K||(K={}));const f_=(t,i={message:`Input not instance of ${t.name}`})=>_y(r=>r instanceof t,i),xy=yn.create,Sy=Ei.create,h_=ds.create,d_=Ai.create,ky=bl.create,m_=Ji.create,p_=cs.create,g_=_l.create,y_=xl.create,v_=$r.create,b_=$i.create,__=Wn.create,x_=fs.create,S_=vn.create,k_=et.create,T_=et.strictCreate,w_=Sl.create,E_=bs.create,A_=kl.create,C_=Rn.create,O_=Tl.create,z_=hs.create,M_=Wi.create,R_=Xr.create,D_=wl.create,N_=El.create,j_=Ci.create,L_=Al.create,U_=Kr.create,Sg=xn.create,B_=bn.create,H_=Oi.create,Z_=xn.createWithPreprocess,q_=Nl.create,V_=()=>xy().optional(),Y_=()=>Sy().optional(),I_=()=>ky().optional(),G_={string:t=>yn.create({...t,coerce:!0}),number:t=>Ei.create({...t,coerce:!0}),boolean:t=>bl.create({...t,coerce:!0}),bigint:t=>Ai.create({...t,coerce:!0}),date:t=>Ji.create({...t,coerce:!0})},Q_=_e;var X_=Object.freeze({__proto__:null,defaultErrorMap:Fr,setErrorMap:Z1,getErrorMap:us,makeIssue:ss,EMPTY_PATH:q1,addIssueToContext:ee,ParseStatus:kt,INVALID:_e,DIRTY:Qr,OK:zt,isAborted:Ef,isDirty:Af,isValid:Ki,isAsync:vl,get util(){return je},get objectUtil(){return wf},ZodParsedType:ne,getParsedType:Jn,ZodType:Ae,datetimeRegex:vy,ZodString:yn,ZodNumber:Ei,ZodBigInt:Ai,ZodBoolean:bl,ZodDate:Ji,ZodSymbol:cs,ZodUndefined:_l,ZodNull:xl,ZodAny:$r,ZodUnknown:$i,ZodNever:Wn,ZodVoid:fs,ZodArray:vn,ZodObject:et,ZodUnion:Sl,ZodDiscriminatedUnion:bs,ZodIntersection:kl,ZodTuple:Rn,ZodRecord:Tl,ZodMap:hs,ZodSet:Wi,ZodFunction:Xr,ZodLazy:wl,ZodLiteral:El,ZodEnum:Ci,ZodNativeEnum:Al,ZodPromise:Kr,ZodEffects:xn,ZodTransformer:xn,ZodOptional:bn,ZodNullable:Oi,ZodDefault:Cl,ZodCatch:Ol,ZodNaN:ds,BRAND:o_,ZodBranded:qf,ZodPipeline:Nl,ZodReadonly:zl,custom:_y,Schema:Ae,ZodSchema:Ae,late:c_,get ZodFirstPartyTypeKind(){return K},coerce:G_,any:v_,array:S_,bigint:d_,boolean:ky,date:m_,discriminatedUnion:E_,effect:Sg,enum:j_,function:R_,instanceof:f_,intersection:A_,lazy:D_,literal:N_,map:z_,nan:h_,nativeEnum:L_,never:__,null:y_,nullable:H_,number:Sy,object:k_,oboolean:I_,onumber:Y_,optional:B_,ostring:V_,pipeline:q_,preprocess:Z_,promise:U_,record:O_,set:M_,strictObject:T_,string:xy,symbol:p_,transformer:Sg,tuple:C_,undefined:g_,union:w_,unknown:b_,void:x_,NEVER:Q_,ZodIssueCode:X,quotelessJson:H1,ZodError:$t});const P_=Symbol("Let zodToJsonSchema decide on which parser to use"),F_={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},$_=t=>({...F_,...t}),K_=t=>{const i=$_(t),r=i.name!==void 0?[...i.basePath,i.definitionPath,i.name]:i.basePath;return{...i,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(i.definitions).map(([a,s])=>[s._def,{def:s._def,path:[...i.basePath,i.definitionPath,a],jsonSchema:void 0}]))}};function Ty(t,i,r,a){a!=null&&a.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[i]:r})}function Ie(t,i,r,a,s){t[i]=r,Ty(t,i,a,s)}function J_(){return{}}function W_(t,i){var a,s,o;const r={type:"array"};return(a=t.type)!=null&&a._def&&((o=(s=t.type)==null?void 0:s._def)==null?void 0:o.typeName)!==K.ZodAny&&(r.items=Ze(t.type._def,{...i,currentPath:[...i.currentPath,"items"]})),t.minLength&&Ie(r,"minItems",t.minLength.value,t.minLength.message,i),t.maxLength&&Ie(r,"maxItems",t.maxLength.value,t.maxLength.message,i),t.exactLength&&(Ie(r,"minItems",t.exactLength.value,t.exactLength.message,i),Ie(r,"maxItems",t.exactLength.value,t.exactLength.message,i)),r}function ex(t,i){const r={type:"integer",format:"int64"};if(!t.checks)return r;for(const a of t.checks)switch(a.kind){case"min":i.target==="jsonSchema7"?a.inclusive?Ie(r,"minimum",a.value,a.message,i):Ie(r,"exclusiveMinimum",a.value,a.message,i):(a.inclusive||(r.exclusiveMinimum=!0),Ie(r,"minimum",a.value,a.message,i));break;case"max":i.target==="jsonSchema7"?a.inclusive?Ie(r,"maximum",a.value,a.message,i):Ie(r,"exclusiveMaximum",a.value,a.message,i):(a.inclusive||(r.exclusiveMaximum=!0),Ie(r,"maximum",a.value,a.message,i));break;case"multipleOf":Ie(r,"multipleOf",a.value,a.message,i);break}return r}function tx(){return{type:"boolean"}}function wy(t,i){return Ze(t.type._def,i)}const nx=(t,i)=>Ze(t.innerType._def,i);function Ey(t,i,r){const a=r??i.dateStrategy;if(Array.isArray(a))return{anyOf:a.map((s,o)=>Ey(t,i,s))};switch(a){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ix(t,i)}}const ix=(t,i)=>{const r={type:"integer",format:"unix-time"};if(i.target==="openApi3")return r;for(const a of t.checks)switch(a.kind){case"min":Ie(r,"minimum",a.value,a.message,i);break;case"max":Ie(r,"maximum",a.value,a.message,i);break}return r};function rx(t,i){return{...Ze(t.innerType._def,i),default:t.defaultValue()}}function ax(t,i){return i.effectStrategy==="input"?Ze(t.schema._def,i):{}}function lx(t){return{type:"string",enum:Array.from(t.values)}}const ux=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function sx(t,i){const r=[Ze(t.left._def,{...i,currentPath:[...i.currentPath,"allOf","0"]}),Ze(t.right._def,{...i,currentPath:[...i.currentPath,"allOf","1"]})].filter(o=>!!o);let a=i.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const s=[];return r.forEach(o=>{if(ux(o))s.push(...o.allOf),o.unevaluatedProperties===void 0&&(a=void 0);else{let c=o;if("additionalProperties"in o&&o.additionalProperties===!1){const{additionalProperties:h,...p}=o;c=p}else a=void 0;s.push(c)}}),s.length?{allOf:s,...a}:void 0}function ox(t,i){const r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:i.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}let nf;const mn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(nf===void 0&&(nf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),nf),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Ay(t,i){const r={type:"string"};if(t.checks)for(const a of t.checks)switch(a.kind){case"min":Ie(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,a.value):a.value,a.message,i);break;case"max":Ie(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,a.value):a.value,a.message,i);break;case"email":switch(i.emailStrategy){case"format:email":pn(r,"email",a.message,i);break;case"format:idn-email":pn(r,"idn-email",a.message,i);break;case"pattern:zod":At(r,mn.email,a.message,i);break}break;case"url":pn(r,"uri",a.message,i);break;case"uuid":pn(r,"uuid",a.message,i);break;case"regex":At(r,a.regex,a.message,i);break;case"cuid":At(r,mn.cuid,a.message,i);break;case"cuid2":At(r,mn.cuid2,a.message,i);break;case"startsWith":At(r,RegExp(`^${rf(a.value,i)}`),a.message,i);break;case"endsWith":At(r,RegExp(`${rf(a.value,i)}$`),a.message,i);break;case"datetime":pn(r,"date-time",a.message,i);break;case"date":pn(r,"date",a.message,i);break;case"time":pn(r,"time",a.message,i);break;case"duration":pn(r,"duration",a.message,i);break;case"length":Ie(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,a.value):a.value,a.message,i),Ie(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,a.value):a.value,a.message,i);break;case"includes":{At(r,RegExp(rf(a.value,i)),a.message,i);break}case"ip":{a.version!=="v6"&&pn(r,"ipv4",a.message,i),a.version!=="v4"&&pn(r,"ipv6",a.message,i);break}case"base64url":At(r,mn.base64url,a.message,i);break;case"jwt":At(r,mn.jwt,a.message,i);break;case"cidr":{a.version!=="v6"&&At(r,mn.ipv4Cidr,a.message,i),a.version!=="v4"&&At(r,mn.ipv6Cidr,a.message,i);break}case"emoji":At(r,mn.emoji(),a.message,i);break;case"ulid":{At(r,mn.ulid,a.message,i);break}case"base64":{switch(i.base64Strategy){case"format:binary":{pn(r,"binary",a.message,i);break}case"contentEncoding:base64":{Ie(r,"contentEncoding","base64",a.message,i);break}case"pattern:zod":{At(r,mn.base64,a.message,i);break}}break}case"nanoid":At(r,mn.nanoid,a.message,i)}return r}function rf(t,i){return i.patternStrategy==="escape"?fx(t):t}const cx=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function fx(t){let i="";for(let r=0;r<t.length;r++)cx.has(t[r])||(i+="\\"),i+=t[r];return i}function pn(t,i,r,a){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&a.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:i,...r&&a.errorMessages&&{errorMessage:{format:r}}})):Ie(t,"format",i,r,a)}function At(t,i,r,a){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&a.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:kg(i,a),...r&&a.errorMessages&&{errorMessage:{pattern:r}}})):Ie(t,"pattern",kg(i,a),r,a)}function kg(t,i){var p;if(!i.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},a=r.i?t.source.toLowerCase():t.source;let s="",o=!1,c=!1,h=!1;for(let m=0;m<a.length;m++){if(o){s+=a[m],o=!1;continue}if(r.i){if(c){if(a[m].match(/[a-z]/)){h?(s+=a[m],s+=`${a[m-2]}-${a[m]}`.toUpperCase(),h=!1):a[m+1]==="-"&&((p=a[m+2])!=null&&p.match(/[a-z]/))?(s+=a[m],h=!0):s+=`${a[m]}${a[m].toUpperCase()}`;continue}}else if(a[m].match(/[a-z]/)){s+=`[${a[m]}${a[m].toUpperCase()}]`;continue}}if(r.m){if(a[m]==="^"){s+=`(^|(?<=[\r
|
|
48
|
+
`+l.stack}}function Wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bh(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Gv(e){var n=bh(e)?"checked":"value",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),u=""+e[n];if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,d=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){u=""+v,d.call(this,v)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return u},setValue:function(v){u=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Yl(e){e._valueTracker||(e._valueTracker=Gv(e))}function xh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),u="";return e&&(u=bh(e)?e.checked?"true":"false":e.value),e=u,e!==l?(n.setValue(e),!0):!1}function Il(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Pv=/[\n"\\]/g;function en(e){return e.replace(Pv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Bs(e,n,l,u,f,d,v,_){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Wt(n)):e.value!==""+Wt(n)&&(e.value=""+Wt(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Hs(e,v,Wt(n)):l!=null?Hs(e,v,Wt(l)):u!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Wt(_):e.removeAttribute("name")}function _h(e,n,l,u,f,d,v,_){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null))return;l=l!=null?""+Wt(l):"",n=n!=null?""+Wt(n):l,_||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=_?e.checked:!!u,e.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function Hs(e,n,l){n==="number"&&Il(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function or(e,n,l,u){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&u&&(e[l].defaultSelected=!0)}else{for(l=""+Wt(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Sh(e,n,l){if(n!=null&&(n=""+Wt(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+Wt(l):""}function kh(e,n,l,u){if(n==null){if(u!=null){if(l!=null)throw Error(a(92));if(se(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),n=l}l=Wt(n),e.defaultValue=l,u=e.textContent,u===l&&u!==""&&u!==null&&(e.value=u)}function cr(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var Qv=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 Th(e,n,l){var u=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,l):typeof l!="number"||l===0||Qv.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function wh(e,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var f in n)u=n[f],n.hasOwnProperty(f)&&l[f]!==u&&Th(e,f,u)}else for(var d in n)n.hasOwnProperty(d)&&Th(e,d,n[d])}function Zs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xv=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"]]),Fv=/^[\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 Gl(e){return Fv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var qs=null;function Vs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fr=null,hr=null;function Eh(e){var n=ar(e);if(n&&(e=n.stateNode)){var l=e[Rt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Bs(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+en(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var u=l[n];if(u!==e&&u.form===e.form){var f=u[Rt]||null;if(!f)throw Error(a(90));Bs(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)u=l[n],u.form===e.form&&xh(u)}break e;case"textarea":Sh(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&or(e,!!l.multiple,n,!1)}}}var Ys=!1;function Ah(e,n,l){if(Ys)return e(n,l);Ys=!0;try{var u=e(n);return u}finally{if(Ys=!1,(fr!==null||hr!==null)&&(zu(),fr&&(n=fr,e=hr,hr=fr=null,Eh(n),e)))for(n=0;n<e.length;n++)Eh(e[n])}}function ca(e,n){var l=e.stateNode;if(l===null)return null;var u=l[Rt]||null;if(u===null)return null;l=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Is=!1;if(Un)try{var fa={};Object.defineProperty(fa,"passive",{get:function(){Is=!0}}),window.addEventListener("test",fa,fa),window.removeEventListener("test",fa,fa)}catch{Is=!1}var ni=null,Gs=null,Pl=null;function Ch(){if(Pl)return Pl;var e,n=Gs,l=n.length,u,f="value"in ni?ni.value:ni.textContent,d=f.length;for(e=0;e<l&&n[e]===f[e];e++);var v=l-e;for(u=1;u<=v&&n[l-u]===f[d-u];u++);return Pl=f.slice(e,1<u?1-u:void 0)}function Ql(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Xl(){return!0}function Oh(){return!1}function Dt(e){function n(l,u,f,d,v){this._reactName=l,this._targetInst=f,this.type=u,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(l=e[_],this[_]=l?l(d):d[_]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Xl:Oh,this.isPropagationStopped=Oh,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Xl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Xl)},persist:function(){},isPersistent:Xl}),n}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fl=Dt(Ri),ha=g({},Ri,{view:0,detail:0}),$v=Dt(ha),Ps,Qs,da,$l=g({},ha,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==da&&(da&&e.type==="mousemove"?(Ps=e.screenX-da.screenX,Qs=e.screenY-da.screenY):Qs=Ps=0,da=e),Ps)},movementY:function(e){return"movementY"in e?e.movementY:Qs}}),zh=Dt($l),Kv=g({},$l,{dataTransfer:0}),Jv=Dt(Kv),Wv=g({},ha,{relatedTarget:0}),Xs=Dt(Wv),e0=g({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=Dt(e0),n0=g({},Ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),i0=Dt(n0),r0=g({},Ri,{data:0}),Mh=Dt(r0),a0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},l0={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"},u0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=u0[e])?!!n[e]:!1}function Fs(){return s0}var o0=g({},ha,{key:function(e){if(e.key){var n=a0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ql(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?l0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fs,charCode:function(e){return e.type==="keypress"?Ql(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ql(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c0=Dt(o0),f0=g({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rh=Dt(f0),h0=g({},ha,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fs}),d0=Dt(h0),m0=g({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),p0=Dt(m0),g0=g({},$l,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),y0=Dt(g0),v0=g({},Ri,{newState:0,oldState:0}),b0=Dt(v0),x0=[9,13,27,32],$s=Un&&"CompositionEvent"in window,ma=null;Un&&"documentMode"in document&&(ma=document.documentMode);var _0=Un&&"TextEvent"in window&&!ma,Dh=Un&&(!$s||ma&&8<ma&&11>=ma),Nh=" ",jh=!1;function Lh(e,n){switch(e){case"keyup":return x0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function S0(e,n){switch(e){case"compositionend":return Uh(n);case"keypress":return n.which!==32?null:(jh=!0,Nh);case"textInput":return e=n.data,e===Nh&&jh?null:e;default:return null}}function k0(e,n){if(dr)return e==="compositionend"||!$s&&Lh(e,n)?(e=Ch(),Pl=Gs=ni=null,dr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Dh&&n.locale!=="ko"?null:n.data;default:return null}}var T0={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 Bh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!T0[e.type]:n==="textarea"}function Hh(e,n,l,u){fr?hr?hr.push(u):hr=[u]:fr=u,n=Lu(n,"onChange"),0<n.length&&(l=new Fl("onChange","change",null,l,u),e.push({event:l,listeners:n}))}var pa=null,ga=null;function w0(e){bp(e,0)}function Kl(e){var n=oa(e);if(xh(n))return e}function Zh(e,n){if(e==="change")return n}var qh=!1;if(Un){var Ks;if(Un){var Js="oninput"in document;if(!Js){var Vh=document.createElement("div");Vh.setAttribute("oninput","return;"),Js=typeof Vh.oninput=="function"}Ks=Js}else Ks=!1;qh=Ks&&(!document.documentMode||9<document.documentMode)}function Yh(){pa&&(pa.detachEvent("onpropertychange",Ih),ga=pa=null)}function Ih(e){if(e.propertyName==="value"&&Kl(ga)){var n=[];Hh(n,ga,e,Vs(e)),Ah(w0,n)}}function E0(e,n,l){e==="focusin"?(Yh(),pa=n,ga=l,pa.attachEvent("onpropertychange",Ih)):e==="focusout"&&Yh()}function A0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kl(ga)}function C0(e,n){if(e==="click")return Kl(n)}function O0(e,n){if(e==="input"||e==="change")return Kl(n)}function z0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Vt=typeof Object.is=="function"?Object.is:z0;function ya(e,n){if(Vt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),u=Object.keys(n);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var f=l[u];if(!na.call(n,f)||!Vt(e[f],n[f]))return!1}return!0}function Gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ph(e,n){var l=Gh(e);e=0;for(var u;l;){if(l.nodeType===3){if(u=e+l.textContent.length,e<=n&&u>=n)return{node:l,offset:n-e};e=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Gh(l)}}function Qh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Qh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Il(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=Il(e.document)}return n}function Ws(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var M0=Un&&"documentMode"in document&&11>=document.documentMode,mr=null,eo=null,va=null,to=!1;function Fh(e,n,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;to||mr==null||mr!==Il(u)||(u=mr,"selectionStart"in u&&Ws(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),va&&ya(va,u)||(va=u,u=Lu(eo,"onSelect"),0<u.length&&(n=new Fl("onSelect","select",null,n,l),e.push({event:n,listeners:u}),n.target=mr)))}function Di(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var pr={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")},no={},$h={};Un&&($h=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function Ni(e){if(no[e])return no[e];if(!pr[e])return e;var n=pr[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in $h)return no[e]=n[l];return e}var Kh=Ni("animationend"),Jh=Ni("animationiteration"),Wh=Ni("animationstart"),R0=Ni("transitionrun"),D0=Ni("transitionstart"),N0=Ni("transitioncancel"),ed=Ni("transitionend"),td=new Map,io="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(" ");io.push("scrollEnd");function fn(e,n){td.set(e,n),Mi(n,[e])}var nd=new WeakMap;function tn(e,n){if(typeof e=="object"&&e!==null){var l=nd.get(e);return l!==void 0?l:(n={value:e,source:n,stack:vh(n)},nd.set(e,n),n)}return{value:e,source:n,stack:vh(n)}}var nn=[],gr=0,ro=0;function Jl(){for(var e=gr,n=ro=gr=0;n<e;){var l=nn[n];nn[n++]=null;var u=nn[n];nn[n++]=null;var f=nn[n];nn[n++]=null;var d=nn[n];if(nn[n++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}d!==0&&id(l,f,d)}}function Wl(e,n,l,u){nn[gr++]=e,nn[gr++]=n,nn[gr++]=l,nn[gr++]=u,ro|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function ao(e,n,l,u){return Wl(e,n,l,u),eu(e)}function yr(e,n){return Wl(e,null,null,n),eu(e)}function id(e,n,l){e.lanes|=l;var u=e.alternate;u!==null&&(u.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,u=d.alternate,u!==null&&(u.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&n!==null&&(f=31-ve(l),e=d.hiddenUpdates,u=e[f],u===null?e[f]=[n]:u.push(n),n.lane=l|536870912),d):null}function eu(e){if(50<Ya)throw Ya=0,hc=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var vr={};function j0(e,n,l,u){this.tag=e,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=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,n,l,u){return new j0(e,n,l,u)}function lo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bn(e,n){var l=e.alternate;return l===null?(l=Yt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function rd(e,n){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function tu(e,n,l,u,f,d){var v=0;if(u=e,typeof e=="function")lo(e)&&(v=1);else if(typeof e=="string")v=Ub(e,l,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case _e:return e=Yt(31,l,n,f),e.elementType=_e,e.lanes=d,e;case w:return ji(l.children,f,d,n);case M:v=8,f|=24;break;case U:return e=Yt(12,l,n,f|2),e.elementType=U,e.lanes=d,e;case G:return e=Yt(13,l,n,f),e.elementType=G,e.lanes=d,e;case N:return e=Yt(19,l,n,f),e.elementType=N,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:case H:v=10;break e;case P:v=9;break e;case F:v=11;break e;case he:v=14;break e;case Se:v=16,u=null;break e}v=29,l=Error(a(130,e===null?"null":typeof e,"")),u=null}return n=Yt(v,l,n,f),n.elementType=e,n.type=u,n.lanes=d,n}function ji(e,n,l,u){return e=Yt(7,e,u,n),e.lanes=l,e}function uo(e,n,l){return e=Yt(6,e,null,n),e.lanes=l,e}function so(e,n,l){return n=Yt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var br=[],xr=0,nu=null,iu=0,rn=[],an=0,Li=null,Hn=1,Zn="";function Ui(e,n){br[xr++]=iu,br[xr++]=nu,nu=e,iu=n}function ad(e,n,l){rn[an++]=Hn,rn[an++]=Zn,rn[an++]=Li,Li=e;var u=Hn;e=Zn;var f=32-ve(u)-1;u&=~(1<<f),l+=1;var d=32-ve(n)+f;if(30<d){var v=f-f%5;d=(u&(1<<v)-1).toString(32),u>>=v,f-=v,Hn=1<<32-ve(n)+f|l<<f|u,Zn=d+e}else Hn=1<<d|l<<f|u,Zn=e}function oo(e){e.return!==null&&(Ui(e,1),ad(e,1,0))}function co(e){for(;e===nu;)nu=br[--xr],br[xr]=null,iu=br[--xr],br[xr]=null;for(;e===Li;)Li=rn[--an],rn[an]=null,Zn=rn[--an],rn[an]=null,Hn=rn[--an],rn[an]=null}var At=null,tt=null,He=!1,Bi=null,Tn=!1,fo=Error(a(519));function Hi(e){var n=Error(a(418,""));throw _a(tn(n,e)),fo}function ld(e){var n=e.stateNode,l=e.type,u=e.memoizedProps;switch(n[xt]=e,n[Rt]=u,l){case"dialog":Re("cancel",n),Re("close",n);break;case"iframe":case"object":case"embed":Re("load",n);break;case"video":case"audio":for(l=0;l<Ga.length;l++)Re(Ga[l],n);break;case"source":Re("error",n);break;case"img":case"image":case"link":Re("error",n),Re("load",n);break;case"details":Re("toggle",n);break;case"input":Re("invalid",n),_h(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Yl(n);break;case"select":Re("invalid",n);break;case"textarea":Re("invalid",n),kh(n,u.value,u.defaultValue,u.children),Yl(n)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||u.suppressHydrationWarning===!0||kp(n.textContent,l)?(u.popover!=null&&(Re("beforetoggle",n),Re("toggle",n)),u.onScroll!=null&&Re("scroll",n),u.onScrollEnd!=null&&Re("scrollend",n),u.onClick!=null&&(n.onclick=Uu),n=!0):n=!1,n||Hi(e)}function ud(e){for(At=e.return;At;)switch(At.tag){case 5:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:At=At.return}}function ba(e){if(e!==At)return!1;if(!He)return ud(e),He=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Cc(e.type,e.memoizedProps)),l=!l),l&&tt&&Hi(e),ud(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8)if(l=e.data,l==="/$"){if(n===0){tt=dn(e.nextSibling);break e}n--}else l!=="$"&&l!=="$!"&&l!=="$?"||n++;e=e.nextSibling}tt=null}}else n===27?(n=tt,vi(e.type)?(e=Rc,Rc=null,tt=e):tt=n):tt=At?dn(e.stateNode.nextSibling):null;return!0}function xa(){tt=At=null,He=!1}function sd(){var e=Bi;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Bi=null),e}function _a(e){Bi===null?Bi=[e]:Bi.push(e)}var ho=Y(null),Zi=null,qn=null;function ii(e,n,l){k(ho,n._currentValue),n._currentValue=l}function Vn(e){e._currentValue=ho.current,W(ho)}function mo(e,n,l){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===l)break;e=e.return}}function po(e,n,l,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var v=f.child;d=d.firstContext;e:for(;d!==null;){var _=d;d=f;for(var T=0;T<n.length;T++)if(_.context===n[T]){d.lanes|=l,_=d.alternate,_!==null&&(_.lanes|=l),mo(d.return,l,e),u||(v=null);break e}d=_.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(a(341));v.lanes|=l,d=v.alternate,d!==null&&(d.lanes|=l),mo(v,l,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function Sa(e,n,l,u){e=null;for(var f=n,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(a(387));if(v=v.memoizedProps,v!==null){var _=f.type;Vt(f.pendingProps.value,v.value)||(e!==null?e.push(_):e=[_])}}else if(f===ot.current){if(v=f.alternate,v===null)throw Error(a(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ka):e=[Ka])}f=f.return}e!==null&&po(n,e,l,u),n.flags|=262144}function ru(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){Zi=e,qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return od(Zi,e)}function au(e,n){return Zi===null&&qi(e),od(e,n)}function od(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},qn===null){if(e===null)throw Error(a(308));qn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else qn=qn.next=n;return l}var L0=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},U0=t.unstable_scheduleCallback,B0=t.unstable_NormalPriority,ct={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function go(){return{controller:new L0,data:new Map,refCount:0}}function ka(e){e.refCount--,e.refCount===0&&U0(B0,function(){e.controller.abort()})}var Ta=null,yo=0,_r=0,Sr=null;function H0(e,n){if(Ta===null){var l=Ta=[];yo=0,_r=bc(),Sr={status:"pending",value:void 0,then:function(u){l.push(u)}}}return yo++,n.then(cd,cd),n}function cd(){if(--yo===0&&Ta!==null){Sr!==null&&(Sr.status="fulfilled");var e=Ta;Ta=null,_r=0,Sr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Z0(e,n){var l=[],u={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(u.status="rejected",u.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),u}var fd=L.S;L.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&H0(e,n),fd!==null&&fd(e,n)};var Vi=Y(null);function vo(){var e=Vi.current;return e!==null?e:$e.pooledCache}function lu(e,n){n===null?k(Vi,Vi.current):k(Vi,n.pool)}function hd(){var e=vo();return e===null?null:{parent:ct._currentValue,pool:e}}var wa=Error(a(460)),dd=Error(a(474)),uu=Error(a(542)),bo={then:function(){}};function md(e){return e=e.status,e==="fulfilled"||e==="rejected"}function su(){}function pd(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(su,su),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,yd(e),e;default:if(typeof n.status=="string")n.then(su,su);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=u}},function(u){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,yd(e),e}throw Ea=n,wa}}var Ea=null;function gd(){if(Ea===null)throw Error(a(459));var e=Ea;return Ea=null,e}function yd(e){if(e===wa||e===uu)throw Error(a(483))}var ri=!1;function xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _o(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function li(e,n,l){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ve&2)!==0){var f=u.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),u.pending=n,n=eu(e),id(e,null,l),n}return Wl(e,u,n,l),eu(e)}function Aa(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,l|=u,n.lanes=l,ch(e,l)}}function So(e,n){var l=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=v:d=d.next=v,l=l.next}while(l!==null);d===null?f=d=n:d=d.next=n}else f=d=n;l={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var ko=!1;function Ca(){if(ko){var e=Sr;if(e!==null)throw e}}function Oa(e,n,l,u){ko=!1;var f=e.updateQueue;ri=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var T=_,O=T.next;T.next=null,v===null?d=O:v.next=O,v=T;var q=e.alternate;q!==null&&(q=q.updateQueue,_=q.lastBaseUpdate,_!==v&&(_===null?q.firstBaseUpdate=O:_.next=O,q.lastBaseUpdate=T))}if(d!==null){var I=f.baseState;v=0,q=O=T=null,_=d;do{var R=_.lane&-536870913,D=R!==_.lane;if(D?(Ne&R)===R:(u&R)===R){R!==0&&R===_r&&(ko=!0),q!==null&&(q=q.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var be=e,ge=_;R=n;var Qe=l;switch(ge.tag){case 1:if(be=ge.payload,typeof be=="function"){I=be.call(Qe,I,R);break e}I=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=ge.payload,R=typeof be=="function"?be.call(Qe,I,R):be,R==null)break e;I=g({},I,R);break e;case 2:ri=!0}}R=_.callback,R!==null&&(e.flags|=64,D&&(e.flags|=8192),D=f.callbacks,D===null?f.callbacks=[R]:D.push(R))}else D={lane:R,tag:_.tag,payload:_.payload,callback:_.callback,next:null},q===null?(O=q=D,T=I):q=q.next=D,v|=R;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;D=_,_=D.next,D.next=null,f.lastBaseUpdate=D,f.shared.pending=null}}while(!0);q===null&&(T=I),f.baseState=T,f.firstBaseUpdate=O,f.lastBaseUpdate=q,d===null&&(f.shared.lanes=0),mi|=v,e.lanes=v,e.memoizedState=I}}function vd(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function bd(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)vd(l[e],n)}var kr=Y(null),ou=Y(0);function xd(e,n){e=Fn,k(ou,e),k(kr,n),Fn=e|n.baseLanes}function To(){k(ou,Fn),k(kr,kr.current)}function wo(){Fn=ou.current,W(kr),W(ou)}var ui=0,Ce=null,Ge=null,lt=null,cu=!1,Tr=!1,Yi=!1,fu=0,za=0,wr=null,q0=0;function rt(){throw Error(a(321))}function Eo(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Vt(e[l],n[l]))return!1;return!0}function Ao(e,n,l,u,f,d){return ui=d,Ce=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,L.H=e===null||e.memoizedState===null?im:rm,Yi=!1,d=l(u,f),Yi=!1,Tr&&(d=Sd(n,l,u,f)),_d(e),d}function _d(e){L.H=yu;var n=Ge!==null&&Ge.next!==null;if(ui=0,lt=Ge=Ce=null,cu=!1,za=0,wr=null,n)throw Error(a(300));e===null||mt||(e=e.dependencies,e!==null&&ru(e)&&(mt=!0))}function Sd(e,n,l,u){Ce=e;var f=0;do{if(Tr&&(wr=null),za=0,Tr=!1,25<=f)throw Error(a(301));if(f+=1,lt=Ge=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}L.H=X0,d=n(l,u)}while(Tr);return d}function V0(){var e=L.H,n=e.useState()[0];return n=typeof n.then=="function"?Ma(n):n,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(Ce.flags|=1024),n}function Co(){var e=fu!==0;return fu=0,e}function Oo(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function zo(e){if(cu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}cu=!1}ui=0,lt=Ge=Ce=null,Tr=!1,za=fu=0,wr=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ce.memoizedState=lt=e:lt=lt.next=e,lt}function ut(){if(Ge===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var n=lt===null?Ce.memoizedState:lt.next;if(n!==null)lt=n,Ge=e;else{if(e===null)throw Ce.alternate===null?Error(a(467)):Error(a(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},lt===null?Ce.memoizedState=lt=e:lt=lt.next=e}return lt}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ma(e){var n=za;return za+=1,wr===null&&(wr=[]),e=pd(wr,e,n),n=Ce,(lt===null?n.memoizedState:lt.next)===null&&(n=n.alternate,L.H=n===null||n.memoizedState===null?im:rm),e}function hu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ma(e);if(e.$$typeof===H)return _t(e)}throw Error(a(438,String(e)))}function Ro(e){var n=null,l=Ce.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var u=Ce.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Mo(),Ce.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),u=0;u<e;u++)l[u]=j;return n.index++,l}function Yn(e,n){return typeof n=="function"?n(e):n}function du(e){var n=ut();return Do(n,Ge,e)}function Do(e,n,l){var u=e.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var f=e.baseQueue,d=u.pending;if(d!==null){if(f!==null){var v=f.next;f.next=d.next,d.next=v}n.baseQueue=f=d,u.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{n=f.next;var _=v=null,T=null,O=n,q=!1;do{var I=O.lane&-536870913;if(I!==O.lane?(Ne&I)===I:(ui&I)===I){var R=O.revertLane;if(R===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),I===_r&&(q=!0);else if((ui&R)===R){O=O.next,R===_r&&(q=!0);continue}else I={lane:0,revertLane:O.revertLane,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},T===null?(_=T=I,v=d):T=T.next=I,Ce.lanes|=R,mi|=R;I=O.action,Yi&&l(d,I),d=O.hasEagerState?O.eagerState:l(d,I)}else R={lane:I,revertLane:O.revertLane,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},T===null?(_=T=R,v=d):T=T.next=R,Ce.lanes|=I,mi|=I;O=O.next}while(O!==null&&O!==n);if(T===null?v=d:T.next=_,!Vt(d,e.memoizedState)&&(mt=!0,q&&(l=Sr,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=T,u.lastRenderedState=d}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function No(e){var n=ut(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var u=l.dispatch,f=l.pending,d=n.memoizedState;if(f!==null){l.pending=null;var v=f=f.next;do d=e(d,v.action),v=v.next;while(v!==f);Vt(d,n.memoizedState)||(mt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,u]}function kd(e,n,l){var u=Ce,f=ut(),d=He;if(d){if(l===void 0)throw Error(a(407));l=l()}else l=n();var v=!Vt((Ge||f).memoizedState,l);v&&(f.memoizedState=l,mt=!0),f=f.queue;var _=Ed.bind(null,u,f,e);if(Ra(2048,8,_,[e]),f.getSnapshot!==n||v||lt!==null&<.memoizedState.tag&1){if(u.flags|=2048,Er(9,mu(),wd.bind(null,u,f,l,n),null),$e===null)throw Error(a(349));d||(ui&124)!==0||Td(u,n,l)}return l}function Td(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ce.updateQueue,n===null?(n=Mo(),Ce.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function wd(e,n,l,u){n.value=l,n.getSnapshot=u,Ad(n)&&Cd(e)}function Ed(e,n,l){return l(function(){Ad(n)&&Cd(e)})}function Ad(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Vt(e,l)}catch{return!0}}function Cd(e){var n=yr(e,2);n!==null&&Xt(n,e,2)}function jo(e){var n=Nt();if(typeof e=="function"){var l=e;if(e=l(),Yi){me(!0);try{l()}finally{me(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:e},n}function Od(e,n,l,u){return e.baseState=l,Do(e,Ge,typeof u=="function"?u:Yn)}function Y0(e,n,l,u,f){if(gu(e))throw Error(a(485));if(e=n.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};L.T!==null?l(!0):d.isTransition=!1,u(d),l=n.pending,l===null?(d.next=n.pending=d,zd(n,d)):(d.next=l.next,n.pending=l.next=d)}}function zd(e,n){var l=n.action,u=n.payload,f=e.state;if(n.isTransition){var d=L.T,v={};L.T=v;try{var _=l(f,u),T=L.S;T!==null&&T(v,_),Md(e,n,_)}catch(O){Lo(e,n,O)}finally{L.T=d}}else try{d=l(f,u),Md(e,n,d)}catch(O){Lo(e,n,O)}}function Md(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Rd(e,n,u)},function(u){return Lo(e,n,u)}):Rd(e,n,l)}function Rd(e,n,l){n.status="fulfilled",n.value=l,Dd(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,zd(e,l)))}function Lo(e,n,l){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=l,Dd(n),n=n.next;while(n!==u)}e.action=null}function Dd(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Nd(e,n){return n}function jd(e,n){if(He){var l=$e.formState;if(l!==null){e:{var u=Ce;if(He){if(tt){t:{for(var f=tt,d=Tn;f.nodeType!==8;){if(!d){f=null;break t}if(f=dn(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){tt=dn(f.nextSibling),u=f.data==="F!";break e}}Hi(u)}u=!1}u&&(n=l[0])}}return l=Nt(),l.memoizedState=l.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nd,lastRenderedState:n},l.queue=u,l=em.bind(null,Ce,u),u.dispatch=l,u=jo(!1),d=qo.bind(null,Ce,!1,u.queue),u=Nt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,l=Y0.bind(null,Ce,f,d,l),f.dispatch=l,u.memoizedState=e,[n,l,!1]}function Ld(e){var n=ut();return Ud(n,Ge,e)}function Ud(e,n,l){if(n=Do(e,n,Nd)[0],e=du(Yn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Ma(n)}catch(v){throw v===wa?uu:v}else u=n;n=ut();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Ce.flags|=2048,Er(9,mu(),I0.bind(null,f,l),null)),[u,d,e]}function I0(e,n){e.action=n}function Bd(e){var n=ut(),l=Ge;if(l!==null)return Ud(n,l,e);ut(),n=n.memoizedState,l=ut();var u=l.queue.dispatch;return l.memoizedState=e,[n,u,!1]}function Er(e,n,l,u){return e={tag:e,create:l,deps:u,inst:n,next:null},n=Ce.updateQueue,n===null&&(n=Mo(),Ce.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(u=l.next,l.next=e,e.next=u,n.lastEffect=e),e}function mu(){return{destroy:void 0,resource:void 0}}function Hd(){return ut().memoizedState}function pu(e,n,l,u){var f=Nt();u=u===void 0?null:u,Ce.flags|=e,f.memoizedState=Er(1|n,mu(),l,u)}function Ra(e,n,l,u){var f=ut();u=u===void 0?null:u;var d=f.memoizedState.inst;Ge!==null&&u!==null&&Eo(u,Ge.memoizedState.deps)?f.memoizedState=Er(n,d,l,u):(Ce.flags|=e,f.memoizedState=Er(1|n,d,l,u))}function Zd(e,n){pu(8390656,8,e,n)}function qd(e,n){Ra(2048,8,e,n)}function Vd(e,n){return Ra(4,2,e,n)}function Yd(e,n){return Ra(4,4,e,n)}function Id(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Gd(e,n,l){l=l!=null?l.concat([e]):null,Ra(4,4,Id.bind(null,n,e),l)}function Uo(){}function Pd(e,n){var l=ut();n=n===void 0?null:n;var u=l.memoizedState;return n!==null&&Eo(n,u[1])?u[0]:(l.memoizedState=[e,n],e)}function Qd(e,n){var l=ut();n=n===void 0?null:n;var u=l.memoizedState;if(n!==null&&Eo(n,u[1]))return u[0];if(u=e(),Yi){me(!0);try{e()}finally{me(!1)}}return l.memoizedState=[u,n],u}function Bo(e,n,l){return l===void 0||(ui&1073741824)!==0?e.memoizedState=n:(e.memoizedState=l,e=$m(),Ce.lanes|=e,mi|=e,l)}function Xd(e,n,l,u){return Vt(l,n)?l:kr.current!==null?(e=Bo(e,l,u),Vt(e,n)||(mt=!0),e):(ui&42)===0?(mt=!0,e.memoizedState=l):(e=$m(),Ce.lanes|=e,mi|=e,n)}function Fd(e,n,l,u,f){var d=J.p;J.p=d!==0&&8>d?d:8;var v=L.T,_={};L.T=_,qo(e,!1,n,l);try{var T=f(),O=L.S;if(O!==null&&O(_,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var q=Z0(T,u);Da(e,n,q,Qt(e))}else Da(e,n,u,Qt(e))}catch(I){Da(e,n,{then:function(){},status:"rejected",reason:I},Qt())}finally{J.p=d,L.T=v}}function G0(){}function Ho(e,n,l,u){if(e.tag!==5)throw Error(a(476));var f=$d(e).queue;Fd(e,f,n,ce,l===null?G0:function(){return Kd(e),l(u)})}function $d(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:ce},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Kd(e){var n=$d(e).next.queue;Da(e,n,{},Qt())}function Zo(){return _t(Ka)}function Jd(){return ut().memoizedState}function Wd(){return ut().memoizedState}function P0(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=Qt();e=ai(l);var u=li(n,e,l);u!==null&&(Xt(u,n,l),Aa(u,n,l)),n={cache:go()},e.payload=n;return}n=n.return}}function Q0(e,n,l){var u=Qt();l={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},gu(e)?tm(n,l):(l=ao(e,n,l,u),l!==null&&(Xt(l,e,u),nm(l,n,u)))}function em(e,n,l){var u=Qt();Da(e,n,l,u)}function Da(e,n,l,u){var f={lane:u,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(gu(e))tm(n,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,_=d(v,l);if(f.hasEagerState=!0,f.eagerState=_,Vt(_,v))return Wl(e,n,f,0),$e===null&&Jl(),!1}catch{}finally{}if(l=ao(e,n,f,u),l!==null)return Xt(l,e,u),nm(l,n,u),!0}return!1}function qo(e,n,l,u){if(u={lane:2,revertLane:bc(),action:u,hasEagerState:!1,eagerState:null,next:null},gu(e)){if(n)throw Error(a(479))}else n=ao(e,l,u,2),n!==null&&Xt(n,e,2)}function gu(e){var n=e.alternate;return e===Ce||n!==null&&n===Ce}function tm(e,n){Tr=cu=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function nm(e,n,l){if((l&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,l|=u,n.lanes=l,ch(e,l)}}var yu={readContext:_t,use:hu,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt},im={readContext:_t,use:hu,useCallback:function(e,n){return Nt().memoizedState=[e,n===void 0?null:n],e},useContext:_t,useEffect:Zd,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,pu(4194308,4,Id.bind(null,n,e),l)},useLayoutEffect:function(e,n){return pu(4194308,4,e,n)},useInsertionEffect:function(e,n){pu(4,2,e,n)},useMemo:function(e,n){var l=Nt();n=n===void 0?null:n;var u=e();if(Yi){me(!0);try{e()}finally{me(!1)}}return l.memoizedState=[u,n],u},useReducer:function(e,n,l){var u=Nt();if(l!==void 0){var f=l(n);if(Yi){me(!0);try{l(n)}finally{me(!1)}}}else f=n;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=Q0.bind(null,Ce,e),[u.memoizedState,e]},useRef:function(e){var n=Nt();return e={current:e},n.memoizedState=e},useState:function(e){e=jo(e);var n=e.queue,l=em.bind(null,Ce,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Uo,useDeferredValue:function(e,n){var l=Nt();return Bo(l,e,n)},useTransition:function(){var e=jo(!1);return e=Fd.bind(null,Ce,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var u=Ce,f=Nt();if(He){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),$e===null)throw Error(a(349));(Ne&124)!==0||Td(u,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,Zd(Ed.bind(null,u,d,e),[e]),u.flags|=2048,Er(9,mu(),wd.bind(null,u,d,l,n),null),l},useId:function(){var e=Nt(),n=$e.identifierPrefix;if(He){var l=Zn,u=Hn;l=(u&~(1<<32-ve(u)-1)).toString(32)+l,n="«"+n+"R"+l,l=fu++,0<l&&(n+="H"+l.toString(32)),n+="»"}else l=q0++,n="«"+n+"r"+l.toString(32)+"»";return e.memoizedState=n},useHostTransitionStatus:Zo,useFormState:jd,useActionState:jd,useOptimistic:function(e){var n=Nt();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=qo.bind(null,Ce,!0,l),l.dispatch=n,[e,n]},useMemoCache:Ro,useCacheRefresh:function(){return Nt().memoizedState=P0.bind(null,Ce)}},rm={readContext:_t,use:hu,useCallback:Pd,useContext:_t,useEffect:qd,useImperativeHandle:Gd,useInsertionEffect:Vd,useLayoutEffect:Yd,useMemo:Qd,useReducer:du,useRef:Hd,useState:function(){return du(Yn)},useDebugValue:Uo,useDeferredValue:function(e,n){var l=ut();return Xd(l,Ge.memoizedState,e,n)},useTransition:function(){var e=du(Yn)[0],n=ut().memoizedState;return[typeof e=="boolean"?e:Ma(e),n]},useSyncExternalStore:kd,useId:Jd,useHostTransitionStatus:Zo,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,n){var l=ut();return Od(l,Ge,e,n)},useMemoCache:Ro,useCacheRefresh:Wd},X0={readContext:_t,use:hu,useCallback:Pd,useContext:_t,useEffect:qd,useImperativeHandle:Gd,useInsertionEffect:Vd,useLayoutEffect:Yd,useMemo:Qd,useReducer:No,useRef:Hd,useState:function(){return No(Yn)},useDebugValue:Uo,useDeferredValue:function(e,n){var l=ut();return Ge===null?Bo(l,e,n):Xd(l,Ge.memoizedState,e,n)},useTransition:function(){var e=No(Yn)[0],n=ut().memoizedState;return[typeof e=="boolean"?e:Ma(e),n]},useSyncExternalStore:kd,useId:Jd,useHostTransitionStatus:Zo,useFormState:Bd,useActionState:Bd,useOptimistic:function(e,n){var l=ut();return Ge!==null?Od(l,Ge,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Ro,useCacheRefresh:Wd},Ar=null,Na=0;function vu(e){var n=Na;return Na+=1,Ar===null&&(Ar=[]),pd(Ar,e,n)}function ja(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function bu(e,n){throw n.$$typeof===y?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function am(e){var n=e._init;return n(e._payload)}function lm(e){function n(A,E){if(e){var C=A.deletions;C===null?(A.deletions=[E],A.flags|=16):C.push(E)}}function l(A,E){if(!e)return null;for(;E!==null;)n(A,E),E=E.sibling;return null}function u(A){for(var E=new Map;A!==null;)A.key!==null?E.set(A.key,A):E.set(A.index,A),A=A.sibling;return E}function f(A,E){return A=Bn(A,E),A.index=0,A.sibling=null,A}function d(A,E,C){return A.index=C,e?(C=A.alternate,C!==null?(C=C.index,C<E?(A.flags|=67108866,E):C):(A.flags|=67108866,E)):(A.flags|=1048576,E)}function v(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function _(A,E,C,V){return E===null||E.tag!==6?(E=uo(C,A.mode,V),E.return=A,E):(E=f(E,C),E.return=A,E)}function T(A,E,C,V){var ae=C.type;return ae===w?q(A,E,C.props.children,V,C.key):E!==null&&(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Se&&am(ae)===E.type)?(E=f(E,C.props),ja(E,C),E.return=A,E):(E=tu(C.type,C.key,C.props,null,A.mode,V),ja(E,C),E.return=A,E)}function O(A,E,C,V){return E===null||E.tag!==4||E.stateNode.containerInfo!==C.containerInfo||E.stateNode.implementation!==C.implementation?(E=so(C,A.mode,V),E.return=A,E):(E=f(E,C.children||[]),E.return=A,E)}function q(A,E,C,V,ae){return E===null||E.tag!==7?(E=ji(C,A.mode,V,ae),E.return=A,E):(E=f(E,C),E.return=A,E)}function I(A,E,C){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=uo(""+E,A.mode,C),E.return=A,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case x:return C=tu(E.type,E.key,E.props,null,A.mode,C),ja(C,E),C.return=A,C;case S:return E=so(E,A.mode,C),E.return=A,E;case Se:var V=E._init;return E=V(E._payload),I(A,E,C)}if(se(E)||te(E))return E=ji(E,A.mode,C,null),E.return=A,E;if(typeof E.then=="function")return I(A,vu(E),C);if(E.$$typeof===H)return I(A,au(A,E),C);bu(A,E)}return null}function R(A,E,C,V){var ae=E!==null?E.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ae!==null?null:_(A,E,""+C,V);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case x:return C.key===ae?T(A,E,C,V):null;case S:return C.key===ae?O(A,E,C,V):null;case Se:return ae=C._init,C=ae(C._payload),R(A,E,C,V)}if(se(C)||te(C))return ae!==null?null:q(A,E,C,V,null);if(typeof C.then=="function")return R(A,E,vu(C),V);if(C.$$typeof===H)return R(A,E,au(A,C),V);bu(A,C)}return null}function D(A,E,C,V,ae){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return A=A.get(C)||null,_(E,A,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case x:return A=A.get(V.key===null?C:V.key)||null,T(E,A,V,ae);case S:return A=A.get(V.key===null?C:V.key)||null,O(E,A,V,ae);case Se:var Oe=V._init;return V=Oe(V._payload),D(A,E,C,V,ae)}if(se(V)||te(V))return A=A.get(C)||null,q(E,A,V,ae,null);if(typeof V.then=="function")return D(A,E,C,vu(V),ae);if(V.$$typeof===H)return D(A,E,C,au(E,V),ae);bu(E,V)}return null}function be(A,E,C,V){for(var ae=null,Oe=null,de=E,ye=E=0,gt=null;de!==null&&ye<C.length;ye++){de.index>ye?(gt=de,de=null):gt=de.sibling;var Be=R(A,de,C[ye],V);if(Be===null){de===null&&(de=gt);break}e&&de&&Be.alternate===null&&n(A,de),E=d(Be,E,ye),Oe===null?ae=Be:Oe.sibling=Be,Oe=Be,de=gt}if(ye===C.length)return l(A,de),He&&Ui(A,ye),ae;if(de===null){for(;ye<C.length;ye++)de=I(A,C[ye],V),de!==null&&(E=d(de,E,ye),Oe===null?ae=de:Oe.sibling=de,Oe=de);return He&&Ui(A,ye),ae}for(de=u(de);ye<C.length;ye++)gt=D(de,A,ye,C[ye],V),gt!==null&&(e&>.alternate!==null&&de.delete(gt.key===null?ye:gt.key),E=d(gt,E,ye),Oe===null?ae=gt:Oe.sibling=gt,Oe=gt);return e&&de.forEach(function(ki){return n(A,ki)}),He&&Ui(A,ye),ae}function ge(A,E,C,V){if(C==null)throw Error(a(151));for(var ae=null,Oe=null,de=E,ye=E=0,gt=null,Be=C.next();de!==null&&!Be.done;ye++,Be=C.next()){de.index>ye?(gt=de,de=null):gt=de.sibling;var ki=R(A,de,Be.value,V);if(ki===null){de===null&&(de=gt);break}e&&de&&ki.alternate===null&&n(A,de),E=d(ki,E,ye),Oe===null?ae=ki:Oe.sibling=ki,Oe=ki,de=gt}if(Be.done)return l(A,de),He&&Ui(A,ye),ae;if(de===null){for(;!Be.done;ye++,Be=C.next())Be=I(A,Be.value,V),Be!==null&&(E=d(Be,E,ye),Oe===null?ae=Be:Oe.sibling=Be,Oe=Be);return He&&Ui(A,ye),ae}for(de=u(de);!Be.done;ye++,Be=C.next())Be=D(de,A,ye,Be.value,V),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?ye:Be.key),E=d(Be,E,ye),Oe===null?ae=Be:Oe.sibling=Be,Oe=Be);return e&&de.forEach(function(Fb){return n(A,Fb)}),He&&Ui(A,ye),ae}function Qe(A,E,C,V){if(typeof C=="object"&&C!==null&&C.type===w&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case x:e:{for(var ae=C.key;E!==null;){if(E.key===ae){if(ae=C.type,ae===w){if(E.tag===7){l(A,E.sibling),V=f(E,C.props.children),V.return=A,A=V;break e}}else if(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Se&&am(ae)===E.type){l(A,E.sibling),V=f(E,C.props),ja(V,C),V.return=A,A=V;break e}l(A,E);break}else n(A,E);E=E.sibling}C.type===w?(V=ji(C.props.children,A.mode,V,C.key),V.return=A,A=V):(V=tu(C.type,C.key,C.props,null,A.mode,V),ja(V,C),V.return=A,A=V)}return v(A);case S:e:{for(ae=C.key;E!==null;){if(E.key===ae)if(E.tag===4&&E.stateNode.containerInfo===C.containerInfo&&E.stateNode.implementation===C.implementation){l(A,E.sibling),V=f(E,C.children||[]),V.return=A,A=V;break e}else{l(A,E);break}else n(A,E);E=E.sibling}V=so(C,A.mode,V),V.return=A,A=V}return v(A);case Se:return ae=C._init,C=ae(C._payload),Qe(A,E,C,V)}if(se(C))return be(A,E,C,V);if(te(C)){if(ae=te(C),typeof ae!="function")throw Error(a(150));return C=ae.call(C),ge(A,E,C,V)}if(typeof C.then=="function")return Qe(A,E,vu(C),V);if(C.$$typeof===H)return Qe(A,E,au(A,C),V);bu(A,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,E!==null&&E.tag===6?(l(A,E.sibling),V=f(E,C),V.return=A,A=V):(l(A,E),V=uo(C,A.mode,V),V.return=A,A=V),v(A)):l(A,E)}return function(A,E,C,V){try{Na=0;var ae=Qe(A,E,C,V);return Ar=null,ae}catch(de){if(de===wa||de===uu)throw de;var Oe=Yt(29,de,null,A.mode);return Oe.lanes=V,Oe.return=A,Oe}finally{}}}var Cr=lm(!0),um=lm(!1),ln=Y(null),wn=null;function si(e){var n=e.alternate;k(ft,ft.current&1),k(ln,e),wn===null&&(n===null||kr.current!==null||n.memoizedState!==null)&&(wn=e)}function sm(e){if(e.tag===22){if(k(ft,ft.current),k(ln,e),wn===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(wn=e)}}else oi()}function oi(){k(ft,ft.current),k(ln,ln.current)}function In(e){W(ln),wn===e&&(wn=null),W(ft)}var ft=Y(0);function xu(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Mc(l)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Vo(e,n,l,u){n=e.memoizedState,l=l(u,n),l=l==null?n:g({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Yo={enqueueSetState:function(e,n,l){e=e._reactInternals;var u=Qt(),f=ai(u);f.payload=n,l!=null&&(f.callback=l),n=li(e,f,u),n!==null&&(Xt(n,e,u),Aa(n,e,u))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var u=Qt(),f=ai(u);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=li(e,f,u),n!==null&&(Xt(n,e,u),Aa(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=Qt(),u=ai(l);u.tag=2,n!=null&&(u.callback=n),n=li(e,u,l),n!==null&&(Xt(n,e,l),Aa(n,e,l))}};function om(e,n,l,u,f,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,v):n.prototype&&n.prototype.isPureReactComponent?!ya(l,u)||!ya(f,d):!0}function cm(e,n,l,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,u),n.state!==e&&Yo.enqueueReplaceState(n,n.state,null)}function Ii(e,n){var l=n;if("ref"in n){l={};for(var u in n)u!=="ref"&&(l[u]=n[u])}if(e=e.defaultProps){l===n&&(l=g({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}var _u=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function fm(e){_u(e)}function hm(e){console.error(e)}function dm(e){_u(e)}function Su(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function mm(e,n,l){try{var u=e.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Io(e,n,l){return l=ai(l),l.tag=3,l.payload={element:null},l.callback=function(){Su(e,n)},l}function pm(e){return e=ai(e),e.tag=3,e}function gm(e,n,l,u){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=u.value;e.payload=function(){return f(d)},e.callback=function(){mm(n,l,u)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){mm(n,l,u),typeof f!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function F0(e,n,l,u,f){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=l.alternate,n!==null&&Sa(n,l,f,!0),l=ln.current,l!==null){switch(l.tag){case 13:return wn===null?mc():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,u===bo?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([u]):n.add(u),gc(e,u,f)),!1;case 22:return l.flags|=65536,u===bo?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([u]):l.add(u)),gc(e,u,f)),!1}throw Error(a(435,l.tag))}return gc(e,u,f),mc(),!1}if(He)return n=ln.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==fo&&(e=Error(a(422),{cause:u}),_a(tn(e,l)))):(u!==fo&&(n=Error(a(423),{cause:u}),_a(tn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=tn(u,l),f=Io(e.stateNode,u,f),So(e,f),nt!==4&&(nt=2)),!1;var d=Error(a(520),{cause:u});if(d=tn(d,l),Va===null?Va=[d]:Va.push(d),nt!==4&&(nt=2),n===null)return!0;u=tn(u,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Io(l.stateNode,u,e),So(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(pi===null||!pi.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=pm(f),gm(f,e,l,u),So(l,f),!1}l=l.return}while(l!==null);return!1}var ym=Error(a(461)),mt=!1;function yt(e,n,l,u){n.child=e===null?um(n,null,l,u):Cr(n,e.child,l,u)}function vm(e,n,l,u,f){l=l.render;var d=n.ref;if("ref"in u){var v={};for(var _ in u)_!=="ref"&&(v[_]=u[_])}else v=u;return qi(n),u=Ao(e,n,l,v,d,f),_=Co(),e!==null&&!mt?(Oo(e,n,f),Gn(e,n,f)):(He&&_&&oo(n),n.flags|=1,yt(e,n,u,f),n.child)}function bm(e,n,l,u,f){if(e===null){var d=l.type;return typeof d=="function"&&!lo(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,xm(e,n,d,u,f)):(e=tu(l.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!Jo(e,f)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:ya,l(v,u)&&e.ref===n.ref)return Gn(e,n,f)}return n.flags|=1,e=Bn(d,u),e.ref=n.ref,e.return=n,n.child=e}function xm(e,n,l,u,f){if(e!==null){var d=e.memoizedProps;if(ya(d,u)&&e.ref===n.ref)if(mt=!1,n.pendingProps=u=d,Jo(e,f))(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,Gn(e,n,f)}return Go(e,n,l,u,f)}function _m(e,n,l){var u=n.pendingProps,f=u.children,d=e!==null?e.memoizedState:null;if(u.mode==="hidden"){if((n.flags&128)!==0){if(u=d!==null?d.baseLanes|l:l,e!==null){for(f=n.child=e.child,d=0;f!==null;)d=d|f.lanes|f.childLanes,f=f.sibling;n.childLanes=d&~u}else n.childLanes=0,n.child=null;return Sm(e,n,u,l)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&lu(n,d!==null?d.cachePool:null),d!==null?xd(n,d):To(),sm(n);else return n.lanes=n.childLanes=536870912,Sm(e,n,d!==null?d.baseLanes|l:l,l)}else d!==null?(lu(n,d.cachePool),xd(n,d),oi(),n.memoizedState=null):(e!==null&&lu(n,null),To(),oi());return yt(e,n,f,l),n.child}function Sm(e,n,l,u){var f=vo();return f=f===null?null:{parent:ct._currentValue,pool:f},n.memoizedState={baseLanes:l,cachePool:f},e!==null&&lu(n,null),To(),sm(n),e!==null&&Sa(e,n,u,!0),null}function ku(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function Go(e,n,l,u,f){return qi(n),l=Ao(e,n,l,u,void 0,f),u=Co(),e!==null&&!mt?(Oo(e,n,f),Gn(e,n,f)):(He&&u&&oo(n),n.flags|=1,yt(e,n,l,f),n.child)}function km(e,n,l,u,f,d){return qi(n),n.updateQueue=null,l=Sd(n,u,l,f),_d(e),u=Co(),e!==null&&!mt?(Oo(e,n,d),Gn(e,n,d)):(He&&u&&oo(n),n.flags|=1,yt(e,n,l,d),n.child)}function Tm(e,n,l,u,f){if(qi(n),n.stateNode===null){var d=vr,v=l.contextType;typeof v=="object"&&v!==null&&(d=_t(v)),d=new l(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Yo,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},xo(n),v=l.contextType,d.context=typeof v=="object"&&v!==null?_t(v):vr,d.state=n.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(Vo(n,l,v,u),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Yo.enqueueReplaceState(d,d.state,null),Oa(n,u,d,f),Ca(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var _=n.memoizedProps,T=Ii(l,_);d.props=T;var O=d.context,q=l.contextType;v=vr,typeof q=="object"&&q!==null&&(v=_t(q));var I=l.getDerivedStateFromProps;q=typeof I=="function"||typeof d.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,q||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(_||O!==v)&&cm(n,d,u,v),ri=!1;var R=n.memoizedState;d.state=R,Oa(n,u,d,f),Ca(),O=n.memoizedState,_||R!==O||ri?(typeof I=="function"&&(Vo(n,l,I,u),O=n.memoizedState),(T=ri||om(n,l,T,u,R,O,v))?(q||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=O),d.props=u,d.state=O,d.context=v,u=T):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,_o(e,n),v=n.memoizedProps,q=Ii(l,v),d.props=q,I=n.pendingProps,R=d.context,O=l.contextType,T=vr,typeof O=="object"&&O!==null&&(T=_t(O)),_=l.getDerivedStateFromProps,(O=typeof _=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==I||R!==T)&&cm(n,d,u,T),ri=!1,R=n.memoizedState,d.state=R,Oa(n,u,d,f),Ca();var D=n.memoizedState;v!==I||R!==D||ri||e!==null&&e.dependencies!==null&&ru(e.dependencies)?(typeof _=="function"&&(Vo(n,l,_,u),D=n.memoizedState),(q=ri||om(n,l,q,u,R,D,T)||e!==null&&e.dependencies!==null&&ru(e.dependencies))?(O||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,D,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,D,T)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=D),d.props=u,d.state=D,d.context=T,u=q):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&R===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,ku(e,n),u=(n.flags&128)!==0,d||u?(d=n.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&u?(n.child=Cr(n,e.child,null,f),n.child=Cr(n,null,l,f)):yt(e,n,l,f),n.memoizedState=d.state,e=n.child):e=Gn(e,n,f),e}function wm(e,n,l,u){return xa(),n.flags|=256,yt(e,n,l,u),n.child}var Po={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qo(e){return{baseLanes:e,cachePool:hd()}}function Xo(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=un),e}function Em(e,n,l){var u=n.pendingProps,f=!1,d=(n.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(He){if(f?si(n):oi(),He){var _=tt,T;if(T=_){e:{for(T=_,_=Tn;T.nodeType!==8;){if(!_){_=null;break e}if(T=dn(T.nextSibling),T===null){_=null;break e}}_=T}_!==null?(n.memoizedState={dehydrated:_,treeContext:Li!==null?{id:Hn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},T=Yt(18,null,null,0),T.stateNode=_,T.return=n,n.child=T,At=n,tt=null,T=!0):T=!1}T||Hi(n)}if(_=n.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Mc(_)?n.lanes=32:n.lanes=536870912,null;In(n)}return _=u.children,u=u.fallback,f?(oi(),f=n.mode,_=Tu({mode:"hidden",children:_},f),u=ji(u,f,l,null),_.return=n,u.return=n,_.sibling=u,n.child=_,f=n.child,f.memoizedState=Qo(l),f.childLanes=Xo(e,v,l),n.memoizedState=Po,u):(si(n),Fo(n,_))}if(T=e.memoizedState,T!==null&&(_=T.dehydrated,_!==null)){if(d)n.flags&256?(si(n),n.flags&=-257,n=$o(e,n,l)):n.memoizedState!==null?(oi(),n.child=e.child,n.flags|=128,n=null):(oi(),f=u.fallback,_=n.mode,u=Tu({mode:"visible",children:u.children},_),f=ji(f,_,l,null),f.flags|=2,u.return=n,f.return=n,u.sibling=f,n.child=u,Cr(n,e.child,null,l),u=n.child,u.memoizedState=Qo(l),u.childLanes=Xo(e,v,l),n.memoizedState=Po,n=f);else if(si(n),Mc(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var O=v.dgst;v=O,u=Error(a(419)),u.stack="",u.digest=v,_a({value:u,source:null,stack:null}),n=$o(e,n,l)}else if(mt||Sa(e,n,l,!1),v=(l&e.childLanes)!==0,mt||v){if(v=$e,v!==null&&(u=l&-l,u=(u&42)!==0?1:Ms(u),u=(u&(v.suspendedLanes|l))!==0?0:u,u!==0&&u!==T.retryLane))throw T.retryLane=u,yr(e,u),Xt(v,e,u),ym;_.data==="$?"||mc(),n=$o(e,n,l)}else _.data==="$?"?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,tt=dn(_.nextSibling),At=n,He=!0,Bi=null,Tn=!1,e!==null&&(rn[an++]=Hn,rn[an++]=Zn,rn[an++]=Li,Hn=e.id,Zn=e.overflow,Li=n),n=Fo(n,u.children),n.flags|=4096);return n}return f?(oi(),f=u.fallback,_=n.mode,T=e.child,O=T.sibling,u=Bn(T,{mode:"hidden",children:u.children}),u.subtreeFlags=T.subtreeFlags&65011712,O!==null?f=Bn(O,f):(f=ji(f,_,l,null),f.flags|=2),f.return=n,u.return=n,u.sibling=f,n.child=u,u=f,f=n.child,_=e.child.memoizedState,_===null?_=Qo(l):(T=_.cachePool,T!==null?(O=ct._currentValue,T=T.parent!==O?{parent:O,pool:O}:T):T=hd(),_={baseLanes:_.baseLanes|l,cachePool:T}),f.memoizedState=_,f.childLanes=Xo(e,v,l),n.memoizedState=Po,u):(si(n),l=e.child,e=l.sibling,l=Bn(l,{mode:"visible",children:u.children}),l.return=n,l.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=l,n.memoizedState=null,l)}function Fo(e,n){return n=Tu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Tu(e,n){return e=Yt(22,e,null,n),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function $o(e,n,l){return Cr(n,e.child,null,l),e=Fo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Am(e,n,l){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),mo(e.return,n,l)}function Ko(e,n,l,u,f){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:f}:(d.isBackwards=n,d.rendering=null,d.renderingStartTime=0,d.last=u,d.tail=l,d.tailMode=f)}function Cm(e,n,l){var u=n.pendingProps,f=u.revealOrder,d=u.tail;if(yt(e,n,u.children,l),u=ft.current,(u&2)!==0)u=u&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Am(e,l,n);else if(e.tag===19)Am(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=1}switch(k(ft,u),f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&xu(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),Ko(n,!1,f,l,d);break;case"backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&xu(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Ko(n,!0,l,null,d);break;case"together":Ko(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Gn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),mi|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Sa(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,l=Bn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Bn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function Jo(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ru(e)))}function $0(e,n,l){switch(n.tag){case 3:Ue(n,n.stateNode.containerInfo),ii(n,ct,e.memoizedState.cache),xa();break;case 27:case 5:Sn(n);break;case 4:Ue(n,n.stateNode.containerInfo);break;case 10:ii(n,n.type,n.memoizedProps.value);break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(si(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Em(e,n,l):(si(n),e=Gn(e,n,l),e!==null?e.sibling:null);si(n);break;case 19:var f=(e.flags&128)!==0;if(u=(l&n.childLanes)!==0,u||(Sa(e,n,l,!1),u=(l&n.childLanes)!==0),f){if(u)return Cm(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),k(ft,ft.current),u)break;return null;case 22:case 23:return n.lanes=0,_m(e,n,l);case 24:ii(n,ct,e.memoizedState.cache)}return Gn(e,n,l)}function Om(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)mt=!0;else{if(!Jo(e,l)&&(n.flags&128)===0)return mt=!1,$0(e,n,l);mt=(e.flags&131072)!==0}else mt=!1,He&&(n.flags&1048576)!==0&&ad(n,iu,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var u=n.elementType,f=u._init;if(u=f(u._payload),n.type=u,typeof u=="function")lo(u)?(e=Ii(u,e),n.tag=1,n=Tm(null,n,u,e,l)):(n.tag=0,n=Go(null,n,u,e,l));else{if(u!=null){if(f=u.$$typeof,f===F){n.tag=11,n=vm(null,n,u,e,l);break e}else if(f===he){n.tag=14,n=bm(null,n,u,e,l);break e}}throw n=ie(u)||u,Error(a(306,n,""))}}return n;case 0:return Go(e,n,n.type,n.pendingProps,l);case 1:return u=n.type,f=Ii(u,n.pendingProps),Tm(e,n,u,f,l);case 3:e:{if(Ue(n,n.stateNode.containerInfo),e===null)throw Error(a(387));u=n.pendingProps;var d=n.memoizedState;f=d.element,_o(e,n),Oa(n,u,null,l);var v=n.memoizedState;if(u=v.cache,ii(n,ct,u),u!==d.cache&&po(n,[ct],l,!0),Ca(),u=v.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=wm(e,n,u,l);break e}else if(u!==f){f=tn(Error(a(424)),n),_a(f),n=wm(e,n,u,l);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(tt=dn(e.firstChild),At=n,He=!0,Bi=null,Tn=!0,l=um(n,null,u,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(xa(),u===f){n=Gn(e,n,l);break e}yt(e,n,u,l)}n=n.child}return n;case 26:return ku(e,n),e===null?(l=Dp(n.type,null,n.pendingProps,null))?n.memoizedState=l:He||(l=n.type,e=n.pendingProps,u=Bu(oe.current).createElement(l),u[xt]=n,u[Rt]=e,bt(u,l,e),dt(u),n.stateNode=u):n.memoizedState=Dp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Sn(n),e===null&&He&&(u=n.stateNode=zp(n.type,n.pendingProps,oe.current),At=n,Tn=!0,f=tt,vi(n.type)?(Rc=f,tt=dn(u.firstChild)):tt=f),yt(e,n,n.pendingProps.children,l),ku(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&He&&((f=u=tt)&&(u=Tb(u,n.type,n.pendingProps,Tn),u!==null?(n.stateNode=u,At=n,tt=dn(u.firstChild),Tn=!1,f=!0):f=!1),f||Hi(n)),Sn(n),f=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,u=d.children,Cc(f,d)?u=null:v!==null&&Cc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Ao(e,n,V0,null,null,l),Ka._currentValue=f),ku(e,n),yt(e,n,u,l),n.child;case 6:return e===null&&He&&((e=l=tt)&&(l=wb(l,n.pendingProps,Tn),l!==null?(n.stateNode=l,At=n,tt=null,e=!0):e=!1),e||Hi(n)),null;case 13:return Em(e,n,l);case 4:return Ue(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Cr(n,null,u,l):yt(e,n,u,l),n.child;case 11:return vm(e,n,n.type,n.pendingProps,l);case 7:return yt(e,n,n.pendingProps,l),n.child;case 8:return yt(e,n,n.pendingProps.children,l),n.child;case 12:return yt(e,n,n.pendingProps.children,l),n.child;case 10:return u=n.pendingProps,ii(n,n.type,u.value),yt(e,n,u.children,l),n.child;case 9:return f=n.type._context,u=n.pendingProps.children,qi(n),f=_t(f),u=u(f),n.flags|=1,yt(e,n,u,l),n.child;case 14:return bm(e,n,n.type,n.pendingProps,l);case 15:return xm(e,n,n.type,n.pendingProps,l);case 19:return Cm(e,n,l);case 31:return u=n.pendingProps,l=n.mode,u={mode:u.mode,children:u.children},e===null?(l=Tu(u,l),l.ref=n.ref,n.child=l,l.return=n,n=l):(l=Bn(e.child,u),l.ref=n.ref,n.child=l,l.return=n,n=l),n;case 22:return _m(e,n,l);case 24:return qi(n),u=_t(ct),e===null?(f=vo(),f===null&&(f=$e,d=go(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:u,cache:f},xo(n),ii(n,ct,f)):((e.lanes&l)!==0&&(_o(e,n),Oa(n,null,null,l),Ca()),f=e.memoizedState,d=n.memoizedState,f.parent!==u?(f={parent:u,cache:u},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),ii(n,ct,u)):(u=d.cache,ii(n,ct,u),u!==f.cache&&po(n,[ct],l,!0))),yt(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function Pn(e){e.flags|=4}function zm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Bp(n)){if(n=ln.current,n!==null&&((Ne&4194048)===Ne?wn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||n!==wn))throw Ea=bo,dd;e.flags|=8192}}function wu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?sh():536870912,e.lanes|=n,Rr|=n)}function La(e,n){if(!He)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function We(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,u=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=l,n}function K0(e,n,l){var u=n.pendingProps;switch(co(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(n),null;case 1:return We(n),null;case 3:return l=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Vn(ct),Et(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ba(n)?Pn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,sd())),We(n),null;case 26:return l=n.memoizedState,e===null?(Pn(n),l!==null?(We(n),zm(n,l)):(We(n),n.flags&=-16777217)):l?l!==e.memoizedState?(Pn(n),We(n),zm(n,l)):(We(n),n.flags&=-16777217):(e.memoizedProps!==u&&Pn(n),We(n),n.flags&=-16777217),null;case 27:Nn(n),l=oe.current;var f=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return We(n),null}e=ue.current,ba(n)?ld(n):(e=zp(f,u,l),n.stateNode=e,Pn(n))}return We(n),null;case 5:if(Nn(n),l=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return We(n),null}if(e=ue.current,ba(n))ld(n);else{switch(f=Bu(oe.current),e){case 1:e=f.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:e=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":e=f.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":e=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof u.is=="string"?f.createElement("select",{is:u.is}):f.createElement("select"),u.multiple?e.multiple=!0:u.size&&(e.size=u.size);break;default:e=typeof u.is=="string"?f.createElement(l,{is:u.is}):f.createElement(l)}}e[xt]=n,e[Rt]=u;e:for(f=n.child;f!==null;){if(f.tag===5||f.tag===6)e.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===n)break e;for(;f.sibling===null;){if(f.return===null||f.return===n)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}n.stateNode=e;e:switch(bt(e,l,u),l){case"button":case"input":case"select":case"textarea":e=!!u.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Pn(n)}}return We(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(a(166));if(e=oe.current,ba(n)){if(e=n.stateNode,l=n.memoizedProps,u=null,f=At,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}e[xt]=n,e=!!(e.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||kp(e.nodeValue,l)),e||Hi(n)}else e=Bu(e).createTextNode(u),e[xt]=n,n.stateNode=e}return We(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ba(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[xt]=n}else xa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;We(n),f=!1}else f=sd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(In(n),n):(In(n),null)}if(In(n),(n.flags&128)!==0)return n.lanes=l,n;if(l=u!==null,e=e!==null&&e.memoizedState!==null,l){u=n.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool);var d=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==f&&(u.flags|=2048)}return l!==e&&l&&(n.child.flags|=8192),wu(n,n.updateQueue),We(n),null;case 4:return Et(),e===null&&kc(n.stateNode.containerInfo),We(n),null;case 10:return Vn(n.type),We(n),null;case 19:if(W(ft),f=n.memoizedState,f===null)return We(n),null;if(u=(n.flags&128)!==0,d=f.rendering,d===null)if(u)La(f,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=xu(e),d!==null){for(n.flags|=128,La(f,!1),e=d.updateQueue,n.updateQueue=e,wu(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)rd(l,e),l=l.sibling;return k(ft,ft.current&1|2),n.child}e=e.sibling}f.tail!==null&&Ht()>Cu&&(n.flags|=128,u=!0,La(f,!1),n.lanes=4194304)}else{if(!u)if(e=xu(d),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,wu(n,e),La(f,!0),f.tail===null&&f.tailMode==="hidden"&&!d.alternate&&!He)return We(n),null}else 2*Ht()-f.renderingStartTime>Cu&&l!==536870912&&(n.flags|=128,u=!0,La(f,!1),n.lanes=4194304);f.isBackwards?(d.sibling=n.child,n.child=d):(e=f.last,e!==null?e.sibling=d:n.child=d,f.last=d)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ht(),n.sibling=null,e=ft.current,k(ft,u?e&1|2:e&1),n):(We(n),null);case 22:case 23:return In(n),wo(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(l&536870912)!==0&&(n.flags&128)===0&&(We(n),n.subtreeFlags&6&&(n.flags|=8192)):We(n),l=n.updateQueue,l!==null&&wu(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==l&&(n.flags|=2048),e!==null&&W(Vi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Vn(ct),We(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function J0(e,n){switch(co(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Vn(ct),Et(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Nn(n),null;case 13:if(In(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return W(ft),null;case 4:return Et(),null;case 10:return Vn(n.type),null;case 22:case 23:return In(n),wo(),e!==null&&W(Vi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Vn(ct),null;case 25:return null;default:return null}}function Mm(e,n){switch(co(n),n.tag){case 3:Vn(ct),Et();break;case 26:case 27:case 5:Nn(n);break;case 4:Et();break;case 13:In(n);break;case 19:W(ft);break;case 10:Vn(n.type);break;case 22:case 23:In(n),wo(),e!==null&&W(Vi);break;case 24:Vn(ct)}}function Ua(e,n){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var f=u.next;l=f;do{if((l.tag&e)===e){u=void 0;var d=l.create,v=l.inst;u=d(),v.destroy=u}l=l.next}while(l!==f)}}catch(_){Xe(n,n.return,_)}}function ci(e,n,l){try{var u=n.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var d=f.next;u=d;do{if((u.tag&e)===e){var v=u.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,f=n;var T=l,O=_;try{O()}catch(q){Xe(f,T,q)}}}u=u.next}while(u!==d)}}catch(q){Xe(n,n.return,q)}}function Rm(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{bd(n,l)}catch(u){Xe(e,e.return,u)}}}function Dm(e,n,l){l.props=Ii(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(u){Xe(e,n,u)}}function Ba(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof l=="function"?e.refCleanup=l(u):l.current=u}}catch(f){Xe(e,n,f)}}function En(e,n){var l=e.ref,u=e.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(f){Xe(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){Xe(e,n,f)}else l.current=null}function Nm(e){var n=e.type,l=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(f){Xe(e,e.return,f)}}function Wo(e,n,l){try{var u=e.stateNode;bb(u,e.type,l,n),u[Rt]=n}catch(f){Xe(e,e.return,f)}}function jm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&vi(e.type)||e.tag===4}function ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&vi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tc(e,n,l){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Uu));else if(u!==4&&(u===27&&vi(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(tc(e,n,l),e=e.sibling;e!==null;)tc(e,n,l),e=e.sibling}function Eu(e,n,l){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(u!==4&&(u===27&&vi(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Eu(e,n,l),e=e.sibling;e!==null;)Eu(e,n,l),e=e.sibling}function Lm(e){var n=e.stateNode,l=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);bt(n,u,l),n[xt]=e,n[Rt]=l}catch(d){Xe(e,e.return,d)}}var Qn=!1,at=!1,nc=!1,Um=typeof WeakSet=="function"?WeakSet:Set,pt=null;function W0(e,n){if(e=e.containerInfo,Ec=Iu,e=Xh(e),Ws(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var f=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var v=0,_=-1,T=-1,O=0,q=0,I=e,R=null;t:for(;;){for(var D;I!==l||f!==0&&I.nodeType!==3||(_=v+f),I!==d||u!==0&&I.nodeType!==3||(T=v+u),I.nodeType===3&&(v+=I.nodeValue.length),(D=I.firstChild)!==null;)R=I,I=D;for(;;){if(I===e)break t;if(R===l&&++O===f&&(_=v),R===d&&++q===u&&(T=v),(D=I.nextSibling)!==null)break;I=R,R=I.parentNode}I=D}l=_===-1||T===-1?null:{start:_,end:T}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ac={focusedElem:e,selectionRange:l},Iu=!1,pt=n;pt!==null;)if(n=pt,e=n.child,(n.subtreeFlags&1024)!==0&&e!==null)e.return=n,pt=e;else for(;pt!==null;){switch(n=pt,d=n.alternate,e=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,f=d.memoizedProps,d=d.memoizedState,u=l.stateNode;try{var be=Ii(l.type,f,l.elementType===l.type);e=u.getSnapshotBeforeUpdate(be,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Xe(l,l.return,ge)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)zc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=n.sibling,e!==null){e.return=n.return,pt=e;break}pt=n.return}}function Bm(e,n,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:fi(e,l),u&4&&Ua(5,l);break;case 1:if(fi(e,l),u&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(v){Xe(l,l.return,v)}else{var f=Ii(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Xe(l,l.return,v)}}u&64&&Rm(l),u&512&&Ba(l,l.return);break;case 3:if(fi(e,l),u&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{bd(e,n)}catch(v){Xe(l,l.return,v)}}break;case 27:n===null&&u&4&&Lm(l);case 26:case 5:fi(e,l),n===null&&u&4&&Nm(l),u&512&&Ba(l,l.return);break;case 12:fi(e,l);break;case 13:fi(e,l),u&4&&qm(e,l),u&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=sb.bind(null,l),Eb(e,l))));break;case 22:if(u=l.memoizedState!==null||Qn,!u){n=n!==null&&n.memoizedState!==null||at,f=Qn;var d=at;Qn=u,(at=n)&&!d?hi(e,l,(l.subtreeFlags&8772)!==0):fi(e,l),Qn=f,at=d}break;case 30:break;default:fi(e,l)}}function Hm(e){var n=e.alternate;n!==null&&(e.alternate=null,Hm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ns(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,jt=!1;function Xn(e,n,l){for(l=l.child;l!==null;)Zm(e,n,l),l=l.sibling}function Zm(e,n,l){if(X&&typeof X.onCommitFiberUnmount=="function")try{X.onCommitFiberUnmount(Z,l)}catch{}switch(l.tag){case 26:at||En(l,n),Xn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:at||En(l,n);var u=Je,f=jt;vi(l.type)&&(Je=l.stateNode,jt=!1),Xn(e,n,l),Qa(l.stateNode),Je=u,jt=f;break;case 5:at||En(l,n);case 6:if(u=Je,f=jt,Je=null,Xn(e,n,l),Je=u,jt=f,Je!==null)if(jt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(l.stateNode)}catch(d){Xe(l,n,d)}else try{Je.removeChild(l.stateNode)}catch(d){Xe(l,n,d)}break;case 18:Je!==null&&(jt?(e=Je,Cp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),tl(e)):Cp(Je,l.stateNode));break;case 4:u=Je,f=jt,Je=l.stateNode.containerInfo,jt=!0,Xn(e,n,l),Je=u,jt=f;break;case 0:case 11:case 14:case 15:at||ci(2,l,n),at||ci(4,l,n),Xn(e,n,l);break;case 1:at||(En(l,n),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Dm(l,n,u)),Xn(e,n,l);break;case 21:Xn(e,n,l);break;case 22:at=(u=at)||l.memoizedState!==null,Xn(e,n,l),at=u;break;default:Xn(e,n,l)}}function qm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{tl(e)}catch(l){Xe(n,n.return,l)}}function eb(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Um),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Um),n;default:throw Error(a(435,e.tag))}}function ic(e,n){var l=eb(e);n.forEach(function(u){var f=ob.bind(null,e,u);l.has(u)||(l.add(u),u.then(f,f))})}function It(e,n){var l=n.deletions;if(l!==null)for(var u=0;u<l.length;u++){var f=l[u],d=e,v=n,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(vi(_.type)){Je=_.stateNode,jt=!1;break e}break;case 5:Je=_.stateNode,jt=!1;break e;case 3:case 4:Je=_.stateNode.containerInfo,jt=!0;break e}_=_.return}if(Je===null)throw Error(a(160));Zm(d,v,f),Je=null,jt=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)Vm(n,e),n=n.sibling}var hn=null;function Vm(e,n){var l=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(n,e),Gt(e),u&4&&(ci(3,e,e.return),Ua(3,e),ci(5,e,e.return));break;case 1:It(n,e),Gt(e),u&512&&(at||l===null||En(l,l.return)),u&64&&Qn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var f=hn;if(It(n,e),Gt(e),u&512&&(at||l===null||En(l,l.return)),u&4){var d=l!==null?l.memoizedState:null;if(u=e.memoizedState,l===null)if(u===null)if(e.stateNode===null){e:{u=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":d=f.getElementsByTagName("title")[0],(!d||d[sa]||d[xt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(u),f.head.insertBefore(d,f.querySelector("head > title"))),bt(d,u,l),d[xt]=e,dt(d),u=d;break e;case"link":var v=Lp("link","href",f).get(u+(l.href||""));if(v){for(var _=0;_<v.length;_++)if(d=v[_],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(_,1);break t}}d=f.createElement(u),bt(d,u,l),f.head.appendChild(d);break;case"meta":if(v=Lp("meta","content",f).get(u+(l.content||""))){for(_=0;_<v.length;_++)if(d=v[_],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(_,1);break t}}d=f.createElement(u),bt(d,u,l),f.head.appendChild(d);break;default:throw Error(a(468,u))}d[xt]=e,dt(d),u=d}e.stateNode=u}else Up(f,e.type,e.stateNode);else e.stateNode=jp(f,u,e.memoizedProps);else d!==u?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,u===null?Up(f,e.type,e.stateNode):jp(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&Wo(e,e.memoizedProps,l.memoizedProps)}break;case 27:It(n,e),Gt(e),u&512&&(at||l===null||En(l,l.return)),l!==null&&u&4&&Wo(e,e.memoizedProps,l.memoizedProps);break;case 5:if(It(n,e),Gt(e),u&512&&(at||l===null||En(l,l.return)),e.flags&32){f=e.stateNode;try{cr(f,"")}catch(D){Xe(e,e.return,D)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,Wo(e,f,l!==null?l.memoizedProps:f)),u&1024&&(nc=!0);break;case 6:if(It(n,e),Gt(e),u&4){if(e.stateNode===null)throw Error(a(162));u=e.memoizedProps,l=e.stateNode;try{l.nodeValue=u}catch(D){Xe(e,e.return,D)}}break;case 3:if(qu=null,f=hn,hn=Hu(n.containerInfo),It(n,e),hn=f,Gt(e),u&4&&l!==null&&l.memoizedState.isDehydrated)try{tl(n.containerInfo)}catch(D){Xe(e,e.return,D)}nc&&(nc=!1,Ym(e));break;case 4:u=hn,hn=Hu(e.stateNode.containerInfo),It(n,e),Gt(e),hn=u;break;case 12:It(n,e),Gt(e);break;case 13:It(n,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(oc=Ht()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ic(e,u)));break;case 22:f=e.memoizedState!==null;var T=l!==null&&l.memoizedState!==null,O=Qn,q=at;if(Qn=O||f,at=q||T,It(n,e),at=q,Qn=O,Gt(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||T||Qn||at||Gi(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){T=l=n;try{if(d=T.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=T.stateNode;var I=T.memoizedProps.style,R=I!=null&&I.hasOwnProperty("display")?I.display:null;_.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(D){Xe(T,T.return,D)}}}else if(n.tag===6){if(l===null){T=n;try{T.stateNode.nodeValue=f?"":T.memoizedProps}catch(D){Xe(T,T.return,D)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,ic(e,l))));break;case 19:It(n,e),Gt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ic(e,u)));break;case 30:break;case 21:break;default:It(n,e),Gt(e)}}function Gt(e){var n=e.flags;if(n&2){try{for(var l,u=e.return;u!==null;){if(jm(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,d=ec(e);Eu(e,d,f);break;case 5:var v=l.stateNode;l.flags&32&&(cr(v,""),l.flags&=-33);var _=ec(e);Eu(e,_,v);break;case 3:case 4:var T=l.stateNode.containerInfo,O=ec(e);tc(e,O,T);break;default:throw Error(a(161))}}catch(q){Xe(e,e.return,q)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Ym(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Ym(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function fi(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Bm(e,n.alternate,n),n=n.sibling}function Gi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ci(4,n,n.return),Gi(n);break;case 1:En(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Dm(n,n.return,l),Gi(n);break;case 27:Qa(n.stateNode);case 26:case 5:En(n,n.return),Gi(n);break;case 22:n.memoizedState===null&&Gi(n);break;case 30:Gi(n);break;default:Gi(n)}e=e.sibling}}function hi(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,f=e,d=n,v=d.flags;switch(d.tag){case 0:case 11:case 15:hi(f,d,l),Ua(4,d);break;case 1:if(hi(f,d,l),u=d,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(O){Xe(u,u.return,O)}if(u=d,f=u.updateQueue,f!==null){var _=u.stateNode;try{var T=f.shared.hiddenCallbacks;if(T!==null)for(f.shared.hiddenCallbacks=null,f=0;f<T.length;f++)vd(T[f],_)}catch(O){Xe(u,u.return,O)}}l&&v&64&&Rm(d),Ba(d,d.return);break;case 27:Lm(d);case 26:case 5:hi(f,d,l),l&&u===null&&v&4&&Nm(d),Ba(d,d.return);break;case 12:hi(f,d,l);break;case 13:hi(f,d,l),l&&v&4&&qm(f,d);break;case 22:d.memoizedState===null&&hi(f,d,l),Ba(d,d.return);break;case 30:break;default:hi(f,d,l)}n=n.sibling}}function rc(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ka(l))}function ac(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ka(e))}function An(e,n,l,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Im(e,n,l,u),n=n.sibling}function Im(e,n,l,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:An(e,n,l,u),f&2048&&Ua(9,n);break;case 1:An(e,n,l,u);break;case 3:An(e,n,l,u),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ka(e)));break;case 12:if(f&2048){An(e,n,l,u),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,_=d.onPostCommit;typeof _=="function"&&_(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Xe(n,n.return,T)}}else An(e,n,l,u);break;case 13:An(e,n,l,u);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?An(e,n,l,u):Ha(e,n):d._visibility&2?An(e,n,l,u):(d._visibility|=2,Or(e,n,l,u,(n.subtreeFlags&10256)!==0)),f&2048&&rc(v,n);break;case 24:An(e,n,l,u),f&2048&&ac(n.alternate,n);break;default:An(e,n,l,u)}}function Or(e,n,l,u,f){for(f=f&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var d=e,v=n,_=l,T=u,O=v.flags;switch(v.tag){case 0:case 11:case 15:Or(d,v,_,T,f),Ua(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?Or(d,v,_,T,f):Ha(d,v):(q._visibility|=2,Or(d,v,_,T,f)),f&&O&2048&&rc(v.alternate,v);break;case 24:Or(d,v,_,T,f),f&&O&2048&&ac(v.alternate,v);break;default:Or(d,v,_,T,f)}n=n.sibling}}function Ha(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,u=n,f=u.flags;switch(u.tag){case 22:Ha(l,u),f&2048&&rc(u.alternate,u);break;case 24:Ha(l,u),f&2048&&ac(u.alternate,u);break;default:Ha(l,u)}n=n.sibling}}var Za=8192;function zr(e){if(e.subtreeFlags&Za)for(e=e.child;e!==null;)Gm(e),e=e.sibling}function Gm(e){switch(e.tag){case 26:zr(e),e.flags&Za&&e.memoizedState!==null&&Hb(hn,e.memoizedState,e.memoizedProps);break;case 5:zr(e);break;case 3:case 4:var n=hn;hn=Hu(e.stateNode.containerInfo),zr(e),hn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Za,Za=16777216,zr(e),Za=n):zr(e));break;default:zr(e)}}function Pm(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function qa(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var u=n[l];pt=u,Xm(u,e)}Pm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qm(e),e=e.sibling}function Qm(e){switch(e.tag){case 0:case 11:case 15:qa(e),e.flags&2048&&ci(9,e,e.return);break;case 3:qa(e);break;case 12:qa(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Au(e)):qa(e);break;default:qa(e)}}function Au(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var u=n[l];pt=u,Xm(u,e)}Pm(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ci(8,n,n.return),Au(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Au(n));break;default:Au(n)}e=e.sibling}}function Xm(e,n){for(;pt!==null;){var l=pt;switch(l.tag){case 0:case 11:case 15:ci(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:ka(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,pt=u;else e:for(l=e;pt!==null;){u=pt;var f=u.sibling,d=u.return;if(Hm(u),u===l){pt=null;break e}if(f!==null){f.return=d,pt=f;break e}pt=d}}}var tb={getCacheForType:function(e){var n=_t(ct),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l}},nb=typeof WeakMap=="function"?WeakMap:Map,Ve=0,$e=null,Me=null,Ne=0,Ye=0,Pt=null,di=!1,Mr=!1,lc=!1,Fn=0,nt=0,mi=0,Pi=0,uc=0,un=0,Rr=0,Va=null,Lt=null,sc=!1,oc=0,Cu=1/0,Ou=null,pi=null,vt=0,gi=null,Dr=null,Nr=0,cc=0,fc=null,Fm=null,Ya=0,hc=null;function Qt(){if((Ve&2)!==0&&Ne!==0)return Ne&-Ne;if(L.T!==null){var e=_r;return e!==0?e:bc()}return fh()}function $m(){un===0&&(un=(Ne&536870912)===0||He?uh():536870912);var e=ln.current;return e!==null&&(e.flags|=32),un}function Xt(e,n,l){(e===$e&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(jr(e,0),yi(e,Ne,un,!1)),ua(e,l),((Ve&2)===0||e!==$e)&&(e===$e&&((Ve&2)===0&&(Pi|=l),nt===4&&yi(e,Ne,un,!1)),Cn(e))}function Km(e,n,l){if((Ve&6)!==0)throw Error(a(327));var u=!l&&(n&124)===0&&(n&e.expiredLanes)===0||Jt(e,n),f=u?ab(e,n):pc(e,n,!0),d=u;do{if(f===0){Mr&&!u&&yi(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!ib(l)){f=pc(e,n,!1),d=!1;continue}if(f===2){if(d=n,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var _=e;f=Va;var T=_.current.memoizedState.isDehydrated;if(T&&(jr(_,v).flags|=256),v=pc(_,v,!1),v!==2){if(lc&&!T){_.errorRecoveryDisabledLanes|=d,Pi|=d,f=4;break e}d=Lt,Lt=f,d!==null&&(Lt===null?Lt=d:Lt.push.apply(Lt,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){jr(e,0),yi(e,n,0,!0);break}e:{switch(u=e,d=f,d){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:yi(u,n,un,!di);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(f=oc+300-Ht(),10<f)){if(yi(u,n,un,!di),ht(u,0,!0)!==0)break e;u.timeoutHandle=Ep(Jm.bind(null,u,l,Lt,Ou,sc,n,un,Pi,Rr,di,d,2,-0,0),f);break e}Jm(u,l,Lt,Ou,sc,n,un,Pi,Rr,di,d,0,-0,0)}}break}while(!0);Cn(e)}function Jm(e,n,l,u,f,d,v,_,T,O,q,I,R,D){if(e.timeoutHandle=-1,I=n.subtreeFlags,(I&8192||(I&16785408)===16785408)&&($a={stylesheets:null,count:0,unsuspend:Bb},Gm(n),I=Zb(),I!==null)){e.cancelPendingCommit=I(ap.bind(null,e,n,d,l,u,f,v,_,T,q,1,R,D)),yi(e,d,v,!O);return}ap(e,n,d,l,u,f,v,_,T)}function ib(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var f=l[u],d=f.getSnapshot;f=f.value;try{if(!Vt(d(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function yi(e,n,l,u){n&=~uc,n&=~Pi,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var f=n;0<f;){var d=31-ve(f),v=1<<d;u[d]=-1,f&=~v}l!==0&&oh(e,l,n)}function zu(){return(Ve&6)===0?(Ia(0),!1):!0}function dc(){if(Me!==null){if(Ye===0)var e=Me.return;else e=Me,qn=Zi=null,zo(e),Ar=null,Na=0,e=Me;for(;e!==null;)Mm(e.alternate,e),e=e.return;Me=null}}function jr(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,_b(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),dc(),$e=e,Me=l=Bn(e.current,null),Ne=n,Ye=0,Pt=null,di=!1,Mr=Jt(e,n),lc=!1,Rr=un=uc=Pi=mi=nt=0,Lt=Va=null,sc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var f=31-ve(u),d=1<<f;n|=e[f],u&=~d}return Fn=n,Jl(),l}function Wm(e,n){Ce=null,L.H=yu,n===wa||n===uu?(n=gd(),Ye=3):n===dd?(n=gd(),Ye=4):Ye=n===ym?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Pt=n,Me===null&&(nt=1,Su(e,tn(n,e.current)))}function ep(){var e=L.H;return L.H=yu,e===null?yu:e}function tp(){var e=L.A;return L.A=tb,e}function mc(){nt=4,di||(Ne&4194048)!==Ne&&ln.current!==null||(Mr=!0),(mi&134217727)===0&&(Pi&134217727)===0||$e===null||yi($e,Ne,un,!1)}function pc(e,n,l){var u=Ve;Ve|=2;var f=ep(),d=tp();($e!==e||Ne!==n)&&(Ou=null,jr(e,n)),n=!1;var v=nt;e:do try{if(Ye!==0&&Me!==null){var _=Me,T=Pt;switch(Ye){case 8:dc(),v=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(n=!0);var O=Ye;if(Ye=0,Pt=null,Lr(e,_,T,O),l&&Mr){v=0;break e}break;default:O=Ye,Ye=0,Pt=null,Lr(e,_,T,O)}}rb(),v=nt;break}catch(q){Wm(e,q)}while(!0);return n&&e.shellSuspendCounter++,qn=Zi=null,Ve=u,L.H=f,L.A=d,Me===null&&($e=null,Ne=0,Jl()),v}function rb(){for(;Me!==null;)np(Me)}function ab(e,n){var l=Ve;Ve|=2;var u=ep(),f=tp();$e!==e||Ne!==n?(Ou=null,Cu=Ht()+500,jr(e,n)):Mr=Jt(e,n);e:do try{if(Ye!==0&&Me!==null){n=Me;var d=Pt;t:switch(Ye){case 1:Ye=0,Pt=null,Lr(e,n,d,1);break;case 2:case 9:if(md(d)){Ye=0,Pt=null,ip(n);break}n=function(){Ye!==2&&Ye!==9||$e!==e||(Ye=7),Cn(e)},d.then(n,n);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:md(d)?(Ye=0,Pt=null,ip(n)):(Ye=0,Pt=null,Lr(e,n,d,7));break;case 5:var v=null;switch(Me.tag){case 26:v=Me.memoizedState;case 5:case 27:var _=Me;if(!v||Bp(v)){Ye=0,Pt=null;var T=_.sibling;if(T!==null)Me=T;else{var O=_.return;O!==null?(Me=O,Mu(O)):Me=null}break t}}Ye=0,Pt=null,Lr(e,n,d,5);break;case 6:Ye=0,Pt=null,Lr(e,n,d,6);break;case 8:dc(),nt=6;break e;default:throw Error(a(462))}}lb();break}catch(q){Wm(e,q)}while(!0);return qn=Zi=null,L.H=u,L.A=f,Ve=l,Me!==null?0:($e=null,Ne=0,Jl(),nt)}function lb(){for(;Me!==null&&!Bl();)np(Me)}function np(e){var n=Om(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,n===null?Mu(e):Me=n}function ip(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=km(l,n,n.pendingProps,n.type,void 0,Ne);break;case 11:n=km(l,n,n.pendingProps,n.type.render,n.ref,Ne);break;case 5:zo(n);default:Mm(l,n),n=Me=rd(n,Fn),n=Om(l,n,Fn)}e.memoizedProps=e.pendingProps,n===null?Mu(e):Me=n}function Lr(e,n,l,u){qn=Zi=null,zo(n),Ar=null,Na=0;var f=n.return;try{if(F0(e,f,n,l,Ne)){nt=1,Su(e,tn(l,e.current)),Me=null;return}}catch(d){if(f!==null)throw Me=f,d;nt=1,Su(e,tn(l,e.current)),Me=null;return}n.flags&32768?(He||u===1?e=!0:Mr||(Ne&536870912)!==0?e=!1:(di=e=!0,(u===2||u===9||u===3||u===6)&&(u=ln.current,u!==null&&u.tag===13&&(u.flags|=16384))),rp(n,e)):Mu(n)}function Mu(e){var n=e;do{if((n.flags&32768)!==0){rp(n,di);return}e=n.return;var l=K0(n.alternate,n,Fn);if(l!==null){Me=l;return}if(n=n.sibling,n!==null){Me=n;return}Me=n=e}while(n!==null);nt===0&&(nt=5)}function rp(e,n){do{var l=J0(e.alternate,e);if(l!==null){l.flags&=32767,Me=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Me=e;return}Me=e=l}while(e!==null);nt=6,Me=null}function ap(e,n,l,u,f,d,v,_,T){e.cancelPendingCommit=null;do Ru();while(vt!==0);if((Ve&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(d=n.lanes|n.childLanes,d|=ro,Bv(e,l,d,v,_,T),e===$e&&(Me=$e=null,Ne=0),Dr=n,gi=e,Nr=l,cc=d,fc=f,Fm=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cb(nr,function(){return cp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=L.T,L.T=null,f=J.p,J.p=2,v=Ve,Ve|=4;try{W0(e,n,l)}finally{Ve=v,J.p=f,L.T=u}}vt=1,lp(),up(),sp()}}function lp(){if(vt===1){vt=0;var e=gi,n=Dr,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=L.T,L.T=null;var u=J.p;J.p=2;var f=Ve;Ve|=4;try{Vm(n,e);var d=Ac,v=Xh(e.containerInfo),_=d.focusedElem,T=d.selectionRange;if(v!==_&&_&&_.ownerDocument&&Qh(_.ownerDocument.documentElement,_)){if(T!==null&&Ws(_)){var O=T.start,q=T.end;if(q===void 0&&(q=O),"selectionStart"in _)_.selectionStart=O,_.selectionEnd=Math.min(q,_.value.length);else{var I=_.ownerDocument||document,R=I&&I.defaultView||window;if(R.getSelection){var D=R.getSelection(),be=_.textContent.length,ge=Math.min(T.start,be),Qe=T.end===void 0?ge:Math.min(T.end,be);!D.extend&&ge>Qe&&(v=Qe,Qe=ge,ge=v);var A=Ph(_,ge),E=Ph(_,Qe);if(A&&E&&(D.rangeCount!==1||D.anchorNode!==A.node||D.anchorOffset!==A.offset||D.focusNode!==E.node||D.focusOffset!==E.offset)){var C=I.createRange();C.setStart(A.node,A.offset),D.removeAllRanges(),ge>Qe?(D.addRange(C),D.extend(E.node,E.offset)):(C.setEnd(E.node,E.offset),D.addRange(C))}}}}for(I=[],D=_;D=D.parentNode;)D.nodeType===1&&I.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<I.length;_++){var V=I[_];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Iu=!!Ec,Ac=Ec=null}finally{Ve=f,J.p=u,L.T=l}}e.current=n,vt=2}}function up(){if(vt===2){vt=0;var e=gi,n=Dr,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=L.T,L.T=null;var u=J.p;J.p=2;var f=Ve;Ve|=4;try{Bm(e,n.alternate,n)}finally{Ve=f,J.p=u,L.T=l}}vt=3}}function sp(){if(vt===4||vt===3){vt=0,Hl();var e=gi,n=Dr,l=Nr,u=Fm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?vt=5:(vt=0,Dr=gi=null,op(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(pi=null),Rs(l),n=n.stateNode,X&&typeof X.onCommitFiberRoot=="function")try{X.onCommitFiberRoot(Z,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=L.T,f=J.p,J.p=2,L.T=null;try{for(var d=e.onRecoverableError,v=0;v<u.length;v++){var _=u[v];d(_.value,{componentStack:_.stack})}}finally{L.T=n,J.p=f}}(Nr&3)!==0&&Ru(),Cn(e),f=e.pendingLanes,(l&4194090)!==0&&(f&42)!==0?e===hc?Ya++:(Ya=0,hc=e):Ya=0,Ia(0)}}function op(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,ka(n)))}function Ru(e){return lp(),up(),sp(),cp()}function cp(){if(vt!==5)return!1;var e=gi,n=cc;cc=0;var l=Rs(Nr),u=L.T,f=J.p;try{J.p=32>l?32:l,L.T=null,l=fc,fc=null;var d=gi,v=Nr;if(vt=0,Dr=gi=null,Nr=0,(Ve&6)!==0)throw Error(a(331));var _=Ve;if(Ve|=4,Qm(d.current),Im(d,d.current,v,l),Ve=_,Ia(0,!1),X&&typeof X.onPostCommitFiberRoot=="function")try{X.onPostCommitFiberRoot(Z,d)}catch{}return!0}finally{J.p=f,L.T=u,op(e,n)}}function fp(e,n,l){n=tn(l,n),n=Io(e.stateNode,n,2),e=li(e,n,2),e!==null&&(ua(e,2),Cn(e))}function Xe(e,n,l){if(e.tag===3)fp(e,e,l);else for(;n!==null;){if(n.tag===3){fp(n,e,l);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(pi===null||!pi.has(u))){e=tn(l,e),l=pm(2),u=li(n,l,2),u!==null&&(gm(l,u,n,e),ua(u,2),Cn(u));break}}n=n.return}}function gc(e,n,l){var u=e.pingCache;if(u===null){u=e.pingCache=new nb;var f=new Set;u.set(n,f)}else f=u.get(n),f===void 0&&(f=new Set,u.set(n,f));f.has(l)||(lc=!0,f.add(l),e=ub.bind(null,e,n,l),n.then(e,e))}function ub(e,n,l){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Ne&l)===l&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>Ht()-oc?(Ve&2)===0&&jr(e,0):uc|=l,Rr===Ne&&(Rr=0)),Cn(e)}function hp(e,n){n===0&&(n=sh()),e=yr(e,n),e!==null&&(ua(e,n),Cn(e))}function sb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),hp(e,l)}function ob(e,n){var l=0;switch(e.tag){case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(n),hp(e,l)}function cb(e,n){return ia(e,n)}var Du=null,Ur=null,yc=!1,Nu=!1,vc=!1,Qi=0;function Cn(e){e!==Ur&&e.next===null&&(Ur===null?Du=Ur=e:Ur=Ur.next=e),Nu=!0,yc||(yc=!0,hb())}function Ia(e,n){if(!vc&&Nu){vc=!0;do for(var l=!1,u=Du;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var d=0;else{var v=u.suspendedLanes,_=u.pingedLanes;d=(1<<31-ve(42|e)+1)-1,d&=f&~(v&~_),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,gp(u,d))}else d=Ne,d=ht(u,u===$e?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||Jt(u,d)||(l=!0,gp(u,d));u=u.next}while(l);vc=!1}}function fb(){dp()}function dp(){Nu=yc=!1;var e=0;Qi!==0&&(xb()&&(e=Qi),Qi=0);for(var n=Ht(),l=null,u=Du;u!==null;){var f=u.next,d=mp(u,n);d===0?(u.next=null,l===null?Du=f:l.next=f,f===null&&(Ur=l)):(l=u,(e!==0||(d&3)!==0)&&(Nu=!0)),u=f}Ia(e)}function mp(e,n){for(var l=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-ve(d),_=1<<v,T=f[v];T===-1?((_&l)===0||(_&u)!==0)&&(f[v]=cn(_,n)):T<=n&&(e.expiredLanes|=_),d&=~_}if(n=$e,l=Ne,l=ht(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,l===0||e===n&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&ra(u),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Jt(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(u!==null&&ra(u),Rs(l)){case 2:case 8:l=la;break;case 32:l=nr;break;case 268435456:l=Zl;break;default:l=nr}return u=pp.bind(null,e),l=ia(l,u),e.callbackPriority=n,e.callbackNode=l,n}return u!==null&&u!==null&&ra(u),e.callbackPriority=2,e.callbackNode=null,2}function pp(e,n){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Ru()&&e.callbackNode!==l)return null;var u=Ne;return u=ht(e,e===$e?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Km(e,u,n),mp(e,Ht()),e.callbackNode!=null&&e.callbackNode===l?pp.bind(null,e):null)}function gp(e,n){if(Ru())return null;Km(e,n,!0)}function hb(){Sb(function(){(Ve&6)!==0?ia(aa,fb):dp()})}function bc(){return Qi===0&&(Qi=uh()),Qi}function yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gl(""+e)}function vp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function db(e,n,l,u,f){if(n==="submit"&&l&&l.stateNode===f){var d=yp((f[Rt]||null).action),v=u.submitter;v&&(n=(n=v[Rt]||null)?yp(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var _=new Fl("action","action",null,u,f);e.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Qi!==0){var T=v?vp(f,v):new FormData(f);Ho(l,{pending:!0,data:T,method:f.method,action:d},null,T)}}else typeof d=="function"&&(_.preventDefault(),T=v?vp(f,v):new FormData(f),Ho(l,{pending:!0,data:T,method:f.method,action:d},d,T))},currentTarget:f}]})}}for(var xc=0;xc<io.length;xc++){var _c=io[xc],mb=_c.toLowerCase(),pb=_c[0].toUpperCase()+_c.slice(1);fn(mb,"on"+pb)}fn(Kh,"onAnimationEnd"),fn(Jh,"onAnimationIteration"),fn(Wh,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(R0,"onTransitionRun"),fn(D0,"onTransitionStart"),fn(N0,"onTransitionCancel"),fn(ed,"onTransitionEnd"),ur("onMouseEnter",["mouseout","mouseover"]),ur("onMouseLeave",["mouseout","mouseover"]),ur("onPointerEnter",["pointerout","pointerover"]),ur("onPointerLeave",["pointerout","pointerover"]),Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ga="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(" "),gb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ga));function bp(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var u=e[l],f=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var v=u.length-1;0<=v;v--){var _=u[v],T=_.instance,O=_.currentTarget;if(_=_.listener,T!==d&&f.isPropagationStopped())break e;d=_,f.currentTarget=O;try{d(f)}catch(q){_u(q)}f.currentTarget=null,d=T}else for(v=0;v<u.length;v++){if(_=u[v],T=_.instance,O=_.currentTarget,_=_.listener,T!==d&&f.isPropagationStopped())break e;d=_,f.currentTarget=O;try{d(f)}catch(q){_u(q)}f.currentTarget=null,d=T}}}}function Re(e,n){var l=n[Ds];l===void 0&&(l=n[Ds]=new Set);var u=e+"__bubble";l.has(u)||(xp(n,e,2,!1),l.add(u))}function Sc(e,n,l){var u=0;n&&(u|=4),xp(l,e,u,n)}var ju="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[ju]){e[ju]=!0,dh.forEach(function(l){l!=="selectionchange"&&(gb.has(l)||Sc(l,!1,e),Sc(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ju]||(n[ju]=!0,Sc("selectionchange",!1,n))}}function xp(e,n,l,u){switch(Ip(n)){case 2:var f=Yb;break;case 8:f=Ib;break;default:f=Uc}l=f.bind(null,n,l,e),f=void 0,!Is||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Tc(e,n,l,u,f){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var _=u.stateNode.containerInfo;if(_===f)break;if(v===4)for(v=u.return;v!==null;){var T=v.tag;if((T===3||T===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;_!==null;){if(v=rr(_),v===null)return;if(T=v.tag,T===5||T===6||T===26||T===27){u=d=v;continue e}_=_.parentNode}}u=u.return}Ah(function(){var O=d,q=Vs(l),I=[];e:{var R=td.get(e);if(R!==void 0){var D=Fl,be=e;switch(e){case"keypress":if(Ql(l)===0)break e;case"keydown":case"keyup":D=c0;break;case"focusin":be="focus",D=Xs;break;case"focusout":be="blur",D=Xs;break;case"beforeblur":case"afterblur":D=Xs;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":D=zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=Jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=d0;break;case Kh:case Jh:case Wh:D=t0;break;case ed:D=p0;break;case"scroll":case"scrollend":D=$v;break;case"wheel":D=y0;break;case"copy":case"cut":case"paste":D=i0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Rh;break;case"toggle":case"beforetoggle":D=b0}var ge=(n&4)!==0,Qe=!ge&&(e==="scroll"||e==="scrollend"),A=ge?R!==null?R+"Capture":null:R;ge=[];for(var E=O,C;E!==null;){var V=E;if(C=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||C===null||A===null||(V=ca(E,A),V!=null&&ge.push(Pa(E,V,C))),Qe)break;E=E.return}0<ge.length&&(R=new D(R,be,null,l,q),I.push({event:R,listeners:ge}))}}if((n&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",R&&l!==qs&&(be=l.relatedTarget||l.fromElement)&&(rr(be)||be[ir]))break e;if((D||R)&&(R=q.window===q?q:(R=q.ownerDocument)?R.defaultView||R.parentWindow:window,D?(be=l.relatedTarget||l.toElement,D=O,be=be?rr(be):null,be!==null&&(Qe=o(be),ge=be.tag,be!==Qe||ge!==5&&ge!==27&&ge!==6)&&(be=null)):(D=null,be=O),D!==be)){if(ge=zh,V="onMouseLeave",A="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ge=Rh,V="onPointerLeave",A="onPointerEnter",E="pointer"),Qe=D==null?R:oa(D),C=be==null?R:oa(be),R=new ge(V,E+"leave",D,l,q),R.target=Qe,R.relatedTarget=C,V=null,rr(q)===O&&(ge=new ge(A,E+"enter",be,l,q),ge.target=C,ge.relatedTarget=Qe,V=ge),Qe=V,D&&be)t:{for(ge=D,A=be,E=0,C=ge;C;C=Br(C))E++;for(C=0,V=A;V;V=Br(V))C++;for(;0<E-C;)ge=Br(ge),E--;for(;0<C-E;)A=Br(A),C--;for(;E--;){if(ge===A||A!==null&&ge===A.alternate)break t;ge=Br(ge),A=Br(A)}ge=null}else ge=null;D!==null&&_p(I,R,D,ge,!1),be!==null&&Qe!==null&&_p(I,Qe,be,ge,!0)}}e:{if(R=O?oa(O):window,D=R.nodeName&&R.nodeName.toLowerCase(),D==="select"||D==="input"&&R.type==="file")var ae=Zh;else if(Bh(R))if(qh)ae=O0;else{ae=A0;var Oe=E0}else D=R.nodeName,!D||D.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?O&&Zs(O.elementType)&&(ae=Zh):ae=C0;if(ae&&(ae=ae(e,O))){Hh(I,ae,l,q);break e}Oe&&Oe(e,R,O),e==="focusout"&&O&&R.type==="number"&&O.memoizedProps.value!=null&&Hs(R,"number",R.value)}switch(Oe=O?oa(O):window,e){case"focusin":(Bh(Oe)||Oe.contentEditable==="true")&&(mr=Oe,eo=O,va=null);break;case"focusout":va=eo=mr=null;break;case"mousedown":to=!0;break;case"contextmenu":case"mouseup":case"dragend":to=!1,Fh(I,l,q);break;case"selectionchange":if(M0)break;case"keydown":case"keyup":Fh(I,l,q)}var de;if($s)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else dr?Lh(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(Dh&&l.locale!=="ko"&&(dr||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&dr&&(de=Ch()):(ni=q,Gs="value"in ni?ni.value:ni.textContent,dr=!0)),Oe=Lu(O,ye),0<Oe.length&&(ye=new Mh(ye,e,null,l,q),I.push({event:ye,listeners:Oe}),de?ye.data=de:(de=Uh(l),de!==null&&(ye.data=de)))),(de=_0?S0(e,l):k0(e,l))&&(ye=Lu(O,"onBeforeInput"),0<ye.length&&(Oe=new Mh("onBeforeInput","beforeinput",null,l,q),I.push({event:Oe,listeners:ye}),Oe.data=de)),db(I,e,O,l,q)}bp(I,n)})}function Pa(e,n,l){return{instance:e,listener:n,currentTarget:l}}function Lu(e,n){for(var l=n+"Capture",u=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=ca(e,l),f!=null&&u.unshift(Pa(e,f,d)),f=ca(e,n),f!=null&&u.push(Pa(e,f,d))),e.tag===3)return u;e=e.return}return[]}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _p(e,n,l,u,f){for(var d=n._reactName,v=[];l!==null&&l!==u;){var _=l,T=_.alternate,O=_.stateNode;if(_=_.tag,T!==null&&T===u)break;_!==5&&_!==26&&_!==27||O===null||(T=O,f?(O=ca(l,d),O!=null&&v.unshift(Pa(l,O,T))):f||(O=ca(l,d),O!=null&&v.push(Pa(l,O,T)))),l=l.return}v.length!==0&&e.push({event:n,listeners:v})}var yb=/\r\n?/g,vb=/\u0000|\uFFFD/g;function Sp(e){return(typeof e=="string"?e:""+e).replace(yb,`
|
|
49
|
+
`).replace(vb,"")}function kp(e,n){return n=Sp(n),Sp(e)===n}function Uu(){}function Pe(e,n,l,u,f,d){switch(l){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||cr(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&cr(e,""+u);break;case"className":Vl(e,"class",u);break;case"tabIndex":Vl(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(e,l,u);break;case"style":wh(e,u,d);break;case"data":if(n!=="object"){Vl(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(l);break}u=Gl(""+u),e.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){e.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 d=="function"&&(l==="formAction"?(n!=="input"&&Pe(e,n,"name",f.name,f,null),Pe(e,n,"formEncType",f.formEncType,f,null),Pe(e,n,"formMethod",f.formMethod,f,null),Pe(e,n,"formTarget",f.formTarget,f,null)):(Pe(e,n,"encType",f.encType,f,null),Pe(e,n,"method",f.method,f,null),Pe(e,n,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(l);break}u=Gl(""+u),e.setAttribute(l,u);break;case"onClick":u!=null&&(e.onclick=Uu);break;case"onScroll":u!=null&&Re("scroll",e);break;case"onScrollEnd":u!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}l=Gl(""+u),e.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":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(l,""+u):e.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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":u===!0?e.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(l,u):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(l,u):e.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(l):e.setAttribute(l,u);break;case"popover":Re("beforetoggle",e),Re("toggle",e),ql(e,"popover",u);break;case"xlinkActuate":Ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ln(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ln(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ln(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ln(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ql(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Xv.get(l)||l,ql(e,l,u))}}function wc(e,n,l,u,f,d){switch(l){case"style":wh(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"children":typeof u=="string"?cr(e,u):(typeof u=="number"||typeof u=="bigint")&&cr(e,""+u);break;case"onScroll":u!=null&&Re("scroll",e);break;case"onScrollEnd":u!=null&&Re("scrollend",e);break;case"onClick":u!=null&&(e.onclick=Uu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),d=e[Rt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,f),typeof u=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,u,f);break e}l in e?e[l]=u:u===!0?e.setAttribute(l,""):ql(e,l,u)}}}function bt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var u=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var v=l[d];if(v!=null)switch(d){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Pe(e,n,d,v,l,null)}}f&&Pe(e,n,"srcSet",l.srcSet,l,null),u&&Pe(e,n,"src",l.src,l,null);return;case"input":Re("invalid",e);var _=d=v=f=null,T=null,O=null;for(u in l)if(l.hasOwnProperty(u)){var q=l[u];if(q!=null)switch(u){case"name":f=q;break;case"type":v=q;break;case"checked":T=q;break;case"defaultChecked":O=q;break;case"value":d=q;break;case"defaultValue":_=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,n));break;default:Pe(e,n,u,q,l,null)}}_h(e,d,_,T,O,v,f,!1),Yl(e);return;case"select":Re("invalid",e),u=v=d=null;for(f in l)if(l.hasOwnProperty(f)&&(_=l[f],_!=null))switch(f){case"value":d=_;break;case"defaultValue":v=_;break;case"multiple":u=_;default:Pe(e,n,f,_,l,null)}n=d,l=v,e.multiple=!!u,n!=null?or(e,!!u,n,!1):l!=null&&or(e,!!u,l,!0);return;case"textarea":Re("invalid",e),d=f=u=null;for(v in l)if(l.hasOwnProperty(v)&&(_=l[v],_!=null))switch(v){case"value":u=_;break;case"defaultValue":f=_;break;case"children":d=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:Pe(e,n,v,_,l,null)}kh(e,u,f,d),Yl(e);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(u=l[T],u!=null))switch(T){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Pe(e,n,T,u,l,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(u=0;u<Ga.length;u++)Re(Ga[u],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in l)if(l.hasOwnProperty(O)&&(u=l[O],u!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Pe(e,n,O,u,l,null)}return;default:if(Zs(n)){for(q in l)l.hasOwnProperty(q)&&(u=l[q],u!==void 0&&wc(e,n,q,u,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(u=l[_],u!=null&&Pe(e,n,_,u,l,null))}function bb(e,n,l,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,v=null,_=null,T=null,O=null,q=null;for(D in l){var I=l[D];if(l.hasOwnProperty(D)&&I!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":T=I;default:u.hasOwnProperty(D)||Pe(e,n,D,null,u,I)}}for(var R in u){var D=u[R];if(I=l[R],u.hasOwnProperty(R)&&(D!=null||I!=null))switch(R){case"type":d=D;break;case"name":f=D;break;case"checked":O=D;break;case"defaultChecked":q=D;break;case"value":v=D;break;case"defaultValue":_=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(a(137,n));break;default:D!==I&&Pe(e,n,R,D,u,I)}}Bs(e,v,_,T,O,q,d,f);return;case"select":D=v=_=R=null;for(d in l)if(T=l[d],l.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":D=T;default:u.hasOwnProperty(d)||Pe(e,n,d,null,u,T)}for(f in u)if(d=u[f],T=l[f],u.hasOwnProperty(f)&&(d!=null||T!=null))switch(f){case"value":R=d;break;case"defaultValue":_=d;break;case"multiple":v=d;default:d!==T&&Pe(e,n,f,d,u,T)}n=_,l=v,u=D,R!=null?or(e,!!l,R,!1):!!u!=!!l&&(n!=null?or(e,!!l,n,!0):or(e,!!l,l?[]:"",!1));return;case"textarea":D=R=null;for(_ in l)if(f=l[_],l.hasOwnProperty(_)&&f!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Pe(e,n,_,null,u,f)}for(v in u)if(f=u[v],d=l[v],u.hasOwnProperty(v)&&(f!=null||d!=null))switch(v){case"value":R=f;break;case"defaultValue":D=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==d&&Pe(e,n,v,f,u,d)}Sh(e,R,D);return;case"option":for(var be in l)if(R=l[be],l.hasOwnProperty(be)&&R!=null&&!u.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:Pe(e,n,be,null,u,R)}for(T in u)if(R=u[T],D=l[T],u.hasOwnProperty(T)&&R!==D&&(R!=null||D!=null))switch(T){case"selected":e.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:Pe(e,n,T,R,u,D)}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 ge in l)R=l[ge],l.hasOwnProperty(ge)&&R!=null&&!u.hasOwnProperty(ge)&&Pe(e,n,ge,null,u,R);for(O in u)if(R=u[O],D=l[O],u.hasOwnProperty(O)&&R!==D&&(R!=null||D!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(a(137,n));break;default:Pe(e,n,O,R,u,D)}return;default:if(Zs(n)){for(var Qe in l)R=l[Qe],l.hasOwnProperty(Qe)&&R!==void 0&&!u.hasOwnProperty(Qe)&&wc(e,n,Qe,void 0,u,R);for(q in u)R=u[q],D=l[q],!u.hasOwnProperty(q)||R===D||R===void 0&&D===void 0||wc(e,n,q,R,u,D);return}}for(var A in l)R=l[A],l.hasOwnProperty(A)&&R!=null&&!u.hasOwnProperty(A)&&Pe(e,n,A,null,u,R);for(I in u)R=u[I],D=l[I],!u.hasOwnProperty(I)||R===D||R==null&&D==null||Pe(e,n,I,R,u,D)}var Ec=null,Ac=null;function Bu(e){return e.nodeType===9?e:e.ownerDocument}function Tp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Cc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Oc=null;function xb(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var Ep=typeof setTimeout=="function"?setTimeout:void 0,_b=typeof clearTimeout=="function"?clearTimeout:void 0,Ap=typeof Promise=="function"?Promise:void 0,Sb=typeof queueMicrotask=="function"?queueMicrotask:typeof Ap<"u"?function(e){return Ap.resolve(null).then(e).catch(kb)}:Ep;function kb(e){setTimeout(function(){throw e})}function vi(e){return e==="head"}function Cp(e,n){var l=n,u=0,f=0;do{var d=l.nextSibling;if(e.removeChild(l),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(0<u&&8>u){l=u;var v=e.ownerDocument;if(l&1&&Qa(v.documentElement),l&2&&Qa(v.body),l&4)for(l=v.head,Qa(l),v=l.firstChild;v;){var _=v.nextSibling,T=v.nodeName;v[sa]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=_}}if(f===0){e.removeChild(d),tl(n);return}f--}else l==="$"||l==="$?"||l==="$!"?f++:u=l.charCodeAt(0)-48;else u=0;l=d}while(l);tl(n)}function zc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":zc(l),Ns(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Tb(e,n,l,u){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[sa])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=dn(e.nextSibling),e===null)break}return null}function wb(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=dn(e.nextSibling),e===null))return null;return e}function Mc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Eb(e,n){var l=e.ownerDocument;if(e.data!=="$?"||l.readyState==="complete")n();else{var u=function(){n(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function dn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return e}var Rc=null;function Op(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"){if(n===0)return e;n--}else l==="/$"&&n++}e=e.previousSibling}return null}function zp(e,n,l){switch(n=Bu(l),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Qa(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ns(e)}var sn=new Map,Mp=new Set;function Hu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $n=J.d;J.d={f:Ab,r:Cb,D:Ob,C:zb,L:Mb,m:Rb,X:Nb,S:Db,M:jb};function Ab(){var e=$n.f(),n=zu();return e||n}function Cb(e){var n=ar(e);n!==null&&n.tag===5&&n.type==="form"?Kd(n):$n.r(e)}var Hr=typeof document>"u"?null:document;function Rp(e,n,l){var u=Hr;if(u&&typeof n=="string"&&n){var f=en(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),Mp.has(f)||(Mp.add(f),e={rel:e,crossOrigin:l,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),bt(n,"link",e),dt(n),u.head.appendChild(n)))}}function Ob(e){$n.D(e),Rp("dns-prefetch",e,null)}function zb(e,n){$n.C(e,n),Rp("preconnect",e,n)}function Mb(e,n,l){$n.L(e,n,l);var u=Hr;if(u&&e&&n){var f='link[rel="preload"][as="'+en(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+en(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+en(l.imageSizes)+'"]')):f+='[href="'+en(e)+'"]';var d=f;switch(n){case"style":d=Zr(e);break;case"script":d=qr(e)}sn.has(d)||(e=g({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),sn.set(d,e),u.querySelector(f)!==null||n==="style"&&u.querySelector(Xa(d))||n==="script"&&u.querySelector(Fa(d))||(n=u.createElement("link"),bt(n,"link",e),dt(n),u.head.appendChild(n)))}}function Rb(e,n){$n.m(e,n);var l=Hr;if(l&&e){var u=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+en(u)+'"][href="'+en(e)+'"]',d=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=qr(e)}if(!sn.has(d)&&(e=g({rel:"modulepreload",href:e},n),sn.set(d,e),l.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Fa(d)))return}u=l.createElement("link"),bt(u,"link",e),dt(u),l.head.appendChild(u)}}}function Db(e,n,l){$n.S(e,n,l);var u=Hr;if(u&&e){var f=lr(u).hoistableStyles,d=Zr(e);n=n||"default";var v=f.get(d);if(!v){var _={loading:0,preload:null};if(v=u.querySelector(Xa(d)))_.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},l),(l=sn.get(d))&&Dc(e,l);var T=v=u.createElement("link");dt(T),bt(T,"link",e),T._p=new Promise(function(O,q){T.onload=O,T.onerror=q}),T.addEventListener("load",function(){_.loading|=1}),T.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Zu(v,n,u)}v={type:"stylesheet",instance:v,count:1,state:_},f.set(d,v)}}}function Nb(e,n){$n.X(e,n);var l=Hr;if(l&&e){var u=lr(l).hoistableScripts,f=qr(e),d=u.get(f);d||(d=l.querySelector(Fa(f)),d||(e=g({src:e,async:!0},n),(n=sn.get(f))&&Nc(e,n),d=l.createElement("script"),dt(d),bt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(f,d))}}function jb(e,n){$n.M(e,n);var l=Hr;if(l&&e){var u=lr(l).hoistableScripts,f=qr(e),d=u.get(f);d||(d=l.querySelector(Fa(f)),d||(e=g({src:e,async:!0,type:"module"},n),(n=sn.get(f))&&Nc(e,n),d=l.createElement("script"),dt(d),bt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(f,d))}}function Dp(e,n,l,u){var f=(f=oe.current)?Hu(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Zr(l.href),l=lr(f).hoistableStyles,u=l.get(n),u||(u={type:"style",instance:null,count:0,state:null},l.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Zr(l.href);var d=lr(f).hoistableStyles,v=d.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=f.querySelector(Xa(e)))&&!d._p&&(v.instance=d,v.state.loading=5),sn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},sn.set(e,l),d||Lb(f,e,l,v.state))),n&&u===null)throw Error(a(528,""));return v}if(n&&u!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qr(l),l=lr(f).hoistableScripts,u=l.get(n),u||(u={type:"script",instance:null,count:0,state:null},l.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Zr(e){return'href="'+en(e)+'"'}function Xa(e){return'link[rel="stylesheet"]['+e+"]"}function Np(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Lb(e,n,l,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),bt(n,"link",l),dt(n),e.head.appendChild(n))}function qr(e){return'[src="'+en(e)+'"]'}function Fa(e){return"script[async]"+e}function jp(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+en(l.href)+'"]');if(u)return n.instance=u,dt(u),u;var f=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),dt(u),bt(u,"style",f),Zu(u,l.precedence,e),n.instance=u;case"stylesheet":f=Zr(l.href);var d=e.querySelector(Xa(f));if(d)return n.state.loading|=4,n.instance=d,dt(d),d;u=Np(l),(f=sn.get(f))&&Dc(u,f),d=(e.ownerDocument||e).createElement("link"),dt(d);var v=d;return v._p=new Promise(function(_,T){v.onload=_,v.onerror=T}),bt(d,"link",u),n.state.loading|=4,Zu(d,l.precedence,e),n.instance=d;case"script":return d=qr(l.src),(f=e.querySelector(Fa(d)))?(n.instance=f,dt(f),f):(u=l,(f=sn.get(d))&&(u=g({},l),Nc(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),dt(f),bt(f,"link",u),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Zu(u,l.precedence,e));return n.instance}function Zu(e,n,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,d=f,v=0;v<u.length;v++){var _=u[v];if(_.dataset.precedence===n)d=_;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function Dc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Nc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var qu=null;function Lp(e,n,l){if(qu===null){var u=new Map,f=qu=new Map;f.set(l,u)}else f=qu,u=f.get(l),u||(u=new Map,f.set(l,u));if(u.has(e))return u;for(u.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[sa]||d[xt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(n)||"";v=e+v;var _=u.get(v);_?_.push(d):u.set(v,[d])}}return u}function Up(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function Ub(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Bp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var $a=null;function Bb(){}function Hb(e,n,l){if($a===null)throw Error(a(475));var u=$a;if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var f=Zr(l.href),d=e.querySelector(Xa(f));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(u.count++,u=Vu.bind(u),e.then(u,u)),n.state.loading|=4,n.instance=d,dt(d);return}d=e.ownerDocument||e,l=Np(l),(f=sn.get(f))&&Dc(l,f),d=d.createElement("link"),dt(d);var v=d;v._p=new Promise(function(_,T){v.onload=_,v.onerror=T}),bt(d,"link",l),n.instance=d}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(u.count++,n=Vu.bind(u),e.addEventListener("load",n),e.addEventListener("error",n))}}function Zb(){if($a===null)throw Error(a(475));var e=$a;return e.stylesheets&&e.count===0&&jc(e,e.stylesheets),0<e.count?function(n){var l=setTimeout(function(){if(e.stylesheets&&jc(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l)}}:null}function Vu(){if(this.count--,this.count===0){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yu=null;function jc(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yu=new Map,n.forEach(qb,e),Yu=null,Vu.call(e))}function qb(e,n){if(!(n.state.loading&4)){var l=Yu.get(e);if(l)var u=l.get(null);else{l=new Map,Yu.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var v=f[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),u=v)}u&&l.set(null,u)}f=n.instance,v=f.getAttribute("data-precedence"),d=l.get(v)||u,d===u&&l.set(null,f),l.set(v,f),this.count++,u=Vu.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Ka={$$typeof:H,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function Vb(e,n,l,u,f,d,v,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zs(0),this.hiddenUpdates=zs(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Hp(e,n,l,u,f,d,v,_,T,O,q,I){return e=new Vb(e,n,l,v,_,T,O,I),n=1,d===!0&&(n|=24),d=Yt(3,null,null,n),e.current=d,d.stateNode=e,n=go(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:l,cache:n},xo(d),e}function Zp(e){return e?(e=vr,e):vr}function qp(e,n,l,u,f,d){f=Zp(f),u.context===null?u.context=f:u.pendingContext=f,u=ai(n),u.payload={element:l},d=d===void 0?null:d,d!==null&&(u.callback=d),l=li(e,u,n),l!==null&&(Xt(l,e,n),Aa(l,e,n))}function Vp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function Lc(e,n){Vp(e,n),(e=e.alternate)&&Vp(e,n)}function Yp(e){if(e.tag===13){var n=yr(e,67108864);n!==null&&Xt(n,e,67108864),Lc(e,67108864)}}var Iu=!0;function Yb(e,n,l,u){var f=L.T;L.T=null;var d=J.p;try{J.p=2,Uc(e,n,l,u)}finally{J.p=d,L.T=f}}function Ib(e,n,l,u){var f=L.T;L.T=null;var d=J.p;try{J.p=8,Uc(e,n,l,u)}finally{J.p=d,L.T=f}}function Uc(e,n,l,u){if(Iu){var f=Bc(u);if(f===null)Tc(e,n,u,Gu,l),Gp(e,u);else if(Pb(f,e,n,l,u))u.stopPropagation();else if(Gp(e,u),n&4&&-1<Gb.indexOf(e)){for(;f!==null;){var d=ar(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=qt(d.pendingLanes);if(v!==0){var _=d;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var T=1<<31-ve(v);_.entanglements[1]|=T,v&=~T}Cn(d),(Ve&6)===0&&(Cu=Ht()+500,Ia(0))}}break;case 13:_=yr(d,2),_!==null&&Xt(_,d,2),zu(),Lc(d,2)}if(d=Bc(u),d===null&&Tc(e,n,u,Gu,l),d===f)break;f=d}f!==null&&u.stopPropagation()}else Tc(e,n,u,null,l)}}function Bc(e){return e=Vs(e),Hc(e)}var Gu=null;function Hc(e){if(Gu=null,e=rr(e),e!==null){var n=o(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=c(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Gu=e,null}function Ip(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Es()){case aa:return 2;case la:return 8;case nr:case As:return 32;case Zl:return 268435456;default:return 32}default:return 32}}var Zc=!1,bi=null,xi=null,_i=null,Ja=new Map,Wa=new Map,Si=[],Gb="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 Gp(e,n){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":Ja.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wa.delete(n.pointerId)}}function el(e,n,l,u,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:u,nativeEvent:d,targetContainers:[f]},n!==null&&(n=ar(n),n!==null&&Yp(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function Pb(e,n,l,u,f){switch(n){case"focusin":return bi=el(bi,e,n,l,u,f),!0;case"dragenter":return xi=el(xi,e,n,l,u,f),!0;case"mouseover":return _i=el(_i,e,n,l,u,f),!0;case"pointerover":var d=f.pointerId;return Ja.set(d,el(Ja.get(d)||null,e,n,l,u,f)),!0;case"gotpointercapture":return d=f.pointerId,Wa.set(d,el(Wa.get(d)||null,e,n,l,u,f)),!0}return!1}function Pp(e){var n=rr(e.target);if(n!==null){var l=o(n);if(l!==null){if(n=l.tag,n===13){if(n=c(l),n!==null){e.blockedOn=n,Hv(e.priority,function(){if(l.tag===13){var u=Qt();u=Ms(u);var f=yr(l,u);f!==null&&Xt(f,l,u),Lc(l,u)}});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=Bc(e.nativeEvent);if(l===null){l=e.nativeEvent;var u=new l.constructor(l.type,l);qs=u,l.target.dispatchEvent(u),qs=null}else return n=ar(l),n!==null&&Yp(n),e.blockedOn=l,!1;n.shift()}return!0}function Qp(e,n,l){Pu(e)&&l.delete(n)}function Qb(){Zc=!1,bi!==null&&Pu(bi)&&(bi=null),xi!==null&&Pu(xi)&&(xi=null),_i!==null&&Pu(_i)&&(_i=null),Ja.forEach(Qp),Wa.forEach(Qp)}function Qu(e,n){e.blockedOn===n&&(e.blockedOn=null,Zc||(Zc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Qb)))}var Xu=null;function Xp(e){Xu!==e&&(Xu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Xu===e&&(Xu=null);for(var n=0;n<e.length;n+=3){var l=e[n],u=e[n+1],f=e[n+2];if(typeof u!="function"){if(Hc(u||l)===null)continue;break}var d=ar(l);d!==null&&(e.splice(n,3),n-=3,Ho(d,{pending:!0,data:f,method:l.method,action:u},u,f))}}))}function tl(e){function n(T){return Qu(T,e)}bi!==null&&Qu(bi,e),xi!==null&&Qu(xi,e),_i!==null&&Qu(_i,e),Ja.forEach(n),Wa.forEach(n);for(var l=0;l<Si.length;l++){var u=Si[l];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Si.length&&(l=Si[0],l.blockedOn===null);)Pp(l),l.blockedOn===null&&Si.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var f=l[u],d=l[u+1],v=f[Rt]||null;if(typeof d=="function")v||Xp(l);else if(v){var _=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[Rt]||null)_=v.formAction;else if(Hc(f)!==null)continue}else _=v.action;typeof _=="function"?l[u+1]=_:(l.splice(u,3),u-=3),Xp(l)}}}function qc(e){this._internalRoot=e}Fu.prototype.render=qc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,u=Qt();qp(l,u,e,n,null,null)},Fu.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;qp(e.current,2,null,e,null,null),zu(),n[ir]=null}};function Fu(e){this._internalRoot=e}Fu.prototype.unstable_scheduleHydration=function(e){if(e){var n=fh();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Si.length&&n!==0&&n<Si[l].priority;l++);Si.splice(l,0,e),l===0&&Pp(e)}};var Fp=i.version;if(Fp!=="19.1.0")throw Error(a(527,Fp,"19.1.0"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=p(n),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var Xb={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{Z=$u.inject(Xb),X=$u}catch{}}return il.createRoot=function(e,n){if(!s(e))throw Error(a(299));var l=!1,u="",f=fm,d=hm,v=dm,_=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(_=n.unstable_transitionCallbacks)),n=Hp(e,1,!1,null,null,l,u,f,d,v,_,null),e[ir]=n.current,kc(e),new qc(n)},il.hydrateRoot=function(e,n,l){if(!s(e))throw Error(a(299));var u=!1,f="",d=fm,v=hm,_=dm,T=null,O=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(T=l.unstable_transitionCallbacks),l.formState!==void 0&&(O=l.formState)),n=Hp(e,1,!0,n,l??null,u,f,d,v,_,T,O),n.context=Zp(null),l=n.current,u=Qt(),u=Ms(u),f=ai(u),f.callback=null,li(l,f,u),l=u,n.current.lanes=l,ua(n,l),Cn(n),e[ir]=n.current,kc(e),new Fu(n)},il.version="19.1.0",il}var lg;function l1(){if(lg)return Yc.exports;lg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Yc.exports=a1(),Yc.exports}var u1=l1();const s1=Dl(u1);var it=Zf();const o1=({content:t})=>{const i=()=>typeof t=="string"?B.jsx("div",{className:"message-text",children:t}):Array.isArray(t)?t.map((r,a)=>{switch(r.type){case"text":return B.jsx("div",{className:"message-text",children:r.text},a);case"image_url":return B.jsx("div",{className:"message-image",children:B.jsx("img",{src:r.image_url.url,alt:"用户上传的图片",style:{maxWidth:"200px",borderRadius:"4px"}})},a);case"audio":return B.jsx("div",{className:"message-audio",children:B.jsx("audio",{controls:!0,src:r.audio_url,children:"您的浏览器不支持音频播放"})},a);default:return B.jsx("div",{className:"message-text",children:JSON.stringify(r)},a)}}):B.jsx("div",{className:"message-text",children:JSON.stringify(t)});return B.jsx("div",{className:"message human",children:B.jsx("div",{className:"message-content",children:i()})})},qf=({usage_metadata:t,spend_time:i,response_metadata:r})=>{const a=s=>s.toString();return B.jsxs("div",{className:"message-meta",children:[B.jsxs("div",{className:"token-info",children:[B.jsxs("span",{className:"token-item",children:[B.jsx("span",{className:"token-emoji",children:"📥"}),a(t.input_tokens||0)]}),B.jsxs("span",{className:"token-item",children:[B.jsx("span",{className:"token-emoji",children:"📤"}),a(t.output_tokens||0)]}),B.jsxs("span",{className:"token-item",children:[B.jsx("span",{className:"token-emoji",children:"📊"}),a(t.total_tokens||0)]})]}),B.jsx("div",{children:r==null?void 0:r.model_name}),B.jsx("span",{className:"message-time",children:i?`${(i/1e3).toFixed(2)}s`:""})]})};var rl={exports:{}},Xc={},Fc,ug;function c1(){if(ug)return Fc;ug=1;function t(i,r){typeof r=="boolean"&&(r={forever:r}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=r||{},this._maxRetryTime=r&&r.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return Fc=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var r=new Date().getTime();if(i&&r-this._operationStart>=this._maxRetryTime)return this._errors.push(i),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var a=this._timeouts.shift();if(a===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),a=this._cachedTimeouts.slice(-1);else return!1;var s=this;return this._timer=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},a),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(i,r){this._fn=i,r&&(r.timeout&&(this._operationTimeout=r.timeout),r.cb&&(this._operationTimeoutCb=r.cb));var a=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){a._operationTimeoutCb()},a._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)},t.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},r=null,a=0,s=0;s<this._errors.length;s++){var o=this._errors[s],c=o.message,h=(i[c]||0)+1;i[c]=h,h>=a&&(r=o,a=h)}return r},Fc}var sg;function f1(){return sg||(sg=1,function(t){var i=c1();t.operation=function(r){var a=t.timeouts(r);return new i(a,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(r){if(r instanceof Array)return[].concat(r);var a={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var s in r)a[s]=r[s];if(a.minTimeout>a.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],c=0;c<a.retries;c++)o.push(this.createTimeout(c,a));return r&&r.forever&&!o.length&&o.push(this.createTimeout(c,a)),o.sort(function(h,p){return h-p}),o},t.createTimeout=function(r,a){var s=a.randomize?Math.random()+1:1,o=Math.round(s*Math.max(a.minTimeout,1)*Math.pow(a.factor,r));return o=Math.min(o,a.maxTimeout),o},t.wrap=function(r,a,s){if(a instanceof Array&&(s=a,a=null),!s){s=[];for(var o in r)typeof r[o]=="function"&&s.push(o)}for(var c=0;c<s.length;c++){var h=s[c],p=r[h];r[h]=(function(g){var y=t.operation(a),x=Array.prototype.slice.call(arguments,1),S=x.pop();x.push(function(w){y.retry(w)||(w&&(arguments[0]=y.mainError()),S.apply(this,arguments))}),y.attempt(function(){g.apply(r,x)})}).bind(r,p),r[h].options=a}}}(Xc)),Xc}var $c,og;function h1(){return og||(og=1,$c=f1()),$c}var cg;function d1(){if(cg)return rl.exports;cg=1;const t=h1(),i=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class r extends Error{constructor(h){super(),h instanceof Error?(this.originalError=h,{message:h}=h):(this.originalError=new Error(h),this.originalError.stack=this.stack),this.name="AbortError",this.message=h}}const a=(c,h,p)=>{const m=p.retries-(h-1);return c.attemptNumber=h,c.retriesLeft=m,c},s=c=>i.includes(c),o=(c,h)=>new Promise((p,m)=>{h={onFailedAttempt:()=>{},retries:10,...h};const g=t.operation(h);g.attempt(async y=>{try{p(await c(y))}catch(x){if(!(x instanceof Error)){m(new TypeError(`Non-error was thrown: "${x}". You should only throw errors.`));return}if(x instanceof r)g.stop(),m(x.originalError);else if(x instanceof TypeError&&!s(x.message))g.stop(),m(x);else{a(x,y,h);try{await h.onFailedAttempt(x)}catch(S){m(S);return}g.retry(x)||m(g.mainError())}}})});return rl.exports=o,rl.exports.default=o,rl.exports.AbortError=r,rl.exports}var m1=d1();const p1=Dl(m1);var Ku={},Kc={exports:{}},fg;function g1(){return fg||(fg=1,function(t){var i=Object.prototype.hasOwnProperty,r="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1));function s(p,m,g){this.fn=p,this.context=m,this.once=g||!1}function o(p,m,g,y,x){if(typeof g!="function")throw new TypeError("The listener must be a function");var S=new s(g,y||p,x),w=r?r+m:m;return p._events[w]?p._events[w].fn?p._events[w]=[p._events[w],S]:p._events[w].push(S):(p._events[w]=S,p._eventsCount++),p}function c(p,m){--p._eventsCount===0?p._events=new a:delete p._events[m]}function h(){this._events=new a,this._eventsCount=0}h.prototype.eventNames=function(){var m=[],g,y;if(this._eventsCount===0)return m;for(y in g=this._events)i.call(g,y)&&m.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},h.prototype.listeners=function(m){var g=r?r+m:m,y=this._events[g];if(!y)return[];if(y.fn)return[y.fn];for(var x=0,S=y.length,w=new Array(S);x<S;x++)w[x]=y[x].fn;return w},h.prototype.listenerCount=function(m){var g=r?r+m:m,y=this._events[g];return y?y.fn?1:y.length:0},h.prototype.emit=function(m,g,y,x,S,w){var M=r?r+m:m;if(!this._events[M])return!1;var U=this._events[M],z=arguments.length,P,H;if(U.fn){switch(U.once&&this.removeListener(m,U.fn,void 0,!0),z){case 1:return U.fn.call(U.context),!0;case 2:return U.fn.call(U.context,g),!0;case 3:return U.fn.call(U.context,g,y),!0;case 4:return U.fn.call(U.context,g,y,x),!0;case 5:return U.fn.call(U.context,g,y,x,S),!0;case 6:return U.fn.call(U.context,g,y,x,S,w),!0}for(H=1,P=new Array(z-1);H<z;H++)P[H-1]=arguments[H];U.fn.apply(U.context,P)}else{var F=U.length,G;for(H=0;H<F;H++)switch(U[H].once&&this.removeListener(m,U[H].fn,void 0,!0),z){case 1:U[H].fn.call(U[H].context);break;case 2:U[H].fn.call(U[H].context,g);break;case 3:U[H].fn.call(U[H].context,g,y);break;case 4:U[H].fn.call(U[H].context,g,y,x);break;default:if(!P)for(G=1,P=new Array(z-1);G<z;G++)P[G-1]=arguments[G];U[H].fn.apply(U[H].context,P)}}return!0},h.prototype.on=function(m,g,y){return o(this,m,g,y,!1)},h.prototype.once=function(m,g,y){return o(this,m,g,y,!0)},h.prototype.removeListener=function(m,g,y,x){var S=r?r+m:m;if(!this._events[S])return this;if(!g)return c(this,S),this;var w=this._events[S];if(w.fn)w.fn===g&&(!x||w.once)&&(!y||w.context===y)&&c(this,S);else{for(var M=0,U=[],z=w.length;M<z;M++)(w[M].fn!==g||x&&!w[M].once||y&&w[M].context!==y)&&U.push(w[M]);U.length?this._events[S]=U.length===1?U[0]:U:c(this,S)}return this},h.prototype.removeAllListeners=function(m){var g;return m?(g=r?r+m:m,this._events[g]&&c(this,g)):(this._events=new a,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=r,h.EventEmitter=h,t.exports=h}(Kc)),Kc.exports}var al={exports:{}},Jc,hg;function y1(){return hg||(hg=1,Jc=(t,i)=>(i=i||(()=>{}),t.then(r=>new Promise(a=>{a(i())}).then(()=>r),r=>new Promise(a=>{a(i())}).then(()=>{throw r})))),Jc}var dg;function v1(){if(dg)return al.exports;dg=1;const t=y1();class i extends Error{constructor(s){super(s),this.name="TimeoutError"}}const r=(a,s,o)=>new Promise((c,h)=>{if(typeof s!="number"||s<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(s===1/0){c(a);return}const p=setTimeout(()=>{if(typeof o=="function"){try{c(o())}catch(y){h(y)}return}const m=typeof o=="string"?o:`Promise timed out after ${s} milliseconds`,g=o instanceof Error?o:new i(m);typeof a.cancel=="function"&&a.cancel(),h(g)},s);t(a.then(c,h),()=>{clearTimeout(p)})});return al.exports=r,al.exports.default=r,al.exports.TimeoutError=i,al.exports}var Ju={},Wu={},mg;function b1(){if(mg)return Wu;mg=1,Object.defineProperty(Wu,"__esModule",{value:!0});function t(i,r,a){let s=0,o=i.length;for(;o>0;){const c=o/2|0;let h=s+c;a(i[h],r)<=0?(s=++h,o-=c+1):o=c}return s}return Wu.default=t,Wu}var pg;function x1(){if(pg)return Ju;pg=1,Object.defineProperty(Ju,"__esModule",{value:!0});const t=b1();class i{constructor(){this._queue=[]}enqueue(a,s){s=Object.assign({priority:0},s);const o={priority:s.priority,run:a};if(this.size&&this._queue[this.size-1].priority>=s.priority){this._queue.push(o);return}const c=t.default(this._queue,o,(h,p)=>p.priority-h.priority);this._queue.splice(c,0,o)}dequeue(){const a=this._queue.shift();return a==null?void 0:a.run}filter(a){return this._queue.filter(s=>s.priority===a.priority).map(s=>s.run)}get size(){return this._queue.length}}return Ju.default=i,Ju}var gg;function _1(){if(gg)return Ku;gg=1,Object.defineProperty(Ku,"__esModule",{value:!0});const t=g1(),i=v1(),r=x1(),a=()=>{},s=new i.TimeoutError;class o extends t{constructor(h){var p,m,g,y;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=a,this._resolveIdle=a,h=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},h),!(typeof h.intervalCap=="number"&&h.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(m=(p=h.intervalCap)===null||p===void 0?void 0:p.toString())!==null&&m!==void 0?m:""}\` (${typeof h.intervalCap})`);if(h.interval===void 0||!(Number.isFinite(h.interval)&&h.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(y=(g=h.interval)===null||g===void 0?void 0:g.toString())!==null&&y!==void 0?y:""}\` (${typeof h.interval})`);this._carryoverConcurrencyCount=h.carryoverConcurrencyCount,this._isIntervalIgnored=h.intervalCap===1/0||h.interval===0,this._intervalCap=h.intervalCap,this._interval=h.interval,this._queue=new h.queueClass,this._queueClass=h.queueClass,this.concurrency=h.concurrency,this._timeout=h.timeout,this._throwOnTimeout=h.throwOnTimeout===!0,this._isPaused=h.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=a,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=a,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const h=Date.now();if(this._intervalId===void 0){const p=this._intervalEnd-h;if(p<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},p)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const h=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const p=this._queue.dequeue();return p?(this.emit("active"),p(),h&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(h){if(!(typeof h=="number"&&h>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${h}\` (${typeof h})`);this._concurrency=h,this._processQueue()}async add(h,p={}){return new Promise((m,g)=>{const y=async()=>{this._pendingCount++,this._intervalCount++;try{const x=this._timeout===void 0&&p.timeout===void 0?h():i.default(Promise.resolve(h()),p.timeout===void 0?this._timeout:p.timeout,()=>{(p.throwOnTimeout===void 0?this._throwOnTimeout:p.throwOnTimeout)&&g(s)});m(await x)}catch(x){g(x)}this._next()};this._queue.enqueue(y,p),this._tryToStartAnother(),this.emit("add")})}async addAll(h,p){return Promise.all(h.map(async m=>this.add(m,p)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(h=>{const p=this._resolveEmpty;this._resolveEmpty=()=>{p(),h()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(h=>{const p=this._resolveIdle;this._resolveIdle=()=>{p(),h()}})}get size(){return this._queue.size}sizeBy(h){return this._queue.filter(h).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(h){this._timeout=h}}return Ku.default=o,Ku}var S1=_1();const Wc=Dl(S1),k1=(...t)=>fetch(...t),T1=Symbol.for("lg:fetch_implementation"),w1=()=>globalThis[T1]??k1,E1=[400,401,402,403,404,405,406,407,408,409,422];function A1(t){return t==null||typeof t!="object"?!1:"status"in t&&"statusText"in t&&"text"in t}class gl extends Error{constructor(i,r,a){super(`HTTP ${i}: ${r}`),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=i,this.text=r,this.response=a}static async fromResponse(i,r){try{return new gl(i.status,await i.text(),r!=null&&r.includeResponse?i:void 0)}catch{return new gl(i.status,i.statusText,r!=null&&r.includeResponse?i:void 0)}}}class C1{constructor(i){Object.defineProperty(this,"maxConcurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxRetries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onFailedResponseHook",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"customFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxConcurrency=i.maxConcurrency??1/0,this.maxRetries=i.maxRetries??4,"default"in Wc?this.queue=new Wc.default({concurrency:this.maxConcurrency}):this.queue=new Wc({concurrency:this.maxConcurrency}),this.onFailedResponseHook=i==null?void 0:i.onFailedResponseHook,this.customFetch=i.fetch}call(i,...r){const a=this.onFailedResponseHook;return this.queue.add(()=>p1(()=>i(...r).catch(async s=>{throw s instanceof Error?s:A1(s)?await gl.fromResponse(s,{includeResponse:!!a}):new Error(s)}),{async onFailedAttempt(s){if(s.message.startsWith("Cancel")||s.message.startsWith("TimeoutError")||s.message.startsWith("AbortError")||(s==null?void 0:s.code)==="ECONNABORTED")throw s;if(s instanceof gl){if(E1.includes(s.status))throw s;a&&s.response&&await a(s.response)}},retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0})}callWithOptions(i,r,...a){return i.signal?Promise.race([this.call(r,...a),new Promise((s,o)=>{var c;(c=i.signal)==null||c.addEventListener("abort",()=>{o(new Error("AbortError"))})})]):this.call(r,...a)}fetch(...i){const r=this.customFetch??w1();return this.call(()=>r(...i).then(a=>a.ok?a:Promise.reject(a)))}}var ef={};function O1(t){try{return typeof process<"u"?ef==null?void 0:ef[t]:void 0}catch{return}}function z1(...t){const i=t.filter(a=>a!=null);if(i.length===0)return;if(i.length===1)return i[0];const r=new AbortController;for(const a of t){if(a!=null&&a.aborted)return r.abort(a.reason),r.signal;a==null||a.addEventListener("abort",()=>r.abort(a.reason),{once:!0})}return r.signal}const cl=13,Tf=10,M1=0,yg=58,R1=32,D1=[cl,Tf];class vg extends TransformStream{constructor(){let i=[],r=!1;super({start(){i=[],r=!1},transform(a,s){let o=a;if(r&&(o=as([[cl],o]),r=!1),o.length>0&&o.at(-1)===cl&&(r=!0,o=o.subarray(0,-1)),!o.length)return;const c=D1.includes(o.at(-1)),h=o.length-1,{lines:p}=o.reduce((m,g,y)=>(m.from>y||((g===cl||g===Tf)&&(m.lines.push(o.subarray(m.from,y)),g===cl&&o[y+1]===Tf?m.from=y+2:m.from=y+1),y===h&&m.from<=h&&m.lines.push(o.subarray(m.from))),m),{lines:[],from:0});if(p.length===1&&!c){i.push(p[0]);return}i.length&&(i.push(p[0]),p[0]=as(i),i=[]),c||p.length&&(i=[p.pop()]);for(const m of p)s.enqueue(m)},flush(a){i.length&&a.enqueue(as(i))}})}}class bg extends TransformStream{constructor(){let i="",r=[],a="",s=null;const o=new TextDecoder;super({transform(c,h){if(!c.length){if(!i&&!r.length&&!a&&s==null)return;const y={event:i,data:r.length?xg(o,r):null};i="",r=[],s=null,h.enqueue(y);return}if(c[0]===yg)return;const p=c.indexOf(yg);if(p===-1)return;const m=o.decode(c.subarray(0,p));let g=c.subarray(p+1);if(g[0]===R1&&(g=g.subarray(1)),m==="event")i=o.decode(g);else if(m==="data")r.push(g);else if(m==="id")g.indexOf(M1)===-1&&(a=o.decode(g));else if(m==="retry"){const y=Number.parseInt(o.decode(g));Number.isNaN(y)||(s=y)}},flush(c){i&&c.enqueue({event:i,data:r.length?xg(o,r):null})}})}}function as(t){const i=t.reduce((s,o)=>s+o.length,0);let r=new Uint8Array(i),a=0;for(const s of t)r.set(s,a),a+=s.length;return r}function xg(t,i){return JSON.parse(t.decode(as(i)))}class yl extends ReadableStream{constructor(){super(...arguments),Object.defineProperty(this,"reader",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}ensureReader(){this.reader||(this.reader=this.getReader())}async next(){this.ensureReader();try{const i=await this.reader.read();return i.done?(this.reader.releaseLock(),{done:!0,value:void 0}):{done:!1,value:i.value}}catch(i){throw this.reader.releaseLock(),i}}async return(){if(this.ensureReader(),this.locked){const i=this.reader.cancel();this.reader.releaseLock(),await i}return{done:!0,value:void 0}}async throw(i){if(this.ensureReader(),this.locked){const r=this.reader.cancel();this.reader.releaseLock(),await r}throw i}async[Symbol.asyncDispose](){await this.return()}[Symbol.asyncIterator](){return this}static fromReadableStream(i){const r=i.getReader();return new yl({start(a){return s();function s(){return r.read().then(({done:o,value:c})=>{if(o){a.close();return}return a.enqueue(c),s()})}},cancel(){r.releaseLock()}})}static fromAsyncGenerator(i){return new yl({async pull(r){const{value:a,done:s}=await i.next();s&&r.close(),r.enqueue(a)},async cancel(r){await i.return(r)}})}}function N1(t){if(t)return t;const i=["LANGGRAPH","LANGSMITH","LANGCHAIN"];for(const r of i){const a=O1(`${r}_API_KEY`);if(a)return a.trim().replace(/^["']|["']$/g,"")}}class Wr{constructor(i){var o;Object.defineProperty(this,"asyncCaller",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timeoutMs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"defaultHeaders",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r={maxRetries:4,maxConcurrency:4,...i==null?void 0:i.callerOptions};let a="http://localhost:8123";if(!(i!=null&&i.apiUrl)&&typeof globalThis=="object"&&globalThis!=null){const c=Symbol.for("langgraph_api:fetch"),h=Symbol.for("langgraph_api:url"),p=globalThis;p[c]&&(r.fetch??(r.fetch=p[c])),p[h]&&(a=p[h])}this.asyncCaller=new C1(r),this.timeoutMs=i==null?void 0:i.timeoutMs,this.apiUrl=((o=i==null?void 0:i.apiUrl)==null?void 0:o.replace(/\/$/,""))||a,this.defaultHeaders=(i==null?void 0:i.defaultHeaders)||{};const s=N1(i==null?void 0:i.apiKey);s&&(this.defaultHeaders["X-Api-Key"]=s)}prepareFetchOptions(i,r){const a={...r,headers:{...this.defaultHeaders,...r==null?void 0:r.headers}};a.json&&(a.body=JSON.stringify(a.json),a.headers={...a.headers,"Content-Type":"application/json"},delete a.json);let s=null;typeof(r==null?void 0:r.timeoutMs)<"u"?r.timeoutMs!=null&&(s=AbortSignal.timeout(r.timeoutMs)):this.timeoutMs!=null&&(s=AbortSignal.timeout(this.timeoutMs)),a.signal=z1(s,a.signal);const o=new URL(`${this.apiUrl}${i}`);if(a.params){for(const[c,h]of Object.entries(a.params)){if(h==null)continue;let p=typeof h=="string"||typeof h=="number"?h.toString():JSON.stringify(h);o.searchParams.append(c,p)}delete a.params}return[o,a]}async fetch(i,r){const a=await this.asyncCaller.fetch(...this.prepareFetchOptions(i,r));if(!(a.status===202||a.status===204))return a.json()}}class j1 extends Wr{async createForThread(i,r,a){const s={schedule:a==null?void 0:a.schedule,input:a==null?void 0:a.input,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,webhook:a==null?void 0:a.webhook,multitask_strategy:a==null?void 0:a.multitaskStrategy,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring};return this.fetch(`/threads/${i}/runs/crons`,{method:"POST",json:s})}async create(i,r){const a={schedule:r==null?void 0:r.schedule,input:r==null?void 0:r.input,config:r==null?void 0:r.config,metadata:r==null?void 0:r.metadata,assistant_id:i,interrupt_before:r==null?void 0:r.interruptBefore,interrupt_after:r==null?void 0:r.interruptAfter,webhook:r==null?void 0:r.webhook,multitask_strategy:r==null?void 0:r.multitaskStrategy,if_not_exists:r==null?void 0:r.ifNotExists,checkpoint_during:r==null?void 0:r.checkpointDuring};return this.fetch("/runs/crons",{method:"POST",json:a})}async delete(i){await this.fetch(`/runs/crons/${i}`,{method:"DELETE"})}async search(i){return this.fetch("/runs/crons/search",{method:"POST",json:{assistant_id:(i==null?void 0:i.assistantId)??void 0,thread_id:(i==null?void 0:i.threadId)??void 0,limit:(i==null?void 0:i.limit)??10,offset:(i==null?void 0:i.offset)??0}})}}class L1 extends Wr{async get(i){return this.fetch(`/assistants/${i}`)}async getGraph(i,r){return this.fetch(`/assistants/${i}/graph`,{params:{xray:r==null?void 0:r.xray}})}async getSchemas(i){return this.fetch(`/assistants/${i}/schemas`)}async getSubgraphs(i,r){return r!=null&&r.namespace?this.fetch(`/assistants/${i}/subgraphs/${r.namespace}`,{params:{recurse:r==null?void 0:r.recurse}}):this.fetch(`/assistants/${i}/subgraphs`,{params:{recurse:r==null?void 0:r.recurse}})}async create(i){return this.fetch("/assistants",{method:"POST",json:{graph_id:i.graphId,config:i.config,metadata:i.metadata,assistant_id:i.assistantId,if_exists:i.ifExists,name:i.name,description:i.description}})}async update(i,r){return this.fetch(`/assistants/${i}`,{method:"PATCH",json:{graph_id:r.graphId,config:r.config,metadata:r.metadata,name:r.name,description:r.description}})}async delete(i){return this.fetch(`/assistants/${i}`,{method:"DELETE"})}async search(i){return this.fetch("/assistants/search",{method:"POST",json:{graph_id:(i==null?void 0:i.graphId)??void 0,metadata:(i==null?void 0:i.metadata)??void 0,limit:(i==null?void 0:i.limit)??10,offset:(i==null?void 0:i.offset)??0,sort_by:(i==null?void 0:i.sortBy)??void 0,sort_order:(i==null?void 0:i.sortOrder)??void 0}})}async getVersions(i,r){return this.fetch(`/assistants/${i}/versions`,{method:"POST",json:{metadata:(r==null?void 0:r.metadata)??void 0,limit:(r==null?void 0:r.limit)??10,offset:(r==null?void 0:r.offset)??0}})}async setLatest(i,r){return this.fetch(`/assistants/${i}/latest`,{method:"POST",json:{version:r}})}}class U1 extends Wr{async get(i){return this.fetch(`/threads/${i}`)}async create(i){var r;return this.fetch("/threads",{method:"POST",json:{metadata:{...i==null?void 0:i.metadata,graph_id:i==null?void 0:i.graphId},thread_id:i==null?void 0:i.threadId,if_exists:i==null?void 0:i.ifExists,supersteps:(r=i==null?void 0:i.supersteps)==null?void 0:r.map(a=>({updates:a.updates.map(s=>({values:s.values,command:s.command,as_node:s.asNode}))}))}})}async copy(i){return this.fetch(`/threads/${i}/copy`,{method:"POST"})}async update(i,r){return this.fetch(`/threads/${i}`,{method:"PATCH",json:{metadata:r==null?void 0:r.metadata}})}async delete(i){return this.fetch(`/threads/${i}`,{method:"DELETE"})}async search(i){return this.fetch("/threads/search",{method:"POST",json:{metadata:(i==null?void 0:i.metadata)??void 0,limit:(i==null?void 0:i.limit)??10,offset:(i==null?void 0:i.offset)??0,status:i==null?void 0:i.status,sort_by:i==null?void 0:i.sortBy,sort_order:i==null?void 0:i.sortOrder}})}async getState(i,r,a){return r!=null?typeof r!="string"?this.fetch(`/threads/${i}/state/checkpoint`,{method:"POST",json:{checkpoint:r,subgraphs:a==null?void 0:a.subgraphs}}):this.fetch(`/threads/${i}/state/${r}`,{params:{subgraphs:a==null?void 0:a.subgraphs}}):this.fetch(`/threads/${i}/state`,{params:{subgraphs:a==null?void 0:a.subgraphs}})}async updateState(i,r){return this.fetch(`/threads/${i}/state`,{method:"POST",json:{values:r.values,checkpoint_id:r.checkpointId,checkpoint:r.checkpoint,as_node:r==null?void 0:r.asNode}})}async patchState(i,r){var s;let a;if(typeof i!="string"){if(typeof((s=i.configurable)==null?void 0:s.thread_id)!="string")throw new Error("Thread ID is required when updating state with a config.");a=i.configurable.thread_id}else a=i;return this.fetch(`/threads/${a}/state`,{method:"PATCH",json:{metadata:r}})}async getHistory(i,r){return this.fetch(`/threads/${i}/history`,{method:"POST",json:{limit:(r==null?void 0:r.limit)??10,before:r==null?void 0:r.before,metadata:r==null?void 0:r.metadata,checkpoint:r==null?void 0:r.checkpoint}})}}class B1 extends Wr{async*stream(i,r,a){const s={input:a==null?void 0:a.input,command:a==null?void 0:a.command,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,stream_mode:a==null?void 0:a.streamMode,stream_subgraphs:a==null?void 0:a.streamSubgraphs,feedback_keys:a==null?void 0:a.feedbackKeys,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,checkpoint:a==null?void 0:a.checkpoint,checkpoint_id:a==null?void 0:a.checkpointId,webhook:a==null?void 0:a.webhook,multitask_strategy:a==null?void 0:a.multitaskStrategy,on_completion:a==null?void 0:a.onCompletion,on_disconnect:a==null?void 0:a.onDisconnect,after_seconds:a==null?void 0:a.afterSeconds,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring},o=i==null?"/runs/stream":`/threads/${i}/runs/stream`,h=((await this.asyncCaller.fetch(...this.prepareFetchOptions(o,{method:"POST",json:s,timeoutMs:null,signal:a==null?void 0:a.signal}))).body||new ReadableStream({start:p=>p.close()})).pipeThrough(new vg).pipeThrough(new bg);yield*yl.fromReadableStream(h)}async create(i,r,a){const s={input:a==null?void 0:a.input,command:a==null?void 0:a.command,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,stream_mode:a==null?void 0:a.streamMode,stream_subgraphs:a==null?void 0:a.streamSubgraphs,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,webhook:a==null?void 0:a.webhook,checkpoint:a==null?void 0:a.checkpoint,checkpoint_id:a==null?void 0:a.checkpointId,multitask_strategy:a==null?void 0:a.multitaskStrategy,after_seconds:a==null?void 0:a.afterSeconds,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring};return this.fetch(`/threads/${i}/runs`,{method:"POST",json:s,signal:a==null?void 0:a.signal})}async createBatch(i){const r=i.map(a=>({...a,assistant_id:a.assistantId})).map(a=>Object.fromEntries(Object.entries(a).filter(([s,o])=>o!==void 0)));return this.fetch("/runs/batch",{method:"POST",json:r})}async wait(i,r,a){var p,m;const s={input:a==null?void 0:a.input,command:a==null?void 0:a.command,config:a==null?void 0:a.config,metadata:a==null?void 0:a.metadata,assistant_id:r,interrupt_before:a==null?void 0:a.interruptBefore,interrupt_after:a==null?void 0:a.interruptAfter,checkpoint:a==null?void 0:a.checkpoint,checkpoint_id:a==null?void 0:a.checkpointId,webhook:a==null?void 0:a.webhook,multitask_strategy:a==null?void 0:a.multitaskStrategy,on_completion:a==null?void 0:a.onCompletion,on_disconnect:a==null?void 0:a.onDisconnect,after_seconds:a==null?void 0:a.afterSeconds,if_not_exists:a==null?void 0:a.ifNotExists,checkpoint_during:a==null?void 0:a.checkpointDuring},o=i==null?"/runs/wait":`/threads/${i}/runs/wait`,c=await this.fetch(o,{method:"POST",json:s,timeoutMs:null,signal:a==null?void 0:a.signal});if(((a==null?void 0:a.raiseError)!==void 0?a.raiseError:!0)&&"__error__"in c&&typeof c.__error__=="object"&&c.__error__&&"error"in c.__error__&&"message"in c.__error__)throw new Error(`${(p=c.__error__)==null?void 0:p.error}: ${(m=c.__error__)==null?void 0:m.message}`);return c}async list(i,r){return this.fetch(`/threads/${i}/runs`,{params:{limit:(r==null?void 0:r.limit)??10,offset:(r==null?void 0:r.offset)??0,status:(r==null?void 0:r.status)??void 0}})}async get(i,r){return this.fetch(`/threads/${i}/runs/${r}`)}async cancel(i,r,a=!1,s="interrupt"){return this.fetch(`/threads/${i}/runs/${r}/cancel`,{method:"POST",params:{wait:a?"1":"0",action:s}})}async join(i,r,a){return this.fetch(`/threads/${i}/runs/${r}/join`,{timeoutMs:null,signal:a==null?void 0:a.signal})}async*joinStream(i,r,a){const s=typeof a=="object"&&a!=null&&a instanceof AbortSignal?{signal:a}:a,c=((await this.asyncCaller.fetch(...this.prepareFetchOptions(`/threads/${i}/runs/${r}/stream`,{method:"GET",timeoutMs:null,signal:s==null?void 0:s.signal,params:{cancel_on_disconnect:s!=null&&s.cancelOnDisconnect?"1":"0",stream_mode:s==null?void 0:s.streamMode}}))).body||new ReadableStream({start:h=>h.close()})).pipeThrough(new vg).pipeThrough(new bg);yield*yl.fromReadableStream(c)}async delete(i,r){return this.fetch(`/threads/${i}/runs/${r}`,{method:"DELETE"})}}class H1 extends Wr{async putItem(i,r,a,s){i.forEach(c=>{if(c.includes("."))throw new Error(`Invalid namespace label '${c}'. Namespace labels cannot contain periods ('.')`)});const o={namespace:i,key:r,value:a,index:s==null?void 0:s.index,ttl:s==null?void 0:s.ttl};return this.fetch("/store/items",{method:"PUT",json:o})}async getItem(i,r,a){i.forEach(c=>{if(c.includes("."))throw new Error(`Invalid namespace label '${c}'. Namespace labels cannot contain periods ('.')`)});const s={namespace:i.join("."),key:r};(a==null?void 0:a.refreshTtl)!==void 0&&(s.refresh_ttl=a.refreshTtl);const o=await this.fetch("/store/items",{params:s});return o?{...o,createdAt:o.created_at,updatedAt:o.updated_at}:null}async deleteItem(i,r){return i.forEach(a=>{if(a.includes("."))throw new Error(`Invalid namespace label '${a}'. Namespace labels cannot contain periods ('.')`)}),this.fetch("/store/items",{method:"DELETE",json:{namespace:i,key:r}})}async searchItems(i,r){const a={namespace_prefix:i,filter:r==null?void 0:r.filter,limit:(r==null?void 0:r.limit)??10,offset:(r==null?void 0:r.offset)??0,query:r==null?void 0:r.query,refresh_ttl:r==null?void 0:r.refreshTtl};return{items:(await this.fetch("/store/items/search",{method:"POST",json:a})).items.map(o=>({...o,createdAt:o.created_at,updatedAt:o.updated_at}))}}async listNamespaces(i){const r={prefix:i==null?void 0:i.prefix,suffix:i==null?void 0:i.suffix,max_depth:i==null?void 0:i.maxDepth,limit:(i==null?void 0:i.limit)??100,offset:(i==null?void 0:i.offset)??0};return this.fetch("/store/namespaces",{method:"POST",json:r})}}class Fi extends Wr{static getOrCached(i,r){if(Fi.promiseCache[i]!=null)return Fi.promiseCache[i];const a=r();return Fi.promiseCache[i]=a,a}async getComponent(i,r){return Fi.getOrCached(`${this.apiUrl}-${i}-${r}`,async()=>(await this.asyncCaller.fetch(...this.prepareFetchOptions(`/ui/${i}`,{headers:{Accept:"text/html","Content-Type":"application/json"},method:"POST",json:{name:r}}))).text())}}Object.defineProperty(Fi,"promiseCache",{enumerable:!0,configurable:!0,writable:!0,value:{}});class Z1{constructor(i){Object.defineProperty(this,"assistants",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threads",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"crons",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"~ui",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.assistants=new L1(i),this.threads=new U1(i),this.runs=new B1(i),this.crons=new j1(i),this.store=new H1(i),this["~ui"]=new Fi(i)}}var je;(function(t){t.assertEqual=s=>s;function i(s){}t.assertIs=i;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const o={};for(const c of s)o[c]=c;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),c={};for(const h of o)c[h]=s[h];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.push(c);return o},t.find=(s,o)=>{for(const c of s)if(o(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function a(s,o=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}t.joinValues=a,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(je||(je={}));var wf;(function(t){t.mergeShapes=(i,r)=>({...i,...r})})(wf||(wf={}));const ne=je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jn=t=>{switch(typeof t){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(t)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(t)?ne.array:t===null?ne.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ne.promise:typeof Map<"u"&&t instanceof Map?ne.map:typeof Set<"u"&&t instanceof Set?ne.set:typeof Date<"u"&&t instanceof Date?ne.date:ne.object;default:return ne.unknown}},Q=je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),q1=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class $t extends Error{get errors(){return this.issues}constructor(i){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=i}format(i){const r=i||function(o){return o.message},a={_errors:[]},s=o=>{for(const c of o.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)a._errors.push(r(c));else{let h=a,p=0;for(;p<c.path.length;){const m=c.path[p];p===c.path.length-1?(h[m]=h[m]||{_errors:[]},h[m]._errors.push(r(c))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),a}static assert(i){if(!(i instanceof $t))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=r=>r.message){const r={},a=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(i(s))):a.push(i(s));return{formErrors:a,fieldErrors:r}}get formErrors(){return this.flatten()}}$t.create=t=>new $t(t);const Fr=(t,i)=>{let r;switch(t.code){case Q.invalid_type:t.received===ne.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,je.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${je.joinValues(t.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${je.joinValues(t.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${je.joinValues(t.options)}, received '${t.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:je.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Q.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Q.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=i.defaultError,je.assertNever(t)}return{message:r}};let py=Fr;function V1(t){py=t}function us(){return py}const ss=t=>{const{data:i,path:r,errorMaps:a,issueData:s}=t,o=[...r,...s.path||[]],c={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let h="";const p=a.filter(m=>!!m).slice().reverse();for(const m of p)h=m(c,{data:i,defaultError:h}).message;return{...s,path:o,message:h}},Y1=[];function ee(t,i){const r=us(),a=ss({issueData:i,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Fr?void 0:Fr].filter(s=>!!s)});t.common.issues.push(a)}class Tt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,r){const a=[];for(const s of r){if(s.status==="aborted")return xe;s.status==="dirty"&&i.dirty(),a.push(s.value)}return{status:i.value,value:a}}static async mergeObjectAsync(i,r){const a=[];for(const s of r){const o=await s.key,c=await s.value;a.push({key:o,value:c})}return Tt.mergeObjectSync(i,a)}static mergeObjectSync(i,r){const a={};for(const s of r){const{key:o,value:c}=s;if(o.status==="aborted"||c.status==="aborted")return xe;o.status==="dirty"&&i.dirty(),c.status==="dirty"&&i.dirty(),o.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(a[o.value]=c.value)}return{status:i.value,value:a}}}const xe=Object.freeze({status:"aborted"}),Pr=t=>({status:"dirty",value:t}),zt=t=>({status:"valid",value:t}),Ef=t=>t.status==="aborted",Af=t=>t.status==="dirty",Ki=t=>t.status==="valid",vl=t=>typeof Promise<"u"&&t instanceof Promise;function os(t,i,r,a){if(typeof i=="function"?t!==i||!0:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i.get(t)}function gy(t,i,r,a,s){if(typeof i=="function"?t!==i||!0:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i.set(t,r),r}var fe;(function(t){t.errToObj=i=>typeof i=="string"?{message:i}:i||{},t.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(fe||(fe={}));var fl,hl;class Mn{constructor(i,r,a,s){this._cachedPath=[],this.parent=i,this.data=r,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const _g=(t,i)=>{if(Ki(i))return{success:!0,data:i.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new $t(t.common.issues);return this._error=r,this._error}}};function ke(t){if(!t)return{};const{errorMap:i,invalid_type_error:r,required_error:a,description:s}=t;if(i&&(r||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:s}:{errorMap:(c,h)=>{var p,m;const{message:g}=t;return c.code==="invalid_enum_value"?{message:g??h.defaultError}:typeof h.data>"u"?{message:(p=g??a)!==null&&p!==void 0?p:h.defaultError}:c.code!=="invalid_type"?{message:h.defaultError}:{message:(m=g??r)!==null&&m!==void 0?m:h.defaultError}},description:s}}class Ae{get description(){return this._def.description}_getType(i){return Jn(i.data)}_getOrReturnCtx(i,r){return r||{common:i.parent.common,data:i.data,parsedType:Jn(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new Tt,ctx:{common:i.parent.common,data:i.data,parsedType:Jn(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const r=this._parse(i);if(vl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(i){const r=this._parse(i);return Promise.resolve(r)}parse(i,r){const a=this.safeParse(i,r);if(a.success)return a.data;throw a.error}safeParse(i,r){var a;const s={common:{issues:[],async:(a=r==null?void 0:r.async)!==null&&a!==void 0?a:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)},o=this._parseSync({data:i,path:s.path,parent:s});return _g(s,o)}"~validate"(i){var r,a;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)};if(!this["~standard"].async)try{const o=this._parseSync({data:i,path:[],parent:s});return Ki(o)?{value:o.value}:{issues:s.common.issues}}catch(o){!((a=(r=o==null?void 0:o.message)===null||r===void 0?void 0:r.toLowerCase())===null||a===void 0)&&a.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:i,path:[],parent:s}).then(o=>Ki(o)?{value:o.value}:{issues:s.common.issues})}async parseAsync(i,r){const a=await this.safeParseAsync(i,r);if(a.success)return a.data;throw a.error}async safeParseAsync(i,r){const a={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)},s=this._parse({data:i,path:a.path,parent:a}),o=await(vl(s)?s:Promise.resolve(s));return _g(a,o)}refine(i,r){const a=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const c=i(s),h=()=>o.addIssue({code:Q.custom,...a(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(h(),!1)):c?!0:(h(),!1)})}refinement(i,r){return this._refinement((a,s)=>i(a)?!0:(s.addIssue(typeof r=="function"?r(a,s):r),!1))}_refinement(i){return new _n({schema:this,typeName:K.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return bn.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vn.create(this)}promise(){return Kr.create(this,this._def)}or(i){return Sl.create([this,i],this._def)}and(i){return kl.create(this,i,this._def)}transform(i){return new _n({...ke(this._def),schema:this,typeName:K.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const r=typeof i=="function"?i:()=>i;return new Cl({...ke(this._def),innerType:this,defaultValue:r,typeName:K.ZodDefault})}brand(){return new Vf({typeName:K.ZodBranded,type:this,...ke(this._def)})}catch(i){const r=typeof i=="function"?i:()=>i;return new Ol({...ke(this._def),innerType:this,catchValue:r,typeName:K.ZodCatch})}describe(i){const r=this.constructor;return new r({...this._def,description:i})}pipe(i){return Nl.create(this,i)}readonly(){return zl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const I1=/^c[^\s-]{8,}$/i,G1=/^[0-9a-z]+$/,P1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Q1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,X1=/^[a-z0-9_-]{21}$/i,F1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,K1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,J1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tf;const W1=/^(?:(?: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])$/,ex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,tx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,nx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ix=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rx=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yy="((\\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])))",ax=new RegExp(`^${yy}$`);function vy(t){let i="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?i=`${i}\\.\\d{${t.precision}}`:t.precision==null&&(i=`${i}(\\.\\d+)?`),i}function lx(t){return new RegExp(`^${vy(t)}$`)}function by(t){let i=`${yy}T${vy(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${r.join("|")})`,new RegExp(`^${i}$`)}function ux(t,i){return!!((i==="v4"||!i)&&W1.test(t)||(i==="v6"||!i)&&tx.test(t))}function sx(t,i){if(!F1.test(t))return!1;try{const[r]=t.split("."),a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(a));return!(typeof s!="object"||s===null||!s.typ||!s.alg||i&&s.alg!==i)}catch{return!1}}function ox(t,i){return!!((i==="v4"||!i)&&ex.test(t)||(i==="v6"||!i)&&nx.test(t))}class yn extends Ae{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==ne.string){const o=this._getOrReturnCtx(i);return ee(o,{code:Q.invalid_type,expected:ne.string,received:o.parsedType}),xe}const a=new Tt;let s;for(const o of this._def.checks)if(o.kind==="min")i.data.length<o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")i.data.length>o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const c=i.data.length>o.value,h=i.data.length<o.value;(c||h)&&(s=this._getOrReturnCtx(i,s),c?ee(s,{code:Q.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&ee(s,{code:Q.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")K1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"email",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")tf||(tf=new RegExp(J1,"u")),tf.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"emoji",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")Q1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"uuid",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")X1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"nanoid",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")I1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"cuid",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")G1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"cuid2",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")P1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"ulid",code:Q.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(i.data)}catch{s=this._getOrReturnCtx(i,s),ee(s,{validation:"url",code:Q.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"regex",code:Q.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?i.data=i.data.trim():o.kind==="includes"?i.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?i.data=i.data.toLowerCase():o.kind==="toUpperCase"?i.data=i.data.toUpperCase():o.kind==="startsWith"?i.data.startsWith(o.value)||(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?i.data.endsWith(o.value)||(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?by(o).test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?ax.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?lx(o).test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?$1.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"duration",code:Q.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?ux(i.data,o.version)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"ip",code:Q.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?sx(i.data,o.alg)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"jwt",code:Q.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?ox(i.data,o.version)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"cidr",code:Q.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?ix.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"base64",code:Q.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?rx.test(i.data)||(s=this._getOrReturnCtx(i,s),ee(s,{validation:"base64url",code:Q.invalid_string,message:o.message}),a.dirty()):je.assertNever(o);return{status:a.value,value:i.data}}_regex(i,r,a){return this.refinement(s=>i.test(s),{validation:r,code:Q.invalid_string,...fe.errToObj(a)})}_addCheck(i){return new yn({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...fe.errToObj(i)})}url(i){return this._addCheck({kind:"url",...fe.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...fe.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...fe.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...fe.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...fe.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...fe.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...fe.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...fe.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...fe.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...fe.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...fe.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...fe.errToObj(i)})}datetime(i){var r,a;return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(r=i==null?void 0:i.offset)!==null&&r!==void 0?r:!1,local:(a=i==null?void 0:i.local)!==null&&a!==void 0?a:!1,...fe.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...fe.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...fe.errToObj(i)})}regex(i,r){return this._addCheck({kind:"regex",regex:i,...fe.errToObj(r)})}includes(i,r){return this._addCheck({kind:"includes",value:i,position:r==null?void 0:r.position,...fe.errToObj(r==null?void 0:r.message)})}startsWith(i,r){return this._addCheck({kind:"startsWith",value:i,...fe.errToObj(r)})}endsWith(i,r){return this._addCheck({kind:"endsWith",value:i,...fe.errToObj(r)})}min(i,r){return this._addCheck({kind:"min",value:i,...fe.errToObj(r)})}max(i,r){return this._addCheck({kind:"max",value:i,...fe.errToObj(r)})}length(i,r){return this._addCheck({kind:"length",value:i,...fe.errToObj(r)})}nonempty(i){return this.min(1,fe.errToObj(i))}trim(){return new yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i}get maxLength(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i}}yn.create=t=>{var i;return new yn({checks:[],typeName:K.ZodString,coerce:(i=t==null?void 0:t.coerce)!==null&&i!==void 0?i:!1,...ke(t)})};function cx(t,i){const r=(t.toString().split(".")[1]||"").length,a=(i.toString().split(".")[1]||"").length,s=r>a?r:a,o=parseInt(t.toFixed(s).replace(".","")),c=parseInt(i.toFixed(s).replace(".",""));return o%c/Math.pow(10,s)}class Ei extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==ne.number){const o=this._getOrReturnCtx(i);return ee(o,{code:Q.invalid_type,expected:ne.number,received:o.parsedType}),xe}let a;const s=new Tt;for(const o of this._def.checks)o.kind==="int"?je.isInteger(i.data)||(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?i.data<o.value:i.data<=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?i.data>o.value:i.data>=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?cx(i.data,o.value)!==0&&(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(i.data)||(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.not_finite,message:o.message}),s.dirty()):je.assertNever(o);return{status:s.value,value:i.data}}gte(i,r){return this.setLimit("min",i,!0,fe.toString(r))}gt(i,r){return this.setLimit("min",i,!1,fe.toString(r))}lte(i,r){return this.setLimit("max",i,!0,fe.toString(r))}lt(i,r){return this.setLimit("max",i,!1,fe.toString(r))}setLimit(i,r,a,s){return new Ei({...this._def,checks:[...this._def.checks,{kind:i,value:r,inclusive:a,message:fe.toString(s)}]})}_addCheck(i){return new Ei({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:fe.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(i)})}multipleOf(i,r){return this._addCheck({kind:"multipleOf",value:i,message:fe.toString(r)})}finite(i){return this._addCheck({kind:"finite",message:fe.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(i)})}get minValue(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i}get maxValue(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&je.isInteger(i.value))}get isFinite(){let i=null,r=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(i===null||a.value<i)&&(i=a.value)}return Number.isFinite(r)&&Number.isFinite(i)}}Ei.create=t=>new Ei({checks:[],typeName:K.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ke(t)});class Ai extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==ne.bigint)return this._getInvalidInput(i);let a;const s=new Tt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?i.data<o.value:i.data<=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?i.data>o.value:i.data>=o.value)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?i.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(i,a),ee(a,{code:Q.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):je.assertNever(o);return{status:s.value,value:i.data}}_getInvalidInput(i){const r=this._getOrReturnCtx(i);return ee(r,{code:Q.invalid_type,expected:ne.bigint,received:r.parsedType}),xe}gte(i,r){return this.setLimit("min",i,!0,fe.toString(r))}gt(i,r){return this.setLimit("min",i,!1,fe.toString(r))}lte(i,r){return this.setLimit("max",i,!0,fe.toString(r))}lt(i,r){return this.setLimit("max",i,!1,fe.toString(r))}setLimit(i,r,a,s){return new Ai({...this._def,checks:[...this._def.checks,{kind:i,value:r,inclusive:a,message:fe.toString(s)}]})}_addCheck(i){return new Ai({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(i)})}multipleOf(i,r){return this._addCheck({kind:"multipleOf",value:i,message:fe.toString(r)})}get minValue(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i}get maxValue(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i}}Ai.create=t=>{var i;return new Ai({checks:[],typeName:K.ZodBigInt,coerce:(i=t==null?void 0:t.coerce)!==null&&i!==void 0?i:!1,...ke(t)})};class bl extends Ae{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==ne.boolean){const a=this._getOrReturnCtx(i);return ee(a,{code:Q.invalid_type,expected:ne.boolean,received:a.parsedType}),xe}return zt(i.data)}}bl.create=t=>new bl({typeName:K.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ke(t)});class Ji extends Ae{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==ne.date){const o=this._getOrReturnCtx(i);return ee(o,{code:Q.invalid_type,expected:ne.date,received:o.parsedType}),xe}if(isNaN(i.data.getTime())){const o=this._getOrReturnCtx(i);return ee(o,{code:Q.invalid_date}),xe}const a=new Tt;let s;for(const o of this._def.checks)o.kind==="min"?i.data.getTime()<o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?i.data.getTime()>o.value&&(s=this._getOrReturnCtx(i,s),ee(s,{code:Q.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):je.assertNever(o);return{status:a.value,value:new Date(i.data.getTime())}}_addCheck(i){return new Ji({...this._def,checks:[...this._def.checks,i]})}min(i,r){return this._addCheck({kind:"min",value:i.getTime(),message:fe.toString(r)})}max(i,r){return this._addCheck({kind:"max",value:i.getTime(),message:fe.toString(r)})}get minDate(){let i=null;for(const r of this._def.checks)r.kind==="min"&&(i===null||r.value>i)&&(i=r.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const r of this._def.checks)r.kind==="max"&&(i===null||r.value<i)&&(i=r.value);return i!=null?new Date(i):null}}Ji.create=t=>new Ji({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:K.ZodDate,...ke(t)});class cs extends Ae{_parse(i){if(this._getType(i)!==ne.symbol){const a=this._getOrReturnCtx(i);return ee(a,{code:Q.invalid_type,expected:ne.symbol,received:a.parsedType}),xe}return zt(i.data)}}cs.create=t=>new cs({typeName:K.ZodSymbol,...ke(t)});class xl extends Ae{_parse(i){if(this._getType(i)!==ne.undefined){const a=this._getOrReturnCtx(i);return ee(a,{code:Q.invalid_type,expected:ne.undefined,received:a.parsedType}),xe}return zt(i.data)}}xl.create=t=>new xl({typeName:K.ZodUndefined,...ke(t)});class _l extends Ae{_parse(i){if(this._getType(i)!==ne.null){const a=this._getOrReturnCtx(i);return ee(a,{code:Q.invalid_type,expected:ne.null,received:a.parsedType}),xe}return zt(i.data)}}_l.create=t=>new _l({typeName:K.ZodNull,...ke(t)});class $r extends Ae{constructor(){super(...arguments),this._any=!0}_parse(i){return zt(i.data)}}$r.create=t=>new $r({typeName:K.ZodAny,...ke(t)});class $i extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(i){return zt(i.data)}}$i.create=t=>new $i({typeName:K.ZodUnknown,...ke(t)});class Wn extends Ae{_parse(i){const r=this._getOrReturnCtx(i);return ee(r,{code:Q.invalid_type,expected:ne.never,received:r.parsedType}),xe}}Wn.create=t=>new Wn({typeName:K.ZodNever,...ke(t)});class fs extends Ae{_parse(i){if(this._getType(i)!==ne.undefined){const a=this._getOrReturnCtx(i);return ee(a,{code:Q.invalid_type,expected:ne.void,received:a.parsedType}),xe}return zt(i.data)}}fs.create=t=>new fs({typeName:K.ZodVoid,...ke(t)});class vn extends Ae{_parse(i){const{ctx:r,status:a}=this._processInputParams(i),s=this._def;if(r.parsedType!==ne.array)return ee(r,{code:Q.invalid_type,expected:ne.array,received:r.parsedType}),xe;if(s.exactLength!==null){const c=r.data.length>s.exactLength.value,h=r.data.length<s.exactLength.value;(c||h)&&(ee(r,{code:c?Q.too_big:Q.too_small,minimum:h?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ee(r,{code:Q.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ee(r,{code:Q.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),r.common.async)return Promise.all([...r.data].map((c,h)=>s.type._parseAsync(new Mn(r,c,r.path,h)))).then(c=>Tt.mergeArray(a,c));const o=[...r.data].map((c,h)=>s.type._parseSync(new Mn(r,c,r.path,h)));return Tt.mergeArray(a,o)}get element(){return this._def.type}min(i,r){return new vn({...this._def,minLength:{value:i,message:fe.toString(r)}})}max(i,r){return new vn({...this._def,maxLength:{value:i,message:fe.toString(r)}})}length(i,r){return new vn({...this._def,exactLength:{value:i,message:fe.toString(r)}})}nonempty(i){return this.min(1,i)}}vn.create=(t,i)=>new vn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:K.ZodArray,...ke(i)});function Ir(t){if(t instanceof et){const i={};for(const r in t.shape){const a=t.shape[r];i[r]=bn.create(Ir(a))}return new et({...t._def,shape:()=>i})}else return t instanceof vn?new vn({...t._def,type:Ir(t.element)}):t instanceof bn?bn.create(Ir(t.unwrap())):t instanceof Oi?Oi.create(Ir(t.unwrap())):t instanceof Rn?Rn.create(t.items.map(i=>Ir(i))):t}class et extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),r=je.objectKeys(i);return this._cached={shape:i,keys:r}}_parse(i){if(this._getType(i)!==ne.object){const m=this._getOrReturnCtx(i);return ee(m,{code:Q.invalid_type,expected:ne.object,received:m.parsedType}),xe}const{status:a,ctx:s}=this._processInputParams(i),{shape:o,keys:c}=this._getCached(),h=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const m in s.data)c.includes(m)||h.push(m);const p=[];for(const m of c){const g=o[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:g._parse(new Mn(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof Wn){const m=this._def.unknownKeys;if(m==="passthrough")for(const g of h)p.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(m==="strict")h.length>0&&(ee(s,{code:Q.unrecognized_keys,keys:h}),a.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const g of h){const y=s.data[g];p.push({key:{status:"valid",value:g},value:m._parse(new Mn(s,y,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const g of p){const y=await g.key,x=await g.value;m.push({key:y,value:x,alwaysSet:g.alwaysSet})}return m}).then(m=>Tt.mergeObjectSync(a,m)):Tt.mergeObjectSync(a,p)}get shape(){return this._def.shape()}strict(i){return fe.errToObj,new et({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(r,a)=>{var s,o,c,h;const p=(c=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,a).message)!==null&&c!==void 0?c:a.defaultError;return r.code==="unrecognized_keys"?{message:(h=fe.errToObj(i).message)!==null&&h!==void 0?h:p}:{message:p}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(i){return new et({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new et({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:K.ZodObject})}setKey(i,r){return this.augment({[i]:r})}catchall(i){return new et({...this._def,catchall:i})}pick(i){const r={};return je.objectKeys(i).forEach(a=>{i[a]&&this.shape[a]&&(r[a]=this.shape[a])}),new et({...this._def,shape:()=>r})}omit(i){const r={};return je.objectKeys(this.shape).forEach(a=>{i[a]||(r[a]=this.shape[a])}),new et({...this._def,shape:()=>r})}deepPartial(){return Ir(this)}partial(i){const r={};return je.objectKeys(this.shape).forEach(a=>{const s=this.shape[a];i&&!i[a]?r[a]=s:r[a]=s.optional()}),new et({...this._def,shape:()=>r})}required(i){const r={};return je.objectKeys(this.shape).forEach(a=>{if(i&&!i[a])r[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof bn;)o=o._def.innerType;r[a]=o}}),new et({...this._def,shape:()=>r})}keyof(){return xy(je.objectKeys(this.shape))}}et.create=(t,i)=>new et({shape:()=>t,unknownKeys:"strip",catchall:Wn.create(),typeName:K.ZodObject,...ke(i)});et.strictCreate=(t,i)=>new et({shape:()=>t,unknownKeys:"strict",catchall:Wn.create(),typeName:K.ZodObject,...ke(i)});et.lazycreate=(t,i)=>new et({shape:t,unknownKeys:"strip",catchall:Wn.create(),typeName:K.ZodObject,...ke(i)});class Sl extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i),a=this._def.options;function s(o){for(const h of o)if(h.result.status==="valid")return h.result;for(const h of o)if(h.result.status==="dirty")return r.common.issues.push(...h.ctx.common.issues),h.result;const c=o.map(h=>new $t(h.ctx.common.issues));return ee(r,{code:Q.invalid_union,unionErrors:c}),xe}if(r.common.async)return Promise.all(a.map(async o=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(s);{let o;const c=[];for(const p of a){const m={...r,common:{...r.common,issues:[]},parent:null},g=p._parseSync({data:r.data,path:r.path,parent:m});if(g.status==="valid")return g;g.status==="dirty"&&!o&&(o={result:g,ctx:m}),m.common.issues.length&&c.push(m.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const h=c.map(p=>new $t(p));return ee(r,{code:Q.invalid_union,unionErrors:h}),xe}}get options(){return this._def.options}}Sl.create=(t,i)=>new Sl({options:t,typeName:K.ZodUnion,...ke(i)});const Kn=t=>t instanceof wl?Kn(t.schema):t instanceof _n?Kn(t.innerType()):t instanceof El?[t.value]:t instanceof Ci?t.options:t instanceof Al?je.objectValues(t.enum):t instanceof Cl?Kn(t._def.innerType):t instanceof xl?[void 0]:t instanceof _l?[null]:t instanceof bn?[void 0,...Kn(t.unwrap())]:t instanceof Oi?[null,...Kn(t.unwrap())]:t instanceof Vf||t instanceof zl?Kn(t.unwrap()):t instanceof Ol?Kn(t._def.innerType):[];class bs extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i);if(r.parsedType!==ne.object)return ee(r,{code:Q.invalid_type,expected:ne.object,received:r.parsedType}),xe;const a=this.discriminator,s=r.data[a],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(ee(r,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(i,r,a){const s=new Map;for(const o of r){const c=Kn(o.shape[i]);if(!c.length)throw new Error(`A discriminator value for key \`${i}\` could not be extracted from all schema options`);for(const h of c){if(s.has(h))throw new Error(`Discriminator property ${String(i)} has duplicate value ${String(h)}`);s.set(h,o)}}return new bs({typeName:K.ZodDiscriminatedUnion,discriminator:i,options:r,optionsMap:s,...ke(a)})}}function Cf(t,i){const r=Jn(t),a=Jn(i);if(t===i)return{valid:!0,data:t};if(r===ne.object&&a===ne.object){const s=je.objectKeys(i),o=je.objectKeys(t).filter(h=>s.indexOf(h)!==-1),c={...t,...i};for(const h of o){const p=Cf(t[h],i[h]);if(!p.valid)return{valid:!1};c[h]=p.data}return{valid:!0,data:c}}else if(r===ne.array&&a===ne.array){if(t.length!==i.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const c=t[o],h=i[o],p=Cf(c,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return r===ne.date&&a===ne.date&&+t==+i?{valid:!0,data:t}:{valid:!1}}class kl extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i),s=(o,c)=>{if(Ef(o)||Ef(c))return xe;const h=Cf(o.value,c.value);return h.valid?((Af(o)||Af(c))&&r.dirty(),{status:r.value,value:h.data}):(ee(a,{code:Q.invalid_intersection_types}),xe)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,c])=>s(o,c)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}kl.create=(t,i,r)=>new kl({left:t,right:i,typeName:K.ZodIntersection,...ke(r)});class Rn extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.array)return ee(a,{code:Q.invalid_type,expected:ne.array,received:a.parsedType}),xe;if(a.data.length<this._def.items.length)return ee(a,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&a.data.length>this._def.items.length&&(ee(a,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...a.data].map((c,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Mn(a,c,a.path,h)):null}).filter(c=>!!c);return a.common.async?Promise.all(o).then(c=>Tt.mergeArray(r,c)):Tt.mergeArray(r,o)}get items(){return this._def.items}rest(i){return new Rn({...this._def,rest:i})}}Rn.create=(t,i)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:t,typeName:K.ZodTuple,rest:null,...ke(i)})};class Tl extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.object)return ee(a,{code:Q.invalid_type,expected:ne.object,received:a.parsedType}),xe;const s=[],o=this._def.keyType,c=this._def.valueType;for(const h in a.data)s.push({key:o._parse(new Mn(a,h,a.path,h)),value:c._parse(new Mn(a,a.data[h],a.path,h)),alwaysSet:h in a.data});return a.common.async?Tt.mergeObjectAsync(r,s):Tt.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(i,r,a){return r instanceof Ae?new Tl({keyType:i,valueType:r,typeName:K.ZodRecord,...ke(a)}):new Tl({keyType:yn.create(),valueType:i,typeName:K.ZodRecord,...ke(r)})}}class hs extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.map)return ee(a,{code:Q.invalid_type,expected:ne.map,received:a.parsedType}),xe;const s=this._def.keyType,o=this._def.valueType,c=[...a.data.entries()].map(([h,p],m)=>({key:s._parse(new Mn(a,h,a.path,[m,"key"])),value:o._parse(new Mn(a,p,a.path,[m,"value"]))}));if(a.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const p of c){const m=await p.key,g=await p.value;if(m.status==="aborted"||g.status==="aborted")return xe;(m.status==="dirty"||g.status==="dirty")&&r.dirty(),h.set(m.value,g.value)}return{status:r.value,value:h}})}else{const h=new Map;for(const p of c){const m=p.key,g=p.value;if(m.status==="aborted"||g.status==="aborted")return xe;(m.status==="dirty"||g.status==="dirty")&&r.dirty(),h.set(m.value,g.value)}return{status:r.value,value:h}}}}hs.create=(t,i,r)=>new hs({valueType:i,keyType:t,typeName:K.ZodMap,...ke(r)});class Wi extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.parsedType!==ne.set)return ee(a,{code:Q.invalid_type,expected:ne.set,received:a.parsedType}),xe;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(ee(a,{code:Q.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(ee(a,{code:Q.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function c(p){const m=new Set;for(const g of p){if(g.status==="aborted")return xe;g.status==="dirty"&&r.dirty(),m.add(g.value)}return{status:r.value,value:m}}const h=[...a.data.values()].map((p,m)=>o._parse(new Mn(a,p,a.path,m)));return a.common.async?Promise.all(h).then(p=>c(p)):c(h)}min(i,r){return new Wi({...this._def,minSize:{value:i,message:fe.toString(r)}})}max(i,r){return new Wi({...this._def,maxSize:{value:i,message:fe.toString(r)}})}size(i,r){return this.min(i,r).max(i,r)}nonempty(i){return this.min(1,i)}}Wi.create=(t,i)=>new Wi({valueType:t,minSize:null,maxSize:null,typeName:K.ZodSet,...ke(i)});class Qr extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(i){const{ctx:r}=this._processInputParams(i);if(r.parsedType!==ne.function)return ee(r,{code:Q.invalid_type,expected:ne.function,received:r.parsedType}),xe;function a(h,p){return ss({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,us(),Fr].filter(m=>!!m),issueData:{code:Q.invalid_arguments,argumentsError:p}})}function s(h,p){return ss({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,us(),Fr].filter(m=>!!m),issueData:{code:Q.invalid_return_type,returnTypeError:p}})}const o={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof Kr){const h=this;return zt(async function(...p){const m=new $t([]),g=await h._def.args.parseAsync(p,o).catch(S=>{throw m.addIssue(a(p,S)),m}),y=await Reflect.apply(c,this,g);return await h._def.returns._def.type.parseAsync(y,o).catch(S=>{throw m.addIssue(s(y,S)),m})})}else{const h=this;return zt(function(...p){const m=h._def.args.safeParse(p,o);if(!m.success)throw new $t([a(p,m.error)]);const g=Reflect.apply(c,this,m.data),y=h._def.returns.safeParse(g,o);if(!y.success)throw new $t([s(g,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...i){return new Qr({...this._def,args:Rn.create(i).rest($i.create())})}returns(i){return new Qr({...this._def,returns:i})}implement(i){return this.parse(i)}strictImplement(i){return this.parse(i)}static create(i,r,a){return new Qr({args:i||Rn.create([]).rest($i.create()),returns:r||$i.create(),typeName:K.ZodFunction,...ke(a)})}}class wl extends Ae{get schema(){return this._def.getter()}_parse(i){const{ctx:r}=this._processInputParams(i);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}wl.create=(t,i)=>new wl({getter:t,typeName:K.ZodLazy,...ke(i)});class El extends Ae{_parse(i){if(i.data!==this._def.value){const r=this._getOrReturnCtx(i);return ee(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:i.data}}get value(){return this._def.value}}El.create=(t,i)=>new El({value:t,typeName:K.ZodLiteral,...ke(i)});function xy(t,i){return new Ci({values:t,typeName:K.ZodEnum,...ke(i)})}class Ci extends Ae{constructor(){super(...arguments),fl.set(this,void 0)}_parse(i){if(typeof i.data!="string"){const r=this._getOrReturnCtx(i),a=this._def.values;return ee(r,{expected:je.joinValues(a),received:r.parsedType,code:Q.invalid_type}),xe}if(os(this,fl)||gy(this,fl,new Set(this._def.values)),!os(this,fl).has(i.data)){const r=this._getOrReturnCtx(i),a=this._def.values;return ee(r,{received:r.data,code:Q.invalid_enum_value,options:a}),xe}return zt(i.data)}get options(){return this._def.values}get enum(){const i={};for(const r of this._def.values)i[r]=r;return i}get Values(){const i={};for(const r of this._def.values)i[r]=r;return i}get Enum(){const i={};for(const r of this._def.values)i[r]=r;return i}extract(i,r=this._def){return Ci.create(i,{...this._def,...r})}exclude(i,r=this._def){return Ci.create(this.options.filter(a=>!i.includes(a)),{...this._def,...r})}}fl=new WeakMap;Ci.create=xy;class Al extends Ae{constructor(){super(...arguments),hl.set(this,void 0)}_parse(i){const r=je.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(i);if(a.parsedType!==ne.string&&a.parsedType!==ne.number){const s=je.objectValues(r);return ee(a,{expected:je.joinValues(s),received:a.parsedType,code:Q.invalid_type}),xe}if(os(this,hl)||gy(this,hl,new Set(je.getValidEnumValues(this._def.values))),!os(this,hl).has(i.data)){const s=je.objectValues(r);return ee(a,{received:a.data,code:Q.invalid_enum_value,options:s}),xe}return zt(i.data)}get enum(){return this._def.values}}hl=new WeakMap;Al.create=(t,i)=>new Al({values:t,typeName:K.ZodNativeEnum,...ke(i)});class Kr extends Ae{unwrap(){return this._def.type}_parse(i){const{ctx:r}=this._processInputParams(i);if(r.parsedType!==ne.promise&&r.common.async===!1)return ee(r,{code:Q.invalid_type,expected:ne.promise,received:r.parsedType}),xe;const a=r.parsedType===ne.promise?r.data:Promise.resolve(r.data);return zt(a.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Kr.create=(t,i)=>new Kr({type:t,typeName:K.ZodPromise,...ke(i)});class _n extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===K.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:r,ctx:a}=this._processInputParams(i),s=this._def.effect||null,o={addIssue:c=>{ee(a,c),c.fatal?r.abort():r.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const c=s.transform(a.data,o);if(a.common.async)return Promise.resolve(c).then(async h=>{if(r.value==="aborted")return xe;const p=await this._def.schema._parseAsync({data:h,path:a.path,parent:a});return p.status==="aborted"?xe:p.status==="dirty"||r.value==="dirty"?Pr(p.value):p});{if(r.value==="aborted")return xe;const h=this._def.schema._parseSync({data:c,path:a.path,parent:a});return h.status==="aborted"?xe:h.status==="dirty"||r.value==="dirty"?Pr(h.value):h}}if(s.type==="refinement"){const c=h=>{const p=s.refinement(h,o);if(a.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(a.common.async===!1){const h=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return h.status==="aborted"?xe:(h.status==="dirty"&&r.dirty(),c(h.value),{status:r.value,value:h.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(h=>h.status==="aborted"?xe:(h.status==="dirty"&&r.dirty(),c(h.value).then(()=>({status:r.value,value:h.value}))))}if(s.type==="transform")if(a.common.async===!1){const c=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Ki(c))return c;const h=s.transform(c.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:h}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(c=>Ki(c)?Promise.resolve(s.transform(c.value,o)).then(h=>({status:r.value,value:h})):c);je.assertNever(s)}}_n.create=(t,i,r)=>new _n({schema:t,typeName:K.ZodEffects,effect:i,...ke(r)});_n.createWithPreprocess=(t,i,r)=>new _n({schema:i,effect:{type:"preprocess",transform:t},typeName:K.ZodEffects,...ke(r)});class bn extends Ae{_parse(i){return this._getType(i)===ne.undefined?zt(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}bn.create=(t,i)=>new bn({innerType:t,typeName:K.ZodOptional,...ke(i)});class Oi extends Ae{_parse(i){return this._getType(i)===ne.null?zt(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}Oi.create=(t,i)=>new Oi({innerType:t,typeName:K.ZodNullable,...ke(i)});class Cl extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i);let a=r.data;return r.parsedType===ne.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Cl.create=(t,i)=>new Cl({innerType:t,typeName:K.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,...ke(i)});class Ol extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i),a={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return vl(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new $t(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new $t(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ol.create=(t,i)=>new Ol({innerType:t,typeName:K.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,...ke(i)});class ds extends Ae{_parse(i){if(this._getType(i)!==ne.nan){const a=this._getOrReturnCtx(i);return ee(a,{code:Q.invalid_type,expected:ne.nan,received:a.parsedType}),xe}return{status:"valid",value:i.data}}}ds.create=t=>new ds({typeName:K.ZodNaN,...ke(t)});const fx=Symbol("zod_brand");class Vf extends Ae{_parse(i){const{ctx:r}=this._processInputParams(i),a=r.data;return this._def.type._parse({data:a,path:r.path,parent:r})}unwrap(){return this._def.type}}class Nl extends Ae{_parse(i){const{status:r,ctx:a}=this._processInputParams(i);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?xe:o.status==="dirty"?(r.dirty(),Pr(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?xe:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(i,r){return new Nl({in:i,out:r,typeName:K.ZodPipeline})}}class zl extends Ae{_parse(i){const r=this._def.innerType._parse(i),a=s=>(Ki(s)&&(s.value=Object.freeze(s.value)),s);return vl(r)?r.then(s=>a(s)):a(r)}unwrap(){return this._def.innerType}}zl.create=(t,i)=>new zl({innerType:t,typeName:K.ZodReadonly,...ke(i)});function Sg(t,i){const r=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function _y(t,i={},r){return t?$r.create().superRefine((a,s)=>{var o,c;const h=t(a);if(h instanceof Promise)return h.then(p=>{var m,g;if(!p){const y=Sg(i,a),x=(g=(m=y.fatal)!==null&&m!==void 0?m:r)!==null&&g!==void 0?g:!0;s.addIssue({code:"custom",...y,fatal:x})}});if(!h){const p=Sg(i,a),m=(c=(o=p.fatal)!==null&&o!==void 0?o:r)!==null&&c!==void 0?c:!0;s.addIssue({code:"custom",...p,fatal:m})}}):$r.create()}const hx={object:et.lazycreate};var K;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(K||(K={}));const dx=(t,i={message:`Input not instance of ${t.name}`})=>_y(r=>r instanceof t,i),Sy=yn.create,ky=Ei.create,mx=ds.create,px=Ai.create,Ty=bl.create,gx=Ji.create,yx=cs.create,vx=xl.create,bx=_l.create,xx=$r.create,_x=$i.create,Sx=Wn.create,kx=fs.create,Tx=vn.create,wx=et.create,Ex=et.strictCreate,Ax=Sl.create,Cx=bs.create,Ox=kl.create,zx=Rn.create,Mx=Tl.create,Rx=hs.create,Dx=Wi.create,Nx=Qr.create,jx=wl.create,Lx=El.create,Ux=Ci.create,Bx=Al.create,Hx=Kr.create,kg=_n.create,Zx=bn.create,qx=Oi.create,Vx=_n.createWithPreprocess,Yx=Nl.create,Ix=()=>Sy().optional(),Gx=()=>ky().optional(),Px=()=>Ty().optional(),Qx={string:t=>yn.create({...t,coerce:!0}),number:t=>Ei.create({...t,coerce:!0}),boolean:t=>bl.create({...t,coerce:!0}),bigint:t=>Ai.create({...t,coerce:!0}),date:t=>Ji.create({...t,coerce:!0})},Xx=xe;var Fx=Object.freeze({__proto__:null,defaultErrorMap:Fr,setErrorMap:V1,getErrorMap:us,makeIssue:ss,EMPTY_PATH:Y1,addIssueToContext:ee,ParseStatus:Tt,INVALID:xe,DIRTY:Pr,OK:zt,isAborted:Ef,isDirty:Af,isValid:Ki,isAsync:vl,get util(){return je},get objectUtil(){return wf},ZodParsedType:ne,getParsedType:Jn,ZodType:Ae,datetimeRegex:by,ZodString:yn,ZodNumber:Ei,ZodBigInt:Ai,ZodBoolean:bl,ZodDate:Ji,ZodSymbol:cs,ZodUndefined:xl,ZodNull:_l,ZodAny:$r,ZodUnknown:$i,ZodNever:Wn,ZodVoid:fs,ZodArray:vn,ZodObject:et,ZodUnion:Sl,ZodDiscriminatedUnion:bs,ZodIntersection:kl,ZodTuple:Rn,ZodRecord:Tl,ZodMap:hs,ZodSet:Wi,ZodFunction:Qr,ZodLazy:wl,ZodLiteral:El,ZodEnum:Ci,ZodNativeEnum:Al,ZodPromise:Kr,ZodEffects:_n,ZodTransformer:_n,ZodOptional:bn,ZodNullable:Oi,ZodDefault:Cl,ZodCatch:Ol,ZodNaN:ds,BRAND:fx,ZodBranded:Vf,ZodPipeline:Nl,ZodReadonly:zl,custom:_y,Schema:Ae,ZodSchema:Ae,late:hx,get ZodFirstPartyTypeKind(){return K},coerce:Qx,any:xx,array:Tx,bigint:px,boolean:Ty,date:gx,discriminatedUnion:Cx,effect:kg,enum:Ux,function:Nx,instanceof:dx,intersection:Ox,lazy:jx,literal:Lx,map:Rx,nan:mx,nativeEnum:Bx,never:Sx,null:bx,nullable:qx,number:ky,object:wx,oboolean:Px,onumber:Gx,optional:Zx,ostring:Ix,pipeline:Yx,preprocess:Vx,promise:Hx,record:Mx,set:Dx,strictObject:Ex,string:Sy,symbol:yx,transformer:kg,tuple:zx,undefined:vx,union:Ax,unknown:_x,void:kx,NEVER:Xx,ZodIssueCode:Q,quotelessJson:q1,ZodError:$t});const $x=Symbol("Let zodToJsonSchema decide on which parser to use"),Kx={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Jx=t=>({...Kx,...t}),Wx=t=>{const i=Jx(t),r=i.name!==void 0?[...i.basePath,i.definitionPath,i.name]:i.basePath;return{...i,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(i.definitions).map(([a,s])=>[s._def,{def:s._def,path:[...i.basePath,i.definitionPath,a],jsonSchema:void 0}]))}};function wy(t,i,r,a){a!=null&&a.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[i]:r})}function Ie(t,i,r,a,s){t[i]=r,wy(t,i,a,s)}function e_(){return{}}function t_(t,i){var a,s,o;const r={type:"array"};return(a=t.type)!=null&&a._def&&((o=(s=t.type)==null?void 0:s._def)==null?void 0:o.typeName)!==K.ZodAny&&(r.items=Ze(t.type._def,{...i,currentPath:[...i.currentPath,"items"]})),t.minLength&&Ie(r,"minItems",t.minLength.value,t.minLength.message,i),t.maxLength&&Ie(r,"maxItems",t.maxLength.value,t.maxLength.message,i),t.exactLength&&(Ie(r,"minItems",t.exactLength.value,t.exactLength.message,i),Ie(r,"maxItems",t.exactLength.value,t.exactLength.message,i)),r}function n_(t,i){const r={type:"integer",format:"int64"};if(!t.checks)return r;for(const a of t.checks)switch(a.kind){case"min":i.target==="jsonSchema7"?a.inclusive?Ie(r,"minimum",a.value,a.message,i):Ie(r,"exclusiveMinimum",a.value,a.message,i):(a.inclusive||(r.exclusiveMinimum=!0),Ie(r,"minimum",a.value,a.message,i));break;case"max":i.target==="jsonSchema7"?a.inclusive?Ie(r,"maximum",a.value,a.message,i):Ie(r,"exclusiveMaximum",a.value,a.message,i):(a.inclusive||(r.exclusiveMaximum=!0),Ie(r,"maximum",a.value,a.message,i));break;case"multipleOf":Ie(r,"multipleOf",a.value,a.message,i);break}return r}function i_(){return{type:"boolean"}}function Ey(t,i){return Ze(t.type._def,i)}const r_=(t,i)=>Ze(t.innerType._def,i);function Ay(t,i,r){const a=r??i.dateStrategy;if(Array.isArray(a))return{anyOf:a.map((s,o)=>Ay(t,i,s))};switch(a){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return a_(t,i)}}const a_=(t,i)=>{const r={type:"integer",format:"unix-time"};if(i.target==="openApi3")return r;for(const a of t.checks)switch(a.kind){case"min":Ie(r,"minimum",a.value,a.message,i);break;case"max":Ie(r,"maximum",a.value,a.message,i);break}return r};function l_(t,i){return{...Ze(t.innerType._def,i),default:t.defaultValue()}}function u_(t,i){return i.effectStrategy==="input"?Ze(t.schema._def,i):{}}function s_(t){return{type:"string",enum:Array.from(t.values)}}const o_=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function c_(t,i){const r=[Ze(t.left._def,{...i,currentPath:[...i.currentPath,"allOf","0"]}),Ze(t.right._def,{...i,currentPath:[...i.currentPath,"allOf","1"]})].filter(o=>!!o);let a=i.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const s=[];return r.forEach(o=>{if(o_(o))s.push(...o.allOf),o.unevaluatedProperties===void 0&&(a=void 0);else{let c=o;if("additionalProperties"in o&&o.additionalProperties===!1){const{additionalProperties:h,...p}=o;c=p}else a=void 0;s.push(c)}}),s.length?{allOf:s,...a}:void 0}function f_(t,i){const r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:i.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}let nf;const mn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(nf===void 0&&(nf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),nf),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Cy(t,i){const r={type:"string"};if(t.checks)for(const a of t.checks)switch(a.kind){case"min":Ie(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,a.value):a.value,a.message,i);break;case"max":Ie(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,a.value):a.value,a.message,i);break;case"email":switch(i.emailStrategy){case"format:email":pn(r,"email",a.message,i);break;case"format:idn-email":pn(r,"idn-email",a.message,i);break;case"pattern:zod":Ct(r,mn.email,a.message,i);break}break;case"url":pn(r,"uri",a.message,i);break;case"uuid":pn(r,"uuid",a.message,i);break;case"regex":Ct(r,a.regex,a.message,i);break;case"cuid":Ct(r,mn.cuid,a.message,i);break;case"cuid2":Ct(r,mn.cuid2,a.message,i);break;case"startsWith":Ct(r,RegExp(`^${rf(a.value,i)}`),a.message,i);break;case"endsWith":Ct(r,RegExp(`${rf(a.value,i)}$`),a.message,i);break;case"datetime":pn(r,"date-time",a.message,i);break;case"date":pn(r,"date",a.message,i);break;case"time":pn(r,"time",a.message,i);break;case"duration":pn(r,"duration",a.message,i);break;case"length":Ie(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,a.value):a.value,a.message,i),Ie(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,a.value):a.value,a.message,i);break;case"includes":{Ct(r,RegExp(rf(a.value,i)),a.message,i);break}case"ip":{a.version!=="v6"&&pn(r,"ipv4",a.message,i),a.version!=="v4"&&pn(r,"ipv6",a.message,i);break}case"base64url":Ct(r,mn.base64url,a.message,i);break;case"jwt":Ct(r,mn.jwt,a.message,i);break;case"cidr":{a.version!=="v6"&&Ct(r,mn.ipv4Cidr,a.message,i),a.version!=="v4"&&Ct(r,mn.ipv6Cidr,a.message,i);break}case"emoji":Ct(r,mn.emoji(),a.message,i);break;case"ulid":{Ct(r,mn.ulid,a.message,i);break}case"base64":{switch(i.base64Strategy){case"format:binary":{pn(r,"binary",a.message,i);break}case"contentEncoding:base64":{Ie(r,"contentEncoding","base64",a.message,i);break}case"pattern:zod":{Ct(r,mn.base64,a.message,i);break}}break}case"nanoid":Ct(r,mn.nanoid,a.message,i)}return r}function rf(t,i){return i.patternStrategy==="escape"?d_(t):t}const h_=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function d_(t){let i="";for(let r=0;r<t.length;r++)h_.has(t[r])||(i+="\\"),i+=t[r];return i}function pn(t,i,r,a){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&a.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:i,...r&&a.errorMessages&&{errorMessage:{format:r}}})):Ie(t,"format",i,r,a)}function Ct(t,i,r,a){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&a.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:Tg(i,a),...r&&a.errorMessages&&{errorMessage:{pattern:r}}})):Ie(t,"pattern",Tg(i,a),r,a)}function Tg(t,i){var p;if(!i.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},a=r.i?t.source.toLowerCase():t.source;let s="",o=!1,c=!1,h=!1;for(let m=0;m<a.length;m++){if(o){s+=a[m],o=!1;continue}if(r.i){if(c){if(a[m].match(/[a-z]/)){h?(s+=a[m],s+=`${a[m-2]}-${a[m]}`.toUpperCase(),h=!1):a[m+1]==="-"&&((p=a[m+2])!=null&&p.match(/[a-z]/))?(s+=a[m],h=!0):s+=`${a[m]}${a[m].toUpperCase()}`;continue}}else if(a[m].match(/[a-z]/)){s+=`[${a[m]}${a[m].toUpperCase()}]`;continue}}if(r.m){if(a[m]==="^"){s+=`(^|(?<=[\r
|
|
50
50
|
]))`;continue}else if(a[m]==="$"){s+=`($|(?=[\r
|
|
51
51
|
]))`;continue}}if(r.s&&a[m]==="."){s+=c?`${a[m]}\r
|
|
52
52
|
`:`[${a[m]}\r
|
|
53
|
-
]`;continue}s+=a[m],a[m]==="\\"?o=!0:c&&a[m]==="]"?c=!1:!c&&a[m]==="["&&(c=!0)}try{new RegExp(s)}catch{return console.warn(`Could not convert regex pattern at ${i.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return s}function Cy(t,i){var a,s,o,c,h,p;if(i.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),i.target==="openApi3"&&((a=t.keyType)==null?void 0:a._def.typeName)===K.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((m,g)=>({...m,[g]:Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"properties",g]})??{}}),{}),additionalProperties:i.rejectedAdditionalProperties};const r={type:"object",additionalProperties:Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"additionalProperties"]})??i.allowedAdditionalProperties};if(i.target==="openApi3")return r;if(((s=t.keyType)==null?void 0:s._def.typeName)===K.ZodString&&((o=t.keyType._def.checks)!=null&&o.length)){const{type:m,...g}=Ay(t.keyType._def,i);return{...r,propertyNames:g}}else{if(((c=t.keyType)==null?void 0:c._def.typeName)===K.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(((h=t.keyType)==null?void 0:h._def.typeName)===K.ZodBranded&&t.keyType._def.type._def.typeName===K.ZodString&&((p=t.keyType._def.type._def.checks)!=null&&p.length)){const{type:m,...g}=wy(t.keyType._def,i);return{...r,propertyNames:g}}}return r}function hx(t,i){if(i.mapStrategy==="record")return Cy(t,i);const r=Ze(t.keyType._def,{...i,currentPath:[...i.currentPath,"items","items","0"]})||{},a=Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[r,a],minItems:2,maxItems:2}}}function dx(t){const i=t.values,a=Object.keys(t.values).filter(o=>typeof i[i[o]]!="number").map(o=>i[o]),s=Array.from(new Set(a.map(o=>typeof o)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:a}}function mx(){return{not:{}}}function px(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const ms={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function gx(t,i){if(i.target==="openApi3")return Tg(t,i);const r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(a=>a._def.typeName in ms&&(!a._def.checks||!a._def.checks.length))){const a=r.reduce((s,o)=>{const c=ms[o._def.typeName];return c&&!s.includes(c)?[...s,c]:s},[]);return{type:a.length>1?a:a[0]}}else if(r.every(a=>a._def.typeName==="ZodLiteral"&&!a.description)){const a=r.reduce((s,o)=>{const c=typeof o._def.value;switch(c){case"string":case"number":case"boolean":return[...s,c];case"bigint":return[...s,"integer"];case"object":if(o._def.value===null)return[...s,"null"];case"symbol":case"undefined":case"function":default:return s}},[]);if(a.length===r.length){const s=a.filter((o,c,h)=>h.indexOf(o)===c);return{type:s.length>1?s:s[0],enum:r.reduce((o,c)=>o.includes(c._def.value)?o:[...o,c._def.value],[])}}}else if(r.every(a=>a._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((a,s)=>[...a,...s._def.values.filter(o=>!a.includes(o))],[])};return Tg(t,i)}const Tg=(t,i)=>{const r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((a,s)=>Ze(a._def,{...i,currentPath:[...i.currentPath,"anyOf",`${s}`]})).filter(a=>!!a&&(!i.strictUnions||typeof a=="object"&&Object.keys(a).length>0));return r.length?{anyOf:r}:void 0};function yx(t,i){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return i.target==="openApi3"?{type:ms[t.innerType._def.typeName],nullable:!0}:{type:[ms[t.innerType._def.typeName],"null"]};if(i.target==="openApi3"){const a=Ze(t.innerType._def,{...i,currentPath:[...i.currentPath]});return a&&"$ref"in a?{allOf:[a],nullable:!0}:a&&{...a,nullable:!0}}const r=Ze(t.innerType._def,{...i,currentPath:[...i.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function vx(t,i){const r={type:"number"};if(!t.checks)return r;for(const a of t.checks)switch(a.kind){case"int":r.type="integer",Ty(r,"type",a.message,i);break;case"min":i.target==="jsonSchema7"?a.inclusive?Ie(r,"minimum",a.value,a.message,i):Ie(r,"exclusiveMinimum",a.value,a.message,i):(a.inclusive||(r.exclusiveMinimum=!0),Ie(r,"minimum",a.value,a.message,i));break;case"max":i.target==="jsonSchema7"?a.inclusive?Ie(r,"maximum",a.value,a.message,i):Ie(r,"exclusiveMaximum",a.value,a.message,i):(a.inclusive||(r.exclusiveMaximum=!0),Ie(r,"maximum",a.value,a.message,i));break;case"multipleOf":Ie(r,"multipleOf",a.value,a.message,i);break}return r}function bx(t,i){const r=i.target==="openAi",a={type:"object",properties:{}},s=[],o=t.shape();for(const h in o){let p=o[h];if(p===void 0||p._def===void 0)continue;let m=xx(p);m&&r&&(p instanceof bn&&(p=p._def.innerType),p.isNullable()||(p=p.nullable()),m=!1);const g=Ze(p._def,{...i,currentPath:[...i.currentPath,"properties",h],propertyPath:[...i.currentPath,"properties",h]});g!==void 0&&(a.properties[h]=g,m||s.push(h))}s.length&&(a.required=s);const c=_x(t,i);return c!==void 0&&(a.additionalProperties=c),a}function _x(t,i){if(t.catchall._def.typeName!=="ZodNever")return Ze(t.catchall._def,{...i,currentPath:[...i.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return i.allowedAdditionalProperties;case"strict":return i.rejectedAdditionalProperties;case"strip":return i.removeAdditionalStrategy==="strict"?i.allowedAdditionalProperties:i.rejectedAdditionalProperties}}function xx(t){try{return t.isOptional()}catch{return!0}}const Sx=(t,i)=>{var a;if(i.currentPath.toString()===((a=i.propertyPath)==null?void 0:a.toString()))return Ze(t.innerType._def,i);const r=Ze(t.innerType._def,{...i,currentPath:[...i.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}},kx=(t,i)=>{if(i.pipeStrategy==="input")return Ze(t.in._def,i);if(i.pipeStrategy==="output")return Ze(t.out._def,i);const r=Ze(t.in._def,{...i,currentPath:[...i.currentPath,"allOf","0"]}),a=Ze(t.out._def,{...i,currentPath:[...i.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,a].filter(s=>s!==void 0)}};function Tx(t,i){return Ze(t.type._def,i)}function wx(t,i){const a={type:"array",uniqueItems:!0,items:Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"items"]})};return t.minSize&&Ie(a,"minItems",t.minSize.value,t.minSize.message,i),t.maxSize&&Ie(a,"maxItems",t.maxSize.value,t.maxSize.message,i),a}function Ex(t,i){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,a)=>Ze(r._def,{...i,currentPath:[...i.currentPath,"items",`${a}`]})).reduce((r,a)=>a===void 0?r:[...r,a],[]),additionalItems:Ze(t.rest._def,{...i,currentPath:[...i.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,a)=>Ze(r._def,{...i,currentPath:[...i.currentPath,"items",`${a}`]})).reduce((r,a)=>a===void 0?r:[...r,a],[])}}function Ax(){return{not:{}}}function Cx(){return{}}const Ox=(t,i)=>Ze(t.innerType._def,i),zx=(t,i,r)=>{switch(i){case K.ZodString:return Ay(t,r);case K.ZodNumber:return vx(t,r);case K.ZodObject:return bx(t,r);case K.ZodBigInt:return ex(t,r);case K.ZodBoolean:return tx();case K.ZodDate:return Ey(t,r);case K.ZodUndefined:return Ax();case K.ZodNull:return px(r);case K.ZodArray:return W_(t,r);case K.ZodUnion:case K.ZodDiscriminatedUnion:return gx(t,r);case K.ZodIntersection:return sx(t,r);case K.ZodTuple:return Ex(t,r);case K.ZodRecord:return Cy(t,r);case K.ZodLiteral:return ox(t,r);case K.ZodEnum:return lx(t);case K.ZodNativeEnum:return dx(t);case K.ZodNullable:return yx(t,r);case K.ZodOptional:return Sx(t,r);case K.ZodMap:return hx(t,r);case K.ZodSet:return wx(t,r);case K.ZodLazy:return()=>t.getter()._def;case K.ZodPromise:return Tx(t,r);case K.ZodNaN:case K.ZodNever:return mx();case K.ZodEffects:return ax(t,r);case K.ZodAny:return J_();case K.ZodUnknown:return Cx();case K.ZodDefault:return rx(t,r);case K.ZodBranded:return wy(t,r);case K.ZodReadonly:return Ox(t,r);case K.ZodCatch:return nx(t,r);case K.ZodPipeline:return kx(t,r);case K.ZodFunction:case K.ZodVoid:case K.ZodSymbol:return;default:return(a=>{})()}};function Ze(t,i,r=!1){var h;const a=i.seen.get(t);if(i.override){const p=(h=i.override)==null?void 0:h.call(i,t,i,a,r);if(p!==P_)return p}if(a&&!r){const p=Mx(a,i);if(p!==void 0)return p}const s={def:t,path:i.currentPath,jsonSchema:void 0};i.seen.set(t,s);const o=zx(t,t.typeName,i),c=typeof o=="function"?Ze(o(),i):o;if(c&&Dx(t,i,c),i.postProcess){const p=i.postProcess(c,t,i);return s.jsonSchema=c,p}return s.jsonSchema=c,c}const Mx=(t,i)=>{switch(i.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Rx(i.currentPath,t.path)};case"none":case"seen":return t.path.length<i.currentPath.length&&t.path.every((r,a)=>i.currentPath[a]===r)?(console.warn(`Recursive reference detected at ${i.currentPath.join("/")}! Defaulting to any`),{}):i.$refStrategy==="seen"?{}:void 0}},Rx=(t,i)=>{let r=0;for(;r<t.length&&r<i.length&&t[r]===i[r];r++);return[(t.length-r).toString(),...i.slice(r)].join("/")},Dx=(t,i,r)=>(t.description&&(r.description=t.description,i.markdownDescription&&(r.markdownDescription=t.description)),r),Nx=(t,i)=>{const r=K_(i),a=void 0,s=i==null?void 0:i.name,o=Ze(t._def,r,!1)??{},c=s===void 0?a?{...o,[r.definitionPath]:a}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,s].join("/"),[r.definitionPath]:{...a,[s]:o}};return r.target==="jsonSchema7"?c.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(c.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in c||"oneOf"in c||"allOf"in c||"type"in c&&Array.isArray(c.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),c},jx=t=>({name:t.name,description:t.description,parameters:Nx(X_.object(t.parameters))});class Lx{constructor(){this.tools=new Map,this.waitingMap=new Map}bindTool(i){if(this.tools.has(i.name))throw new Error(`Tool with name ${i.name} already exists`);this.tools.set(i.name,i)}bindTools(i){i.forEach(r=>this.bindTool(r))}getAllTools(){return Array.from(this.tools.values())}getTool(i){return this.tools.get(i)}removeTool(i){return this.tools.delete(i)}clearTools(){this.tools.clear()}async callTool(i,r,a){const s=this.getTool(i);if(!s)throw new Error(`Tool with name ${i} not found`);return await s.execute(r,a)}toJSON(){return Array.from(this.tools.values()).map(i=>jx(i))}doneWaiting(i,r){return this.waitingMap.has(i)?(this.waitingMap.get(i)(r),this.waitingMap.delete(i),!0):(console.warn(`Waiting for tool ${i} not found`),!1)}waitForDone(i){return this.waitingMap.has(i)?this.waitingMap.get(i):new Promise((a,s)=>{this.waitingMap.set(i,a)})}static waitForUIDone(i,r){return r.client.tools.waitForDone(r.message.id)}}class af{static isUser(i){return i.type==="human"}static isTool(i){return i.type==="tool"}static isAssistant(i){return i.type==="ai"&&!this.isToolAssistant(i)}static isToolAssistant(i){var r,a;return i.type==="ai"&&(((r=i.tool_calls)===null||r===void 0?void 0:r.length)||((a=i.tool_call_chunks)===null||a===void 0?void 0:a.length))}}class Ux extends B1{constructor(i){super(i),this.currentAssistant=null,this.currentThread=null,this.streamingCallbacks=new Set,this.tools=new Lx,this.stopController=null,this.availableAssistants=[],this.streamingMessage=[],this.graphMessages=[],this.graphState={}}listAssistants(){return this.assistants.search({metadata:null,offset:0,limit:100})}async initAssistant(i){try{const r=await this.listAssistants();if(this.availableAssistants=r,r.length>0){if(this.currentAssistant=r.find(a=>a.graph_id===i)||null,!this.currentAssistant)throw new Error("Agent not found: "+i)}else throw new Error("No assistants found")}catch(r){throw console.error("Failed to initialize LangGraphClient:",r),r}}async createThread({threadId:i}={}){try{return this.currentThread=await this.threads.create({threadId:i}),this.currentThread}catch(r){throw console.error("Failed to create new thread:",r),r}}async listThreads(){return this.threads.search({sortOrder:"desc"})}async resetThread(i,r){await this.initAssistant(i),this.currentThread=await this.threads.get(r),this.graphState=this.currentThread.values,this.graphMessages=this.graphState.messages,this.emitStreamingUpdate({type:"value",data:{event:"messages/partial",data:{messages:this.graphMessages}}})}cloneMessage(i){return JSON.parse(JSON.stringify(i))}replaceMessageWithValuesMessage(i,r=!1){const a=r?"tool_call_id":"id",s=this.graphMessages.find(o=>o[a]===i[a]);return s?{...s,tool_input:i.tool_input}:i}get renderMessage(){var i;const r=new Map,a=[],s=[...this.graphMessages,...this.streamingMessage];for(let o=s.length-1;o>=0;o--){const c=this.cloneMessage(s[o]);if(!c.id){a.unshift(c);continue}if(!r.has(c.id))if(af.isToolAssistant(c)){const h=this.replaceMessageWithValuesMessage(c);r.set(c.id,h);const m=(!((i=h.tool_calls)===null||i===void 0)&&i.length?h.tool_calls:h.tool_call_chunks).map((g,y)=>{var S,x,w,C;return this.replaceMessageWithValuesMessage({type:"tool",additional_kwargs:{},tool_input:(C=(w=(x=(S=h.additional_kwargs)===null||S===void 0?void 0:S.tool_calls)===null||x===void 0?void 0:x[y])===null||w===void 0?void 0:w.function)===null||C===void 0?void 0:C.arguments,id:g.id,name:g.name,response_metadata:{},tool_call_id:g.id},!0)});for(const g of m)r.has(g.id)||(a.unshift(g),r.set(g.id,g));a.unshift(h)}else{const h=this.replaceMessageWithValuesMessage(c);r.set(c.id,h),a.unshift(h)}}return this.attachInfoForMessage(this.composeToolMessages(a))}attachInfoForMessage(i){var r,a,s;let o=null;for(const c of i){const h=((r=c.response_metadata)===null||r===void 0?void 0:r.create_time)||"";try{c.unique_id=c.id+JSON.stringify(c.content).length}catch{c.unique_id=c.id}if(c.spend_time=new Date(h).getTime()-new Date(((a=o==null?void 0:o.response_metadata)===null||a===void 0?void 0:a.create_time)||h).getTime(),!c.usage_metadata&&(!((s=c.response_metadata)===null||s===void 0)&&s.usage)){const p=c.response_metadata.usage;c.usage_metadata={input_tokens:p.prompt_tokens,output_tokens:p.completion_tokens,total_tokens:p.total_tokens}}o=c}return i}composeToolMessages(i){var r;const a=[],s=new Map,o=new Map;for(const c of i)if(!(af.isToolAssistant(c)&&((r=c.tool_calls||c.tool_call_chunks)===null||r===void 0||r.forEach(h=>{s.set(h.id,h),o.set(h.id,c)}),!c.content))){if(af.isTool(c)&&!c.tool_input){const h=s.get(c.tool_call_id),p=o.get(c.tool_call_id);h&&(c.tool_input=typeof h.args!="string"?JSON.stringify(h.args):h.args,c.additional_kwargs?c.additional_kwargs.done=!0:c.additional_kwargs={done:!0}),p&&(c.usage_metadata=p.usage_metadata)}a.push(c)}return a}get tokenCounter(){return this.graphMessages.reduce((i,r)=>{var a,s,o,c,h;if(r.usage_metadata)i.total_tokens+=((a=r.usage_metadata)===null||a===void 0?void 0:a.total_tokens)||0,i.input_tokens+=((s=r.usage_metadata)===null||s===void 0?void 0:s.input_tokens)||0,i.output_tokens+=((o=r.usage_metadata)===null||o===void 0?void 0:o.output_tokens)||0;else if(!((c=r.response_metadata)===null||c===void 0)&&c.usage){const p=(h=r.response_metadata)===null||h===void 0?void 0:h.usage;i.total_tokens+=p.total_tokens||0,i.input_tokens+=p.prompt_tokens||0,i.output_tokens+=p.completion_tokens||0}return i},{total_tokens:0,input_tokens:0,output_tokens:0})}onStreamingUpdate(i){return this.streamingCallbacks.add(i),()=>{this.streamingCallbacks.delete(i)}}emitStreamingUpdate(i){this.streamingCallbacks.forEach(r=>r(i))}cancelRun(){var i,r;!((i=this.currentThread)===null||i===void 0)&&i.thread_id&&(!((r=this.currentRun)===null||r===void 0)&&r.run_id)&&this.runs.cancel(this.currentThread.thread_id,this.currentRun.run_id)}async sendMessage(i,{extraParams:r,_debug:a,command:s}={}){if(!this.currentAssistant)throw new Error("Thread or Assistant not initialized");this.currentThread||(await this.createThread(),this.emitStreamingUpdate({type:"thread",data:{event:"thread/create",data:{thread:this.currentThread}}}));const o=Array.isArray(i)?i:[{type:"human",content:i}],c=(a==null?void 0:a.streamResponse)||this.runs.stream(this.currentThread.thread_id,this.currentAssistant.assistant_id,{input:{...this.graphState,...r||{},messages:o,fe_tools:this.tools.toJSON()},streamMode:["messages","values"],streamSubgraphs:!0,command:s}),h=[];for await(const m of c)if(h.push(m),m.event==="metadata")this.currentRun=m.data;else if(m.event==="error")this.emitStreamingUpdate({type:"error",data:m});else if(m.event==="messages/partial"){for(const g of m.data)this.streamingMessage.push(g);this.emitStreamingUpdate({type:"message",data:m});continue}else if(m.event.startsWith("values")){const g=m.data;if(g.messages){const y=!!(s!=null&&s.resume),S=g.messages.length>=this.graphMessages.length;(!y||y&&S)&&(this.graphMessages=g.messages,this.emitStreamingUpdate({type:"value",data:m}))}this.graphState=m.data,this.streamingMessage=[];continue}this.streamingMessage=[];const p=await this.runFETool();return p&&h.push(...p),this.emitStreamingUpdate({type:"done",data:{event:"done"}}),h}runFETool(){var i;const r=this.graphMessages,a=r[r.length-1];if(a.type==="ai"&&(!((i=a.tool_calls)===null||i===void 0)&&i.length)){const s=a.tool_calls.map(o=>{if(this.tools.getTool(o.name)){const c={...o,tool_call_id:o.id,tool_input:JSON.stringify(o.args),additional_kwargs:{}};return this.callFETool(c,o.args)}});return Promise.all(s)}}async callFETool(i,r){const a=this,s=await this.tools.callTool(i.name,r,{client:a,message:i});return this.resume(s)}resume(i){return this.sendMessage([],{command:{resume:i}})}doneFEToolWaiting(i,r){var a;!this.tools.doneWaiting(i,r)&&((a=this.currentThread)===null||a===void 0?void 0:a.status)==="interrupted"&&this.resume(r)}getCurrentThread(){return this.currentThread}getCurrentAssistant(){return this.currentAssistant}async reset(){var i;await this.initAssistant((i=this.currentAssistant)===null||i===void 0?void 0:i.name),this.currentThread=null,this.graphState={},this.graphMessages=[],this.streamingMessage=[],this.currentRun=void 0,this.emitStreamingUpdate({type:"value",data:{event:"messages/partial"}})}}let gn=[],Ti=0;const es=4;let On=t=>{let i=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},lc:0,listen(a){return r.lc=i.push(a),()=>{for(let o=Ti+es;o<gn.length;)gn[o]===a?gn.splice(o,es):o+=es;let s=i.indexOf(a);~s&&(i.splice(s,1),--r.lc)}},notify(a,s){let o=!gn.length;for(let c of i)gn.push(c,r.value,a,s);if(o){for(Ti=0;Ti<gn.length;Ti+=es)gn[Ti](gn[Ti+1],gn[Ti+2],gn[Ti+3]);gn.length=0}},off(){},set(a){let s=r.value;s!==a&&(r.value=a,r.notify(s))},subscribe(a){let s=r.listen(a);return a(r.value),s},value:t};return r};function Bx(t,i,r){let a=new Set(i).add(void 0);return t.listen((s,o,c)=>{a.has(c)&&r(s,o,c)})}const Hx=t=>t.toLocaleTimeString("en-US"),Zx=t=>t.toLocaleString("en"),Oy=t=>typeof t=="string"?t:Array.isArray(t)?t.map(i=>typeof i=="string"?i:i.type==="text"?i.text:i.type==="image_url"?"[图片]":JSON.stringify(i)).join(""):JSON.stringify(t),qx=t=>{var i,r,a;const s=(a=(r=(i=t==null?void 0:t.values)===null||i===void 0?void 0:i.messages)===null||r===void 0?void 0:r[0])===null||a===void 0?void 0:a.content;return s&&Array.isArray(s)?s.map(o=>{if(o.type==="text")return o.text}):typeof s=="string"?s:""},Vx=(t,i,r={})=>{const a=On(null),s=On([]),o=On(""),c=On(!1),h=On([]),p=On(null),m=On(!0),g=On(t),y=On(null),S=async()=>{var F;const G=new Ux(i);await G.initAssistant(g.get()),G.onStreamingUpdate(N=>{var he;if(N.type==="thread"||N.type==="done")return Q();N.type==="error"&&(c.set(!1),p.set(((he=N.data)===null||he===void 0?void 0:he.message)||"发生错误")),s.set(G.renderMessage)}),(F=r.onInit)===null||F===void 0||F.call(r,G),G.graphState={},a.set(G)},x=async(F,G)=>{var N;!o.get().trim()&&!(F!=null&&F.length)||c.get()||!a.get()||(c.set(!0),p.set(null),await((N=a.get())===null||N===void 0?void 0:N.sendMessage(F||o.get(),G)),o.set(""),c.set(!1))},w=()=>{var F;(F=a.get())===null||F===void 0||F.cancelRun()},C=F=>{const G=h.get();h.set(G.includes(F)?G.filter(N=>N!==F):[...G,F])},j=()=>{m.set(!m.get())},M=On([]),Q=async()=>{var F;if(a.get())try{const G=await((F=a.get())===null||F===void 0?void 0:F.listThreads());M.set(G||[])}catch(G){console.error("Failed to fetch threads:",G)}};return{data:{client:a,renderMessages:s,userInput:o,loading:c,inChatError:p,currentAgent:g,collapsedTools:h,showHistory:m,historyList:M,currentChatId:y},mutations:{initClient:S,sendMessage:x,stopGeneration:w,toggleToolCollapse:C,toggleHistoryVisible:j,refreshHistoryList:Q,addToHistory:F=>{const G=M.get();M.set([F,...G])},setUserInput(F){o.set(F)},setCurrentAgent(F){return g.set(F),S().then(()=>{Q()})},createNewChat(){var F;(F=a.get())===null||F===void 0||F.reset()},toHistoryChat(F){var G,N;(G=a.get())===null||G===void 0||G.resetThread((N=F.metadata)===null||N===void 0?void 0:N.graph_id,F.thread_id)},async deleteHistoryChat(F){var G;await((G=a.get())===null||G===void 0?void 0:G.threads.delete(F.thread_id)),await Q()}}}},Yx=(t,i)=>({...Object.fromEntries(Object.entries(t.data).map(([a,s])=>[a,i(s)])),...t.mutations});function Ix(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Gx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xx={};function wg(t,i){return(Xx.jsx?Qx:Gx).test(t)}const Px=/[ \t\n\f\r]/g;function Fx(t){return typeof t=="object"?t.type==="text"?Eg(t.value):!1:Eg(t)}function Eg(t){return t.replace(Px,"")===""}class jl{constructor(i,r,a){this.normal=r,this.property=i,a&&(this.space=a)}}jl.prototype.normal={};jl.prototype.property={};jl.prototype.space=void 0;function zy(t,i){const r={},a={};for(const s of t)Object.assign(r,s.property),Object.assign(a,s.normal);return new jl(r,a,i)}function Of(t){return t.toLowerCase()}class Bt{constructor(i,r){this.attribute=r,this.property=i}}Bt.prototype.attribute="";Bt.prototype.booleanish=!1;Bt.prototype.boolean=!1;Bt.prototype.commaOrSpaceSeparated=!1;Bt.prototype.commaSeparated=!1;Bt.prototype.defined=!1;Bt.prototype.mustUseProperty=!1;Bt.prototype.number=!1;Bt.prototype.overloadedBoolean=!1;Bt.prototype.property="";Bt.prototype.spaceSeparated=!1;Bt.prototype.space=void 0;let $x=0;const ke=tr(),ut=tr(),My=tr(),$=tr(),Ke=tr(),Pr=tr(),Ft=tr();function tr(){return 2**++$x}const zf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:ut,commaOrSpaceSeparated:Ft,commaSeparated:Pr,number:$,overloadedBoolean:My,spaceSeparated:Ke},Symbol.toStringTag,{value:"Module"})),lf=Object.keys(zf);class Vf extends Bt{constructor(i,r,a,s){let o=-1;if(super(i,r),Ag(this,"space",s),typeof a=="number")for(;++o<lf.length;){const c=lf[o];Ag(this,lf[o],(a&zf[c])===zf[c])}}}Vf.prototype.defined=!0;function Ag(t,i,r){r&&(t[i]=r)}function ea(t){const i={},r={};for(const[a,s]of Object.entries(t.properties)){const o=new Vf(a,t.transform(t.attributes||{},a),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),i[a]=o,r[Of(a)]=a,r[Of(o.attribute)]=a}return new jl(i,r,t.space)}const Ry=ea({properties:{ariaActiveDescendant:null,ariaAtomic:ut,ariaAutoComplete:null,ariaBusy:ut,ariaChecked:ut,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Ke,ariaCurrent:null,ariaDescribedBy:Ke,ariaDetails:null,ariaDisabled:ut,ariaDropEffect:Ke,ariaErrorMessage:null,ariaExpanded:ut,ariaFlowTo:Ke,ariaGrabbed:ut,ariaHasPopup:null,ariaHidden:ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ke,ariaLevel:$,ariaLive:null,ariaModal:ut,ariaMultiLine:ut,ariaMultiSelectable:ut,ariaOrientation:null,ariaOwns:Ke,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:ut,ariaReadOnly:ut,ariaRelevant:null,ariaRequired:ut,ariaRoleDescription:Ke,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:ut,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function Dy(t,i){return i in t?t[i]:i}function Ny(t,i){return Dy(t,i.toLowerCase())}const Kx=ea({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pr,acceptCharset:Ke,accessKey:Ke,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:Ke,autoFocus:ke,autoPlay:ke,blocking:Ke,capture:null,charSet:null,checked:ke,cite:null,className:Ke,cols:$,colSpan:null,content:null,contentEditable:ut,controls:ke,controlsList:Ke,coords:$|Pr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:My,draggable:ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:Ke,height:$,hidden:ke,high:$,href:null,hrefLang:null,htmlFor:Ke,httpEquiv:Ke,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:Ke,itemRef:Ke,itemScope:ke,itemType:Ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,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:ke,optimum:$,pattern:null,ping:Ke,placeholder:null,playsInline:ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ke,referrerPolicy:null,rel:Ke,required:ke,reversed:ke,rows:$,rowSpan:$,sandbox:Ke,scope:null,scoped:ke,seamless:ke,selected:ke,shadowRootClonable:ke,shadowRootDelegatesFocus:ke,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:ke,useMap:null,value:ut,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ke,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ke,declare:ke,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:ke,noHref:ke,noShade:ke,noWrap:ke,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:ut,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ke,disableRemotePlayback:ke,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Ny}),Jx=ea({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:Ft,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Ke,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:Pr,g2:Pr,glyphName:Pr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Ft,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Ft,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ft,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ft,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dy}),jy=ea({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),Ly=ea({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ny}),Uy=ea({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),Wx={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"},eS=/[A-Z]/g,Cg=/-[a-z]/g,tS=/^data[-\w.:]+$/i;function nS(t,i){const r=Of(i);let a=i,s=Bt;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&tS.test(i)){if(i.charAt(4)==="-"){const o=i.slice(5).replace(Cg,rS);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=i.slice(4);if(!Cg.test(o)){let c=o.replace(eS,iS);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}s=Vf}return new s(a,i)}function iS(t){return"-"+t.toLowerCase()}function rS(t){return t.charAt(1).toUpperCase()}const aS=zy([Ry,Kx,jy,Ly,Uy],"html"),Yf=zy([Ry,Jx,jy,Ly,Uy],"svg");function lS(t){return t.join(" ").trim()}var Vr={},uf,Og;function uS(){if(Og)return uf;Og=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
54
|
-
`,m="/",g="*",y="",S="comment",x="declaration";uf=function(C,j){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];j=j||{};var M=1,Q=1;function B(le){var ie=le.match(i);ie&&(M+=ie.length);var se=le.lastIndexOf(p);Q=~se?le.length-se:Q+le.length}function F(){var le={line:M,column:Q};return function(ie){return ie.position=new G(le),Se(),ie}}function G(le){this.start=le,this.end={line:M,column:Q},this.source=j.source}G.prototype.content=C;function N(le){var ie=new Error(j.source+":"+M+":"+Q+": "+le);if(ie.reason=le,ie.filename=j.source,ie.line=M,ie.column=Q,ie.source=C,!j.silent)throw ie}function he(le){var ie=le.exec(C);if(ie){var se=ie[0];return B(se),C=C.slice(se.length),ie}}function Se(){he(r)}function xe(le){var ie;for(le=le||[];ie=L();)ie!==!1&&le.push(ie);return le}function L(){var le=F();if(!(m!=C.charAt(0)||g!=C.charAt(1))){for(var ie=2;y!=C.charAt(ie)&&(g!=C.charAt(ie)||m!=C.charAt(ie+1));)++ie;if(ie+=2,y===C.charAt(ie-1))return N("End of comment missing");var se=C.slice(2,ie-2);return Q+=2,B(se),C=C.slice(ie),Q+=2,le({type:S,comment:se})}}function re(){var le=F(),ie=he(a);if(ie){if(L(),!he(s))return N("property missing ':'");var se=he(o),U=le({type:x,property:w(ie[0].replace(t,y)),value:se?w(se[0].replace(t,y)):y});return he(c),U}}function te(){var le=[];xe(le);for(var ie;ie=re();)ie!==!1&&(le.push(ie),xe(le));return le}return Se(),te()};function w(C){return C?C.replace(h,y):y}return uf}var zg;function sS(){if(zg)return Vr;zg=1;var t=Vr&&Vr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.default=r;var i=t(uS());function r(a,s){var o=null;if(!a||typeof a!="string")return o;var c=(0,i.default)(a),h=typeof s=="function";return c.forEach(function(p){if(p.type==="declaration"){var m=p.property,g=p.value;h?s(m,g,p):g&&(o=o||{},o[m]=g)}}),o}return Vr}var ll={},Mg;function oS(){if(Mg)return ll;Mg=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||r.test(m)||t.test(m)},c=function(m,g){return g.toUpperCase()},h=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),o(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(s,h):m=m.replace(a,h),m.replace(i,c))};return ll.camelCase=p,ll}var ul,Rg;function cS(){if(Rg)return ul;Rg=1;var t=ul&&ul.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=t(sS()),r=oS();function a(s,o){var c={};return!s||typeof s!="string"||(0,i.default)(s,function(h,p){h&&p&&(c[(0,r.camelCase)(h,o)]=p)}),c}return a.default=a,ul=a,ul}var fS=cS();const hS=Dl(fS),By=Hy("end"),If=Hy("start");function Hy(t){return i;function i(r){const a=r&&r.position&&r.position[t]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function dS(t){const i=If(t),r=By(t);if(i&&r)return{start:i,end:r}}function dl(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Dg(t.position):"start"in t||"end"in t?Dg(t):"line"in t||"column"in t?Mf(t):""}function Mf(t){return Ng(t&&t.line)+":"+Ng(t&&t.column)}function Dg(t){return Mf(t&&t.start)+"-"+Mf(t&&t.end)}function Ng(t){return t&&typeof t=="number"?t:1}class Tt extends Error{constructor(i,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let s="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof i=="string"?s=i:!o.cause&&i&&(c=!0,s=i.message,o.cause=i),!o.ruleId&&!o.source&&typeof a=="string"){const p=a.indexOf(":");p===-1?o.ruleId=a:(o.source=a.slice(0,p),o.ruleId=a.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=h?h.line:void 0,this.name=dl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Tt.prototype.file="";Tt.prototype.name="";Tt.prototype.reason="";Tt.prototype.message="";Tt.prototype.stack="";Tt.prototype.column=void 0;Tt.prototype.line=void 0;Tt.prototype.ancestors=void 0;Tt.prototype.cause=void 0;Tt.prototype.fatal=void 0;Tt.prototype.place=void 0;Tt.prototype.ruleId=void 0;Tt.prototype.source=void 0;const Gf={}.hasOwnProperty,mS=new Map,pS=/[A-Z]/g,gS=new Set(["table","tbody","thead","tfoot","tr"]),yS=new Set(["td","th"]),Zy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vS(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let a;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=ES(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=wS(r,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:a,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Yf:aS,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},o=qy(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function qy(t,i,r){if(i.type==="element")return bS(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return _S(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return SS(t,i,r);if(i.type==="mdxjsEsm")return xS(t,i);if(i.type==="root")return kS(t,i,r);if(i.type==="text")return TS(t,i)}function bS(t,i,r){const a=t.schema;let s=a;i.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Yf,t.schema=s),t.ancestors.push(i);const o=Yy(t,i.tagName,!1),c=AS(t,i);let h=Xf(t,i);return gS.has(i.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!Fx(p):!0})),Vy(t,c,o,i),Qf(c,h),t.ancestors.pop(),t.schema=a,t.create(i,o,c,r)}function _S(t,i){if(i.data&&i.data.estree&&t.evaluater){const a=i.data.estree.body[0];return a.type,t.evaluater.evaluateExpression(a.expression)}Ml(t,i.position)}function xS(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);Ml(t,i.position)}function SS(t,i,r){const a=t.schema;let s=a;i.name==="svg"&&a.space==="html"&&(s=Yf,t.schema=s),t.ancestors.push(i);const o=i.name===null?t.Fragment:Yy(t,i.name,!0),c=CS(t,i),h=Xf(t,i);return Vy(t,c,o,i),Qf(c,h),t.ancestors.pop(),t.schema=a,t.create(i,o,c,r)}function kS(t,i,r){const a={};return Qf(a,Xf(t,i)),t.create(i,t.Fragment,a,r)}function TS(t,i){return i.value}function Vy(t,i,r,a){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=a)}function Qf(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function wS(t,i,r){return a;function a(s,o,c,h){const m=Array.isArray(c.children)?r:i;return h?m(o,c,h):m(o,c)}}function ES(t,i){return r;function r(a,s,o,c){const h=Array.isArray(o.children),p=If(a);return i(s,o,c,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function AS(t,i){const r={};let a,s;for(s in i.properties)if(s!=="children"&&Gf.call(i.properties,s)){const o=OS(t,s,i.properties[s]);if(o){const[c,h]=o;t.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&yS.has(i.tagName)?a=h:r[c]=h}}if(a){const o=r.style||(r.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function CS(t,i){const r={};for(const a of i.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&t.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const h=c.properties[0];h.type,Object.assign(r,t.evaluater.evaluateExpression(h.argument))}else Ml(t,i.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&t.evaluater){const h=a.value.data.estree.body[0];h.type,o=t.evaluater.evaluateExpression(h.expression)}else Ml(t,i.position);else o=a.value===null?!0:a.value;r[s]=o}return r}function Xf(t,i){const r=[];let a=-1;const s=t.passKeys?new Map:mS;for(;++a<i.children.length;){const o=i.children[a];let c;if(t.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const m=s.get(p)||0;c=p+"-"+m,s.set(p,m+1)}}const h=qy(t,o,c);h!==void 0&&r.push(h)}return r}function OS(t,i,r){const a=nS(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?Ix(r):lS(r)),a.property==="style"){let s=typeof r=="object"?r:zS(t,String(r));return t.stylePropertyNameCase==="css"&&(s=MS(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&a.space?Wx[a.property]||a.property:a.attribute,r]}}function zS(t,i){try{return hS(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const a=r,s=new Tt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Zy+"#cannot-parse-style-attribute",s}}function Yy(t,i,r){let a;if(!r)a={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let o=-1,c;for(;++o<s.length;){const h=wg(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}a=c}else a=wg(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(a.type==="Literal"){const s=a.value;return Gf.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(a);Ml(t)}function Ml(t,i){const r=new Tt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=Zy+"#cannot-handle-mdx-estrees-without-createevaluater",r}function MS(t){const i={};let r;for(r in t)Gf.call(t,r)&&(i[RS(r)]=t[r]);return i}function RS(t){let i=t.replace(pS,DS);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function DS(t){return"-"+t.toLowerCase()}const sf={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"]},NS={};function Pf(t,i){const r=NS,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Iy(t,a,s)}function Iy(t,i,r){if(jS(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return jg(t.children,i,r)}return Array.isArray(t)?jg(t,i,r):""}function jg(t,i,r){const a=[];let s=-1;for(;++s<t.length;)a[s]=Iy(t[s],i,r);return a.join("")}function jS(t){return!!(t&&typeof t=="object")}const Lg=document.createElement("i");function Ff(t){const i="&"+t+";";Lg.innerHTML=i;const r=Lg.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function Kt(t,i,r,a){const s=t.length;let o=0,c;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(i,r),t.splice(...c);else for(r&&t.splice(i,r);o<a.length;)c=a.slice(o,o+1e4),c.unshift(i,0),t.splice(...c),o+=1e4,i+=1e4}function on(t,i){return t.length>0?(Kt(t,t.length,0,i),t):i}const Ug={}.hasOwnProperty;function Gy(t){const i={};let r=-1;for(;++r<t.length;)LS(i,t[r]);return i}function LS(t,i){let r;for(r in i){const s=(Ug.call(t,r)?t[r]:void 0)||(t[r]={}),o=i[r];let c;if(o)for(c in o){Ug.call(s,c)||(s[c]=[]);const h=o[c];US(s[c],Array.isArray(h)?h:h?[h]:[])}}}function US(t,i){let r=-1;const a=[];for(;++r<i.length;)(i[r].add==="after"?t:a).push(i[r]);Kt(t,0,0,a)}function Qy(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function _n(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ct=zi(/[A-Za-z]/),St=zi(/[\dA-Za-z]/),BS=zi(/[#-'*+\--9=?A-Z^-~]/);function ps(t){return t!==null&&(t<32||t===127)}const Rf=zi(/\d/),HS=zi(/[\dA-Fa-f]/),ZS=zi(/[!-/:-@[-`{-~]/);function pe(t){return t!==null&&t<-2}function Fe(t){return t!==null&&(t<0||t===32)}function De(t){return t===-2||t===-1||t===32}const _s=zi(new RegExp("\\p{P}|\\p{S}","u")),er=zi(/\s/);function zi(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ta(t){const i=[];let r=-1,a=0,s=0;for(;++r<t.length;){const o=t.charCodeAt(r);let c="";if(o===37&&St(t.charCodeAt(r+1))&&St(t.charCodeAt(r+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const h=t.charCodeAt(r+1);o<56320&&h>56319&&h<57344?(c=String.fromCharCode(o,h),s=1):c="�"}else c=String.fromCharCode(o);c&&(i.push(t.slice(a,r),encodeURIComponent(c)),a=r+s+1,c=""),s&&(r+=s,s=0)}return i.join("")+t.slice(a)}function Le(t,i,r,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(p){return De(p)?(t.enter(r),h(p)):i(p)}function h(p){return De(p)&&o++<s?(t.consume(p),h):(t.exit(r),i(p))}}const qS={tokenize:VS};function VS(t){const i=t.attempt(this.parser.constructs.contentInitial,a,s);let r;return i;function a(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Le(t,i,"linePrefix")}function s(h){return t.enter("paragraph"),o(h)}function o(h){const p=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=p),r=p,c(h)}function c(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return pe(h)?(t.consume(h),t.exit("chunkText"),o):(t.consume(h),c)}}const YS={tokenize:IS},Bg={tokenize:GS};function IS(t){const i=this,r=[];let a=0,s,o,c;return h;function h(B){if(a<r.length){const F=r[a];return i.containerState=F[1],t.attempt(F[0].continuation,p,m)(B)}return m(B)}function p(B){if(a++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&Q();const F=i.events.length;let G=F,N;for(;G--;)if(i.events[G][0]==="exit"&&i.events[G][1].type==="chunkFlow"){N=i.events[G][1].end;break}M(a);let he=F;for(;he<i.events.length;)i.events[he][1].end={...N},he++;return Kt(i.events,G+1,0,i.events.slice(F)),i.events.length=he,m(B)}return h(B)}function m(B){if(a===r.length){if(!s)return S(B);if(s.currentConstruct&&s.currentConstruct.concrete)return w(B);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(Bg,g,y)(B)}function g(B){return s&&Q(),M(a),S(B)}function y(B){return i.parser.lazy[i.now().line]=a!==r.length,c=i.now().offset,w(B)}function S(B){return i.containerState={},t.attempt(Bg,x,w)(B)}function x(B){return a++,r.push([i.currentConstruct,i.containerState]),S(B)}function w(B){if(B===null){s&&Q(),M(0),t.consume(B);return}return s=s||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),C(B)}function C(B){if(B===null){j(t.exit("chunkFlow"),!0),M(0),t.consume(B);return}return pe(B)?(t.consume(B),j(t.exit("chunkFlow")),a=0,i.interrupt=void 0,h):(t.consume(B),C)}function j(B,F){const G=i.sliceStream(B);if(F&&G.push(null),B.previous=o,o&&(o.next=B),o=B,s.defineSkip(B.start),s.write(G),i.parser.lazy[B.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<c&&(!s.events[N][1].end||s.events[N][1].end.offset>c))return;const he=i.events.length;let Se=he,xe,L;for(;Se--;)if(i.events[Se][0]==="exit"&&i.events[Se][1].type==="chunkFlow"){if(xe){L=i.events[Se][1].end;break}xe=!0}for(M(a),N=he;N<i.events.length;)i.events[N][1].end={...L},N++;Kt(i.events,Se+1,0,i.events.slice(he)),i.events.length=N}}function M(B){let F=r.length;for(;F-- >B;){const G=r[F];i.containerState=G[1],G[0].exit.call(i,t)}r.length=B}function Q(){s.write([null]),o=void 0,s=void 0,i.containerState._closeFlow=void 0}}function GS(t,i,r){return Le(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Jr(t){if(t===null||Fe(t)||er(t))return 1;if(_s(t))return 2}function xs(t,i,r){const a=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!a.includes(o)&&(i=o(i,r),a.push(o))}return i}const Df={name:"attention",resolveAll:QS,tokenize:XS};function QS(t,i){let r=-1,a,s,o,c,h,p,m,g;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(a=r;a--;)if(t[a][0]==="exit"&&t[a][1].type==="attentionSequence"&&t[a][1]._open&&i.sliceSerialize(t[a][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[a][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[a][1].end.offset-t[a][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;p=t[a][1].end.offset-t[a][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[a][1].end},S={...t[r][1].start};Hg(y,-p),Hg(S,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[a][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:S},o={type:p>1?"strongText":"emphasisText",start:{...t[a][1].end},end:{...t[r][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...h.end}},t[a][1].end={...c.start},t[r][1].start={...h.end},m=[],t[a][1].end.offset-t[a][1].start.offset&&(m=on(m,[["enter",t[a][1],i],["exit",t[a][1],i]])),m=on(m,[["enter",s,i],["enter",c,i],["exit",c,i],["enter",o,i]]),m=on(m,xs(i.parser.constructs.insideSpan.null,t.slice(a+1,r),i)),m=on(m,[["exit",o,i],["enter",h,i],["exit",h,i],["exit",s,i]]),t[r][1].end.offset-t[r][1].start.offset?(g=2,m=on(m,[["enter",t[r][1],i],["exit",t[r][1],i]])):g=0,Kt(t,a-1,r-a+3,m),r=a+m.length-g-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function XS(t,i){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Jr(a);let o;return c;function c(p){return o=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===o)return t.consume(p),h;const m=t.exit("attentionSequence"),g=Jr(p),y=!g||g===2&&s||r.includes(p),S=!s||s===2&&g||r.includes(a);return m._open=!!(o===42?y:y&&(s||!S)),m._close=!!(o===42?S:S&&(g||!y)),i(p)}}function Hg(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const PS={name:"autolink",tokenize:FS};function FS(t,i,r){let a=0;return s;function s(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(x){return Ct(x)?(t.consume(x),c):x===64?r(x):m(x)}function c(x){return x===43||x===45||x===46||St(x)?(a=1,h(x)):m(x)}function h(x){return x===58?(t.consume(x),a=0,p):(x===43||x===45||x===46||St(x))&&a++<32?(t.consume(x),h):(a=0,m(x))}function p(x){return x===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):x===null||x===32||x===60||ps(x)?r(x):(t.consume(x),p)}function m(x){return x===64?(t.consume(x),g):BS(x)?(t.consume(x),m):r(x)}function g(x){return St(x)?y(x):r(x)}function y(x){return x===46?(t.consume(x),a=0,g):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),i):S(x)}function S(x){if((x===45||St(x))&&a++<63){const w=x===45?S:y;return t.consume(x),w}return r(x)}}const Ll={partial:!0,tokenize:$S};function $S(t,i,r){return a;function a(o){return De(o)?Le(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||pe(o)?i(o):r(o)}}const Xy={continuation:{tokenize:JS},exit:WS,name:"blockQuote",tokenize:KS};function KS(t,i,r){const a=this;return s;function s(c){if(c===62){const h=a.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),o}return r(c)}function o(c){return De(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(c))}}function JS(t,i,r){const a=this;return s;function s(c){return De(c)?Le(t,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return t.attempt(Xy,i,r)(c)}}function WS(t){t.exit("blockQuote")}const Py={name:"characterEscape",tokenize:ek};function ek(t,i,r){return a;function a(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return ZS(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(o)}}const Fy={name:"characterReference",tokenize:tk};function tk(t,i,r){const a=this;let s=0,o,c;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,c=St,g(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,c=HS,g):(t.enter("characterReferenceValue"),o=7,c=Rf,g(y))}function g(y){if(y===59&&s){const S=t.exit("characterReferenceValue");return c===St&&!Ff(a.sliceSerialize(S))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return c(y)&&s++<o?(t.consume(y),g):r(y)}}const Zg={partial:!0,tokenize:ik},qg={concrete:!0,name:"codeFenced",tokenize:nk};function nk(t,i,r){const a=this,s={partial:!0,tokenize:G};let o=0,c=0,h;return p;function p(N){return m(N)}function m(N){const he=a.events[a.events.length-1];return o=he&&he[1].type==="linePrefix"?he[2].sliceSerialize(he[1],!0).length:0,h=N,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(N)}function g(N){return N===h?(c++,t.consume(N),g):c<3?r(N):(t.exit("codeFencedFenceSequence"),De(N)?Le(t,y,"whitespace")(N):y(N))}function y(N){return N===null||pe(N)?(t.exit("codeFencedFence"),a.interrupt?i(N):t.check(Zg,C,F)(N)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),S(N))}function S(N){return N===null||pe(N)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(N)):De(N)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Le(t,x,"whitespace")(N)):N===96&&N===h?r(N):(t.consume(N),S)}function x(N){return N===null||pe(N)?y(N):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===null||pe(N)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(N)):N===96&&N===h?r(N):(t.consume(N),w)}function C(N){return t.attempt(s,F,j)(N)}function j(N){return t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),M}function M(N){return o>0&&De(N)?Le(t,Q,"linePrefix",o+1)(N):Q(N)}function Q(N){return N===null||pe(N)?t.check(Zg,C,F)(N):(t.enter("codeFlowValue"),B(N))}function B(N){return N===null||pe(N)?(t.exit("codeFlowValue"),Q(N)):(t.consume(N),B)}function F(N){return t.exit("codeFenced"),i(N)}function G(N,he,Se){let xe=0;return L;function L(se){return N.enter("lineEnding"),N.consume(se),N.exit("lineEnding"),re}function re(se){return N.enter("codeFencedFence"),De(se)?Le(N,te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(se):te(se)}function te(se){return se===h?(N.enter("codeFencedFenceSequence"),le(se)):Se(se)}function le(se){return se===h?(xe++,N.consume(se),le):xe>=c?(N.exit("codeFencedFenceSequence"),De(se)?Le(N,ie,"whitespace")(se):ie(se)):Se(se)}function ie(se){return se===null||pe(se)?(N.exit("codeFencedFence"),he(se)):Se(se)}}}function ik(t,i,r){const a=this;return s;function s(c){return c===null?r(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}const of={name:"codeIndented",tokenize:ak},rk={partial:!0,tokenize:lk};function ak(t,i,r){const a=this;return s;function s(m){return t.enter("codeIndented"),Le(t,o,"linePrefix",5)(m)}function o(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):r(m)}function c(m){return m===null?p(m):pe(m)?t.attempt(rk,c,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||pe(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),i(m)}}function lk(t,i,r){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?r(c):pe(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Le(t,o,"linePrefix",5)(c)}function o(c){const h=a.events[a.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(c):pe(c)?s(c):r(c)}}const uk={name:"codeText",previous:ok,resolve:sk,tokenize:ck};function sk(t){let i=t.length-4,r=3,a,s;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(a=r;++a<i;)if(t[a][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(a=r-1,i++;++a<=i;)s===void 0?a!==i&&t[a][1].type!=="lineEnding"&&(s=a):(a===i||t[a][1].type==="lineEnding")&&(t[s][1].type="codeTextData",a!==s+2&&(t[s][1].end=t[a-1][1].end,t.splice(s+2,a-s-2),i-=a-s-2,a=s+2),s=void 0);return t}function ok(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ck(t,i,r){let a=0,s,o;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),a++,h):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(o=t.enter("codeTextSequence"),s=0,g(y)):pe(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||pe(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function g(y){return y===96?(t.consume(y),s++,g):s===a?(t.exit("codeTextSequence"),t.exit("codeText"),i(y)):(o.type="codeTextData",m(y))}}class fk{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(i,a):i>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(i,r,a){const s=r||0;this.setCursor(Math.trunc(i));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&sl(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),sl(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),sl(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);sl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);sl(this.left,r.reverse())}}}function sl(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function $y(t){const i={};let r=-1,a,s,o,c,h,p,m;const g=new fk(t);for(;++r<g.length;){for(;r in i;)r=i[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(p=a[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(i,hk(g,r)),r=i[r],m=!0);else if(a[1]._container){for(o=r,s=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...g.get(s)[1].start},h=g.slice(s,r),h.unshift(a),g.splice(s,r-s+1,h))}}return Kt(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function hk(t,i){const r=t.get(i)[1],a=t.get(i)[2];let s=i-1;const o=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const h=c.events,p=[],m={};let g,y,S=-1,x=r,w=0,C=0;const j=[C];for(;x;){for(;t.get(++s)[1]!==x;);o.push(s),x._tokenizer||(g=a.sliceStream(x),x.next||g.push(null),y&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=r;++S<h.length;)h[S][0]==="exit"&&h[S-1][0]==="enter"&&h[S][1].type===h[S-1][1].type&&h[S][1].start.line!==h[S][1].end.line&&(C=S+1,j.push(C),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):j.pop(),S=j.length;S--;){const M=h.slice(j[S],j[S+1]),Q=o.pop();p.push([Q,Q+M.length-1]),t.splice(Q,2,M)}for(p.reverse(),S=-1;++S<p.length;)m[w+p[S][0]]=w+p[S][1],w+=p[S][1]-p[S][0]-1;return m}const dk={resolve:pk,tokenize:gk},mk={partial:!0,tokenize:yk};function pk(t){return $y(t),t}function gk(t,i){let r;return a;function a(h){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?o(h):pe(h)?t.check(mk,c,o)(h):(t.consume(h),s)}function o(h){return t.exit("chunkContent"),t.exit("content"),i(h)}function c(h){return t.consume(h),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function yk(t,i,r){const a=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Le(t,o,"linePrefix")}function o(c){if(c===null||pe(c))return r(c);const h=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(c):t.interrupt(a.parser.constructs.flow,r,i)(c)}}function Ky(t,i,r,a,s,o,c,h,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(M){return M===60?(t.enter(a),t.enter(s),t.enter(o),t.consume(M),t.exit(o),S):M===null||M===32||M===41||ps(M)?r(M):(t.enter(a),t.enter(c),t.enter(h),t.enter("chunkString",{contentType:"string"}),C(M))}function S(M){return M===62?(t.enter(o),t.consume(M),t.exit(o),t.exit(s),t.exit(a),i):(t.enter(h),t.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===62?(t.exit("chunkString"),t.exit(h),S(M)):M===null||M===60||pe(M)?r(M):(t.consume(M),M===92?w:x)}function w(M){return M===60||M===62||M===92?(t.consume(M),x):x(M)}function C(M){return!g&&(M===null||M===41||Fe(M))?(t.exit("chunkString"),t.exit(h),t.exit(c),t.exit(a),i(M)):g<m&&M===40?(t.consume(M),g++,C):M===41?(t.consume(M),g--,C):M===null||M===32||M===40||ps(M)?r(M):(t.consume(M),M===92?j:C)}function j(M){return M===40||M===41||M===92?(t.consume(M),C):C(M)}}function Jy(t,i,r,a,s,o){const c=this;let h=0,p;return m;function m(x){return t.enter(a),t.enter(s),t.consume(x),t.exit(s),t.enter(o),g}function g(x){return h>999||x===null||x===91||x===93&&!p||x===94&&!h&&"_hiddenFootnoteSupport"in c.parser.constructs?r(x):x===93?(t.exit(o),t.enter(s),t.consume(x),t.exit(s),t.exit(a),i):pe(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||pe(x)||h++>999?(t.exit("chunkString"),g(x)):(t.consume(x),p||(p=!De(x)),x===92?S:y)}function S(x){return x===91||x===92||x===93?(t.consume(x),h++,y):y(x)}}function Wy(t,i,r,a,s,o){let c;return h;function h(S){return S===34||S===39||S===40?(t.enter(a),t.enter(s),t.consume(S),t.exit(s),c=S===40?41:S,p):r(S)}function p(S){return S===c?(t.enter(s),t.consume(S),t.exit(s),t.exit(a),i):(t.enter(o),m(S))}function m(S){return S===c?(t.exit(o),p(c)):S===null?r(S):pe(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Le(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===c||S===null||pe(S)?(t.exit("chunkString"),m(S)):(t.consume(S),S===92?y:g)}function y(S){return S===c||S===92?(t.consume(S),g):g(S)}}function ml(t,i){let r;return a;function a(s){return pe(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,a):De(s)?Le(t,a,r?"linePrefix":"lineSuffix")(s):i(s)}}const vk={name:"definition",tokenize:_k},bk={partial:!0,tokenize:xk};function _k(t,i,r){const a=this;let s;return o;function o(x){return t.enter("definition"),c(x)}function c(x){return Jy.call(a,t,h,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function h(x){return s=_n(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),p):r(x)}function p(x){return Fe(x)?ml(t,m)(x):m(x)}function m(x){return Ky(t,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return t.attempt(bk,y,y)(x)}function y(x){return De(x)?Le(t,S,"whitespace")(x):S(x)}function S(x){return x===null||pe(x)?(t.exit("definition"),a.parser.defined.push(s),i(x)):r(x)}}function xk(t,i,r){return a;function a(h){return Fe(h)?ml(t,s)(h):r(h)}function s(h){return Wy(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return De(h)?Le(t,c,"whitespace")(h):c(h)}function c(h){return h===null||pe(h)?i(h):r(h)}}const Sk={name:"hardBreakEscape",tokenize:kk};function kk(t,i,r){return a;function a(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return pe(o)?(t.exit("hardBreakEscape"),i(o)):r(o)}}const Tk={name:"headingAtx",resolve:wk,tokenize:Ek};function wk(t,i){let r=t.length-2,a=3,s,o;return t[a][1].type==="whitespace"&&(a+=2),r-2>a&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&t[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(s={type:"atxHeadingText",start:t[a][1].start,end:t[r][1].end},o={type:"chunkText",start:t[a][1].start,end:t[r][1].end,contentType:"text"},Kt(t,a,r-a+1,[["enter",s,i],["enter",o,i],["exit",o,i],["exit",s,i]])),t}function Ek(t,i,r){let a=0;return s;function s(g){return t.enter("atxHeading"),o(g)}function o(g){return t.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(t.consume(g),c):g===null||Fe(g)?(t.exit("atxHeadingSequence"),h(g)):r(g)}function h(g){return g===35?(t.enter("atxHeadingSequence"),p(g)):g===null||pe(g)?(t.exit("atxHeading"),i(g)):De(g)?Le(t,h,"whitespace")(g):(t.enter("atxHeadingText"),m(g))}function p(g){return g===35?(t.consume(g),p):(t.exit("atxHeadingSequence"),h(g))}function m(g){return g===null||g===35||Fe(g)?(t.exit("atxHeadingText"),h(g)):(t.consume(g),m)}}const Ak=["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"],Vg=["pre","script","style","textarea"],Ck={concrete:!0,name:"htmlFlow",resolveTo:Mk,tokenize:Rk},Ok={partial:!0,tokenize:Nk},zk={partial:!0,tokenize:Dk};function Mk(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function Rk(t,i,r){const a=this;let s,o,c,h,p;return m;function m(k){return g(k)}function g(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),y}function y(k){return k===33?(t.consume(k),S):k===47?(t.consume(k),o=!0,C):k===63?(t.consume(k),s=3,a.interrupt?i:b):Ct(k)?(t.consume(k),c=String.fromCharCode(k),j):r(k)}function S(k){return k===45?(t.consume(k),s=2,x):k===91?(t.consume(k),s=5,h=0,w):Ct(k)?(t.consume(k),s=4,a.interrupt?i:b):r(k)}function x(k){return k===45?(t.consume(k),a.interrupt?i:b):r(k)}function w(k){const ue="CDATA[";return k===ue.charCodeAt(h++)?(t.consume(k),h===ue.length?a.interrupt?i:te:w):r(k)}function C(k){return Ct(k)?(t.consume(k),c=String.fromCharCode(k),j):r(k)}function j(k){if(k===null||k===47||k===62||Fe(k)){const ue=k===47,Ee=c.toLowerCase();return!ue&&!o&&Vg.includes(Ee)?(s=1,a.interrupt?i(k):te(k)):Ak.includes(c.toLowerCase())?(s=6,ue?(t.consume(k),M):a.interrupt?i(k):te(k)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(k):o?Q(k):B(k))}return k===45||St(k)?(t.consume(k),c+=String.fromCharCode(k),j):r(k)}function M(k){return k===62?(t.consume(k),a.interrupt?i:te):r(k)}function Q(k){return De(k)?(t.consume(k),Q):L(k)}function B(k){return k===47?(t.consume(k),L):k===58||k===95||Ct(k)?(t.consume(k),F):De(k)?(t.consume(k),B):L(k)}function F(k){return k===45||k===46||k===58||k===95||St(k)?(t.consume(k),F):G(k)}function G(k){return k===61?(t.consume(k),N):De(k)?(t.consume(k),G):B(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),p=k,he):De(k)?(t.consume(k),N):Se(k)}function he(k){return k===p?(t.consume(k),p=null,xe):k===null||pe(k)?r(k):(t.consume(k),he)}function Se(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Fe(k)?G(k):(t.consume(k),Se)}function xe(k){return k===47||k===62||De(k)?B(k):r(k)}function L(k){return k===62?(t.consume(k),re):r(k)}function re(k){return k===null||pe(k)?te(k):De(k)?(t.consume(k),re):r(k)}function te(k){return k===45&&s===2?(t.consume(k),U):k===60&&s===1?(t.consume(k),J):k===62&&s===4?(t.consume(k),Y):k===63&&s===3?(t.consume(k),b):k===93&&s===5?(t.consume(k),ze):pe(k)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Ok,W,le)(k)):k===null||pe(k)?(t.exit("htmlFlowData"),le(k)):(t.consume(k),te)}function le(k){return t.check(zk,ie,W)(k)}function ie(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),se}function se(k){return k===null||pe(k)?le(k):(t.enter("htmlFlowData"),te(k))}function U(k){return k===45?(t.consume(k),b):te(k)}function J(k){return k===47?(t.consume(k),c="",ce):te(k)}function ce(k){if(k===62){const ue=c.toLowerCase();return Vg.includes(ue)?(t.consume(k),Y):te(k)}return Ct(k)&&c.length<8?(t.consume(k),c+=String.fromCharCode(k),ce):te(k)}function ze(k){return k===93?(t.consume(k),b):te(k)}function b(k){return k===62?(t.consume(k),Y):k===45&&s===2?(t.consume(k),b):te(k)}function Y(k){return k===null||pe(k)?(t.exit("htmlFlowData"),W(k)):(t.consume(k),Y)}function W(k){return t.exit("htmlFlow"),i(k)}}function Dk(t,i,r){const a=this;return s;function s(c){return pe(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):r(c)}function o(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}function Nk(t,i,r){return a;function a(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Ll,i,r)}}const jk={name:"htmlText",tokenize:Lk};function Lk(t,i,r){const a=this;let s,o,c;return h;function h(b){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(b),p}function p(b){return b===33?(t.consume(b),m):b===47?(t.consume(b),G):b===63?(t.consume(b),B):Ct(b)?(t.consume(b),Se):r(b)}function m(b){return b===45?(t.consume(b),g):b===91?(t.consume(b),o=0,w):Ct(b)?(t.consume(b),Q):r(b)}function g(b){return b===45?(t.consume(b),x):r(b)}function y(b){return b===null?r(b):b===45?(t.consume(b),S):pe(b)?(c=y,J(b)):(t.consume(b),y)}function S(b){return b===45?(t.consume(b),x):y(b)}function x(b){return b===62?U(b):b===45?S(b):y(b)}function w(b){const Y="CDATA[";return b===Y.charCodeAt(o++)?(t.consume(b),o===Y.length?C:w):r(b)}function C(b){return b===null?r(b):b===93?(t.consume(b),j):pe(b)?(c=C,J(b)):(t.consume(b),C)}function j(b){return b===93?(t.consume(b),M):C(b)}function M(b){return b===62?U(b):b===93?(t.consume(b),M):C(b)}function Q(b){return b===null||b===62?U(b):pe(b)?(c=Q,J(b)):(t.consume(b),Q)}function B(b){return b===null?r(b):b===63?(t.consume(b),F):pe(b)?(c=B,J(b)):(t.consume(b),B)}function F(b){return b===62?U(b):B(b)}function G(b){return Ct(b)?(t.consume(b),N):r(b)}function N(b){return b===45||St(b)?(t.consume(b),N):he(b)}function he(b){return pe(b)?(c=he,J(b)):De(b)?(t.consume(b),he):U(b)}function Se(b){return b===45||St(b)?(t.consume(b),Se):b===47||b===62||Fe(b)?xe(b):r(b)}function xe(b){return b===47?(t.consume(b),U):b===58||b===95||Ct(b)?(t.consume(b),L):pe(b)?(c=xe,J(b)):De(b)?(t.consume(b),xe):U(b)}function L(b){return b===45||b===46||b===58||b===95||St(b)?(t.consume(b),L):re(b)}function re(b){return b===61?(t.consume(b),te):pe(b)?(c=re,J(b)):De(b)?(t.consume(b),re):xe(b)}function te(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(t.consume(b),s=b,le):pe(b)?(c=te,J(b)):De(b)?(t.consume(b),te):(t.consume(b),ie)}function le(b){return b===s?(t.consume(b),s=void 0,se):b===null?r(b):pe(b)?(c=le,J(b)):(t.consume(b),le)}function ie(b){return b===null||b===34||b===39||b===60||b===61||b===96?r(b):b===47||b===62||Fe(b)?xe(b):(t.consume(b),ie)}function se(b){return b===47||b===62||Fe(b)?xe(b):r(b)}function U(b){return b===62?(t.consume(b),t.exit("htmlTextData"),t.exit("htmlText"),i):r(b)}function J(b){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),ce}function ce(b){return De(b)?Le(t,ze,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ze(b)}function ze(b){return t.enter("htmlTextData"),c(b)}}const $f={name:"labelEnd",resolveAll:Zk,resolveTo:qk,tokenize:Vk},Uk={tokenize:Yk},Bk={tokenize:Ik},Hk={tokenize:Gk};function Zk(t){let i=-1;const r=[];for(;++i<t.length;){const a=t[i][1];if(r.push(t[i]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",i+=s}}return t.length!==r.length&&Kt(t,0,t.length,r),t}function qk(t,i){let r=t.length,a=0,s,o,c,h;for(;r--;)if(s=t[r][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=r,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=r);const p={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[o][1].start},end:{...t[c][1].end}},g={type:"labelText",start:{...t[o+a+2][1].end},end:{...t[c-2][1].start}};return h=[["enter",p,i],["enter",m,i]],h=on(h,t.slice(o+1,o+a+3)),h=on(h,[["enter",g,i]]),h=on(h,xs(i.parser.constructs.insideSpan.null,t.slice(o+a+4,c-3),i)),h=on(h,[["exit",g,i],t[c-2],t[c-1],["exit",m,i]]),h=on(h,t.slice(c+1)),h=on(h,[["exit",p,i]]),Kt(t,o,t.length,h),t}function Vk(t,i,r){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return h;function h(S){return o?o._inactive?y(S):(c=a.parser.defined.includes(_n(a.sliceSerialize({start:o.end,end:a.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(S),t.exit("labelMarker"),t.exit("labelEnd"),p):r(S)}function p(S){return S===40?t.attempt(Uk,g,c?g:y)(S):S===91?t.attempt(Bk,g,c?m:y)(S):c?g(S):y(S)}function m(S){return t.attempt(Hk,g,y)(S)}function g(S){return i(S)}function y(S){return o._balanced=!0,r(S)}}function Yk(t,i,r){return a;function a(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return Fe(y)?ml(t,o)(y):o(y)}function o(y){return y===41?g(y):Ky(t,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Fe(y)?ml(t,p)(y):g(y)}function h(y){return r(y)}function p(y){return y===34||y===39||y===40?Wy(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Fe(y)?ml(t,g)(y):g(y)}function g(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),i):r(y)}}function Ik(t,i,r){const a=this;return s;function s(h){return Jy.call(a,t,o,c,"reference","referenceMarker","referenceString")(h)}function o(h){return a.parser.defined.includes(_n(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?i(h):r(h)}function c(h){return r(h)}}function Gk(t,i,r){return a;function a(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),i):r(o)}}const Qk={name:"labelStartImage",resolveAll:$f.resolveAll,tokenize:Xk};function Xk(t,i,r){const a=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),o}function o(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),c):r(h)}function c(h){return h===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(h):i(h)}}const Pk={name:"labelStartLink",resolveAll:$f.resolveAll,tokenize:Fk};function Fk(t,i,r){const a=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):i(c)}}const cf={name:"lineEnding",tokenize:$k};function $k(t,i){return r;function r(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Le(t,i,"linePrefix")}}const ls={name:"thematicBreak",tokenize:Kk};function Kk(t,i,r){let a=0,s;return o;function o(m){return t.enter("thematicBreak"),c(m)}function c(m){return s=m,h(m)}function h(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):a>=3&&(m===null||pe(m))?(t.exit("thematicBreak"),i(m)):r(m)}function p(m){return m===s?(t.consume(m),a++,p):(t.exit("thematicBreakSequence"),De(m)?Le(t,h,"whitespace")(m):h(m))}}const Ut={continuation:{tokenize:tT},exit:iT,name:"list",tokenize:eT},Jk={partial:!0,tokenize:rT},Wk={partial:!0,tokenize:nT};function eT(t,i,r){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return h;function h(x){const w=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Rf(x)){if(a.containerState.type||(a.containerState.type=w,t.enter(w,{_container:!0})),w==="listUnordered")return t.enter("listItemPrefix"),x===42||x===45?t.check(ls,r,m)(x):m(x);if(!a.interrupt||x===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(x)}return r(x)}function p(x){return Rf(x)&&++c<10?(t.consume(x),p):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(t.exit("listItemValue"),m(x)):r(x)}function m(x){return t.enter("listItemMarker"),t.consume(x),t.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,t.check(Ll,a.interrupt?r:g,t.attempt(Jk,S,y))}function g(x){return a.containerState.initialBlankLine=!0,o++,S(x)}function y(x){return De(x)?(t.enter("listItemPrefixWhitespace"),t.consume(x),t.exit("listItemPrefixWhitespace"),S):r(x)}function S(x){return a.containerState.size=o+a.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(x)}}function tT(t,i,r){const a=this;return a.containerState._closeFlow=void 0,t.check(Ll,s,o);function s(h){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Le(t,i,"listItemIndent",a.containerState.size+1)(h)}function o(h){return a.containerState.furtherBlankLines||!De(h)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(h)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,t.attempt(Wk,i,c)(h))}function c(h){return a.containerState._closeFlow=!0,a.interrupt=void 0,Le(t,t.attempt(Ut,i,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function nT(t,i,r){const a=this;return Le(t,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?i(o):r(o)}}function iT(t){t.exit(this.containerState.type)}function rT(t,i,r){const a=this;return Le(t,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!De(o)&&c&&c[1].type==="listItemPrefixWhitespace"?i(o):r(o)}}const Yg={name:"setextUnderline",resolveTo:aT,tokenize:lT};function aT(t,i){let r=t.length,a,s,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){a=r;break}t[r][1].type==="paragraph"&&(s=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...t[a][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",c,i]),t.splice(o+1,0,["exit",t[a][1],i]),t[a][1].end={...t[o][1].end}):t[a][1]=c,t.push(["exit",c,i]),t}function lT(t,i,r){const a=this;let s;return o;function o(m){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(t.enter("setextHeadingLine"),s=m,c(m)):r(m)}function c(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),De(m)?Le(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||pe(m)?(t.exit("setextHeadingLine"),i(m)):r(m)}}const uT={tokenize:sT};function sT(t){const i=this,r=t.attempt(Ll,a,t.attempt(this.parser.constructs.flowInitial,s,Le(t,t.attempt(this.parser.constructs.flow,s,t.attempt(dk,s)),"linePrefix")));return r;function a(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const oT={resolveAll:tv()},cT=ev("string"),fT=ev("text");function ev(t){return{resolveAll:tv(t==="text"?hT:void 0),tokenize:i};function i(r){const a=this,s=this.parser.constructs[t],o=r.attempt(s,c,h);return c;function c(g){return m(g)?o(g):h(g)}function h(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),p}function p(g){return m(g)?(r.exit("data"),o(g)):(r.consume(g),p)}function m(g){if(g===null)return!0;const y=s[g];let S=-1;if(y)for(;++S<y.length;){const x=y[S];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function tv(t){return i;function i(r,a){let s=-1,o;for(;++s<=r.length;)o===void 0?r[s]&&r[s][1].type==="data"&&(o=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==o+2&&(r[o][1].end=r[s-1][1].end,r.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(r,a):r}}function hT(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const a=t[r-1][1],s=i.sliceStream(a);let o=s.length,c=-1,h=0,p;for(;o--;){const m=s[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)h++,c--;if(c)break;c=-1}else if(m===-2)p=!0,h++;else if(m!==-1){o++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(h=0),h){const m={type:r===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-h,offset:a.end.offset-h},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(t.splice(r,0,["enter",m,i],["exit",m,i]),r+=2)}r++}return t}const dT={42:Ut,43:Ut,45:Ut,48:Ut,49:Ut,50:Ut,51:Ut,52:Ut,53:Ut,54:Ut,55:Ut,56:Ut,57:Ut,62:Xy},mT={91:vk},pT={[-2]:of,[-1]:of,32:of},gT={35:Tk,42:ls,45:[Yg,ls],60:Ck,61:Yg,95:ls,96:qg,126:qg},yT={38:Fy,92:Py},vT={[-5]:cf,[-4]:cf,[-3]:cf,33:Qk,38:Fy,42:Df,60:[PS,jk],91:Pk,92:[Sk,Py],93:$f,95:Df,96:uk},bT={null:[Df,oT]},_T={null:[42,95]},xT={null:[]},ST=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_T,contentInitial:mT,disable:xT,document:dT,flow:gT,flowInitial:pT,insideSpan:bT,string:yT,text:vT},Symbol.toStringTag,{value:"Module"}));function kT(t,i,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},o=[];let c=[],h=[];const p={attempt:he(G),check:he(N),consume:Q,enter:B,exit:F,interrupt:he(N,{interrupt:!0})},m={code:null,containerState:{},defineSkip:C,events:[],now:w,parser:t,previous:null,sliceSerialize:S,sliceStream:x,write:y};let g=i.tokenize.call(m,p);return i.resolveAll&&o.push(i),m;function y(re){return c=on(c,re),j(),c[c.length-1]!==null?[]:(Se(i,0),m.events=xs(o,m.events,m),m.events)}function S(re,te){return wT(x(re),te)}function x(re){return TT(c,re)}function w(){const{_bufferIndex:re,_index:te,line:le,column:ie,offset:se}=a;return{_bufferIndex:re,_index:te,line:le,column:ie,offset:se}}function C(re){s[re.line]=re.column,L()}function j(){let re;for(;a._index<c.length;){const te=c[a._index];if(typeof te=="string")for(re=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===re&&a._bufferIndex<te.length;)M(te.charCodeAt(a._bufferIndex));else M(te)}}function M(re){g=g(re)}function Q(re){pe(re)?(a.line++,a.column=1,a.offset+=re===-3?2:1,L()):re!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=re}function B(re,te){const le=te||{};return le.type=re,le.start=w(),m.events.push(["enter",le,m]),h.push(le),le}function F(re){const te=h.pop();return te.end=w(),m.events.push(["exit",te,m]),te}function G(re,te){Se(re,te.from)}function N(re,te){te.restore()}function he(re,te){return le;function le(ie,se,U){let J,ce,ze,b;return Array.isArray(ie)?W(ie):"tokenize"in ie?W([ie]):Y(ie);function Y(oe){return st;function st(Ue){const wt=Ue!==null&&oe[Ue],Sn=Ue!==null&&oe.null,Nn=[...Array.isArray(wt)?wt:wt?[wt]:[],...Array.isArray(Sn)?Sn:Sn?[Sn]:[]];return W(Nn)(Ue)}}function W(oe){return J=oe,ce=0,oe.length===0?U:k(oe[ce])}function k(oe){return st;function st(Ue){return b=xe(),ze=oe,oe.partial||(m.currentConstruct=oe),oe.name&&m.parser.constructs.disable.null.includes(oe.name)?Ee():oe.tokenize.call(te?Object.assign(Object.create(m),te):m,p,ue,Ee)(Ue)}}function ue(oe){return re(ze,b),se}function Ee(oe){return b.restore(),++ce<J.length?k(J[ce]):U}}}function Se(re,te){re.resolveAll&&!o.includes(re)&&o.push(re),re.resolve&&Kt(m.events,te,m.events.length-te,re.resolve(m.events.slice(te),m)),re.resolveTo&&(m.events=re.resolveTo(m.events,m))}function xe(){const re=w(),te=m.previous,le=m.currentConstruct,ie=m.events.length,se=Array.from(h);return{from:ie,restore:U};function U(){a=re,m.previous=te,m.currentConstruct=le,m.events.length=ie,h=se,L()}}function L(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function TT(t,i){const r=i.start._index,a=i.start._bufferIndex,s=i.end._index,o=i.end._bufferIndex;let c;if(r===s)c=[t[r].slice(a,o)];else{if(c=t.slice(r,s),a>-1){const h=c[0];typeof h=="string"?c[0]=h.slice(a):c.shift()}o>0&&c.push(t[s].slice(0,o))}return c}function wT(t,i){let r=-1;const a=[];let s;for(;++r<t.length;){const o=t[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
53
|
+
]`;continue}s+=a[m],a[m]==="\\"?o=!0:c&&a[m]==="]"?c=!1:!c&&a[m]==="["&&(c=!0)}try{new RegExp(s)}catch{return console.warn(`Could not convert regex pattern at ${i.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return s}function Oy(t,i){var a,s,o,c,h,p;if(i.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),i.target==="openApi3"&&((a=t.keyType)==null?void 0:a._def.typeName)===K.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((m,g)=>({...m,[g]:Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"properties",g]})??{}}),{}),additionalProperties:i.rejectedAdditionalProperties};const r={type:"object",additionalProperties:Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"additionalProperties"]})??i.allowedAdditionalProperties};if(i.target==="openApi3")return r;if(((s=t.keyType)==null?void 0:s._def.typeName)===K.ZodString&&((o=t.keyType._def.checks)!=null&&o.length)){const{type:m,...g}=Cy(t.keyType._def,i);return{...r,propertyNames:g}}else{if(((c=t.keyType)==null?void 0:c._def.typeName)===K.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(((h=t.keyType)==null?void 0:h._def.typeName)===K.ZodBranded&&t.keyType._def.type._def.typeName===K.ZodString&&((p=t.keyType._def.type._def.checks)!=null&&p.length)){const{type:m,...g}=Ey(t.keyType._def,i);return{...r,propertyNames:g}}}return r}function m_(t,i){if(i.mapStrategy==="record")return Oy(t,i);const r=Ze(t.keyType._def,{...i,currentPath:[...i.currentPath,"items","items","0"]})||{},a=Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[r,a],minItems:2,maxItems:2}}}function p_(t){const i=t.values,a=Object.keys(t.values).filter(o=>typeof i[i[o]]!="number").map(o=>i[o]),s=Array.from(new Set(a.map(o=>typeof o)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:a}}function g_(){return{not:{}}}function y_(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const ms={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function v_(t,i){if(i.target==="openApi3")return wg(t,i);const r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(a=>a._def.typeName in ms&&(!a._def.checks||!a._def.checks.length))){const a=r.reduce((s,o)=>{const c=ms[o._def.typeName];return c&&!s.includes(c)?[...s,c]:s},[]);return{type:a.length>1?a:a[0]}}else if(r.every(a=>a._def.typeName==="ZodLiteral"&&!a.description)){const a=r.reduce((s,o)=>{const c=typeof o._def.value;switch(c){case"string":case"number":case"boolean":return[...s,c];case"bigint":return[...s,"integer"];case"object":if(o._def.value===null)return[...s,"null"];case"symbol":case"undefined":case"function":default:return s}},[]);if(a.length===r.length){const s=a.filter((o,c,h)=>h.indexOf(o)===c);return{type:s.length>1?s:s[0],enum:r.reduce((o,c)=>o.includes(c._def.value)?o:[...o,c._def.value],[])}}}else if(r.every(a=>a._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((a,s)=>[...a,...s._def.values.filter(o=>!a.includes(o))],[])};return wg(t,i)}const wg=(t,i)=>{const r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((a,s)=>Ze(a._def,{...i,currentPath:[...i.currentPath,"anyOf",`${s}`]})).filter(a=>!!a&&(!i.strictUnions||typeof a=="object"&&Object.keys(a).length>0));return r.length?{anyOf:r}:void 0};function b_(t,i){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return i.target==="openApi3"?{type:ms[t.innerType._def.typeName],nullable:!0}:{type:[ms[t.innerType._def.typeName],"null"]};if(i.target==="openApi3"){const a=Ze(t.innerType._def,{...i,currentPath:[...i.currentPath]});return a&&"$ref"in a?{allOf:[a],nullable:!0}:a&&{...a,nullable:!0}}const r=Ze(t.innerType._def,{...i,currentPath:[...i.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function x_(t,i){const r={type:"number"};if(!t.checks)return r;for(const a of t.checks)switch(a.kind){case"int":r.type="integer",wy(r,"type",a.message,i);break;case"min":i.target==="jsonSchema7"?a.inclusive?Ie(r,"minimum",a.value,a.message,i):Ie(r,"exclusiveMinimum",a.value,a.message,i):(a.inclusive||(r.exclusiveMinimum=!0),Ie(r,"minimum",a.value,a.message,i));break;case"max":i.target==="jsonSchema7"?a.inclusive?Ie(r,"maximum",a.value,a.message,i):Ie(r,"exclusiveMaximum",a.value,a.message,i):(a.inclusive||(r.exclusiveMaximum=!0),Ie(r,"maximum",a.value,a.message,i));break;case"multipleOf":Ie(r,"multipleOf",a.value,a.message,i);break}return r}function __(t,i){const r=i.target==="openAi",a={type:"object",properties:{}},s=[],o=t.shape();for(const h in o){let p=o[h];if(p===void 0||p._def===void 0)continue;let m=k_(p);m&&r&&(p instanceof bn&&(p=p._def.innerType),p.isNullable()||(p=p.nullable()),m=!1);const g=Ze(p._def,{...i,currentPath:[...i.currentPath,"properties",h],propertyPath:[...i.currentPath,"properties",h]});g!==void 0&&(a.properties[h]=g,m||s.push(h))}s.length&&(a.required=s);const c=S_(t,i);return c!==void 0&&(a.additionalProperties=c),a}function S_(t,i){if(t.catchall._def.typeName!=="ZodNever")return Ze(t.catchall._def,{...i,currentPath:[...i.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return i.allowedAdditionalProperties;case"strict":return i.rejectedAdditionalProperties;case"strip":return i.removeAdditionalStrategy==="strict"?i.allowedAdditionalProperties:i.rejectedAdditionalProperties}}function k_(t){try{return t.isOptional()}catch{return!0}}const T_=(t,i)=>{var a;if(i.currentPath.toString()===((a=i.propertyPath)==null?void 0:a.toString()))return Ze(t.innerType._def,i);const r=Ze(t.innerType._def,{...i,currentPath:[...i.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}},w_=(t,i)=>{if(i.pipeStrategy==="input")return Ze(t.in._def,i);if(i.pipeStrategy==="output")return Ze(t.out._def,i);const r=Ze(t.in._def,{...i,currentPath:[...i.currentPath,"allOf","0"]}),a=Ze(t.out._def,{...i,currentPath:[...i.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,a].filter(s=>s!==void 0)}};function E_(t,i){return Ze(t.type._def,i)}function A_(t,i){const a={type:"array",uniqueItems:!0,items:Ze(t.valueType._def,{...i,currentPath:[...i.currentPath,"items"]})};return t.minSize&&Ie(a,"minItems",t.minSize.value,t.minSize.message,i),t.maxSize&&Ie(a,"maxItems",t.maxSize.value,t.maxSize.message,i),a}function C_(t,i){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,a)=>Ze(r._def,{...i,currentPath:[...i.currentPath,"items",`${a}`]})).reduce((r,a)=>a===void 0?r:[...r,a],[]),additionalItems:Ze(t.rest._def,{...i,currentPath:[...i.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,a)=>Ze(r._def,{...i,currentPath:[...i.currentPath,"items",`${a}`]})).reduce((r,a)=>a===void 0?r:[...r,a],[])}}function O_(){return{not:{}}}function z_(){return{}}const M_=(t,i)=>Ze(t.innerType._def,i),R_=(t,i,r)=>{switch(i){case K.ZodString:return Cy(t,r);case K.ZodNumber:return x_(t,r);case K.ZodObject:return __(t,r);case K.ZodBigInt:return n_(t,r);case K.ZodBoolean:return i_();case K.ZodDate:return Ay(t,r);case K.ZodUndefined:return O_();case K.ZodNull:return y_(r);case K.ZodArray:return t_(t,r);case K.ZodUnion:case K.ZodDiscriminatedUnion:return v_(t,r);case K.ZodIntersection:return c_(t,r);case K.ZodTuple:return C_(t,r);case K.ZodRecord:return Oy(t,r);case K.ZodLiteral:return f_(t,r);case K.ZodEnum:return s_(t);case K.ZodNativeEnum:return p_(t);case K.ZodNullable:return b_(t,r);case K.ZodOptional:return T_(t,r);case K.ZodMap:return m_(t,r);case K.ZodSet:return A_(t,r);case K.ZodLazy:return()=>t.getter()._def;case K.ZodPromise:return E_(t,r);case K.ZodNaN:case K.ZodNever:return g_();case K.ZodEffects:return u_(t,r);case K.ZodAny:return e_();case K.ZodUnknown:return z_();case K.ZodDefault:return l_(t,r);case K.ZodBranded:return Ey(t,r);case K.ZodReadonly:return M_(t,r);case K.ZodCatch:return r_(t,r);case K.ZodPipeline:return w_(t,r);case K.ZodFunction:case K.ZodVoid:case K.ZodSymbol:return;default:return(a=>{})()}};function Ze(t,i,r=!1){var h;const a=i.seen.get(t);if(i.override){const p=(h=i.override)==null?void 0:h.call(i,t,i,a,r);if(p!==$x)return p}if(a&&!r){const p=D_(a,i);if(p!==void 0)return p}const s={def:t,path:i.currentPath,jsonSchema:void 0};i.seen.set(t,s);const o=R_(t,t.typeName,i),c=typeof o=="function"?Ze(o(),i):o;if(c&&j_(t,i,c),i.postProcess){const p=i.postProcess(c,t,i);return s.jsonSchema=c,p}return s.jsonSchema=c,c}const D_=(t,i)=>{switch(i.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:N_(i.currentPath,t.path)};case"none":case"seen":return t.path.length<i.currentPath.length&&t.path.every((r,a)=>i.currentPath[a]===r)?(console.warn(`Recursive reference detected at ${i.currentPath.join("/")}! Defaulting to any`),{}):i.$refStrategy==="seen"?{}:void 0}},N_=(t,i)=>{let r=0;for(;r<t.length&&r<i.length&&t[r]===i[r];r++);return[(t.length-r).toString(),...i.slice(r)].join("/")},j_=(t,i,r)=>(t.description&&(r.description=t.description,i.markdownDescription&&(r.markdownDescription=t.description)),r),L_=(t,i)=>{const r=Wx(i),a=void 0,s=i==null?void 0:i.name,o=Ze(t._def,r,!1)??{},c=s===void 0?a?{...o,[r.definitionPath]:a}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,s].join("/"),[r.definitionPath]:{...a,[s]:o}};return r.target==="jsonSchema7"?c.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(c.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in c||"oneOf"in c||"allOf"in c||"type"in c&&Array.isArray(c.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),c},U_=t=>({name:t.name,description:t.description,parameters:L_(Fx.object(t.parameters))});class B_{constructor(){this.tools=new Map,this.waitingMap=new Map}bindTool(i){if(this.tools.has(i.name))throw new Error(`Tool with name ${i.name} already exists`);this.tools.set(i.name,i)}bindTools(i){i.forEach(r=>this.bindTool(r))}getAllTools(){return Array.from(this.tools.values())}getTool(i){return this.tools.get(i)}removeTool(i){return this.tools.delete(i)}clearTools(){this.tools.clear()}async callTool(i,r,a){const s=this.getTool(i);if(!s)throw new Error(`Tool with name ${i} not found`);return await s.execute(r,a)}toJSON(){return Array.from(this.tools.values()).map(i=>U_(i))}doneWaiting(i,r){return this.waitingMap.has(i)?(this.waitingMap.get(i)(r),this.waitingMap.delete(i),!0):(console.warn(`Waiting for tool ${i} not found`),!1)}waitForDone(i){return this.waitingMap.has(i)?this.waitingMap.get(i):new Promise((a,s)=>{this.waitingMap.set(i,a)})}static waitForUIDone(i,r){return r.client.tools.waitForDone(r.message.id)}}class af{static isUser(i){return i.type==="human"}static isTool(i){return i.type==="tool"}static isAssistant(i){return i.type==="ai"&&!this.isToolAssistant(i)}static isToolAssistant(i){var r,a;return i.type==="ai"&&(((r=i.tool_calls)===null||r===void 0?void 0:r.length)||((a=i.tool_call_chunks)===null||a===void 0?void 0:a.length))}}class H_ extends Z1{constructor(i){super(i),this.currentAssistant=null,this.currentThread=null,this.streamingCallbacks=new Set,this.tools=new B_,this.stopController=null,this.availableAssistants=[],this.streamingMessage=[],this.graphMessages=[],this.graphState={}}listAssistants(){return this.assistants.search({metadata:null,offset:0,limit:100})}async initAssistant(i){try{const r=await this.listAssistants();if(this.availableAssistants=r,r.length>0){if(this.currentAssistant=r.find(a=>a.graph_id===i)||null,!this.currentAssistant)throw new Error("Agent not found: "+i)}else throw new Error("No assistants found")}catch(r){throw console.error("Failed to initialize LangGraphClient:",r),r}}async createThread({threadId:i}={}){try{return this.currentThread=await this.threads.create({threadId:i}),this.currentThread}catch(r){throw console.error("Failed to create new thread:",r),r}}async listThreads(){return this.threads.search({sortOrder:"desc"})}async resetThread(i,r){await this.initAssistant(i),this.currentThread=await this.threads.get(r),this.graphState=this.currentThread.values,this.graphMessages=this.graphState.messages,this.emitStreamingUpdate({type:"value",data:{event:"messages/partial",data:{messages:this.graphMessages}}})}cloneMessage(i){return JSON.parse(JSON.stringify(i))}replaceMessageWithValuesMessage(i,r=!1){const a=r?"tool_call_id":"id",s=this.graphMessages.find(o=>o[a]===i[a]);return s?{...s,tool_input:i.tool_input}:i}get renderMessage(){var i;const r=new Map,a=[],s=[...this.graphMessages,...this.streamingMessage];for(let o=s.length-1;o>=0;o--){const c=this.cloneMessage(s[o]);if(!c.id){a.unshift(c);continue}if(!r.has(c.id))if(af.isToolAssistant(c)){const h=this.replaceMessageWithValuesMessage(c);r.set(c.id,h);const m=(!((i=h.tool_calls)===null||i===void 0)&&i.length?h.tool_calls:h.tool_call_chunks).map((g,y)=>{var x,S,w,M;return this.replaceMessageWithValuesMessage({type:"tool",additional_kwargs:{},tool_input:(M=(w=(S=(x=h.additional_kwargs)===null||x===void 0?void 0:x.tool_calls)===null||S===void 0?void 0:S[y])===null||w===void 0?void 0:w.function)===null||M===void 0?void 0:M.arguments,id:g.id,name:g.name,response_metadata:{},tool_call_id:g.id},!0)});for(const g of m)r.has(g.id)||(a.unshift(g),r.set(g.id,g));a.unshift(h)}else{const h=this.replaceMessageWithValuesMessage(c);r.set(c.id,h),a.unshift(h)}}return this.attachInfoForMessage(this.composeToolMessages(a))}attachInfoForMessage(i){var r,a,s;let o=null;for(const c of i){const h=((r=c.response_metadata)===null||r===void 0?void 0:r.create_time)||"";try{c.unique_id=c.id+JSON.stringify(c.content).length}catch{c.unique_id=c.id}if(c.spend_time=new Date(h).getTime()-new Date(((a=o==null?void 0:o.response_metadata)===null||a===void 0?void 0:a.create_time)||h).getTime(),!c.usage_metadata&&(!((s=c.response_metadata)===null||s===void 0)&&s.usage)){const p=c.response_metadata.usage;c.usage_metadata={input_tokens:p.prompt_tokens,output_tokens:p.completion_tokens,total_tokens:p.total_tokens}}o=c}return i}composeToolMessages(i){var r;const a=[],s=new Map,o=new Map;for(const c of i)if(!(af.isToolAssistant(c)&&((r=c.tool_calls||c.tool_call_chunks)===null||r===void 0||r.forEach(h=>{s.set(h.id,h),o.set(h.id,c)}),!c.content))){if(af.isTool(c)&&!c.tool_input){const h=s.get(c.tool_call_id),p=o.get(c.tool_call_id);h&&(c.tool_input=typeof h.args!="string"?JSON.stringify(h.args):h.args,c.additional_kwargs?c.additional_kwargs.done=!0:c.additional_kwargs={done:!0}),p&&(c.usage_metadata=p.usage_metadata)}a.push(c)}return a}get tokenCounter(){return this.graphMessages.reduce((i,r)=>{var a,s,o,c,h;if(r.usage_metadata)i.total_tokens+=((a=r.usage_metadata)===null||a===void 0?void 0:a.total_tokens)||0,i.input_tokens+=((s=r.usage_metadata)===null||s===void 0?void 0:s.input_tokens)||0,i.output_tokens+=((o=r.usage_metadata)===null||o===void 0?void 0:o.output_tokens)||0;else if(!((c=r.response_metadata)===null||c===void 0)&&c.usage){const p=(h=r.response_metadata)===null||h===void 0?void 0:h.usage;i.total_tokens+=p.total_tokens||0,i.input_tokens+=p.prompt_tokens||0,i.output_tokens+=p.completion_tokens||0}return i},{total_tokens:0,input_tokens:0,output_tokens:0})}onStreamingUpdate(i){return this.streamingCallbacks.add(i),()=>{this.streamingCallbacks.delete(i)}}emitStreamingUpdate(i){this.streamingCallbacks.forEach(r=>r(i))}cancelRun(){var i,r;!((i=this.currentThread)===null||i===void 0)&&i.thread_id&&(!((r=this.currentRun)===null||r===void 0)&&r.run_id)&&this.runs.cancel(this.currentThread.thread_id,this.currentRun.run_id)}async sendMessage(i,{extraParams:r,_debug:a,command:s}={}){if(!this.currentAssistant)throw new Error("Thread or Assistant not initialized");this.currentThread||(await this.createThread(),this.emitStreamingUpdate({type:"thread",data:{event:"thread/create",data:{thread:this.currentThread}}}));const o=Array.isArray(i)?i:[{type:"human",content:i}],c=(a==null?void 0:a.streamResponse)||this.runs.stream(this.currentThread.thread_id,this.currentAssistant.assistant_id,{input:{...this.graphState,...r||{},messages:o,fe_tools:this.tools.toJSON()},streamMode:["messages","values"],streamSubgraphs:!0,command:s}),h=[];for await(const m of c)if(h.push(m),m.event==="metadata")this.currentRun=m.data;else if(m.event==="error")this.emitStreamingUpdate({type:"error",data:m});else if(m.event==="messages/partial"){for(const g of m.data)this.streamingMessage.push(g);this.emitStreamingUpdate({type:"message",data:m});continue}else if(m.event.startsWith("values")){const g=m.data;if(g.messages){const y=!!(s!=null&&s.resume),x=g.messages.length>=this.graphMessages.length;(!y||y&&x)&&(this.graphMessages=g.messages,this.emitStreamingUpdate({type:"value",data:m}))}this.graphState=m.data,this.streamingMessage=[];continue}this.streamingMessage=[];const p=await this.runFETool();return p&&h.push(...p),this.emitStreamingUpdate({type:"done",data:{event:"done"}}),h}runFETool(){var i;const r=this.graphMessages,a=r[r.length-1];if(a.type==="ai"&&(!((i=a.tool_calls)===null||i===void 0)&&i.length)){const s=a.tool_calls.map(o=>{if(this.tools.getTool(o.name)){const c={...o,tool_call_id:o.id,tool_input:JSON.stringify(o.args),additional_kwargs:{}};return this.callFETool(c,o.args)}});return Promise.all(s)}}async callFETool(i,r){const a=this,s=await this.tools.callTool(i.name,r,{client:a,message:i});return this.resume(s)}resume(i){return this.sendMessage([],{command:{resume:i}})}doneFEToolWaiting(i,r){var a;!this.tools.doneWaiting(i,r)&&((a=this.currentThread)===null||a===void 0?void 0:a.status)==="interrupted"&&this.resume(r)}getCurrentThread(){return this.currentThread}getCurrentAssistant(){return this.currentAssistant}async reset(){var i;await this.initAssistant((i=this.currentAssistant)===null||i===void 0?void 0:i.name),this.currentThread=null,this.graphState={},this.graphMessages=[],this.streamingMessage=[],this.currentRun=void 0,this.emitStreamingUpdate({type:"value",data:{event:"messages/partial"}})}}let gn=[],Ti=0;const es=4;let On=t=>{let i=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},lc:0,listen(a){return r.lc=i.push(a),()=>{for(let o=Ti+es;o<gn.length;)gn[o]===a?gn.splice(o,es):o+=es;let s=i.indexOf(a);~s&&(i.splice(s,1),--r.lc)}},notify(a,s){let o=!gn.length;for(let c of i)gn.push(c,r.value,a,s);if(o){for(Ti=0;Ti<gn.length;Ti+=es)gn[Ti](gn[Ti+1],gn[Ti+2],gn[Ti+3]);gn.length=0}},off(){},set(a){let s=r.value;s!==a&&(r.value=a,r.notify(s))},subscribe(a){let s=r.listen(a);return a(r.value),s},value:t};return r};function Z_(t,i,r){let a=new Set(i).add(void 0);return t.listen((s,o,c)=>{a.has(c)&&r(s,o,c)})}const q_=t=>t.toLocaleTimeString("en-US"),V_=t=>t.toLocaleString("en"),zy=t=>typeof t=="string"?t:Array.isArray(t)?t.map(i=>typeof i=="string"?i:i.type==="text"?i.text:i.type==="image_url"?"[图片]":JSON.stringify(i)).join(""):JSON.stringify(t),Y_=t=>{var i,r,a;const s=(a=(r=(i=t==null?void 0:t.values)===null||i===void 0?void 0:i.messages)===null||r===void 0?void 0:r[0])===null||a===void 0?void 0:a.content;return s&&Array.isArray(s)?s.map(o=>{if(o.type==="text")return o.text}):typeof s=="string"?s:""},I_=(t,i,r={})=>{const a=On(null),s=On([]),o=On(""),c=On(!1),h=On([]),p=On(null),m=On(!0),g=On(t),y=On(null),x=async()=>{var F;const G=new H_(i);await G.initAssistant(g.get()),p.set(null),G.onStreamingUpdate(N=>{var he;if(N.type==="thread"||N.type==="done")return P();N.type==="error"&&(c.set(!1),p.set(((he=N.data)===null||he===void 0?void 0:he.message)||"发生错误")),s.set(G.renderMessage)}),(F=r.onInit)===null||F===void 0||F.call(r,G),G.graphState={},a.set(G)},S=async(F,G)=>{var N;!o.get().trim()&&!(F!=null&&F.length)||c.get()||!a.get()||(c.set(!0),p.set(null),await((N=a.get())===null||N===void 0?void 0:N.sendMessage(F||o.get(),G)),o.set(""),c.set(!1))},w=()=>{var F;(F=a.get())===null||F===void 0||F.cancelRun()},M=F=>{const G=h.get();h.set(G.includes(F)?G.filter(N=>N!==F):[...G,F])},U=()=>{m.set(!m.get())},z=On([]),P=async()=>{var F;if(!(!a.get()||!m.get()))try{const G=await((F=a.get())===null||F===void 0?void 0:F.listThreads());z.set(G||[])}catch(G){console.error("Failed to fetch threads:",G)}};return{data:{client:a,renderMessages:s,userInput:o,loading:c,inChatError:p,currentAgent:g,collapsedTools:h,showHistory:m,historyList:z,currentChatId:y},mutations:{initClient:x,sendMessage:S,stopGeneration:w,toggleToolCollapse:M,toggleHistoryVisible:U,refreshHistoryList:P,addToHistory:F=>{const G=z.get();z.set([F,...G])},setUserInput(F){o.set(F)},setCurrentAgent(F){return g.set(F),x().then(()=>{P()})},createNewChat(){var F;(F=a.get())===null||F===void 0||F.reset()},toHistoryChat(F){var G,N;(G=a.get())===null||G===void 0||G.resetThread((N=F.metadata)===null||N===void 0?void 0:N.graph_id,F.thread_id)},async deleteHistoryChat(F){var G;await((G=a.get())===null||G===void 0?void 0:G.threads.delete(F.thread_id)),await P()}}}},G_=(t,i)=>({...Object.fromEntries(Object.entries(t.data).map(([a,s])=>[a,i(s)])),...t.mutations});function P_(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Q_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,X_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,F_={};function Eg(t,i){return(F_.jsx?X_:Q_).test(t)}const $_=/[ \t\n\f\r]/g;function K_(t){return typeof t=="object"?t.type==="text"?Ag(t.value):!1:Ag(t)}function Ag(t){return t.replace($_,"")===""}class jl{constructor(i,r,a){this.normal=r,this.property=i,a&&(this.space=a)}}jl.prototype.normal={};jl.prototype.property={};jl.prototype.space=void 0;function My(t,i){const r={},a={};for(const s of t)Object.assign(r,s.property),Object.assign(a,s.normal);return new jl(r,a,i)}function Of(t){return t.toLowerCase()}class Bt{constructor(i,r){this.attribute=r,this.property=i}}Bt.prototype.attribute="";Bt.prototype.booleanish=!1;Bt.prototype.boolean=!1;Bt.prototype.commaOrSpaceSeparated=!1;Bt.prototype.commaSeparated=!1;Bt.prototype.defined=!1;Bt.prototype.mustUseProperty=!1;Bt.prototype.number=!1;Bt.prototype.overloadedBoolean=!1;Bt.prototype.property="";Bt.prototype.spaceSeparated=!1;Bt.prototype.space=void 0;let J_=0;const we=tr(),st=tr(),zf=tr(),$=tr(),Ke=tr(),Xr=tr(),Ft=tr();function tr(){return 2**++J_}const Mf=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:st,commaOrSpaceSeparated:Ft,commaSeparated:Xr,number:$,overloadedBoolean:zf,spaceSeparated:Ke},Symbol.toStringTag,{value:"Module"})),lf=Object.keys(Mf);class Yf extends Bt{constructor(i,r,a,s){let o=-1;if(super(i,r),Cg(this,"space",s),typeof a=="number")for(;++o<lf.length;){const c=lf[o];Cg(this,lf[o],(a&Mf[c])===Mf[c])}}}Yf.prototype.defined=!0;function Cg(t,i,r){r&&(t[i]=r)}function ea(t){const i={},r={};for(const[a,s]of Object.entries(t.properties)){const o=new Yf(a,t.transform(t.attributes||{},a),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),i[a]=o,r[Of(a)]=a,r[Of(o.attribute)]=a}return new jl(i,r,t.space)}const Ry=ea({properties:{ariaActiveDescendant:null,ariaAtomic:st,ariaAutoComplete:null,ariaBusy:st,ariaChecked:st,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Ke,ariaCurrent:null,ariaDescribedBy:Ke,ariaDetails:null,ariaDisabled:st,ariaDropEffect:Ke,ariaErrorMessage:null,ariaExpanded:st,ariaFlowTo:Ke,ariaGrabbed:st,ariaHasPopup:null,ariaHidden:st,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ke,ariaLevel:$,ariaLive:null,ariaModal:st,ariaMultiLine:st,ariaMultiSelectable:st,ariaOrientation:null,ariaOwns:Ke,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:st,ariaReadOnly:st,ariaRelevant:null,ariaRequired:st,ariaRoleDescription:Ke,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:st,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function Dy(t,i){return i in t?t[i]:i}function Ny(t,i){return Dy(t,i.toLowerCase())}const W_=ea({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xr,acceptCharset:Ke,accessKey:Ke,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Ke,autoFocus:we,autoPlay:we,blocking:Ke,capture:null,charSet:null,checked:we,cite:null,className:Ke,cols:$,colSpan:null,content:null,contentEditable:st,controls:we,controlsList:Ke,coords:$|Xr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:zf,draggable:st,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Ke,height:$,hidden:zf,high:$,href:null,hrefLang:null,htmlFor:Ke,httpEquiv:Ke,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Ke,itemRef:Ke,itemScope:we,itemType:Ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:$,pattern:null,ping:Ke,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Ke,required:we,reversed:we,rows:$,rowSpan:$,sandbox:Ke,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:st,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:st,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ke,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:st,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:we,disableRemotePlayback:we,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Ny}),eS=ea({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:Ft,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Ke,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:Xr,g2:Xr,glyphName:Xr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Ft,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Ft,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ft,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ft,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dy}),jy=ea({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),Ly=ea({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ny}),Uy=ea({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),tS={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"},nS=/[A-Z]/g,Og=/-[a-z]/g,iS=/^data[-\w.:]+$/i;function rS(t,i){const r=Of(i);let a=i,s=Bt;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&iS.test(i)){if(i.charAt(4)==="-"){const o=i.slice(5).replace(Og,lS);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=i.slice(4);if(!Og.test(o)){let c=o.replace(nS,aS);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}s=Yf}return new s(a,i)}function aS(t){return"-"+t.toLowerCase()}function lS(t){return t.charAt(1).toUpperCase()}const uS=My([Ry,W_,jy,Ly,Uy],"html"),If=My([Ry,eS,jy,Ly,Uy],"svg");function sS(t){return t.join(" ").trim()}var Vr={},uf,zg;function oS(){if(zg)return uf;zg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
54
|
+
`,m="/",g="*",y="",x="comment",S="declaration";uf=function(M,U){if(typeof M!="string")throw new TypeError("First argument must be a string");if(!M)return[];U=U||{};var z=1,P=1;function H(le){var ie=le.match(i);ie&&(z+=ie.length);var se=le.lastIndexOf(p);P=~se?le.length-se:P+le.length}function F(){var le={line:z,column:P};return function(ie){return ie.position=new G(le),Se(),ie}}function G(le){this.start=le,this.end={line:z,column:P},this.source=U.source}G.prototype.content=M;function N(le){var ie=new Error(U.source+":"+z+":"+P+": "+le);if(ie.reason=le,ie.filename=U.source,ie.line=z,ie.column=P,ie.source=M,!U.silent)throw ie}function he(le){var ie=le.exec(M);if(ie){var se=ie[0];return H(se),M=M.slice(se.length),ie}}function Se(){he(r)}function _e(le){var ie;for(le=le||[];ie=j();)ie!==!1&&le.push(ie);return le}function j(){var le=F();if(!(m!=M.charAt(0)||g!=M.charAt(1))){for(var ie=2;y!=M.charAt(ie)&&(g!=M.charAt(ie)||m!=M.charAt(ie+1));)++ie;if(ie+=2,y===M.charAt(ie-1))return N("End of comment missing");var se=M.slice(2,ie-2);return P+=2,H(se),M=M.slice(ie),P+=2,le({type:x,comment:se})}}function re(){var le=F(),ie=he(a);if(ie){if(j(),!he(s))return N("property missing ':'");var se=he(o),L=le({type:S,property:w(ie[0].replace(t,y)),value:se?w(se[0].replace(t,y)):y});return he(c),L}}function te(){var le=[];_e(le);for(var ie;ie=re();)ie!==!1&&(le.push(ie),_e(le));return le}return Se(),te()};function w(M){return M?M.replace(h,y):y}return uf}var Mg;function cS(){if(Mg)return Vr;Mg=1;var t=Vr&&Vr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.default=r;var i=t(oS());function r(a,s){var o=null;if(!a||typeof a!="string")return o;var c=(0,i.default)(a),h=typeof s=="function";return c.forEach(function(p){if(p.type==="declaration"){var m=p.property,g=p.value;h?s(m,g,p):g&&(o=o||{},o[m]=g)}}),o}return Vr}var ll={},Rg;function fS(){if(Rg)return ll;Rg=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||r.test(m)||t.test(m)},c=function(m,g){return g.toUpperCase()},h=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),o(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(s,h):m=m.replace(a,h),m.replace(i,c))};return ll.camelCase=p,ll}var ul,Dg;function hS(){if(Dg)return ul;Dg=1;var t=ul&&ul.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=t(cS()),r=fS();function a(s,o){var c={};return!s||typeof s!="string"||(0,i.default)(s,function(h,p){h&&p&&(c[(0,r.camelCase)(h,o)]=p)}),c}return a.default=a,ul=a,ul}var dS=hS();const mS=Dl(dS),By=Hy("end"),Gf=Hy("start");function Hy(t){return i;function i(r){const a=r&&r.position&&r.position[t]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function pS(t){const i=Gf(t),r=By(t);if(i&&r)return{start:i,end:r}}function dl(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ng(t.position):"start"in t||"end"in t?Ng(t):"line"in t||"column"in t?Rf(t):""}function Rf(t){return jg(t&&t.line)+":"+jg(t&&t.column)}function Ng(t){return Rf(t&&t.start)+"-"+Rf(t&&t.end)}function jg(t){return t&&typeof t=="number"?t:1}class wt extends Error{constructor(i,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let s="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof i=="string"?s=i:!o.cause&&i&&(c=!0,s=i.message,o.cause=i),!o.ruleId&&!o.source&&typeof a=="string"){const p=a.indexOf(":");p===-1?o.ruleId=a:(o.source=a.slice(0,p),o.ruleId=a.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=h?h.line:void 0,this.name=dl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}wt.prototype.file="";wt.prototype.name="";wt.prototype.reason="";wt.prototype.message="";wt.prototype.stack="";wt.prototype.column=void 0;wt.prototype.line=void 0;wt.prototype.ancestors=void 0;wt.prototype.cause=void 0;wt.prototype.fatal=void 0;wt.prototype.place=void 0;wt.prototype.ruleId=void 0;wt.prototype.source=void 0;const Pf={}.hasOwnProperty,gS=new Map,yS=/[A-Z]/g,vS=new Set(["table","tbody","thead","tfoot","tr"]),bS=new Set(["td","th"]),Zy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xS(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let a;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=CS(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=AS(r,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:a,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?If:uS,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},o=qy(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function qy(t,i,r){if(i.type==="element")return _S(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return SS(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return TS(t,i,r);if(i.type==="mdxjsEsm")return kS(t,i);if(i.type==="root")return wS(t,i,r);if(i.type==="text")return ES(t,i)}function _S(t,i,r){const a=t.schema;let s=a;i.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=If,t.schema=s),t.ancestors.push(i);const o=Yy(t,i.tagName,!1),c=OS(t,i);let h=Xf(t,i);return vS.has(i.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!K_(p):!0})),Vy(t,c,o,i),Qf(c,h),t.ancestors.pop(),t.schema=a,t.create(i,o,c,r)}function SS(t,i){if(i.data&&i.data.estree&&t.evaluater){const a=i.data.estree.body[0];return a.type,t.evaluater.evaluateExpression(a.expression)}Ml(t,i.position)}function kS(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);Ml(t,i.position)}function TS(t,i,r){const a=t.schema;let s=a;i.name==="svg"&&a.space==="html"&&(s=If,t.schema=s),t.ancestors.push(i);const o=i.name===null?t.Fragment:Yy(t,i.name,!0),c=zS(t,i),h=Xf(t,i);return Vy(t,c,o,i),Qf(c,h),t.ancestors.pop(),t.schema=a,t.create(i,o,c,r)}function wS(t,i,r){const a={};return Qf(a,Xf(t,i)),t.create(i,t.Fragment,a,r)}function ES(t,i){return i.value}function Vy(t,i,r,a){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=a)}function Qf(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function AS(t,i,r){return a;function a(s,o,c,h){const m=Array.isArray(c.children)?r:i;return h?m(o,c,h):m(o,c)}}function CS(t,i){return r;function r(a,s,o,c){const h=Array.isArray(o.children),p=Gf(a);return i(s,o,c,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function OS(t,i){const r={};let a,s;for(s in i.properties)if(s!=="children"&&Pf.call(i.properties,s)){const o=MS(t,s,i.properties[s]);if(o){const[c,h]=o;t.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&bS.has(i.tagName)?a=h:r[c]=h}}if(a){const o=r.style||(r.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function zS(t,i){const r={};for(const a of i.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&t.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const h=c.properties[0];h.type,Object.assign(r,t.evaluater.evaluateExpression(h.argument))}else Ml(t,i.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&t.evaluater){const h=a.value.data.estree.body[0];h.type,o=t.evaluater.evaluateExpression(h.expression)}else Ml(t,i.position);else o=a.value===null?!0:a.value;r[s]=o}return r}function Xf(t,i){const r=[];let a=-1;const s=t.passKeys?new Map:gS;for(;++a<i.children.length;){const o=i.children[a];let c;if(t.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const m=s.get(p)||0;c=p+"-"+m,s.set(p,m+1)}}const h=qy(t,o,c);h!==void 0&&r.push(h)}return r}function MS(t,i,r){const a=rS(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?P_(r):sS(r)),a.property==="style"){let s=typeof r=="object"?r:RS(t,String(r));return t.stylePropertyNameCase==="css"&&(s=DS(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&a.space?tS[a.property]||a.property:a.attribute,r]}}function RS(t,i){try{return mS(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const a=r,s=new wt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Zy+"#cannot-parse-style-attribute",s}}function Yy(t,i,r){let a;if(!r)a={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let o=-1,c;for(;++o<s.length;){const h=Eg(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}a=c}else a=Eg(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(a.type==="Literal"){const s=a.value;return Pf.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(a);Ml(t)}function Ml(t,i){const r=new wt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=Zy+"#cannot-handle-mdx-estrees-without-createevaluater",r}function DS(t){const i={};let r;for(r in t)Pf.call(t,r)&&(i[NS(r)]=t[r]);return i}function NS(t){let i=t.replace(yS,jS);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function jS(t){return"-"+t.toLowerCase()}const sf={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"]},LS={};function Ff(t,i){const r=LS,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Iy(t,a,s)}function Iy(t,i,r){if(US(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Lg(t.children,i,r)}return Array.isArray(t)?Lg(t,i,r):""}function Lg(t,i,r){const a=[];let s=-1;for(;++s<t.length;)a[s]=Iy(t[s],i,r);return a.join("")}function US(t){return!!(t&&typeof t=="object")}const Ug=document.createElement("i");function $f(t){const i="&"+t+";";Ug.innerHTML=i;const r=Ug.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function Kt(t,i,r,a){const s=t.length;let o=0,c;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(i,r),t.splice(...c);else for(r&&t.splice(i,r);o<a.length;)c=a.slice(o,o+1e4),c.unshift(i,0),t.splice(...c),o+=1e4,i+=1e4}function on(t,i){return t.length>0?(Kt(t,t.length,0,i),t):i}const Bg={}.hasOwnProperty;function Gy(t){const i={};let r=-1;for(;++r<t.length;)BS(i,t[r]);return i}function BS(t,i){let r;for(r in i){const s=(Bg.call(t,r)?t[r]:void 0)||(t[r]={}),o=i[r];let c;if(o)for(c in o){Bg.call(s,c)||(s[c]=[]);const h=o[c];HS(s[c],Array.isArray(h)?h:h?[h]:[])}}}function HS(t,i){let r=-1;const a=[];for(;++r<i.length;)(i[r].add==="after"?t:a).push(i[r]);Kt(t,0,0,a)}function Py(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function xn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ot=zi(/[A-Za-z]/),kt=zi(/[\dA-Za-z]/),ZS=zi(/[#-'*+\--9=?A-Z^-~]/);function ps(t){return t!==null&&(t<32||t===127)}const Df=zi(/\d/),qS=zi(/[\dA-Fa-f]/),VS=zi(/[!-/:-@[-`{-~]/);function pe(t){return t!==null&&t<-2}function Fe(t){return t!==null&&(t<0||t===32)}function De(t){return t===-2||t===-1||t===32}const xs=zi(new RegExp("\\p{P}|\\p{S}","u")),er=zi(/\s/);function zi(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ta(t){const i=[];let r=-1,a=0,s=0;for(;++r<t.length;){const o=t.charCodeAt(r);let c="";if(o===37&&kt(t.charCodeAt(r+1))&&kt(t.charCodeAt(r+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const h=t.charCodeAt(r+1);o<56320&&h>56319&&h<57344?(c=String.fromCharCode(o,h),s=1):c="�"}else c=String.fromCharCode(o);c&&(i.push(t.slice(a,r),encodeURIComponent(c)),a=r+s+1,c=""),s&&(r+=s,s=0)}return i.join("")+t.slice(a)}function Le(t,i,r,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(p){return De(p)?(t.enter(r),h(p)):i(p)}function h(p){return De(p)&&o++<s?(t.consume(p),h):(t.exit(r),i(p))}}const YS={tokenize:IS};function IS(t){const i=t.attempt(this.parser.constructs.contentInitial,a,s);let r;return i;function a(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Le(t,i,"linePrefix")}function s(h){return t.enter("paragraph"),o(h)}function o(h){const p=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=p),r=p,c(h)}function c(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return pe(h)?(t.consume(h),t.exit("chunkText"),o):(t.consume(h),c)}}const GS={tokenize:PS},Hg={tokenize:QS};function PS(t){const i=this,r=[];let a=0,s,o,c;return h;function h(H){if(a<r.length){const F=r[a];return i.containerState=F[1],t.attempt(F[0].continuation,p,m)(H)}return m(H)}function p(H){if(a++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&P();const F=i.events.length;let G=F,N;for(;G--;)if(i.events[G][0]==="exit"&&i.events[G][1].type==="chunkFlow"){N=i.events[G][1].end;break}z(a);let he=F;for(;he<i.events.length;)i.events[he][1].end={...N},he++;return Kt(i.events,G+1,0,i.events.slice(F)),i.events.length=he,m(H)}return h(H)}function m(H){if(a===r.length){if(!s)return x(H);if(s.currentConstruct&&s.currentConstruct.concrete)return w(H);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(Hg,g,y)(H)}function g(H){return s&&P(),z(a),x(H)}function y(H){return i.parser.lazy[i.now().line]=a!==r.length,c=i.now().offset,w(H)}function x(H){return i.containerState={},t.attempt(Hg,S,w)(H)}function S(H){return a++,r.push([i.currentConstruct,i.containerState]),x(H)}function w(H){if(H===null){s&&P(),z(0),t.consume(H);return}return s=s||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),M(H)}function M(H){if(H===null){U(t.exit("chunkFlow"),!0),z(0),t.consume(H);return}return pe(H)?(t.consume(H),U(t.exit("chunkFlow")),a=0,i.interrupt=void 0,h):(t.consume(H),M)}function U(H,F){const G=i.sliceStream(H);if(F&&G.push(null),H.previous=o,o&&(o.next=H),o=H,s.defineSkip(H.start),s.write(G),i.parser.lazy[H.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<c&&(!s.events[N][1].end||s.events[N][1].end.offset>c))return;const he=i.events.length;let Se=he,_e,j;for(;Se--;)if(i.events[Se][0]==="exit"&&i.events[Se][1].type==="chunkFlow"){if(_e){j=i.events[Se][1].end;break}_e=!0}for(z(a),N=he;N<i.events.length;)i.events[N][1].end={...j},N++;Kt(i.events,Se+1,0,i.events.slice(he)),i.events.length=N}}function z(H){let F=r.length;for(;F-- >H;){const G=r[F];i.containerState=G[1],G[0].exit.call(i,t)}r.length=H}function P(){s.write([null]),o=void 0,s=void 0,i.containerState._closeFlow=void 0}}function QS(t,i,r){return Le(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Jr(t){if(t===null||Fe(t)||er(t))return 1;if(xs(t))return 2}function _s(t,i,r){const a=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!a.includes(o)&&(i=o(i,r),a.push(o))}return i}const Nf={name:"attention",resolveAll:XS,tokenize:FS};function XS(t,i){let r=-1,a,s,o,c,h,p,m,g;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(a=r;a--;)if(t[a][0]==="exit"&&t[a][1].type==="attentionSequence"&&t[a][1]._open&&i.sliceSerialize(t[a][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[a][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[a][1].end.offset-t[a][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;p=t[a][1].end.offset-t[a][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[a][1].end},x={...t[r][1].start};Zg(y,-p),Zg(x,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[a][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:x},o={type:p>1?"strongText":"emphasisText",start:{...t[a][1].end},end:{...t[r][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...h.end}},t[a][1].end={...c.start},t[r][1].start={...h.end},m=[],t[a][1].end.offset-t[a][1].start.offset&&(m=on(m,[["enter",t[a][1],i],["exit",t[a][1],i]])),m=on(m,[["enter",s,i],["enter",c,i],["exit",c,i],["enter",o,i]]),m=on(m,_s(i.parser.constructs.insideSpan.null,t.slice(a+1,r),i)),m=on(m,[["exit",o,i],["enter",h,i],["exit",h,i],["exit",s,i]]),t[r][1].end.offset-t[r][1].start.offset?(g=2,m=on(m,[["enter",t[r][1],i],["exit",t[r][1],i]])):g=0,Kt(t,a-1,r-a+3,m),r=a+m.length-g-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function FS(t,i){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Jr(a);let o;return c;function c(p){return o=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===o)return t.consume(p),h;const m=t.exit("attentionSequence"),g=Jr(p),y=!g||g===2&&s||r.includes(p),x=!s||s===2&&g||r.includes(a);return m._open=!!(o===42?y:y&&(s||!x)),m._close=!!(o===42?x:x&&(g||!y)),i(p)}}function Zg(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const $S={name:"autolink",tokenize:KS};function KS(t,i,r){let a=0;return s;function s(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(S){return Ot(S)?(t.consume(S),c):S===64?r(S):m(S)}function c(S){return S===43||S===45||S===46||kt(S)?(a=1,h(S)):m(S)}function h(S){return S===58?(t.consume(S),a=0,p):(S===43||S===45||S===46||kt(S))&&a++<32?(t.consume(S),h):(a=0,m(S))}function p(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),i):S===null||S===32||S===60||ps(S)?r(S):(t.consume(S),p)}function m(S){return S===64?(t.consume(S),g):ZS(S)?(t.consume(S),m):r(S)}function g(S){return kt(S)?y(S):r(S)}function y(S){return S===46?(t.consume(S),a=0,g):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),i):x(S)}function x(S){if((S===45||kt(S))&&a++<63){const w=S===45?x:y;return t.consume(S),w}return r(S)}}const Ll={partial:!0,tokenize:JS};function JS(t,i,r){return a;function a(o){return De(o)?Le(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||pe(o)?i(o):r(o)}}const Qy={continuation:{tokenize:ek},exit:tk,name:"blockQuote",tokenize:WS};function WS(t,i,r){const a=this;return s;function s(c){if(c===62){const h=a.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),o}return r(c)}function o(c){return De(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(c))}}function ek(t,i,r){const a=this;return s;function s(c){return De(c)?Le(t,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return t.attempt(Qy,i,r)(c)}}function tk(t){t.exit("blockQuote")}const Xy={name:"characterEscape",tokenize:nk};function nk(t,i,r){return a;function a(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return VS(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(o)}}const Fy={name:"characterReference",tokenize:ik};function ik(t,i,r){const a=this;let s=0,o,c;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,c=kt,g(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,c=qS,g):(t.enter("characterReferenceValue"),o=7,c=Df,g(y))}function g(y){if(y===59&&s){const x=t.exit("characterReferenceValue");return c===kt&&!$f(a.sliceSerialize(x))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return c(y)&&s++<o?(t.consume(y),g):r(y)}}const qg={partial:!0,tokenize:ak},Vg={concrete:!0,name:"codeFenced",tokenize:rk};function rk(t,i,r){const a=this,s={partial:!0,tokenize:G};let o=0,c=0,h;return p;function p(N){return m(N)}function m(N){const he=a.events[a.events.length-1];return o=he&&he[1].type==="linePrefix"?he[2].sliceSerialize(he[1],!0).length:0,h=N,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(N)}function g(N){return N===h?(c++,t.consume(N),g):c<3?r(N):(t.exit("codeFencedFenceSequence"),De(N)?Le(t,y,"whitespace")(N):y(N))}function y(N){return N===null||pe(N)?(t.exit("codeFencedFence"),a.interrupt?i(N):t.check(qg,M,F)(N)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),x(N))}function x(N){return N===null||pe(N)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(N)):De(N)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Le(t,S,"whitespace")(N)):N===96&&N===h?r(N):(t.consume(N),x)}function S(N){return N===null||pe(N)?y(N):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===null||pe(N)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(N)):N===96&&N===h?r(N):(t.consume(N),w)}function M(N){return t.attempt(s,F,U)(N)}function U(N){return t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),z}function z(N){return o>0&&De(N)?Le(t,P,"linePrefix",o+1)(N):P(N)}function P(N){return N===null||pe(N)?t.check(qg,M,F)(N):(t.enter("codeFlowValue"),H(N))}function H(N){return N===null||pe(N)?(t.exit("codeFlowValue"),P(N)):(t.consume(N),H)}function F(N){return t.exit("codeFenced"),i(N)}function G(N,he,Se){let _e=0;return j;function j(se){return N.enter("lineEnding"),N.consume(se),N.exit("lineEnding"),re}function re(se){return N.enter("codeFencedFence"),De(se)?Le(N,te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(se):te(se)}function te(se){return se===h?(N.enter("codeFencedFenceSequence"),le(se)):Se(se)}function le(se){return se===h?(_e++,N.consume(se),le):_e>=c?(N.exit("codeFencedFenceSequence"),De(se)?Le(N,ie,"whitespace")(se):ie(se)):Se(se)}function ie(se){return se===null||pe(se)?(N.exit("codeFencedFence"),he(se)):Se(se)}}}function ak(t,i,r){const a=this;return s;function s(c){return c===null?r(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}const of={name:"codeIndented",tokenize:uk},lk={partial:!0,tokenize:sk};function uk(t,i,r){const a=this;return s;function s(m){return t.enter("codeIndented"),Le(t,o,"linePrefix",5)(m)}function o(m){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):r(m)}function c(m){return m===null?p(m):pe(m)?t.attempt(lk,c,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||pe(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),i(m)}}function sk(t,i,r){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?r(c):pe(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Le(t,o,"linePrefix",5)(c)}function o(c){const h=a.events[a.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(c):pe(c)?s(c):r(c)}}const ok={name:"codeText",previous:fk,resolve:ck,tokenize:hk};function ck(t){let i=t.length-4,r=3,a,s;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(a=r;++a<i;)if(t[a][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(a=r-1,i++;++a<=i;)s===void 0?a!==i&&t[a][1].type!=="lineEnding"&&(s=a):(a===i||t[a][1].type==="lineEnding")&&(t[s][1].type="codeTextData",a!==s+2&&(t[s][1].end=t[a-1][1].end,t.splice(s+2,a-s-2),i-=a-s-2,a=s+2),s=void 0);return t}function fk(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hk(t,i,r){let a=0,s,o;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),a++,h):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(o=t.enter("codeTextSequence"),s=0,g(y)):pe(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||pe(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function g(y){return y===96?(t.consume(y),s++,g):s===a?(t.exit("codeTextSequence"),t.exit("codeText"),i(y)):(o.type="codeTextData",m(y))}}class dk{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(i,a):i>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(i,r,a){const s=r||0;this.setCursor(Math.trunc(i));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&sl(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),sl(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),sl(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);sl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);sl(this.left,r.reverse())}}}function sl(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function $y(t){const i={};let r=-1,a,s,o,c,h,p,m;const g=new dk(t);for(;++r<g.length;){for(;r in i;)r=i[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(p=a[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(i,mk(g,r)),r=i[r],m=!0);else if(a[1]._container){for(o=r,s=void 0;o--;)if(c=g.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...g.get(s)[1].start},h=g.slice(s,r),h.unshift(a),g.splice(s,r-s+1,h))}}return Kt(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function mk(t,i){const r=t.get(i)[1],a=t.get(i)[2];let s=i-1;const o=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const h=c.events,p=[],m={};let g,y,x=-1,S=r,w=0,M=0;const U=[M];for(;S;){for(;t.get(++s)[1]!==S;);o.push(s),S._tokenizer||(g=a.sliceStream(S),S.next||g.push(null),y&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=S,S=S.next}for(S=r;++x<h.length;)h[x][0]==="exit"&&h[x-1][0]==="enter"&&h[x][1].type===h[x-1][1].type&&h[x][1].start.line!==h[x][1].end.line&&(M=x+1,U.push(M),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):U.pop(),x=U.length;x--;){const z=h.slice(U[x],U[x+1]),P=o.pop();p.push([P,P+z.length-1]),t.splice(P,2,z)}for(p.reverse(),x=-1;++x<p.length;)m[w+p[x][0]]=w+p[x][1],w+=p[x][1]-p[x][0]-1;return m}const pk={resolve:yk,tokenize:vk},gk={partial:!0,tokenize:bk};function yk(t){return $y(t),t}function vk(t,i){let r;return a;function a(h){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?o(h):pe(h)?t.check(gk,c,o)(h):(t.consume(h),s)}function o(h){return t.exit("chunkContent"),t.exit("content"),i(h)}function c(h){return t.consume(h),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function bk(t,i,r){const a=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Le(t,o,"linePrefix")}function o(c){if(c===null||pe(c))return r(c);const h=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(c):t.interrupt(a.parser.constructs.flow,r,i)(c)}}function Ky(t,i,r,a,s,o,c,h,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(z){return z===60?(t.enter(a),t.enter(s),t.enter(o),t.consume(z),t.exit(o),x):z===null||z===32||z===41||ps(z)?r(z):(t.enter(a),t.enter(c),t.enter(h),t.enter("chunkString",{contentType:"string"}),M(z))}function x(z){return z===62?(t.enter(o),t.consume(z),t.exit(o),t.exit(s),t.exit(a),i):(t.enter(h),t.enter("chunkString",{contentType:"string"}),S(z))}function S(z){return z===62?(t.exit("chunkString"),t.exit(h),x(z)):z===null||z===60||pe(z)?r(z):(t.consume(z),z===92?w:S)}function w(z){return z===60||z===62||z===92?(t.consume(z),S):S(z)}function M(z){return!g&&(z===null||z===41||Fe(z))?(t.exit("chunkString"),t.exit(h),t.exit(c),t.exit(a),i(z)):g<m&&z===40?(t.consume(z),g++,M):z===41?(t.consume(z),g--,M):z===null||z===32||z===40||ps(z)?r(z):(t.consume(z),z===92?U:M)}function U(z){return z===40||z===41||z===92?(t.consume(z),M):M(z)}}function Jy(t,i,r,a,s,o){const c=this;let h=0,p;return m;function m(S){return t.enter(a),t.enter(s),t.consume(S),t.exit(s),t.enter(o),g}function g(S){return h>999||S===null||S===91||S===93&&!p||S===94&&!h&&"_hiddenFootnoteSupport"in c.parser.constructs?r(S):S===93?(t.exit(o),t.enter(s),t.consume(S),t.exit(s),t.exit(a),i):pe(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===null||S===91||S===93||pe(S)||h++>999?(t.exit("chunkString"),g(S)):(t.consume(S),p||(p=!De(S)),S===92?x:y)}function x(S){return S===91||S===92||S===93?(t.consume(S),h++,y):y(S)}}function Wy(t,i,r,a,s,o){let c;return h;function h(x){return x===34||x===39||x===40?(t.enter(a),t.enter(s),t.consume(x),t.exit(s),c=x===40?41:x,p):r(x)}function p(x){return x===c?(t.enter(s),t.consume(x),t.exit(s),t.exit(a),i):(t.enter(o),m(x))}function m(x){return x===c?(t.exit(o),p(c)):x===null?r(x):pe(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Le(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||pe(x)?(t.exit("chunkString"),m(x)):(t.consume(x),x===92?y:g)}function y(x){return x===c||x===92?(t.consume(x),g):g(x)}}function ml(t,i){let r;return a;function a(s){return pe(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,a):De(s)?Le(t,a,r?"linePrefix":"lineSuffix")(s):i(s)}}const xk={name:"definition",tokenize:Sk},_k={partial:!0,tokenize:kk};function Sk(t,i,r){const a=this;let s;return o;function o(S){return t.enter("definition"),c(S)}function c(S){return Jy.call(a,t,h,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function h(S){return s=xn(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),p):r(S)}function p(S){return Fe(S)?ml(t,m)(S):m(S)}function m(S){return Ky(t,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function g(S){return t.attempt(_k,y,y)(S)}function y(S){return De(S)?Le(t,x,"whitespace")(S):x(S)}function x(S){return S===null||pe(S)?(t.exit("definition"),a.parser.defined.push(s),i(S)):r(S)}}function kk(t,i,r){return a;function a(h){return Fe(h)?ml(t,s)(h):r(h)}function s(h){return Wy(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return De(h)?Le(t,c,"whitespace")(h):c(h)}function c(h){return h===null||pe(h)?i(h):r(h)}}const Tk={name:"hardBreakEscape",tokenize:wk};function wk(t,i,r){return a;function a(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return pe(o)?(t.exit("hardBreakEscape"),i(o)):r(o)}}const Ek={name:"headingAtx",resolve:Ak,tokenize:Ck};function Ak(t,i){let r=t.length-2,a=3,s,o;return t[a][1].type==="whitespace"&&(a+=2),r-2>a&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&t[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(s={type:"atxHeadingText",start:t[a][1].start,end:t[r][1].end},o={type:"chunkText",start:t[a][1].start,end:t[r][1].end,contentType:"text"},Kt(t,a,r-a+1,[["enter",s,i],["enter",o,i],["exit",o,i],["exit",s,i]])),t}function Ck(t,i,r){let a=0;return s;function s(g){return t.enter("atxHeading"),o(g)}function o(g){return t.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(t.consume(g),c):g===null||Fe(g)?(t.exit("atxHeadingSequence"),h(g)):r(g)}function h(g){return g===35?(t.enter("atxHeadingSequence"),p(g)):g===null||pe(g)?(t.exit("atxHeading"),i(g)):De(g)?Le(t,h,"whitespace")(g):(t.enter("atxHeadingText"),m(g))}function p(g){return g===35?(t.consume(g),p):(t.exit("atxHeadingSequence"),h(g))}function m(g){return g===null||g===35||Fe(g)?(t.exit("atxHeadingText"),h(g)):(t.consume(g),m)}}const Ok=["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"],Yg=["pre","script","style","textarea"],zk={concrete:!0,name:"htmlFlow",resolveTo:Dk,tokenize:Nk},Mk={partial:!0,tokenize:Lk},Rk={partial:!0,tokenize:jk};function Dk(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function Nk(t,i,r){const a=this;let s,o,c,h,p;return m;function m(k){return g(k)}function g(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),y}function y(k){return k===33?(t.consume(k),x):k===47?(t.consume(k),o=!0,M):k===63?(t.consume(k),s=3,a.interrupt?i:b):Ot(k)?(t.consume(k),c=String.fromCharCode(k),U):r(k)}function x(k){return k===45?(t.consume(k),s=2,S):k===91?(t.consume(k),s=5,h=0,w):Ot(k)?(t.consume(k),s=4,a.interrupt?i:b):r(k)}function S(k){return k===45?(t.consume(k),a.interrupt?i:b):r(k)}function w(k){const ue="CDATA[";return k===ue.charCodeAt(h++)?(t.consume(k),h===ue.length?a.interrupt?i:te:w):r(k)}function M(k){return Ot(k)?(t.consume(k),c=String.fromCharCode(k),U):r(k)}function U(k){if(k===null||k===47||k===62||Fe(k)){const ue=k===47,Ee=c.toLowerCase();return!ue&&!o&&Yg.includes(Ee)?(s=1,a.interrupt?i(k):te(k)):Ok.includes(c.toLowerCase())?(s=6,ue?(t.consume(k),z):a.interrupt?i(k):te(k)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(k):o?P(k):H(k))}return k===45||kt(k)?(t.consume(k),c+=String.fromCharCode(k),U):r(k)}function z(k){return k===62?(t.consume(k),a.interrupt?i:te):r(k)}function P(k){return De(k)?(t.consume(k),P):j(k)}function H(k){return k===47?(t.consume(k),j):k===58||k===95||Ot(k)?(t.consume(k),F):De(k)?(t.consume(k),H):j(k)}function F(k){return k===45||k===46||k===58||k===95||kt(k)?(t.consume(k),F):G(k)}function G(k){return k===61?(t.consume(k),N):De(k)?(t.consume(k),G):H(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),p=k,he):De(k)?(t.consume(k),N):Se(k)}function he(k){return k===p?(t.consume(k),p=null,_e):k===null||pe(k)?r(k):(t.consume(k),he)}function Se(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Fe(k)?G(k):(t.consume(k),Se)}function _e(k){return k===47||k===62||De(k)?H(k):r(k)}function j(k){return k===62?(t.consume(k),re):r(k)}function re(k){return k===null||pe(k)?te(k):De(k)?(t.consume(k),re):r(k)}function te(k){return k===45&&s===2?(t.consume(k),L):k===60&&s===1?(t.consume(k),J):k===62&&s===4?(t.consume(k),Y):k===63&&s===3?(t.consume(k),b):k===93&&s===5?(t.consume(k),ze):pe(k)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Mk,W,le)(k)):k===null||pe(k)?(t.exit("htmlFlowData"),le(k)):(t.consume(k),te)}function le(k){return t.check(Rk,ie,W)(k)}function ie(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),se}function se(k){return k===null||pe(k)?le(k):(t.enter("htmlFlowData"),te(k))}function L(k){return k===45?(t.consume(k),b):te(k)}function J(k){return k===47?(t.consume(k),c="",ce):te(k)}function ce(k){if(k===62){const ue=c.toLowerCase();return Yg.includes(ue)?(t.consume(k),Y):te(k)}return Ot(k)&&c.length<8?(t.consume(k),c+=String.fromCharCode(k),ce):te(k)}function ze(k){return k===93?(t.consume(k),b):te(k)}function b(k){return k===62?(t.consume(k),Y):k===45&&s===2?(t.consume(k),b):te(k)}function Y(k){return k===null||pe(k)?(t.exit("htmlFlowData"),W(k)):(t.consume(k),Y)}function W(k){return t.exit("htmlFlow"),i(k)}}function jk(t,i,r){const a=this;return s;function s(c){return pe(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):r(c)}function o(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}function Lk(t,i,r){return a;function a(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Ll,i,r)}}const Uk={name:"htmlText",tokenize:Bk};function Bk(t,i,r){const a=this;let s,o,c;return h;function h(b){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(b),p}function p(b){return b===33?(t.consume(b),m):b===47?(t.consume(b),G):b===63?(t.consume(b),H):Ot(b)?(t.consume(b),Se):r(b)}function m(b){return b===45?(t.consume(b),g):b===91?(t.consume(b),o=0,w):Ot(b)?(t.consume(b),P):r(b)}function g(b){return b===45?(t.consume(b),S):r(b)}function y(b){return b===null?r(b):b===45?(t.consume(b),x):pe(b)?(c=y,J(b)):(t.consume(b),y)}function x(b){return b===45?(t.consume(b),S):y(b)}function S(b){return b===62?L(b):b===45?x(b):y(b)}function w(b){const Y="CDATA[";return b===Y.charCodeAt(o++)?(t.consume(b),o===Y.length?M:w):r(b)}function M(b){return b===null?r(b):b===93?(t.consume(b),U):pe(b)?(c=M,J(b)):(t.consume(b),M)}function U(b){return b===93?(t.consume(b),z):M(b)}function z(b){return b===62?L(b):b===93?(t.consume(b),z):M(b)}function P(b){return b===null||b===62?L(b):pe(b)?(c=P,J(b)):(t.consume(b),P)}function H(b){return b===null?r(b):b===63?(t.consume(b),F):pe(b)?(c=H,J(b)):(t.consume(b),H)}function F(b){return b===62?L(b):H(b)}function G(b){return Ot(b)?(t.consume(b),N):r(b)}function N(b){return b===45||kt(b)?(t.consume(b),N):he(b)}function he(b){return pe(b)?(c=he,J(b)):De(b)?(t.consume(b),he):L(b)}function Se(b){return b===45||kt(b)?(t.consume(b),Se):b===47||b===62||Fe(b)?_e(b):r(b)}function _e(b){return b===47?(t.consume(b),L):b===58||b===95||Ot(b)?(t.consume(b),j):pe(b)?(c=_e,J(b)):De(b)?(t.consume(b),_e):L(b)}function j(b){return b===45||b===46||b===58||b===95||kt(b)?(t.consume(b),j):re(b)}function re(b){return b===61?(t.consume(b),te):pe(b)?(c=re,J(b)):De(b)?(t.consume(b),re):_e(b)}function te(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(t.consume(b),s=b,le):pe(b)?(c=te,J(b)):De(b)?(t.consume(b),te):(t.consume(b),ie)}function le(b){return b===s?(t.consume(b),s=void 0,se):b===null?r(b):pe(b)?(c=le,J(b)):(t.consume(b),le)}function ie(b){return b===null||b===34||b===39||b===60||b===61||b===96?r(b):b===47||b===62||Fe(b)?_e(b):(t.consume(b),ie)}function se(b){return b===47||b===62||Fe(b)?_e(b):r(b)}function L(b){return b===62?(t.consume(b),t.exit("htmlTextData"),t.exit("htmlText"),i):r(b)}function J(b){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),ce}function ce(b){return De(b)?Le(t,ze,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ze(b)}function ze(b){return t.enter("htmlTextData"),c(b)}}const Kf={name:"labelEnd",resolveAll:Vk,resolveTo:Yk,tokenize:Ik},Hk={tokenize:Gk},Zk={tokenize:Pk},qk={tokenize:Qk};function Vk(t){let i=-1;const r=[];for(;++i<t.length;){const a=t[i][1];if(r.push(t[i]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",i+=s}}return t.length!==r.length&&Kt(t,0,t.length,r),t}function Yk(t,i){let r=t.length,a=0,s,o,c,h;for(;r--;)if(s=t[r][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=r,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=r);const p={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[o][1].start},end:{...t[c][1].end}},g={type:"labelText",start:{...t[o+a+2][1].end},end:{...t[c-2][1].start}};return h=[["enter",p,i],["enter",m,i]],h=on(h,t.slice(o+1,o+a+3)),h=on(h,[["enter",g,i]]),h=on(h,_s(i.parser.constructs.insideSpan.null,t.slice(o+a+4,c-3),i)),h=on(h,[["exit",g,i],t[c-2],t[c-1],["exit",m,i]]),h=on(h,t.slice(c+1)),h=on(h,[["exit",p,i]]),Kt(t,o,t.length,h),t}function Ik(t,i,r){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return h;function h(x){return o?o._inactive?y(x):(c=a.parser.defined.includes(xn(a.sliceSerialize({start:o.end,end:a.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(x),t.exit("labelMarker"),t.exit("labelEnd"),p):r(x)}function p(x){return x===40?t.attempt(Hk,g,c?g:y)(x):x===91?t.attempt(Zk,g,c?m:y)(x):c?g(x):y(x)}function m(x){return t.attempt(qk,g,y)(x)}function g(x){return i(x)}function y(x){return o._balanced=!0,r(x)}}function Gk(t,i,r){return a;function a(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return Fe(y)?ml(t,o)(y):o(y)}function o(y){return y===41?g(y):Ky(t,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Fe(y)?ml(t,p)(y):g(y)}function h(y){return r(y)}function p(y){return y===34||y===39||y===40?Wy(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Fe(y)?ml(t,g)(y):g(y)}function g(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),i):r(y)}}function Pk(t,i,r){const a=this;return s;function s(h){return Jy.call(a,t,o,c,"reference","referenceMarker","referenceString")(h)}function o(h){return a.parser.defined.includes(xn(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?i(h):r(h)}function c(h){return r(h)}}function Qk(t,i,r){return a;function a(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),i):r(o)}}const Xk={name:"labelStartImage",resolveAll:Kf.resolveAll,tokenize:Fk};function Fk(t,i,r){const a=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),o}function o(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),c):r(h)}function c(h){return h===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(h):i(h)}}const $k={name:"labelStartLink",resolveAll:Kf.resolveAll,tokenize:Kk};function Kk(t,i,r){const a=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):i(c)}}const cf={name:"lineEnding",tokenize:Jk};function Jk(t,i){return r;function r(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Le(t,i,"linePrefix")}}const ls={name:"thematicBreak",tokenize:Wk};function Wk(t,i,r){let a=0,s;return o;function o(m){return t.enter("thematicBreak"),c(m)}function c(m){return s=m,h(m)}function h(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):a>=3&&(m===null||pe(m))?(t.exit("thematicBreak"),i(m)):r(m)}function p(m){return m===s?(t.consume(m),a++,p):(t.exit("thematicBreakSequence"),De(m)?Le(t,h,"whitespace")(m):h(m))}}const Ut={continuation:{tokenize:iT},exit:aT,name:"list",tokenize:nT},eT={partial:!0,tokenize:lT},tT={partial:!0,tokenize:rT};function nT(t,i,r){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return h;function h(S){const w=a.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||S===a.containerState.marker:Df(S)){if(a.containerState.type||(a.containerState.type=w,t.enter(w,{_container:!0})),w==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(ls,r,m)(S):m(S);if(!a.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(S)}return r(S)}function p(S){return Df(S)&&++c<10?(t.consume(S),p):(!a.interrupt||c<2)&&(a.containerState.marker?S===a.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),m(S)):r(S)}function m(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||S,t.check(Ll,a.interrupt?r:g,t.attempt(eT,x,y))}function g(S){return a.containerState.initialBlankLine=!0,o++,x(S)}function y(S){return De(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),x):r(S)}function x(S){return a.containerState.size=o+a.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(S)}}function iT(t,i,r){const a=this;return a.containerState._closeFlow=void 0,t.check(Ll,s,o);function s(h){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Le(t,i,"listItemIndent",a.containerState.size+1)(h)}function o(h){return a.containerState.furtherBlankLines||!De(h)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(h)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,t.attempt(tT,i,c)(h))}function c(h){return a.containerState._closeFlow=!0,a.interrupt=void 0,Le(t,t.attempt(Ut,i,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function rT(t,i,r){const a=this;return Le(t,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?i(o):r(o)}}function aT(t){t.exit(this.containerState.type)}function lT(t,i,r){const a=this;return Le(t,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!De(o)&&c&&c[1].type==="listItemPrefixWhitespace"?i(o):r(o)}}const Ig={name:"setextUnderline",resolveTo:uT,tokenize:sT};function uT(t,i){let r=t.length,a,s,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){a=r;break}t[r][1].type==="paragraph"&&(s=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...t[a][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",c,i]),t.splice(o+1,0,["exit",t[a][1],i]),t[a][1].end={...t[o][1].end}):t[a][1]=c,t.push(["exit",c,i]),t}function sT(t,i,r){const a=this;let s;return o;function o(m){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(t.enter("setextHeadingLine"),s=m,c(m)):r(m)}function c(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),De(m)?Le(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||pe(m)?(t.exit("setextHeadingLine"),i(m)):r(m)}}const oT={tokenize:cT};function cT(t){const i=this,r=t.attempt(Ll,a,t.attempt(this.parser.constructs.flowInitial,s,Le(t,t.attempt(this.parser.constructs.flow,s,t.attempt(pk,s)),"linePrefix")));return r;function a(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const fT={resolveAll:tv()},hT=ev("string"),dT=ev("text");function ev(t){return{resolveAll:tv(t==="text"?mT:void 0),tokenize:i};function i(r){const a=this,s=this.parser.constructs[t],o=r.attempt(s,c,h);return c;function c(g){return m(g)?o(g):h(g)}function h(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),p}function p(g){return m(g)?(r.exit("data"),o(g)):(r.consume(g),p)}function m(g){if(g===null)return!0;const y=s[g];let x=-1;if(y)for(;++x<y.length;){const S=y[x];if(!S.previous||S.previous.call(a,a.previous))return!0}return!1}}}function tv(t){return i;function i(r,a){let s=-1,o;for(;++s<=r.length;)o===void 0?r[s]&&r[s][1].type==="data"&&(o=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==o+2&&(r[o][1].end=r[s-1][1].end,r.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(r,a):r}}function mT(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const a=t[r-1][1],s=i.sliceStream(a);let o=s.length,c=-1,h=0,p;for(;o--;){const m=s[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)h++,c--;if(c)break;c=-1}else if(m===-2)p=!0,h++;else if(m!==-1){o++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(h=0),h){const m={type:r===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-h,offset:a.end.offset-h},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(t.splice(r,0,["enter",m,i],["exit",m,i]),r+=2)}r++}return t}const pT={42:Ut,43:Ut,45:Ut,48:Ut,49:Ut,50:Ut,51:Ut,52:Ut,53:Ut,54:Ut,55:Ut,56:Ut,57:Ut,62:Qy},gT={91:xk},yT={[-2]:of,[-1]:of,32:of},vT={35:Ek,42:ls,45:[Ig,ls],60:zk,61:Ig,95:ls,96:Vg,126:Vg},bT={38:Fy,92:Xy},xT={[-5]:cf,[-4]:cf,[-3]:cf,33:Xk,38:Fy,42:Nf,60:[$S,Uk],91:$k,92:[Tk,Xy],93:Kf,95:Nf,96:ok},_T={null:[Nf,fT]},ST={null:[42,95]},kT={null:[]},TT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ST,contentInitial:gT,disable:kT,document:pT,flow:vT,flowInitial:yT,insideSpan:_T,string:bT,text:xT},Symbol.toStringTag,{value:"Module"}));function wT(t,i,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},o=[];let c=[],h=[];const p={attempt:he(G),check:he(N),consume:P,enter:H,exit:F,interrupt:he(N,{interrupt:!0})},m={code:null,containerState:{},defineSkip:M,events:[],now:w,parser:t,previous:null,sliceSerialize:x,sliceStream:S,write:y};let g=i.tokenize.call(m,p);return i.resolveAll&&o.push(i),m;function y(re){return c=on(c,re),U(),c[c.length-1]!==null?[]:(Se(i,0),m.events=_s(o,m.events,m),m.events)}function x(re,te){return AT(S(re),te)}function S(re){return ET(c,re)}function w(){const{_bufferIndex:re,_index:te,line:le,column:ie,offset:se}=a;return{_bufferIndex:re,_index:te,line:le,column:ie,offset:se}}function M(re){s[re.line]=re.column,j()}function U(){let re;for(;a._index<c.length;){const te=c[a._index];if(typeof te=="string")for(re=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===re&&a._bufferIndex<te.length;)z(te.charCodeAt(a._bufferIndex));else z(te)}}function z(re){g=g(re)}function P(re){pe(re)?(a.line++,a.column=1,a.offset+=re===-3?2:1,j()):re!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=re}function H(re,te){const le=te||{};return le.type=re,le.start=w(),m.events.push(["enter",le,m]),h.push(le),le}function F(re){const te=h.pop();return te.end=w(),m.events.push(["exit",te,m]),te}function G(re,te){Se(re,te.from)}function N(re,te){te.restore()}function he(re,te){return le;function le(ie,se,L){let J,ce,ze,b;return Array.isArray(ie)?W(ie):"tokenize"in ie?W([ie]):Y(ie);function Y(oe){return ot;function ot(Ue){const Et=Ue!==null&&oe[Ue],Sn=Ue!==null&&oe.null,Nn=[...Array.isArray(Et)?Et:Et?[Et]:[],...Array.isArray(Sn)?Sn:Sn?[Sn]:[]];return W(Nn)(Ue)}}function W(oe){return J=oe,ce=0,oe.length===0?L:k(oe[ce])}function k(oe){return ot;function ot(Ue){return b=_e(),ze=oe,oe.partial||(m.currentConstruct=oe),oe.name&&m.parser.constructs.disable.null.includes(oe.name)?Ee():oe.tokenize.call(te?Object.assign(Object.create(m),te):m,p,ue,Ee)(Ue)}}function ue(oe){return re(ze,b),se}function Ee(oe){return b.restore(),++ce<J.length?k(J[ce]):L}}}function Se(re,te){re.resolveAll&&!o.includes(re)&&o.push(re),re.resolve&&Kt(m.events,te,m.events.length-te,re.resolve(m.events.slice(te),m)),re.resolveTo&&(m.events=re.resolveTo(m.events,m))}function _e(){const re=w(),te=m.previous,le=m.currentConstruct,ie=m.events.length,se=Array.from(h);return{from:ie,restore:L};function L(){a=re,m.previous=te,m.currentConstruct=le,m.events.length=ie,h=se,j()}}function j(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function ET(t,i){const r=i.start._index,a=i.start._bufferIndex,s=i.end._index,o=i.end._bufferIndex;let c;if(r===s)c=[t[r].slice(a,o)];else{if(c=t.slice(r,s),a>-1){const h=c[0];typeof h=="string"?c[0]=h.slice(a):c.shift()}o>0&&c.push(t[s].slice(0,o))}return c}function AT(t,i){let r=-1;const a=[];let s;for(;++r<t.length;){const o=t[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
55
55
|
`;break}case-3:{c=`\r
|
|
56
|
-
`;break}case-2:{c=i?" ":" ";break}case-1:{if(!i&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function ET(t){const a={constructs:Gy([ST,...(t||{}).extensions||[]]),content:s(qS),defined:[],document:s(YS),flow:s(uT),lazy:{},string:s(cT),text:s(fT)};return a;function s(o){return c;function c(h){return kT(a,o,h)}}}function AT(t){for(;!$y(t););return t}const Ig=/[\0\t\n\r]/g;function CT(){let t=1,i="",r=!0,a;return s;function s(o,c,h){const p=[];let m,g,y,S,x;for(o=i+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,i="",r&&(o.charCodeAt(0)===65279&&y++,r=void 0);y<o.length;){if(Ig.lastIndex=y,m=Ig.exec(o),S=m&&m.index!==void 0?m.index:o.length,x=o.charCodeAt(S),!m){i=o.slice(y);break}if(x===10&&y===S&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),y<S&&(p.push(o.slice(y,S)),t+=S-y),x){case 0:{p.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,p.push(-2);t++<g;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:a=!0,t=1}y=S+1}return h&&(a&&p.push(-5),i&&p.push(i),p.push(null)),p}}const OT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zT(t){return t.replace(OT,MT)}function MT(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),o=s===120||s===88;return Qy(r.slice(o?2:1),o?16:10)}return Ff(r)||t}const nv={}.hasOwnProperty;function RT(t,i,r){return typeof i!="string"&&(r=i,i=void 0),DT(r)(AT(ET(r).document().write(CT()(t,i,!0))))}function DT(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(aa),autolinkProtocol:xe,autolinkEmail:xe,atxHeading:o(Bl),blockQuote:o(Sn),characterEscape:xe,characterReference:xe,codeFenced:o(Nn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Nn,c),codeText:o(na,c),codeTextData:xe,data:xe,codeFlowValue:xe,definition:o(ia),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(ra),hardBreakEscape:o(Hl),hardBreakTrailing:o(Hl),htmlFlow:o(Ht,c),htmlFlowData:xe,htmlText:o(Ht,c),htmlTextData:xe,image:o(Es),label:c,link:o(aa),listItem:o(nr),listItemValue:S,listOrdered:o(la,y),listUnordered:o(la),paragraph:o(As),reference:k,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Bl),strong:o(Zl),thematicBreak:o(Os)},exit:{atxHeading:p(),atxHeadingSequence:G,autolink:p(),autolinkEmail:wt,autolinkProtocol:Ue,blockQuote:p(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:oe,characterReference:st,codeFenced:p(j),codeFencedFence:C,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:L,codeIndented:p(M),codeText:p(se),codeTextData:L,data:L,definition:p(),definitionDestinationString:F,definitionLabelString:Q,definitionTitleString:B,emphasis:p(),hardBreakEscape:p(te),hardBreakTrailing:p(te),htmlFlow:p(le),htmlFlowData:L,htmlText:p(ie),htmlTextData:L,image:p(J),label:ze,labelText:ce,lineEnding:re,link:p(U),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ue,resourceDestinationString:b,resourceTitleString:Y,resource:W,setextHeading:p(Se),setextHeadingLineSequence:he,setextHeadingText:N,strong:p(),thematicBreak:p()}};iv(i,(t||{}).mdastExtensions||[]);const r={};return a;function a(H){let P={type:"root",children:[]};const me={stack:[P],tokenStack:[],config:i,enter:h,exit:m,buffer:c,resume:g,data:r},ve=[];let qe=-1;for(;++qe<H.length;)if(H[qe][1].type==="listOrdered"||H[qe][1].type==="listUnordered")if(H[qe][0]==="enter")ve.push(qe);else{const Zt=ve.pop();qe=s(H,Zt,qe)}for(qe=-1;++qe<H.length;){const Zt=i[H[qe][0]];nv.call(Zt,H[qe][1].type)&&Zt[H[qe][1].type].call(Object.assign({sliceSerialize:H[qe][2].sliceSerialize},me),H[qe][1])}if(me.tokenStack.length>0){const Zt=me.tokenStack[me.tokenStack.length-1];(Zt[1]||Gg).call(me,void 0,Zt[0])}for(P.position={start:wi(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:wi(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<i.transforms.length;)P=i.transforms[qe](P)||P;return P}function s(H,P,me){let ve=P-1,qe=-1,Zt=!1,jn,Mt,kn,qt;for(;++ve<=me;){const ft=H[ve];switch(ft[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ft[0]==="enter"?qe++:qe--,qt=void 0;break}case"lineEndingBlank":{ft[0]==="enter"&&(jn&&!qt&&!qe&&!kn&&(kn=ve),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!qe&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||qe===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(jn){let Jt=ve;for(Mt=void 0;Jt--;){const cn=H[Jt];if(cn[1].type==="lineEnding"||cn[1].type==="lineEndingBlank"){if(cn[0]==="exit")continue;Mt&&(H[Mt][1].type="lineEndingBlank",Zt=!0),cn[1].type="lineEnding",Mt=Jt}else if(!(cn[1].type==="linePrefix"||cn[1].type==="blockQuotePrefix"||cn[1].type==="blockQuotePrefixWhitespace"||cn[1].type==="blockQuoteMarker"||cn[1].type==="listItemIndent"))break}kn&&(!Mt||kn<Mt)&&(jn._spread=!0),jn.end=Object.assign({},Mt?H[Mt][1].start:ft[1].end),H.splice(Mt||ve,0,["exit",jn,ft[2]]),ve++,me++}if(ft[1].type==="listItemPrefix"){const Jt={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0};jn=Jt,H.splice(ve,0,["enter",Jt,ft[2]]),ve++,me++,kn=void 0,qt=!0}}}return H[P][1]._spread=Zt,me}function o(H,P){return me;function me(ve){h.call(this,H(ve),ve),P&&P.call(this,ve)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(H,P,me){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([P,me||void 0]),H.position={start:wi(P.start),end:void 0}}function p(H){return P;function P(me){H&&H.call(this,me),m.call(this,me)}}function m(H,P){const me=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==H.type&&(P?P.call(this,H,ve[0]):(ve[1]||Gg).call(this,H,ve[0]));else throw new Error("Cannot close `"+H.type+"` ("+dl({start:H.start,end:H.end})+"): it’s not open");me.position.end=wi(H.end)}function g(){return Pf(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function S(H){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function x(){const H=this.resume(),P=this.stack[this.stack.length-1];P.lang=H}function w(){const H=this.resume(),P=this.stack[this.stack.length-1];P.meta=H}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const H=this.resume(),P=this.stack[this.stack.length-1];P.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function M(){const H=this.resume(),P=this.stack[this.stack.length-1];P.value=H.replace(/(\r?\n|\r)$/g,"")}function Q(H){const P=this.resume(),me=this.stack[this.stack.length-1];me.label=P,me.identifier=_n(this.sliceSerialize(H)).toLowerCase()}function B(){const H=this.resume(),P=this.stack[this.stack.length-1];P.title=H}function F(){const H=this.resume(),P=this.stack[this.stack.length-1];P.url=H}function G(H){const P=this.stack[this.stack.length-1];if(!P.depth){const me=this.sliceSerialize(H).length;P.depth=me}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function he(H){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function Se(){this.data.setextHeadingSlurpLineEnding=void 0}function xe(H){const me=this.stack[this.stack.length-1].children;let ve=me[me.length-1];(!ve||ve.type!=="text")&&(ve=Cs(),ve.position={start:wi(H.start),end:void 0},me.push(ve)),this.stack.push(ve)}function L(H){const P=this.stack.pop();P.value+=this.sliceSerialize(H),P.position.end=wi(H.end)}function re(H){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=P.children[P.children.length-1];me.position.end=wi(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(P.type)&&(xe.call(this,H),L.call(this,H))}function te(){this.data.atHardBreak=!0}function le(){const H=this.resume(),P=this.stack[this.stack.length-1];P.value=H}function ie(){const H=this.resume(),P=this.stack[this.stack.length-1];P.value=H}function se(){const H=this.resume(),P=this.stack[this.stack.length-1];P.value=H}function U(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=P,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function J(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=P,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function ce(H){const P=this.sliceSerialize(H),me=this.stack[this.stack.length-2];me.label=zT(P),me.identifier=_n(P).toLowerCase()}function ze(){const H=this.stack[this.stack.length-1],P=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ve=H.children;me.children=ve}else me.alt=P}function b(){const H=this.resume(),P=this.stack[this.stack.length-1];P.url=H}function Y(){const H=this.resume(),P=this.stack[this.stack.length-1];P.title=H}function W(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ue(H){const P=this.resume(),me=this.stack[this.stack.length-1];me.label=P,me.identifier=_n(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function Ee(H){this.data.characterReferenceType=H.type}function oe(H){const P=this.sliceSerialize(H),me=this.data.characterReferenceType;let ve;me?(ve=Qy(P,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=Ff(P);const qe=this.stack[this.stack.length-1];qe.value+=ve}function st(H){const P=this.stack.pop();P.position.end=wi(H.end)}function Ue(H){L.call(this,H);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(H)}function wt(H){L.call(this,H);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(H)}function Sn(){return{type:"blockquote",children:[]}}function Nn(){return{type:"code",lang:null,meta:null,value:""}}function na(){return{type:"inlineCode",value:""}}function ia(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ra(){return{type:"emphasis",children:[]}}function Bl(){return{type:"heading",depth:0,children:[]}}function Hl(){return{type:"break"}}function Ht(){return{type:"html",value:""}}function Es(){return{type:"image",title:null,url:"",alt:null}}function aa(){return{type:"link",title:null,url:"",children:[]}}function la(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function nr(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function As(){return{type:"paragraph",children:[]}}function Zl(){return{type:"strong",children:[]}}function Cs(){return{type:"text",value:""}}function Os(){return{type:"thematicBreak"}}}function wi(t){return{line:t.line,column:t.column,offset:t.offset}}function iv(t,i){let r=-1;for(;++r<i.length;){const a=i[r];Array.isArray(a)?iv(t,a):NT(t,a)}}function NT(t,i){let r;for(r in i)if(nv.call(i,r))switch(r){case"canContainEols":{const a=i[r];a&&t[r].push(...a);break}case"transforms":{const a=i[r];a&&t[r].push(...a);break}case"enter":case"exit":{const a=i[r];a&&Object.assign(t[r],a);break}}}function Gg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+dl({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+dl({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+dl({start:i.start,end:i.end})+") is still open")}function jT(t){const i=this;i.parser=r;function r(a){return RT(a,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function LT(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function UT(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
|
|
57
|
-
`}]}function
|
|
58
|
-
`:"",a={};i.lang&&(a.className=["language-"+i.lang]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return i.meta&&(s.data={meta:i.meta}),t.patch(i,s),s=t.applyData(i,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(i,s),s}function
|
|
56
|
+
`;break}case-2:{c=i?" ":" ";break}case-1:{if(!i&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function CT(t){const a={constructs:Gy([TT,...(t||{}).extensions||[]]),content:s(YS),defined:[],document:s(GS),flow:s(oT),lazy:{},string:s(hT),text:s(dT)};return a;function s(o){return c;function c(h){return wT(a,o,h)}}}function OT(t){for(;!$y(t););return t}const Gg=/[\0\t\n\r]/g;function zT(){let t=1,i="",r=!0,a;return s;function s(o,c,h){const p=[];let m,g,y,x,S;for(o=i+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,i="",r&&(o.charCodeAt(0)===65279&&y++,r=void 0);y<o.length;){if(Gg.lastIndex=y,m=Gg.exec(o),x=m&&m.index!==void 0?m.index:o.length,S=o.charCodeAt(x),!m){i=o.slice(y);break}if(S===10&&y===x&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),y<x&&(p.push(o.slice(y,x)),t+=x-y),S){case 0:{p.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,p.push(-2);t++<g;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:a=!0,t=1}y=x+1}return h&&(a&&p.push(-5),i&&p.push(i),p.push(null)),p}}const MT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RT(t){return t.replace(MT,DT)}function DT(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),o=s===120||s===88;return Py(r.slice(o?2:1),o?16:10)}return $f(r)||t}const nv={}.hasOwnProperty;function NT(t,i,r){return typeof i!="string"&&(r=i,i=void 0),jT(r)(OT(CT(r).document().write(zT()(t,i,!0))))}function jT(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(aa),autolinkProtocol:_e,autolinkEmail:_e,atxHeading:o(Bl),blockQuote:o(Sn),characterEscape:_e,characterReference:_e,codeFenced:o(Nn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Nn,c),codeText:o(na,c),codeTextData:_e,data:_e,codeFlowValue:_e,definition:o(ia),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(ra),hardBreakEscape:o(Hl),hardBreakTrailing:o(Hl),htmlFlow:o(Ht,c),htmlFlowData:_e,htmlText:o(Ht,c),htmlTextData:_e,image:o(Es),label:c,link:o(aa),listItem:o(nr),listItemValue:x,listOrdered:o(la,y),listUnordered:o(la),paragraph:o(As),reference:k,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Bl),strong:o(Zl),thematicBreak:o(Os)},exit:{atxHeading:p(),atxHeadingSequence:G,autolink:p(),autolinkEmail:Et,autolinkProtocol:Ue,blockQuote:p(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:oe,characterReference:ot,codeFenced:p(U),codeFencedFence:M,codeFencedFenceInfo:S,codeFencedFenceMeta:w,codeFlowValue:j,codeIndented:p(z),codeText:p(se),codeTextData:j,data:j,definition:p(),definitionDestinationString:F,definitionLabelString:P,definitionTitleString:H,emphasis:p(),hardBreakEscape:p(te),hardBreakTrailing:p(te),htmlFlow:p(le),htmlFlowData:j,htmlText:p(ie),htmlTextData:j,image:p(J),label:ze,labelText:ce,lineEnding:re,link:p(L),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ue,resourceDestinationString:b,resourceTitleString:Y,resource:W,setextHeading:p(Se),setextHeadingLineSequence:he,setextHeadingText:N,strong:p(),thematicBreak:p()}};iv(i,(t||{}).mdastExtensions||[]);const r={};return a;function a(Z){let X={type:"root",children:[]};const me={stack:[X],tokenStack:[],config:i,enter:h,exit:m,buffer:c,resume:g,data:r},ve=[];let qe=-1;for(;++qe<Z.length;)if(Z[qe][1].type==="listOrdered"||Z[qe][1].type==="listUnordered")if(Z[qe][0]==="enter")ve.push(qe);else{const Zt=ve.pop();qe=s(Z,Zt,qe)}for(qe=-1;++qe<Z.length;){const Zt=i[Z[qe][0]];nv.call(Zt,Z[qe][1].type)&&Zt[Z[qe][1].type].call(Object.assign({sliceSerialize:Z[qe][2].sliceSerialize},me),Z[qe][1])}if(me.tokenStack.length>0){const Zt=me.tokenStack[me.tokenStack.length-1];(Zt[1]||Pg).call(me,void 0,Zt[0])}for(X.position={start:wi(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:wi(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<i.transforms.length;)X=i.transforms[qe](X)||X;return X}function s(Z,X,me){let ve=X-1,qe=-1,Zt=!1,jn,Mt,kn,qt;for(;++ve<=me;){const ht=Z[ve];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?qe++:qe--,qt=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(jn&&!qt&&!qe&&!kn&&(kn=ve),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!qe&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||qe===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(jn){let Jt=ve;for(Mt=void 0;Jt--;){const cn=Z[Jt];if(cn[1].type==="lineEnding"||cn[1].type==="lineEndingBlank"){if(cn[0]==="exit")continue;Mt&&(Z[Mt][1].type="lineEndingBlank",Zt=!0),cn[1].type="lineEnding",Mt=Jt}else if(!(cn[1].type==="linePrefix"||cn[1].type==="blockQuotePrefix"||cn[1].type==="blockQuotePrefixWhitespace"||cn[1].type==="blockQuoteMarker"||cn[1].type==="listItemIndent"))break}kn&&(!Mt||kn<Mt)&&(jn._spread=!0),jn.end=Object.assign({},Mt?Z[Mt][1].start:ht[1].end),Z.splice(Mt||ve,0,["exit",jn,ht[2]]),ve++,me++}if(ht[1].type==="listItemPrefix"){const Jt={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};jn=Jt,Z.splice(ve,0,["enter",Jt,ht[2]]),ve++,me++,kn=void 0,qt=!0}}}return Z[X][1]._spread=Zt,me}function o(Z,X){return me;function me(ve){h.call(this,Z(ve),ve),X&&X.call(this,ve)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(Z,X,me){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([X,me||void 0]),Z.position={start:wi(X.start),end:void 0}}function p(Z){return X;function X(me){Z&&Z.call(this,me),m.call(this,me)}}function m(Z,X){const me=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==Z.type&&(X?X.call(this,Z,ve[0]):(ve[1]||Pg).call(this,Z,ve[0]));else throw new Error("Cannot close `"+Z.type+"` ("+dl({start:Z.start,end:Z.end})+"): it’s not open");me.position.end=wi(Z.end)}function g(){return Ff(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(Z){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function S(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.lang=Z}function w(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.meta=Z}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function U(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function z(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.value=Z.replace(/(\r?\n|\r)$/g,"")}function P(Z){const X=this.resume(),me=this.stack[this.stack.length-1];me.label=X,me.identifier=xn(this.sliceSerialize(Z)).toLowerCase()}function H(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.title=Z}function F(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.url=Z}function G(Z){const X=this.stack[this.stack.length-1];if(!X.depth){const me=this.sliceSerialize(Z).length;X.depth=me}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function he(Z){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function Se(){this.data.setextHeadingSlurpLineEnding=void 0}function _e(Z){const me=this.stack[this.stack.length-1].children;let ve=me[me.length-1];(!ve||ve.type!=="text")&&(ve=Cs(),ve.position={start:wi(Z.start),end:void 0},me.push(ve)),this.stack.push(ve)}function j(Z){const X=this.stack.pop();X.value+=this.sliceSerialize(Z),X.position.end=wi(Z.end)}function re(Z){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=X.children[X.children.length-1];me.position.end=wi(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(X.type)&&(_e.call(this,Z),j.call(this,Z))}function te(){this.data.atHardBreak=!0}function le(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.value=Z}function ie(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.value=Z}function se(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.value=Z}function L(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=X,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=X,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function ce(Z){const X=this.sliceSerialize(Z),me=this.stack[this.stack.length-2];me.label=RT(X),me.identifier=xn(X).toLowerCase()}function ze(){const Z=this.stack[this.stack.length-1],X=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ve=Z.children;me.children=ve}else me.alt=X}function b(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.url=Z}function Y(){const Z=this.resume(),X=this.stack[this.stack.length-1];X.title=Z}function W(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ue(Z){const X=this.resume(),me=this.stack[this.stack.length-1];me.label=X,me.identifier=xn(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Ee(Z){this.data.characterReferenceType=Z.type}function oe(Z){const X=this.sliceSerialize(Z),me=this.data.characterReferenceType;let ve;me?(ve=Py(X,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=$f(X);const qe=this.stack[this.stack.length-1];qe.value+=ve}function ot(Z){const X=this.stack.pop();X.position.end=wi(Z.end)}function Ue(Z){j.call(this,Z);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(Z)}function Et(Z){j.call(this,Z);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(Z)}function Sn(){return{type:"blockquote",children:[]}}function Nn(){return{type:"code",lang:null,meta:null,value:""}}function na(){return{type:"inlineCode",value:""}}function ia(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ra(){return{type:"emphasis",children:[]}}function Bl(){return{type:"heading",depth:0,children:[]}}function Hl(){return{type:"break"}}function Ht(){return{type:"html",value:""}}function Es(){return{type:"image",title:null,url:"",alt:null}}function aa(){return{type:"link",title:null,url:"",children:[]}}function la(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function nr(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function As(){return{type:"paragraph",children:[]}}function Zl(){return{type:"strong",children:[]}}function Cs(){return{type:"text",value:""}}function Os(){return{type:"thematicBreak"}}}function wi(t){return{line:t.line,column:t.column,offset:t.offset}}function iv(t,i){let r=-1;for(;++r<i.length;){const a=i[r];Array.isArray(a)?iv(t,a):LT(t,a)}}function LT(t,i){let r;for(r in i)if(nv.call(i,r))switch(r){case"canContainEols":{const a=i[r];a&&t[r].push(...a);break}case"transforms":{const a=i[r];a&&t[r].push(...a);break}case"enter":case"exit":{const a=i[r];a&&Object.assign(t[r],a);break}}}function Pg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+dl({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+dl({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+dl({start:i.start,end:i.end})+") is still open")}function UT(t){const i=this;i.parser=r;function r(a){return NT(a,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function BT(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function HT(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
|
|
57
|
+
`}]}function ZT(t,i){const r=i.value?i.value+`
|
|
58
|
+
`:"",a={};i.lang&&(a.className=["language-"+i.lang]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return i.meta&&(s.data={meta:i.meta}),t.patch(i,s),s=t.applyData(i,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(i,s),s}function qT(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function VT(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function YT(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=String(i.identifier).toUpperCase(),s=ta(a.toLowerCase()),o=t.footnoteOrder.indexOf(a);let c,h=t.footnoteCounts.get(a);h===void 0?(h=0,t.footnoteOrder.push(a),c=t.footnoteOrder.length):c=o+1,h+=1,t.footnoteCounts.set(a,h);const p={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(i,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(i,m),t.applyData(i,m)}function IT(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function GT(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function rv(t,i){const r=i.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+a}];const s=t.all(i),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function PT(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return rv(t,i);const s={src:ta(a.url||""),alt:i.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return t.patch(i,o),t.applyData(i,o)}function QT(t,i){const r={src:ta(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,a),t.applyData(i,a)}function XT(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,a),t.applyData(i,a)}function FT(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return rv(t,i);const s={href:ta(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:t.all(i)};return t.patch(i,o),t.applyData(i,o)}function $T(t,i){const r={href:ta(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function KT(t,i,r){const a=t.all(i),s=r?JT(r):av(i),o={},c=[];if(typeof i.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<a.length;){const g=a[h];(s||h!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
59
59
|
`}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const p=a[a.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
60
|
-
`});const m={type:"element",tagName:"li",properties:o,children:c};return t.patch(i,m),t.applyData(i,m)}function
|
|
60
|
+
`});const m={type:"element",tagName:"li",properties:o,children:c};return t.patch(i,m),t.applyData(i,m)}function JT(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let a=-1;for(;!i&&++a<r.length;)i=av(r[a])}return i}function av(t){const i=t.spread;return i??t.children.length>1}function WT(t,i){const r={},a=t.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(a,!0)};return t.patch(i,o),t.applyData(i,o)}function ew(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function tw(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function nw(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function iw(t,i){const r=t.all(i),a=r.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([a],!0)};t.patch(i.children[0],c),s.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},h=Gf(i.children[1]),p=By(i.children[i.children.length-1]);h&&p&&(c.position={start:h,end:p}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(i,o),t.applyData(i,o)}function rw(t,i,r){const a=r?r.children:void 0,o=(a?a.indexOf(i):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,h=c?c.length:i.children.length;let p=-1;const m=[];for(;++p<h;){const y=i.children[p],x={},S=c?c[p]:void 0;S&&(x.align=S);let w={type:"element",tagName:o,properties:x,children:[]};y&&(w.children=t.all(y),t.patch(y,w),w=t.applyData(y,w)),m.push(w)}const g={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(i,g),t.applyData(i,g)}function aw(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const Qg=9,Xg=32;function lw(t){const i=String(t),r=/\r?\n|\r/g;let a=r.exec(i),s=0;const o=[];for(;a;)o.push(Fg(i.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=r.exec(i);return o.push(Fg(i.slice(s),s>0,!1)),o.join("")}function Fg(t,i,r){let a=0,s=t.length;if(i){let o=t.codePointAt(a);for(;o===Qg||o===Xg;)a++,o=t.codePointAt(a)}if(r){let o=t.codePointAt(s-1);for(;o===Qg||o===Xg;)s--,o=t.codePointAt(s-1)}return s>a?t.slice(a,s):""}function uw(t,i){const r={type:"text",value:lw(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function sw(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const ow={blockquote:BT,break:HT,code:ZT,delete:qT,emphasis:VT,footnoteReference:YT,heading:IT,html:GT,imageReference:PT,image:QT,inlineCode:XT,linkReference:FT,link:$T,listItem:KT,list:WT,paragraph:ew,root:tw,strong:nw,table:iw,tableCell:aw,tableRow:rw,text:uw,thematicBreak:sw,toml:ts,yaml:ts,definition:ts,footnoteDefinition:ts};function ts(){}const lv=-1,Ss=0,pl=1,gs=2,Jf=3,Wf=4,eh=5,th=6,uv=7,sv=8,$g=typeof self=="object"?self:globalThis,cw=(t,i)=>{const r=(s,o)=>(t.set(o,s),s),a=s=>{if(t.has(s))return t.get(s);const[o,c]=i[s];switch(o){case Ss:case lv:return r(c,s);case pl:{const h=r([],s);for(const p of c)h.push(a(p));return h}case gs:{const h=r({},s);for(const[p,m]of c)h[a(p)]=a(m);return h}case Jf:return r(new Date(c),s);case Wf:{const{source:h,flags:p}=c;return r(new RegExp(h,p),s)}case eh:{const h=r(new Map,s);for(const[p,m]of c)h.set(a(p),a(m));return h}case th:{const h=r(new Set,s);for(const p of c)h.add(a(p));return h}case uv:{const{name:h,message:p}=c;return r(new $g[h](p),s)}case sv:return r(BigInt(c),s);case"BigInt":return r(Object(BigInt(c)),s);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:h}=new Uint8Array(c);return r(new DataView(h),c)}}return r(new $g[o](c),s)};return a},Kg=t=>cw(new Map,t)(0),Yr="",{toString:fw}={},{keys:hw}=Object,ol=t=>{const i=typeof t;if(i!=="object"||!t)return[Ss,i];const r=fw.call(t).slice(8,-1);switch(r){case"Array":return[pl,Yr];case"Object":return[gs,Yr];case"Date":return[Jf,Yr];case"RegExp":return[Wf,Yr];case"Map":return[eh,Yr];case"Set":return[th,Yr];case"DataView":return[pl,r]}return r.includes("Array")?[pl,r]:r.includes("Error")?[uv,r]:[gs,r]},ns=([t,i])=>t===Ss&&(i==="function"||i==="symbol"),dw=(t,i,r,a)=>{const s=(c,h)=>{const p=a.push(c)-1;return r.set(h,p),p},o=c=>{if(r.has(c))return r.get(c);let[h,p]=ol(c);switch(h){case Ss:{let g=c;switch(p){case"bigint":h=sv,g=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return s([lv],c)}return s([h,g],c)}case pl:{if(p){let x=c;return p==="DataView"?x=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(x=new Uint8Array(c)),s([p,[...x]],c)}const g=[],y=s([h,g],c);for(const x of c)g.push(o(x));return y}case gs:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,c.valueOf()],c)}if(i&&"toJSON"in c)return o(c.toJSON());const g=[],y=s([h,g],c);for(const x of hw(c))(t||!ns(ol(c[x])))&&g.push([o(x),o(c[x])]);return y}case Jf:return s([h,c.toISOString()],c);case Wf:{const{source:g,flags:y}=c;return s([h,{source:g,flags:y}],c)}case eh:{const g=[],y=s([h,g],c);for(const[x,S]of c)(t||!(ns(ol(x))||ns(ol(S))))&&g.push([o(x),o(S)]);return y}case th:{const g=[],y=s([h,g],c);for(const x of c)(t||!ns(ol(x)))&&g.push(o(x));return y}}const{message:m}=c;return s([h,{name:p,message:m}],c)};return o},Jg=(t,{json:i,lossy:r}={})=>{const a=[];return dw(!(i||r),!!i,new Map,a)(t),a},ys=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?Kg(Jg(t,i)):structuredClone(t):(t,i)=>Kg(Jg(t,i));function mw(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function pw(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function gw(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||mw,a=t.options.footnoteBackLabel||pw,s=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const g=t.all(m),y=String(m.identifier).toUpperCase(),x=ta(y.toLowerCase());let S=0;const w=[],M=t.footnoteCounts.get(y);for(;M!==void 0&&++S<=M;){w.length>0&&w.push({type:"text",value:" "});let P=typeof r=="string"?r:r(p,S);typeof P=="string"&&(P={type:"text",value:P}),w.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+x+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,S),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const U=g[g.length-1];if(U&&U.type==="element"&&U.tagName==="p"){const P=U.children[U.children.length-1];P&&P.type==="text"?P.value+=" ":U.children.push({type:"text",value:" "}),U.children.push(...w)}else g.push(...w);const z={type:"element",tagName:"li",properties:{id:i+"fn-"+x},children:t.wrap(g,!0)};t.patch(m,z),h.push(z)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ys(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
61
61
|
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
|
|
62
|
-
`}]}}const ks=function(t){if(t==null)return
|
|
62
|
+
`}]}}const ks=function(t){if(t==null)return xw;if(typeof t=="function")return Ts(t);if(typeof t=="object")return Array.isArray(t)?yw(t):vw(t);if(typeof t=="string")return bw(t);throw new Error("Expected function, string, or object as test")};function yw(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=ks(t[r]);return Ts(a);function a(...s){let o=-1;for(;++o<i.length;)if(i[o].apply(this,s))return!0;return!1}}function vw(t){const i=t;return Ts(r);function r(a){const s=a;let o;for(o in t)if(s[o]!==i[o])return!1;return!0}}function bw(t){return Ts(i);function i(r){return r&&r.type===t}}function Ts(t){return i;function i(r,a,s){return!!(_w(r)&&t.call(this,r,typeof a=="number"?a:void 0,s||void 0))}}function xw(){return!0}function _w(t){return t!==null&&typeof t=="object"&&"type"in t}const ov=[],Sw=!0,jf=!1,kw="skip";function cv(t,i,r,a){let s;typeof i=="function"&&typeof r!="function"?(a=r,r=i):s=i;const o=ks(s),c=a?-1:1;h(t,void 0,[])();function h(p,m,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const S=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return x;function x(){let S=ov,w,M,U;if((!i||o(p,m,g[g.length-1]||void 0))&&(S=Tw(r(p,g)),S[0]===jf))return S;if("children"in p&&p.children){const z=p;if(z.children&&S[0]!==kw)for(M=(a?z.children.length:-1)+c,U=g.concat(z);M>-1&&M<z.children.length;){const P=z.children[M];if(w=h(P,M,U)(),w[0]===jf)return w;M=typeof w[1]=="number"?w[1]:M+c}}return S}}}function Tw(t){return Array.isArray(t)?t:typeof t=="number"?[Sw,t]:t==null?ov:[t]}function nh(t,i,r,a){let s,o,c;typeof i=="function"?(o=void 0,c=i,s=r):(o=i,c=r,s=a),cv(t,o,h,s);function h(p,m){const g=m[m.length-1],y=g?g.children.indexOf(p):void 0;return c(p,y,g)}}const Lf={}.hasOwnProperty,ww={};function Ew(t,i){const r=i||ww,a=new Map,s=new Map,o=new Map,c={...ow,...r.handlers},h={all:m,applyData:Cw,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:p,options:r,patch:Aw,wrap:zw};return nh(t,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:s,x=String(g.identifier).toUpperCase();y.has(x)||y.set(x,g)}}),h;function p(g,y){const x=g.type,S=h.handlers[x];if(Lf.call(h.handlers,x)&&S)return S(h,g,y);if(h.options.passThrough&&h.options.passThrough.includes(x)){if("children"in g){const{children:M,...U}=g,z=ys(U);return z.children=h.all(g),z}return ys(g)}return(h.options.unknownHandler||Ow)(h,g,y)}function m(g){const y=[];if("children"in g){const x=g.children;let S=-1;for(;++S<x.length;){const w=h.one(x[S],g);if(w){if(S&&x[S-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Wg(w.value)),!Array.isArray(w)&&w.type==="element")){const M=w.children[0];M&&M.type==="text"&&(M.value=Wg(M.value))}Array.isArray(w)?y.push(...w):y.push(w)}}}return y}}function Aw(t,i){t.position&&(i.position=pS(t))}function Cw(t,i){let r=i;if(t&&t.data){const a=t.data.hName,s=t.data.hChildren,o=t.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&o&&Object.assign(r.properties,ys(o)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function Ow(t,i){const r=i.data||{},a="value"in i&&!(Lf.call(r,"hProperties")||Lf.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function zw(t,i){const r=[];let a=-1;for(i&&r.push({type:"text",value:`
|
|
63
63
|
`});++a<t.length;)a&&r.push({type:"text",value:`
|
|
64
64
|
`}),r.push(t[a]);return i&&t.length>0&&r.push({type:"text",value:`
|
|
65
|
-
`}),r}function
|
|
66
|
-
`},s),o}function Ow(t,i){return t&&"run"in t?async function(r,a){const s=Wg(r,{file:a,...i});await t.run(s,a)}:function(r,a){return Wg(r,{file:a,...t||i})}}function ey(t){if(t)throw t}var ff,ty;function zw(){if(ty)return ff;ty=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},o=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var g=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var S;for(S in m);return typeof S>"u"||t.call(m,S)},c=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},h=function(m,g){if(g==="__proto__")if(t.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return ff=function p(){var m,g,y,S,x,w,C=arguments[0],j=1,M=arguments.length,Q=!1;for(typeof C=="boolean"&&(Q=C,C=arguments[1]||{},j=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});j<M;++j)if(m=arguments[j],m!=null)for(g in m)y=h(C,g),S=h(m,g),C!==S&&(Q&&S&&(o(S)||(x=s(S)))?(x?(x=!1,w=y&&s(y)?y:[]):w=y&&o(y)?y:{},c(C,{name:g,newValue:p(Q,w,S)})):typeof S<"u"&&c(C,{name:g,newValue:S}));return C},ff}var Mw=zw();const hf=Dl(Mw);function Lf(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Rw(){const t=[],i={run:r,use:a};return i;function r(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);h(null,...s);function h(p,...m){const g=t[++o];let y=-1;if(p){c(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,g?Dw(g,h)(...m):c(null,...m)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),i}}function Dw(t,i){let r;return a;function a(...c){const h=t.length>c.length;let p;h&&c.push(s);try{p=t.apply(this,c)}catch(m){const g=m;if(h&&r)throw g;return s(g)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}function s(c,...h){r||(r=!0,i(c,...h))}function o(c){s(null,c)}}const zn={basename:Nw,dirname:jw,extname:Lw,join:Uw,sep:"/"};function Nw(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Ul(t);let r=0,a=-1,s=t.length,o;if(i===void 0||i.length===0||i.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":t.slice(r,a)}if(i===t)return"";let c=-1,h=i.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else c<0&&(o=!0,c=s+1),h>-1&&(t.codePointAt(s)===i.codePointAt(h--)?h<0&&(a=s):(h=-1,a=c));return r===a?a=c:a<0&&(a=t.length),t.slice(r,a)}function jw(t){if(Ul(t),t.length===0)return".";let i=-1,r=t.length,a;for(;--r;)if(t.codePointAt(r)===47){if(a){i=r;break}}else a||(a=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function Lw(t){Ul(t);let i=t.length,r=-1,a=0,s=-1,o=0,c;for(;i--;){const h=t.codePointAt(i);if(h===47){if(c){a=i+1;break}continue}r<0&&(c=!0,r=i+1),h===46?s<0?s=i:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||r<0||o===0||o===1&&s===r-1&&s===a+1?"":t.slice(s,r)}function Uw(...t){let i=-1,r;for(;++i<t.length;)Ul(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":Bw(r)}function Bw(t){Ul(t);const i=t.codePointAt(0)===47;let r=Hw(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function Hw(t,i){let r="",a=0,s=-1,o=0,c=-1,h,p;for(;++c<=t.length;){if(c<t.length)h=t.codePointAt(c);else{if(h===47)break;h=47}if(h===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",a=0):(r=r.slice(0,p),a=r.length-1-r.lastIndexOf("/")),s=c,o=0;continue}}else if(r.length>0){r="",a=0,s=c,o=0;continue}}i&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+t.slice(s+1,c):r=t.slice(s+1,c),a=c-s-1;s=c,o=0}else h===46&&o>-1?o++:o=-1}return r}function Ul(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Zw={cwd:qw};function qw(){return"/"}function Uf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Vw(t){if(typeof t=="string")t=new URL(t);else if(!Uf(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return Yw(t)}function Yw(t){if(t.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const a=i.codePointAt(r+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const df=["history","path","basename","stem","extname","dirname"];class fv{constructor(i){let r;i?Uf(i)?r={path:i}:typeof i=="string"||Iw(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":Zw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<df.length;){const o=df[a];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let s;for(s in r)df.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?zn.basename(this.path):void 0}set basename(i){pf(i,"basename"),mf(i,"basename"),this.path=zn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?zn.dirname(this.path):void 0}set dirname(i){ny(this.basename,"dirname"),this.path=zn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?zn.extname(this.path):void 0}set extname(i){if(mf(i,"extname"),ny(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Uf(i)&&(i=Vw(i)),pf(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?zn.basename(this.path,this.extname):void 0}set stem(i){pf(i,"stem"),mf(i,"stem"),this.path=zn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,a){const s=this.message(i,r,a);throw s.fatal=!0,s}info(i,r,a){const s=this.message(i,r,a);return s.fatal=void 0,s}message(i,r,a){const s=new Tt(i,r,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function mf(t,i){if(t&&t.includes(zn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+zn.sep+"`")}function pf(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function ny(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function Iw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Gw=function(t){const a=this.constructor.prototype,s=a[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o},Qw={}.hasOwnProperty;class nh extends Gw{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=Rw()}copy(){const i=new nh;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];i.use(...a)}return i.data(hf(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(vf("data",this.frozen),this.namespace[i]=r,this):Qw.call(this.namespace,i)&&this.namespace[i]||void 0:i?(vf("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=r.call(i,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=is(i),a=this.parser||this.Parser;return gf("parse",a),a(String(r),r)}process(i,r){const a=this;return this.freeze(),gf("process",this.parser||this.Parser),yf("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(o,c){const h=is(i),p=a.parse(h);a.run(p,h,function(g,y,S){if(g||!y||!S)return m(g);const x=y,w=a.stringify(x,S);Fw(w)?S.value=w:S.result=w,m(g,S)});function m(g,y){g||!y?c(g):o?o(y):r(void 0,y)}}}processSync(i){let r=!1,a;return this.freeze(),gf("processSync",this.parser||this.Parser),yf("processSync",this.compiler||this.Compiler),this.process(i,s),ry("processSync","process",r),a;function s(o,c){r=!0,ey(o),a=c}}run(i,r,a){iy(i),this.freeze();const s=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(c,h){const p=is(r);s.run(i,p,m);function m(g,y,S){const x=y||i;g?h(g):c?c(x):a(void 0,x,S)}}}runSync(i,r){let a=!1,s;return this.run(i,r,o),ry("runSync","run",a),s;function o(c,h){ey(c),s=h,a=!0}}stringify(i,r){this.freeze();const a=is(r),s=this.compiler||this.Compiler;return yf("stringify",s),iy(i),s(i,a)}use(i,...r){const a=this.attachers,s=this.namespace;if(vf("use",this.frozen),i!=null)if(typeof i=="function")p(i,r);else if(typeof i=="object")Array.isArray(i)?h(i):c(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function o(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(m.plugins),m.settings&&(s.settings=hf(!0,s.settings,m.settings))}function h(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];o(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,S=-1;for(;++y<a.length;)if(a[y][0]===m){S=y;break}if(S===-1)a.push([m,...g]);else if(g.length>0){let[x,...w]=g;const C=a[S][1];Lf(C)&&Lf(x)&&(x=hf(!0,C,x)),a[S]=[m,x,...w]}}}}const Xw=new nh().freeze();function gf(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function yf(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function vf(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function iy(t){if(!Lf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ry(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function is(t){return Pw(t)?t:new fv(t)}function Pw(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Fw(t){return typeof t=="string"||$w(t)}function $w(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Kw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ay=[],ly={allowDangerousHtml:!0},Jw=/^(https?|ircs?|mailto|xmpp)$/i,Ww=[{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 eE(t){const i=tE(t),r=nE(t);return iE(i.runSync(i.parse(r),r),t)}function tE(t){const i=t.rehypePlugins||ay,r=t.remarkPlugins||ay,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...ly}:ly;return Xw().use(jT).use(r).use(Ow,a).use(i)}function nE(t){const i=t.children||"",r=new fv;return typeof i=="string"&&(r.value=i),r}function iE(t,i){const r=i.allowedElements,a=i.allowElement,s=i.components,o=i.disallowedElements,c=i.skipHtml,h=i.unwrapDisallowed,p=i.urlTransform||rE;for(const g of Ww)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Kw+g.id,void 0);return th(t,m),vS(t,{Fragment:q.Fragment,components:s,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function m(g,y,S){if(g.type==="raw"&&S&&typeof y=="number")return c?S.children.splice(y,1):S.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let x;for(x in sf)if(Object.hasOwn(sf,x)&&Object.hasOwn(g.properties,x)){const w=g.properties[x],C=sf[x];(C===null||C.includes(g.tagName))&&(g.properties[x]=p(String(w||""),x,g))}}if(g.type==="element"){let x=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!x&&a&&typeof y=="number"&&(x=!a(g,y,S)),x&&S&&typeof y=="number")return h&&g.children?S.children.splice(y,1,...g.children):S.children.splice(y,1),y}}}function rE(t){const i=t.indexOf(":"),r=t.indexOf("?"),a=t.indexOf("#"),s=t.indexOf("/");return i===-1||s!==-1&&i>s||r!==-1&&i>r||a!==-1&&i>a||Jw.test(t.slice(0,i))?t:""}function uy(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let a=0,s=r.indexOf(i);for(;s!==-1;)a++,s=r.indexOf(i,s+i.length);return a}function aE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lE(t,i,r){const s=ks((r||{}).ignore||[]),o=uE(i);let c=-1;for(;++c<o.length;)cv(t,"text",h);function h(m,g){let y=-1,S;for(;++y<g.length;){const x=g[y],w=S?S.children:void 0;if(s(x,w?w.indexOf(x):void 0,S))return;S=x}if(S)return p(m,g)}function p(m,g){const y=g[g.length-1],S=o[c][0],x=o[c][1];let w=0;const j=y.children.indexOf(m);let M=!1,Q=[];S.lastIndex=0;let B=S.exec(m.value);for(;B;){const F=B.index,G={index:B.index,input:B.input,stack:[...g,m]};let N=x(...B,G);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?S.lastIndex=F+1:(w!==F&&Q.push({type:"text",value:m.value.slice(w,F)}),Array.isArray(N)?Q.push(...N):N&&Q.push(N),w=F+B[0].length,M=!0),!S.global)break;B=S.exec(m.value)}return M?(w<m.value.length&&Q.push({type:"text",value:m.value.slice(w)}),y.children.splice(j,1,...Q)):Q=[m],j+Q.length}}function uE(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let a=-1;for(;++a<r.length;){const s=r[a];i.push([sE(s[0]),oE(s[1])])}return i}function sE(t){return typeof t=="string"?new RegExp(aE(t),"g"):t}function oE(t){return typeof t=="function"?t:function(){return t}}const bf="phrasing",_f=["autolink","link","image","label"];function cE(){return{transforms:[yE],enter:{literalAutolink:hE,literalAutolinkEmail:xf,literalAutolinkHttp:xf,literalAutolinkWww:xf},exit:{literalAutolink:gE,literalAutolinkEmail:pE,literalAutolinkHttp:dE,literalAutolinkWww:mE}}}function fE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bf,notInConstruct:_f},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bf,notInConstruct:_f},{character:":",before:"[ps]",after:"\\/",inConstruct:bf,notInConstruct:_f}]}}function hE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function xf(t){this.config.enter.autolinkProtocol.call(this,t)}function dE(t){this.config.exit.autolinkProtocol.call(this,t)}function mE(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function pE(t){this.config.exit.autolinkEmail.call(this,t)}function gE(t){this.exit(t)}function yE(t){lE(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),bE]],{ignore:["link","linkReference"]})}function vE(t,i,r,a,s){let o="";if(!hv(s)||(/^w/i.test(i)&&(r=i+r,i="",o="http://"),!_E(r)))return!1;const c=xE(r+a);if(!c[0])return!1;const h={type:"link",title:null,url:o+i+c[0],children:[{type:"text",value:i+c[0]}]};return c[1]?[h,{type:"text",value:c[1]}]:h}function bE(t,i,r,a){return!hv(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function _E(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function xE(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],a=r.indexOf(")");const s=uy(t,"(");let o=uy(t,")");for(;a!==-1&&s>o;)t+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[t,r]}function hv(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||er(r)||_s(r))&&(!i||r!==47)}dv.peek=zE;function SE(){this.buffer()}function kE(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function TE(){this.buffer()}function wE(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function EE(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=_n(this.sliceSerialize(t)).toLowerCase(),r.label=i}function AE(t){this.exit(t)}function CE(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=_n(this.sliceSerialize(t)).toLowerCase(),r.label=i}function OE(t){this.exit(t)}function zE(){return"["}function dv(t,i,r,a){const s=r.createTracker(a);let o=s.move("[^");const c=r.enter("footnoteReference"),h=r.enter("reference");return o+=s.move(r.safe(r.associationId(t),{after:"]",before:o})),h(),c(),o+=s.move("]"),o}function ME(){return{enter:{gfmFootnoteCallString:SE,gfmFootnoteCall:kE,gfmFootnoteDefinitionLabelString:TE,gfmFootnoteDefinition:wE},exit:{gfmFootnoteCallString:EE,gfmFootnoteCall:AE,gfmFootnoteDefinitionLabelString:CE,gfmFootnoteDefinition:OE}}}function RE(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:dv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,s,o,c){const h=o.createTracker(c);let p=h.move("[^");const m=o.enter("footnoteDefinition"),g=o.enter("label");return p+=h.move(o.safe(o.associationId(a),{before:p,after:"]"})),g(),p+=h.move("]:"),a.children&&a.children.length>0&&(h.shift(4),p+=h.move((i?`
|
|
67
|
-
`:" ")+o.indentLines(o.containerFlow(a,h.current()),i?mv:
|
|
68
|
-
`)}function
|
|
69
|
-
`&&
|
|
70
|
-
`}function
|
|
65
|
+
`}),r}function Wg(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function ey(t,i){const r=Ew(t,i),a=r.one(t,void 0),s=gw(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
66
|
+
`},s),o}function Mw(t,i){return t&&"run"in t?async function(r,a){const s=ey(r,{file:a,...i});await t.run(s,a)}:function(r,a){return ey(r,{file:a,...t||i})}}function ty(t){if(t)throw t}var ff,ny;function Rw(){if(ny)return ff;ny=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},o=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var g=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var x;for(x in m);return typeof x>"u"||t.call(m,x)},c=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},h=function(m,g){if(g==="__proto__")if(t.call(m,g)){if(a)return a(m,g).value}else return;return m[g]};return ff=function p(){var m,g,y,x,S,w,M=arguments[0],U=1,z=arguments.length,P=!1;for(typeof M=="boolean"&&(P=M,M=arguments[1]||{},U=2),(M==null||typeof M!="object"&&typeof M!="function")&&(M={});U<z;++U)if(m=arguments[U],m!=null)for(g in m)y=h(M,g),x=h(m,g),M!==x&&(P&&x&&(o(x)||(S=s(x)))?(S?(S=!1,w=y&&s(y)?y:[]):w=y&&o(y)?y:{},c(M,{name:g,newValue:p(P,w,x)})):typeof x<"u"&&c(M,{name:g,newValue:x}));return M},ff}var Dw=Rw();const hf=Dl(Dw);function Uf(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Nw(){const t=[],i={run:r,use:a};return i;function r(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);h(null,...s);function h(p,...m){const g=t[++o];let y=-1;if(p){c(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,g?jw(g,h)(...m):c(null,...m)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),i}}function jw(t,i){let r;return a;function a(...c){const h=t.length>c.length;let p;h&&c.push(s);try{p=t.apply(this,c)}catch(m){const g=m;if(h&&r)throw g;return s(g)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}function s(c,...h){r||(r=!0,i(c,...h))}function o(c){s(null,c)}}const zn={basename:Lw,dirname:Uw,extname:Bw,join:Hw,sep:"/"};function Lw(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Ul(t);let r=0,a=-1,s=t.length,o;if(i===void 0||i.length===0||i.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":t.slice(r,a)}if(i===t)return"";let c=-1,h=i.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else c<0&&(o=!0,c=s+1),h>-1&&(t.codePointAt(s)===i.codePointAt(h--)?h<0&&(a=s):(h=-1,a=c));return r===a?a=c:a<0&&(a=t.length),t.slice(r,a)}function Uw(t){if(Ul(t),t.length===0)return".";let i=-1,r=t.length,a;for(;--r;)if(t.codePointAt(r)===47){if(a){i=r;break}}else a||(a=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function Bw(t){Ul(t);let i=t.length,r=-1,a=0,s=-1,o=0,c;for(;i--;){const h=t.codePointAt(i);if(h===47){if(c){a=i+1;break}continue}r<0&&(c=!0,r=i+1),h===46?s<0?s=i:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||r<0||o===0||o===1&&s===r-1&&s===a+1?"":t.slice(s,r)}function Hw(...t){let i=-1,r;for(;++i<t.length;)Ul(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":Zw(r)}function Zw(t){Ul(t);const i=t.codePointAt(0)===47;let r=qw(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function qw(t,i){let r="",a=0,s=-1,o=0,c=-1,h,p;for(;++c<=t.length;){if(c<t.length)h=t.codePointAt(c);else{if(h===47)break;h=47}if(h===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",a=0):(r=r.slice(0,p),a=r.length-1-r.lastIndexOf("/")),s=c,o=0;continue}}else if(r.length>0){r="",a=0,s=c,o=0;continue}}i&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+t.slice(s+1,c):r=t.slice(s+1,c),a=c-s-1;s=c,o=0}else h===46&&o>-1?o++:o=-1}return r}function Ul(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Vw={cwd:Yw};function Yw(){return"/"}function Bf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Iw(t){if(typeof t=="string")t=new URL(t);else if(!Bf(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return Gw(t)}function Gw(t){if(t.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const a=i.codePointAt(r+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const df=["history","path","basename","stem","extname","dirname"];class fv{constructor(i){let r;i?Bf(i)?r={path:i}:typeof i=="string"||Pw(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":Vw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<df.length;){const o=df[a];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let s;for(s in r)df.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?zn.basename(this.path):void 0}set basename(i){pf(i,"basename"),mf(i,"basename"),this.path=zn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?zn.dirname(this.path):void 0}set dirname(i){iy(this.basename,"dirname"),this.path=zn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?zn.extname(this.path):void 0}set extname(i){if(mf(i,"extname"),iy(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Bf(i)&&(i=Iw(i)),pf(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?zn.basename(this.path,this.extname):void 0}set stem(i){pf(i,"stem"),mf(i,"stem"),this.path=zn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,a){const s=this.message(i,r,a);throw s.fatal=!0,s}info(i,r,a){const s=this.message(i,r,a);return s.fatal=void 0,s}message(i,r,a){const s=new wt(i,r,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function mf(t,i){if(t&&t.includes(zn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+zn.sep+"`")}function pf(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function iy(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function Pw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Qw=function(t){const a=this.constructor.prototype,s=a[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o},Xw={}.hasOwnProperty;class ih extends Qw{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=Nw()}copy(){const i=new ih;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];i.use(...a)}return i.data(hf(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(vf("data",this.frozen),this.namespace[i]=r,this):Xw.call(this.namespace,i)&&this.namespace[i]||void 0:i?(vf("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=r.call(i,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=is(i),a=this.parser||this.Parser;return gf("parse",a),a(String(r),r)}process(i,r){const a=this;return this.freeze(),gf("process",this.parser||this.Parser),yf("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(o,c){const h=is(i),p=a.parse(h);a.run(p,h,function(g,y,x){if(g||!y||!x)return m(g);const S=y,w=a.stringify(S,x);Kw(w)?x.value=w:x.result=w,m(g,x)});function m(g,y){g||!y?c(g):o?o(y):r(void 0,y)}}}processSync(i){let r=!1,a;return this.freeze(),gf("processSync",this.parser||this.Parser),yf("processSync",this.compiler||this.Compiler),this.process(i,s),ay("processSync","process",r),a;function s(o,c){r=!0,ty(o),a=c}}run(i,r,a){ry(i),this.freeze();const s=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(c,h){const p=is(r);s.run(i,p,m);function m(g,y,x){const S=y||i;g?h(g):c?c(S):a(void 0,S,x)}}}runSync(i,r){let a=!1,s;return this.run(i,r,o),ay("runSync","run",a),s;function o(c,h){ty(c),s=h,a=!0}}stringify(i,r){this.freeze();const a=is(r),s=this.compiler||this.Compiler;return yf("stringify",s),ry(i),s(i,a)}use(i,...r){const a=this.attachers,s=this.namespace;if(vf("use",this.frozen),i!=null)if(typeof i=="function")p(i,r);else if(typeof i=="object")Array.isArray(i)?h(i):c(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function o(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(m.plugins),m.settings&&(s.settings=hf(!0,s.settings,m.settings))}function h(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];o(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,x=-1;for(;++y<a.length;)if(a[y][0]===m){x=y;break}if(x===-1)a.push([m,...g]);else if(g.length>0){let[S,...w]=g;const M=a[x][1];Uf(M)&&Uf(S)&&(S=hf(!0,M,S)),a[x]=[m,S,...w]}}}}const Fw=new ih().freeze();function gf(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function yf(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function vf(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ry(t){if(!Uf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ay(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function is(t){return $w(t)?t:new fv(t)}function $w(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Kw(t){return typeof t=="string"||Jw(t)}function Jw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Ww="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ly=[],uy={allowDangerousHtml:!0},eE=/^(https?|ircs?|mailto|xmpp)$/i,tE=[{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 nE(t){const i=iE(t),r=rE(t);return aE(i.runSync(i.parse(r),r),t)}function iE(t){const i=t.rehypePlugins||ly,r=t.remarkPlugins||ly,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...uy}:uy;return Fw().use(UT).use(r).use(Mw,a).use(i)}function rE(t){const i=t.children||"",r=new fv;return typeof i=="string"&&(r.value=i),r}function aE(t,i){const r=i.allowedElements,a=i.allowElement,s=i.components,o=i.disallowedElements,c=i.skipHtml,h=i.unwrapDisallowed,p=i.urlTransform||lE;for(const g of tE)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Ww+g.id,void 0);return nh(t,m),xS(t,{Fragment:B.Fragment,components:s,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function m(g,y,x){if(g.type==="raw"&&x&&typeof y=="number")return c?x.children.splice(y,1):x.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let S;for(S in sf)if(Object.hasOwn(sf,S)&&Object.hasOwn(g.properties,S)){const w=g.properties[S],M=sf[S];(M===null||M.includes(g.tagName))&&(g.properties[S]=p(String(w||""),S,g))}}if(g.type==="element"){let S=r?!r.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&a&&typeof y=="number"&&(S=!a(g,y,x)),S&&x&&typeof y=="number")return h&&g.children?x.children.splice(y,1,...g.children):x.children.splice(y,1),y}}}function lE(t){const i=t.indexOf(":"),r=t.indexOf("?"),a=t.indexOf("#"),s=t.indexOf("/");return i===-1||s!==-1&&i>s||r!==-1&&i>r||a!==-1&&i>a||eE.test(t.slice(0,i))?t:""}function sy(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let a=0,s=r.indexOf(i);for(;s!==-1;)a++,s=r.indexOf(i,s+i.length);return a}function uE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sE(t,i,r){const s=ks((r||{}).ignore||[]),o=oE(i);let c=-1;for(;++c<o.length;)cv(t,"text",h);function h(m,g){let y=-1,x;for(;++y<g.length;){const S=g[y],w=x?x.children:void 0;if(s(S,w?w.indexOf(S):void 0,x))return;x=S}if(x)return p(m,g)}function p(m,g){const y=g[g.length-1],x=o[c][0],S=o[c][1];let w=0;const U=y.children.indexOf(m);let z=!1,P=[];x.lastIndex=0;let H=x.exec(m.value);for(;H;){const F=H.index,G={index:H.index,input:H.input,stack:[...g,m]};let N=S(...H,G);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?x.lastIndex=F+1:(w!==F&&P.push({type:"text",value:m.value.slice(w,F)}),Array.isArray(N)?P.push(...N):N&&P.push(N),w=F+H[0].length,z=!0),!x.global)break;H=x.exec(m.value)}return z?(w<m.value.length&&P.push({type:"text",value:m.value.slice(w)}),y.children.splice(U,1,...P)):P=[m],U+P.length}}function oE(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let a=-1;for(;++a<r.length;){const s=r[a];i.push([cE(s[0]),fE(s[1])])}return i}function cE(t){return typeof t=="string"?new RegExp(uE(t),"g"):t}function fE(t){return typeof t=="function"?t:function(){return t}}const bf="phrasing",xf=["autolink","link","image","label"];function hE(){return{transforms:[bE],enter:{literalAutolink:mE,literalAutolinkEmail:_f,literalAutolinkHttp:_f,literalAutolinkWww:_f},exit:{literalAutolink:vE,literalAutolinkEmail:yE,literalAutolinkHttp:pE,literalAutolinkWww:gE}}}function dE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bf,notInConstruct:xf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bf,notInConstruct:xf},{character:":",before:"[ps]",after:"\\/",inConstruct:bf,notInConstruct:xf}]}}function mE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function _f(t){this.config.enter.autolinkProtocol.call(this,t)}function pE(t){this.config.exit.autolinkProtocol.call(this,t)}function gE(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function yE(t){this.config.exit.autolinkEmail.call(this,t)}function vE(t){this.exit(t)}function bE(t){sE(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_E]],{ignore:["link","linkReference"]})}function xE(t,i,r,a,s){let o="";if(!hv(s)||(/^w/i.test(i)&&(r=i+r,i="",o="http://"),!SE(r)))return!1;const c=kE(r+a);if(!c[0])return!1;const h={type:"link",title:null,url:o+i+c[0],children:[{type:"text",value:i+c[0]}]};return c[1]?[h,{type:"text",value:c[1]}]:h}function _E(t,i,r,a){return!hv(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function SE(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function kE(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],a=r.indexOf(")");const s=sy(t,"(");let o=sy(t,")");for(;a!==-1&&s>o;)t+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[t,r]}function hv(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||er(r)||xs(r))&&(!i||r!==47)}dv.peek=RE;function TE(){this.buffer()}function wE(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function EE(){this.buffer()}function AE(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function CE(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=xn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function OE(t){this.exit(t)}function zE(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=xn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function ME(t){this.exit(t)}function RE(){return"["}function dv(t,i,r,a){const s=r.createTracker(a);let o=s.move("[^");const c=r.enter("footnoteReference"),h=r.enter("reference");return o+=s.move(r.safe(r.associationId(t),{after:"]",before:o})),h(),c(),o+=s.move("]"),o}function DE(){return{enter:{gfmFootnoteCallString:TE,gfmFootnoteCall:wE,gfmFootnoteDefinitionLabelString:EE,gfmFootnoteDefinition:AE},exit:{gfmFootnoteCallString:CE,gfmFootnoteCall:OE,gfmFootnoteDefinitionLabelString:zE,gfmFootnoteDefinition:ME}}}function NE(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:dv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,s,o,c){const h=o.createTracker(c);let p=h.move("[^");const m=o.enter("footnoteDefinition"),g=o.enter("label");return p+=h.move(o.safe(o.associationId(a),{before:p,after:"]"})),g(),p+=h.move("]:"),a.children&&a.children.length>0&&(h.shift(4),p+=h.move((i?`
|
|
67
|
+
`:" ")+o.indentLines(o.containerFlow(a,h.current()),i?mv:jE))),m(),p}}function jE(t,i,r){return i===0?t:mv(t,i,r)}function mv(t,i,r){return(r?"":" ")+t}const LE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pv.peek=qE;function UE(){return{canContainEols:["delete"],enter:{strikethrough:HE},exit:{strikethrough:ZE}}}function BE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:LE}],handlers:{delete:pv}}}function HE(t){this.enter({type:"delete",children:[]},t)}function ZE(t){this.exit(t)}function pv(t,i,r,a){const s=r.createTracker(a),o=r.enter("strikethrough");let c=s.move("~~");return c+=r.containerPhrasing(t,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function qE(){return"~"}function VE(t){return t.length}function YE(t,i){const r=i||{},a=(r.align||[]).concat(),s=r.stringLength||VE,o=[],c=[],h=[],p=[];let m=0,g=-1;for(;++g<t.length;){const M=[],U=[];let z=-1;for(t[g].length>m&&(m=t[g].length);++z<t[g].length;){const P=IE(t[g][z]);if(r.alignDelimiters!==!1){const H=s(P);U[z]=H,(p[z]===void 0||H>p[z])&&(p[z]=H)}M.push(P)}c[g]=M,h[g]=U}let y=-1;if(typeof a=="object"&&"length"in a)for(;++y<m;)o[y]=oy(a[y]);else{const M=oy(a);for(;++y<m;)o[y]=M}y=-1;const x=[],S=[];for(;++y<m;){const M=o[y];let U="",z="";M===99?(U=":",z=":"):M===108?U=":":M===114&&(z=":");let P=r.alignDelimiters===!1?1:Math.max(1,p[y]-U.length-z.length);const H=U+"-".repeat(P)+z;r.alignDelimiters!==!1&&(P=U.length+P+z.length,P>p[y]&&(p[y]=P),S[y]=P),x[y]=H}c.splice(1,0,x),h.splice(1,0,S),g=-1;const w=[];for(;++g<c.length;){const M=c[g],U=h[g];y=-1;const z=[];for(;++y<m;){const P=M[y]||"";let H="",F="";if(r.alignDelimiters!==!1){const G=p[y]-(U[y]||0),N=o[y];N===114?H=" ".repeat(G):N===99?G%2?(H=" ".repeat(G/2+.5),F=" ".repeat(G/2-.5)):(H=" ".repeat(G/2),F=H):F=" ".repeat(G)}r.delimiterStart!==!1&&!y&&z.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&P==="")&&(r.delimiterStart!==!1||y)&&z.push(" "),r.alignDelimiters!==!1&&z.push(H),z.push(P),r.alignDelimiters!==!1&&z.push(F),r.padding!==!1&&z.push(" "),(r.delimiterEnd!==!1||y!==m-1)&&z.push("|")}w.push(r.delimiterEnd===!1?z.join("").replace(/ +$/,""):z.join(""))}return w.join(`
|
|
68
|
+
`)}function IE(t){return t==null?"":String(t)}function oy(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function GE(t,i,r,a){const s=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const c=r.indentLines(r.containerFlow(t,o.current()),PE);return s(),c}function PE(t,i,r){return">"+(r?"":" ")+t}function QE(t,i){return cy(t,i.inConstruct,!0)&&!cy(t,i.notInConstruct,!1)}function cy(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let a=-1;for(;++a<i.length;)if(t.includes(i[a]))return!0;return!1}function fy(t,i,r,a){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
|
|
69
|
+
`&&QE(r.stack,r.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
70
|
+
`}function XE(t,i){const r=String(t);let a=r.indexOf(i),s=a,o=0,c=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+i.length,a=r.indexOf(i,s);return c}function FE(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function $E(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function KE(t,i,r,a){const s=$E(r),o=t.value||"",c=s==="`"?"GraveAccent":"Tilde";if(FE(t,r)){const y=r.enter("codeIndented"),x=r.indentLines(o,JE);return y(),x}const h=r.createTracker(a),p=s.repeat(Math.max(XE(o,s)+1,3)),m=r.enter("codeFenced");let g=h.move(p);if(t.lang){const y=r.enter(`codeFencedLang${c}`);g+=h.move(r.safe(t.lang,{before:g,after:" ",encode:["`"],...h.current()})),y()}if(t.lang&&t.meta){const y=r.enter(`codeFencedMeta${c}`);g+=h.move(" "),g+=h.move(r.safe(t.meta,{before:g,after:`
|
|
71
71
|
`,encode:["`"],...h.current()})),y()}return g+=h.move(`
|
|
72
72
|
`),o&&(g+=h.move(o+`
|
|
73
|
-
`)),g+=h.move(p),m(),g}function
|
|
74
|
-
`,...p.current()}))),h(),t.title&&(h=r.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(r.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),c(),m}function
|
|
73
|
+
`)),g+=h.move(p),m(),g}function JE(t,i,r){return(r?"":" ")+t}function rh(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function WE(t,i,r,a){const s=rh(r),o=s==='"'?"Quote":"Apostrophe",c=r.enter("definition");let h=r.enter("label");const p=r.createTracker(a);let m=p.move("[");return m+=p.move(r.safe(r.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(r.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=r.enter("destinationRaw"),m+=p.move(r.safe(t.url,{before:m,after:t.title?" ":`
|
|
74
|
+
`,...p.current()}))),h(),t.title&&(h=r.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(r.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),c(),m}function eA(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function Rl(t){return"&#x"+t.toString(16).toUpperCase()+";"}function vs(t,i,r){const a=Jr(t),s=Jr(i);return a===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gv.peek=tA;function gv(t,i,r,a){const s=eA(r),o=r.enter("emphasis"),c=r.createTracker(a),h=c.move(s);let p=c.move(r.containerPhrasing(t,{after:s,before:h,...c.current()}));const m=p.charCodeAt(0),g=vs(a.before.charCodeAt(a.before.length-1),m,s);g.inside&&(p=Rl(m)+p.slice(1));const y=p.charCodeAt(p.length-1),x=vs(a.after.charCodeAt(0),y,s);x.inside&&(p=p.slice(0,-1)+Rl(y));const S=c.move(s);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},h+p+S}function tA(t,i,r){return r.options.emphasis||"*"}function nA(t,i){let r=!1;return nh(t,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,jf}),!!((!t.depth||t.depth<3)&&Ff(t)&&(i.options.setext||r))}function iA(t,i,r,a){const s=Math.max(Math.min(6,t.depth||1),1),o=r.createTracker(a);if(nA(t,r)){const g=r.enter("headingSetext"),y=r.enter("phrasing"),x=r.containerPhrasing(t,{...o.current(),before:`
|
|
75
75
|
`,after:`
|
|
76
|
-
`});return y(),g(),
|
|
77
|
-
`+(s===1?"=":"-").repeat(
|
|
76
|
+
`});return y(),g(),x+`
|
|
77
|
+
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
78
78
|
`))+1))}const c="#".repeat(s),h=r.enter("headingAtx"),p=r.enter("phrasing");o.move(c+" ");let m=r.containerPhrasing(t,{before:"# ",after:`
|
|
79
|
-
`,...o.current()});return/^[\t ]/.test(m)&&(m=Rl(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,r.options.closeAtx&&(m+=" "+c),p(),h(),m}yv.peek=
|
|
80
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
81
|
-
`))}function p(x,w,C,j){const M=C.enter("tableCell"),Q=C.enter("phrasing"),B=C.containerPhrasing(x,{...j,before:o,after:o});return Q(),M(),B}function m(x,w){return qE(x,{align:w,alignDelimiters:a,padding:r,stringLength:s})}function g(x,w,C){const j=x.children;let M=-1;const Q=[],B=w.enter("table");for(;++M<j.length;)Q[M]=y(j[M],w,C);return B(),Q}function y(x,w,C){const j=x.children;let M=-1;const Q=[],B=w.enter("tableRow");for(;++M<j.length;)Q[M]=p(j[M],x,w,C);return B(),Q}function S(x,w,C){let j=Ev.inlineCode(x,w,C);return C.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function CA(){return{exit:{taskListCheckValueChecked:hy,taskListCheckValueUnchecked:hy,paragraph:zA}}}function OA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:MA}}}function hy(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function zA(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const s=i.children;let o=-1,c;for(;++o<s.length;){const h=s[o];if(h.type==="paragraph"){c=h;break}}c===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(t)}function MA(t,i,r,a){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",h=r.createTracker(a);o&&h.move(c);let p=Ev.listItem(t,i,r,{...a,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(g){return g+c}}function RA(){return[cE(),ME(),jE(),xA(),CA()]}function DA(t){return{extensions:[fE(),RE(t),LE(),AA(t),OA()]}}const NA={tokenize:ZA,partial:!0},Av={tokenize:qA,partial:!0},Cv={tokenize:VA,partial:!0},Ov={tokenize:YA,partial:!0},jA={tokenize:IA,partial:!0},zv={name:"wwwAutolink",tokenize:BA,previous:Rv},Mv={name:"protocolAutolink",tokenize:HA,previous:Dv},ei={name:"emailAutolink",tokenize:UA,previous:Nv},Dn={};function LA(){return{text:Dn}}let Pi=48;for(;Pi<123;)Dn[Pi]=ei,Pi++,Pi===58?Pi=65:Pi===91&&(Pi=97);Dn[43]=ei;Dn[45]=ei;Dn[46]=ei;Dn[95]=ei;Dn[72]=[ei,Mv];Dn[104]=[ei,Mv];Dn[87]=[ei,zv];Dn[119]=[ei,zv];function UA(t,i,r){const a=this;let s,o;return c;function c(y){return!Bf(y)||!Nv.call(a,a.previous)||ah(a.events)?r(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Bf(y)?(t.consume(y),h):y===64?(t.consume(y),p):r(y)}function p(y){return y===46?t.check(jA,g,m)(y):y===45||y===95||St(y)?(o=!0,t.consume(y),p):g(y)}function m(y){return t.consume(y),s=!0,p}function g(y){return o&&s&&Ct(a.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(y)):r(y)}}function BA(t,i,r){const a=this;return s;function s(c){return c!==87&&c!==119||!Rv.call(a,a.previous)||ah(a.events)?r(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(NA,t.attempt(Av,t.attempt(Cv,o),r),r)(c))}function o(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(c)}}function HA(t,i,r){const a=this;let s="",o=!1;return c;function c(y){return(y===72||y===104)&&Dv.call(a,a.previous)&&!ah(a.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):r(y)}function h(y){if(Ct(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const S=s.toLowerCase();if(S==="http"||S==="https")return t.consume(y),p}return r(y)}function p(y){return y===47?(t.consume(y),o?m:(o=!0,p)):r(y)}function m(y){return y===null||ps(y)||Fe(y)||er(y)||_s(y)?r(y):t.attempt(Av,t.attempt(Cv,g),r)(y)}function g(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(y)}}function ZA(t,i,r){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,t.consume(c),s):c===46&&a===3?(t.consume(c),o):r(c)}function o(c){return c===null?r(c):i(c)}}function qA(t,i,r){let a,s,o;return c;function c(m){return m===46||m===95?t.check(Ov,p,h)(m):m===null||Fe(m)||er(m)||m!==45&&_s(m)?p(m):(o=!0,t.consume(m),c)}function h(m){return m===95?a=!0:(s=a,a=void 0),t.consume(m),c}function p(m){return s||a||!o?r(m):i(m)}}function VA(t,i){let r=0,a=0;return s;function s(c){return c===40?(r++,t.consume(c),s):c===41&&a<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(Ov,i,o)(c):c===null||Fe(c)||er(c)?i(c):(t.consume(c),s)}function o(c){return c===41&&a++,t.consume(c),s}}function YA(t,i,r){return a;function a(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),a):h===38?(t.consume(h),o):h===93?(t.consume(h),s):h===60||h===null||Fe(h)||er(h)?i(h):r(h)}function s(h){return h===null||h===40||h===91||Fe(h)||er(h)?i(h):a(h)}function o(h){return Ct(h)?c(h):r(h)}function c(h){return h===59?(t.consume(h),a):Ct(h)?(t.consume(h),c):r(h)}}function IA(t,i,r){return a;function a(o){return t.consume(o),s}function s(o){return St(o)?r(o):i(o)}}function Rv(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Fe(t)}function Dv(t){return!Ct(t)}function Nv(t){return!(t===47||Bf(t))}function Bf(t){return t===43||t===45||t===46||t===95||St(t)}function ah(t){let i=t.length,r=!1;for(;i--;){const a=t[i][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const GA={tokenize:WA,partial:!0};function QA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$A,continuation:{tokenize:KA},exit:JA}},text:{91:{name:"gfmFootnoteCall",tokenize:FA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XA,resolveTo:PA}}}}function XA(t,i,r){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const p=a.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!c||!c._balanced)return r(p);const m=_n(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?r(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),i(p))}}function PA(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[t[r+1],t[r+2],["enter",a,i],t[r+3],t[r+4],["enter",s,i],["exit",s,i],["enter",o,i],["enter",c,i],["exit",c,i],["exit",o,i],t[t.length-2],t[t.length-1],["exit",a,i]];return t.splice(r,t.length-r+1,...h),t}function FA(t,i,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?r(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(o>999||y===93&&!c||y===null||y===91||Fe(y))return r(y);if(y===93){t.exit("chunkString");const S=t.exit("gfmFootnoteCallString");return s.includes(_n(a.sliceSerialize(S)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(y)}return Fe(y)||(c=!0),o++,t.consume(y),y===92?g:m}function g(y){return y===91||y===92||y===93?(t.consume(y),o++,m):m(y)}}function $A(t,i,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,h;return p;function p(w){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(w),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(w){return w===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(w),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",g):r(w)}function g(w){if(c>999||w===93&&!h||w===null||w===91||Fe(w))return r(w);if(w===93){t.exit("chunkString");const C=t.exit("gfmFootnoteDefinitionLabelString");return o=_n(a.sliceSerialize(C)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(w),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),S}return Fe(w)||(h=!0),c++,t.consume(w),w===92?y:g}function y(w){return w===91||w===92||w===93?(t.consume(w),c++,g):g(w)}function S(w){return w===58?(t.enter("definitionMarker"),t.consume(w),t.exit("definitionMarker"),s.includes(o)||s.push(o),Le(t,x,"gfmFootnoteDefinitionWhitespace")):r(w)}function x(w){return i(w)}}function KA(t,i,r){return t.check(Ll,i,t.attempt(GA,i,r))}function JA(t){t.exit("gfmFootnoteDefinition")}function WA(t,i,r){const a=this;return Le(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?i(o):r(o)}}function e2(t){let r=(t||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,h){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},S=[["enter",g,h],["enter",c[m][1],h],["exit",c[m][1],h],["enter",y,h]],x=h.parser.constructs.insideSpan.null;x&&Kt(S,S.length,0,xs(x,c.slice(m+1,p),h)),Kt(S,S.length,0,[["exit",y,h],["enter",c[p][1],h],["exit",c[p][1],h],["exit",g,h]]),Kt(c,m-1,p-m+3,S),p=m+S.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function o(c,h,p){const m=this.previous,g=this.events;let y=0;return S;function S(w){return m===126&&g[g.length-1][1].type!=="characterEscape"?p(w):(c.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const C=Jr(m);if(w===126)return y>1?p(w):(c.consume(w),y++,x);if(y<2&&!r)return p(w);const j=c.exit("strikethroughSequenceTemporary"),M=Jr(w);return j._open=!M||M===2&&!!C,j._close=!C||C===2&&!!M,h(w)}}}class t2{constructor(){this.map=[]}add(i,r,a){n2(this,i,r,a)}consume(i){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];a.push(i.slice()),i.length=0;let s=a.pop();for(;s;){for(const o of s)i.push(o);s=a.pop()}this.map.length=0}}function n2(t,i,r,a){let s=0;if(!(r===0&&a.length===0)){for(;s<t.map.length;){if(t.map[s][0]===i){t.map[s][1]+=r,t.map[s][2].push(...a);return}s+=1}t.map.push([i,r,a])}}function i2(t,i){let r=!1;const a=[];for(;i<t.length;){const s=t[i];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return a}function r2(){return{flow:{null:{name:"table",tokenize:a2,resolveAll:l2}}}}function a2(t,i,r){const a=this;let s=0,o=0,c;return h;function h(L){let re=a.events.length-1;for(;re>-1;){const ie=a.events[re][1].type;if(ie==="lineEnding"||ie==="linePrefix")re--;else break}const te=re>-1?a.events[re][1].type:null,le=te==="tableHead"||te==="tableRow"?N:p;return le===N&&a.parser.lazy[a.now().line]?r(L):le(L)}function p(L){return t.enter("tableHead"),t.enter("tableRow"),m(L)}function m(L){return L===124||(c=!0,o+=1),g(L)}function g(L){return L===null?r(L):pe(L)?o>1?(o=0,a.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),x):r(L):De(L)?Le(t,g,"whitespace")(L):(o+=1,c&&(c=!1,s+=1),L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),c=!0,g):(t.enter("data"),y(L)))}function y(L){return L===null||L===124||Fe(L)?(t.exit("data"),g(L)):(t.consume(L),L===92?S:y)}function S(L){return L===92||L===124?(t.consume(L),y):y(L)}function x(L){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(L):(t.enter("tableDelimiterRow"),c=!1,De(L)?Le(t,w,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):w(L))}function w(L){return L===45||L===58?j(L):L===124?(c=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),C):G(L)}function C(L){return De(L)?Le(t,j,"whitespace")(L):j(L)}function j(L){return L===58?(o+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),M):L===45?(o+=1,M(L)):L===null||pe(L)?F(L):G(L)}function M(L){return L===45?(t.enter("tableDelimiterFiller"),Q(L)):G(L)}function Q(L){return L===45?(t.consume(L),Q):L===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),B):(t.exit("tableDelimiterFiller"),B(L))}function B(L){return De(L)?Le(t,F,"whitespace")(L):F(L)}function F(L){return L===124?w(L):L===null||pe(L)?!c||s!==o?G(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(L)):G(L)}function G(L){return r(L)}function N(L){return t.enter("tableRow"),he(L)}function he(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),he):L===null||pe(L)?(t.exit("tableRow"),i(L)):De(L)?Le(t,he,"whitespace")(L):(t.enter("data"),Se(L))}function Se(L){return L===null||L===124||Fe(L)?(t.exit("data"),he(L)):(t.consume(L),L===92?xe:Se)}function xe(L){return L===92||L===124?(t.consume(L),Se):Se(L)}}function l2(t,i){let r=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],h=!1,p=0,m,g,y;const S=new t2;for(;++r<t.length;){const x=t[r],w=x[1];x[0]==="enter"?w.type==="tableHead"?(h=!1,p!==0&&(dy(S,i,p,m,g),g=void 0,p=0),m={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},S.add(r,0,[["enter",m,i]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(a=!0,y=void 0,o=[0,0,0,0],c=[0,r+1,0,0],h&&(h=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},S.add(r,0,[["enter",g,i]])),s=w.type==="tableDelimiterRow"?2:g?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],y=rs(S,i,o,s,void 0,y),o=[0,0,0,0]),c[2]=r)):w.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],y=rs(S,i,o,s,void 0,y)),o=c,c=[o[1],r,0,0])):w.type==="tableHead"?(h=!0,p=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=r,o[1]!==0?(c[0]=c[1],y=rs(S,i,o,s,r,y)):c[1]!==0&&(y=rs(S,i,c,s,r,y)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=r)}for(p!==0&&dy(S,i,p,m,g),S.consume(i.events),r=-1;++r<i.events.length;){const x=i.events[r];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=i2(i.events,r))}return t}function rs(t,i,r,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",h="tableContent";r[0]!==0&&(o.end=Object.assign({},Gr(i.events,r[0])),t.add(r[0],0,[["exit",o,i]]));const p=Gr(i.events,r[1]);if(o={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(r[1],0,[["enter",o,i]]),r[2]!==0){const m=Gr(i.events,r[2]),g=Gr(i.events,r[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},g)};if(t.add(r[2],0,[["enter",y,i]]),a!==2){const S=i.events[r[2]],x=i.events[r[3]];if(S[1].end=Object.assign({},x[1].end),S[1].type="chunkText",S[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,C=r[3]-r[2]-1;t.add(w,C,[])}}t.add(r[3]+1,0,[["exit",y,i]])}return s!==void 0&&(o.end=Object.assign({},Gr(i.events,s)),t.add(s,0,[["exit",o,i]]),o=void 0),o}function dy(t,i,r,a,s){const o=[],c=Gr(i.events,r);s&&(s.end=Object.assign({},c),o.push(["exit",s,i])),a.end=Object.assign({},c),o.push(["exit",a,i]),t.add(r+1,0,o)}function Gr(t,i){const r=t[i],a=r[0]==="enter"?"start":"end";return r[1][a]}const u2={name:"tasklistCheck",tokenize:o2};function s2(){return{text:{91:u2}}}function o2(t,i,r){const a=this;return s;function s(p){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),o)}function o(p){return Fe(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):r(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):r(p)}function h(p){return pe(p)?i(p):De(p)?t.check({tokenize:c2},i,r)(p):r(p)}}function c2(t,i,r){return Le(t,a,"whitespace");function a(s){return s===null?r(s):i(s)}}function f2(t){return Gy([LA(),QA(),e2(t),r2(),s2()])}const h2={};function d2(t){const i=this,r=t||h2,a=i.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(f2(r)),o.push(RA()),c.push(DA(r))}const m2=({message:t})=>q.jsx("div",{className:"message ai",children:q.jsxs("div",{className:"message-content",children:[q.jsx("div",{className:"message-text markdown-body",children:q.jsx(eE,{remarkPlugins:[d2],children:Oy(t.content)})}),q.jsx(Zf,{response_metadata:t.response_metadata,usage_metadata:t.usage_metadata||{},spend_time:t.spend_time})]})}),p2=({message:t,client:i,getMessageContent:r,formatTokens:a,isCollapsed:s,onToggleCollapse:o})=>{var c;return q.jsxs("div",{className:"message tool",children:[t.name==="ask_user"&&!((c=t.additional_kwargs)!=null&&c.done)&&q.jsxs("div",{children:[q.jsxs("div",{children:["询问 ",t.tool_input]}),q.jsx("input",{type:"text",onKeyDown:h=>{h.key==="Enter"&&i.doneFEToolWaiting(t.id,h.target.value)}})]}),q.jsxs("div",{className:"tool-message",children:[q.jsx("div",{className:"tool-header",onClick:o,children:q.jsx("div",{className:"tool-title",children:t.name})}),!s&&q.jsxs("div",{className:"tool-content",children:[q.jsx("div",{className:"tool-input",children:t.tool_input}),q.jsx("div",{className:"tool-output",children:r(t.content)}),q.jsx(Zf,{response_metadata:t.response_metadata,usage_metadata:t.usage_metadata||{},spend_time:t.spend_time})]})]})]})},g2=localStorage.getItem("withCredentials")==="true"?(t,i)=>(i.credentials="include",fetch(t,i)):fetch,y2=Vx("agent",{apiUrl:localStorage.getItem("apiUrl")||"http://localhost:8123",defaultHeaders:JSON.parse(localStorage.getItem("code")||"{}"),callerOptions:{fetch:g2}},{onInit(t){t.tools.bindTools([])}});let kf=(t,i)=>r=>{t.current!==r&&(t.current=r,i())};function v2(t,{keys:i,deps:r=[t,i]}={}){let a=Ot.useRef();a.current=t.get();let s=Ot.useCallback(c=>(kf(a,c)(t.value),(i==null?void 0:i.length)>0?Bx(t,i,kf(a,c)):t.listen(kf(a,c))),r),o=()=>a.current;return Ot.useSyncExternalStore(s,o,o)}const jv=Ot.createContext(void 0),ws=()=>{const t=Ot.useContext(jv);if(!t)throw new Error("useChat must be used within a ChatProvider");return t},b2=({children:t})=>{const i=Yx(y2,v2);return Ot.useEffect(()=>{i.initClient().then(r=>{i.refreshHistoryList()})},[i.currentAgent]),q.jsx(jv.Provider,{value:i,children:t})},_2=({onClose:t,formatTime:i})=>{const{historyList:r,currentChatId:a,refreshHistoryList:s,createNewChat:o,deleteHistoryChat:c,toHistoryChat:h}=ws();return q.jsxs("div",{className:"history-list",children:[q.jsxs("div",{className:"history-header",children:[q.jsxs("div",{className:"header-left",children:[q.jsx("h3",{children:"历史记录"}),q.jsx("button",{className:"refresh-button",onClick:s,title:"刷新列表",children:"🔁"})]}),q.jsx("button",{className:"close-button",onClick:t,title:"关闭",children:"❌"})]}),q.jsxs("div",{className:"history-content",children:[q.jsx("div",{className:"history-items",onClick:()=>{o()},children:q.jsx("div",{className:"history-item",children:q.jsx("div",{className:"history-title",children:" New Chat"})})}),r.length===0?q.jsx("div",{className:"empty-history",children:"暂无历史记录"}):q.jsx("div",{className:"history-items",children:r.sort((p,m)=>new Date(m.created_at).getTime()-new Date(p.created_at).getTime()).map(p=>q.jsxs("div",{className:`history-item ${p.thread_id===a?"active":""}`,children:[q.jsxs("div",{className:"history-info",children:[q.jsx("div",{className:"history-title",children:qx(p)}),q.jsxs("div",{className:"history-meta",children:[q.jsx("span",{className:"history-time",children:i(new Date(p.created_at))}),q.jsx("span",{className:"history-status",children:p.status})]})]}),q.jsxs("div",{className:"history-actions",children:[q.jsx("button",{className:"action-button",onClick:()=>{h(p)},title:"恢复对话",children:"⏪"}),q.jsx("button",{className:"action-button",onClick:async()=>{await c(p)},title:"删除对话",children:"❌"})]})]},p.thread_id))})]}),q.jsx("style",{children:`
|
|
79
|
+
`,...o.current()});return/^[\t ]/.test(m)&&(m=Rl(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,r.options.closeAtx&&(m+=" "+c),p(),h(),m}yv.peek=rA;function yv(t){return t.value||""}function rA(){return"<"}vv.peek=aA;function vv(t,i,r,a){const s=rh(r),o=s==='"'?"Quote":"Apostrophe",c=r.enter("image");let h=r.enter("label");const p=r.createTracker(a);let m=p.move("![");return m+=p.move(r.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(r.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=r.enter("destinationRaw"),m+=p.move(r.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),h(),t.title&&(h=r.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(r.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),m+=p.move(")"),c(),m}function aA(){return"!"}bv.peek=lA;function bv(t,i,r,a){const s=t.referenceType,o=r.enter("imageReference");let c=r.enter("label");const h=r.createTracker(a);let p=h.move("![");const m=r.safe(t.alt,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(t),{before:p,after:"]",...h.current()});return c(),r.stack=g,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function lA(){return"!"}xv.peek=uA;function xv(t,i,r){let a=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<r.unsafe.length;){const c=r.unsafe[o],h=r.compilePattern(c);let p;if(c.atBreak)for(;p=h.exec(a);){let m=p.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(p.index+1)}}return s+a+s}function uA(){return"`"}function _v(t,i){const r=Ff(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Sv.peek=sA;function Sv(t,i,r,a){const s=rh(r),o=s==='"'?"Quote":"Apostrophe",c=r.createTracker(a);let h,p;if(_v(t,r)){const g=r.stack;r.stack=[],h=r.enter("autolink");let y=c.move("<");return y+=c.move(r.containerPhrasing(t,{before:y,after:">",...c.current()})),y+=c.move(">"),h(),r.stack=g,y}h=r.enter("link"),p=r.enter("label");let m=c.move("[");return m+=c.move(r.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(r.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=r.enter("destinationRaw"),m+=c.move(r.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=r.enter(`title${o}`),m+=c.move(" "+s),m+=c.move(r.safe(t.title,{before:m,after:s,...c.current()})),m+=c.move(s),p()),m+=c.move(")"),h(),m}function sA(t,i,r){return _v(t,r)?"<":"["}kv.peek=oA;function kv(t,i,r,a){const s=t.referenceType,o=r.enter("linkReference");let c=r.enter("label");const h=r.createTracker(a);let p=h.move("[");const m=r.containerPhrasing(t,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(t),{before:p,after:"]",...h.current()});return c(),r.stack=g,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function oA(){return"["}function ah(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function cA(t){const i=ah(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function fA(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function Tv(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function hA(t,i,r,a){const s=r.enter("list"),o=r.bulletCurrent;let c=t.ordered?fA(r):ah(r);const h=t.ordered?c==="."?")":".":cA(r);let p=i&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!t.ordered){const g=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(p=!0),Tv(r)===c&&g){let y=-1;for(;++y<t.children.length;){const x=t.children[y];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=h),r.bulletCurrent=c;const m=r.containerFlow(t,a);return r.bulletLastUsed=c,r.bulletCurrent=o,s(),m}function dA(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function mA(t,i,r,a){const s=dA(r);let o=r.bulletCurrent||ah(r);i&&i.type==="list"&&i.ordered&&(o=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(c=Math.ceil(c/4)*4);const h=r.createTracker(a);h.move(o+" ".repeat(c-o.length)),h.shift(c);const p=r.enter("listItem"),m=r.indentLines(r.containerFlow(t,h.current()),g);return p(),m;function g(y,x,S){return x?(S?"":" ".repeat(c))+y:(S?o:o+" ".repeat(c-o.length))+y}}function pA(t,i,r,a){const s=r.enter("paragraph"),o=r.enter("phrasing"),c=r.containerPhrasing(t,a);return o(),s(),c}const gA=ks(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yA(t,i,r,a){return(t.children.some(function(c){return gA(c)})?r.containerPhrasing:r.containerFlow).call(r,t,a)}function vA(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}wv.peek=bA;function wv(t,i,r,a){const s=vA(r),o=r.enter("strong"),c=r.createTracker(a),h=c.move(s+s);let p=c.move(r.containerPhrasing(t,{after:s,before:h,...c.current()}));const m=p.charCodeAt(0),g=vs(a.before.charCodeAt(a.before.length-1),m,s);g.inside&&(p=Rl(m)+p.slice(1));const y=p.charCodeAt(p.length-1),x=vs(a.after.charCodeAt(0),y,s);x.inside&&(p=p.slice(0,-1)+Rl(y));const S=c.move(s+s);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},h+p+S}function bA(t,i,r){return r.options.strong||"*"}function xA(t,i,r,a){return r.safe(t.value,a)}function _A(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function SA(t,i,r){const a=(Tv(r)+(r.options.ruleSpaces?" ":"")).repeat(_A(r));return r.options.ruleSpaces?a.slice(0,-1):a}const Ev={blockquote:GE,break:fy,code:KE,definition:WE,emphasis:gv,hardBreak:fy,heading:iA,html:yv,image:vv,imageReference:bv,inlineCode:xv,link:Sv,linkReference:kv,list:hA,listItem:mA,paragraph:pA,root:yA,strong:wv,text:xA,thematicBreak:SA};function kA(){return{enter:{table:TA,tableData:hy,tableHeader:hy,tableRow:EA},exit:{codeText:AA,table:wA,tableData:Sf,tableHeader:Sf,tableRow:Sf}}}function TA(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function wA(t){this.exit(t),this.data.inTable=void 0}function EA(t){this.enter({type:"tableRow",children:[]},t)}function Sf(t){this.exit(t)}function hy(t){this.enter({type:"tableCell",children:[]},t)}function AA(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,CA));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function CA(t,i){return i==="|"?i:t}function OA(t){const i=t||{},r=i.tableCellPadding,a=i.tablePipeAlign,s=i.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
80
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:p,tableRow:h}};function c(S,w,M,U){return m(g(S,M,U),S.align)}function h(S,w,M,U){const z=y(S,M,U),P=m([z]);return P.slice(0,P.indexOf(`
|
|
81
|
+
`))}function p(S,w,M,U){const z=M.enter("tableCell"),P=M.enter("phrasing"),H=M.containerPhrasing(S,{...U,before:o,after:o});return P(),z(),H}function m(S,w){return YE(S,{align:w,alignDelimiters:a,padding:r,stringLength:s})}function g(S,w,M){const U=S.children;let z=-1;const P=[],H=w.enter("table");for(;++z<U.length;)P[z]=y(U[z],w,M);return H(),P}function y(S,w,M){const U=S.children;let z=-1;const P=[],H=w.enter("tableRow");for(;++z<U.length;)P[z]=p(U[z],S,w,M);return H(),P}function x(S,w,M){let U=Ev.inlineCode(S,w,M);return M.stack.includes("tableCell")&&(U=U.replace(/\|/g,"\\$&")),U}}function zA(){return{exit:{taskListCheckValueChecked:dy,taskListCheckValueUnchecked:dy,paragraph:RA}}}function MA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:DA}}}function dy(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function RA(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const s=i.children;let o=-1,c;for(;++o<s.length;){const h=s[o];if(h.type==="paragraph"){c=h;break}}c===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(t)}function DA(t,i,r,a){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",h=r.createTracker(a);o&&h.move(c);let p=Ev.listItem(t,i,r,{...a,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(g){return g+c}}function NA(){return[hE(),DE(),UE(),kA(),zA()]}function jA(t){return{extensions:[dE(),NE(t),BE(),OA(t),MA()]}}const LA={tokenize:VA,partial:!0},Av={tokenize:YA,partial:!0},Cv={tokenize:IA,partial:!0},Ov={tokenize:GA,partial:!0},UA={tokenize:PA,partial:!0},zv={name:"wwwAutolink",tokenize:ZA,previous:Rv},Mv={name:"protocolAutolink",tokenize:qA,previous:Dv},ei={name:"emailAutolink",tokenize:HA,previous:Nv},Dn={};function BA(){return{text:Dn}}let Xi=48;for(;Xi<123;)Dn[Xi]=ei,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);Dn[43]=ei;Dn[45]=ei;Dn[46]=ei;Dn[95]=ei;Dn[72]=[ei,Mv];Dn[104]=[ei,Mv];Dn[87]=[ei,zv];Dn[119]=[ei,zv];function HA(t,i,r){const a=this;let s,o;return c;function c(y){return!Hf(y)||!Nv.call(a,a.previous)||lh(a.events)?r(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Hf(y)?(t.consume(y),h):y===64?(t.consume(y),p):r(y)}function p(y){return y===46?t.check(UA,g,m)(y):y===45||y===95||kt(y)?(o=!0,t.consume(y),p):g(y)}function m(y){return t.consume(y),s=!0,p}function g(y){return o&&s&&Ot(a.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(y)):r(y)}}function ZA(t,i,r){const a=this;return s;function s(c){return c!==87&&c!==119||!Rv.call(a,a.previous)||lh(a.events)?r(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(LA,t.attempt(Av,t.attempt(Cv,o),r),r)(c))}function o(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(c)}}function qA(t,i,r){const a=this;let s="",o=!1;return c;function c(y){return(y===72||y===104)&&Dv.call(a,a.previous)&&!lh(a.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):r(y)}function h(y){if(Ot(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const x=s.toLowerCase();if(x==="http"||x==="https")return t.consume(y),p}return r(y)}function p(y){return y===47?(t.consume(y),o?m:(o=!0,p)):r(y)}function m(y){return y===null||ps(y)||Fe(y)||er(y)||xs(y)?r(y):t.attempt(Av,t.attempt(Cv,g),r)(y)}function g(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(y)}}function VA(t,i,r){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,t.consume(c),s):c===46&&a===3?(t.consume(c),o):r(c)}function o(c){return c===null?r(c):i(c)}}function YA(t,i,r){let a,s,o;return c;function c(m){return m===46||m===95?t.check(Ov,p,h)(m):m===null||Fe(m)||er(m)||m!==45&&xs(m)?p(m):(o=!0,t.consume(m),c)}function h(m){return m===95?a=!0:(s=a,a=void 0),t.consume(m),c}function p(m){return s||a||!o?r(m):i(m)}}function IA(t,i){let r=0,a=0;return s;function s(c){return c===40?(r++,t.consume(c),s):c===41&&a<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(Ov,i,o)(c):c===null||Fe(c)||er(c)?i(c):(t.consume(c),s)}function o(c){return c===41&&a++,t.consume(c),s}}function GA(t,i,r){return a;function a(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),a):h===38?(t.consume(h),o):h===93?(t.consume(h),s):h===60||h===null||Fe(h)||er(h)?i(h):r(h)}function s(h){return h===null||h===40||h===91||Fe(h)||er(h)?i(h):a(h)}function o(h){return Ot(h)?c(h):r(h)}function c(h){return h===59?(t.consume(h),a):Ot(h)?(t.consume(h),c):r(h)}}function PA(t,i,r){return a;function a(o){return t.consume(o),s}function s(o){return kt(o)?r(o):i(o)}}function Rv(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Fe(t)}function Dv(t){return!Ot(t)}function Nv(t){return!(t===47||Hf(t))}function Hf(t){return t===43||t===45||t===46||t===95||kt(t)}function lh(t){let i=t.length,r=!1;for(;i--;){const a=t[i][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const QA={tokenize:t2,partial:!0};function XA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JA,continuation:{tokenize:WA},exit:e2}},text:{91:{name:"gfmFootnoteCall",tokenize:KA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:FA,resolveTo:$A}}}}function FA(t,i,r){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const p=a.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!c||!c._balanced)return r(p);const m=xn(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?r(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),i(p))}}function $A(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[t[r+1],t[r+2],["enter",a,i],t[r+3],t[r+4],["enter",s,i],["exit",s,i],["enter",o,i],["enter",c,i],["exit",c,i],["exit",o,i],t[t.length-2],t[t.length-1],["exit",a,i]];return t.splice(r,t.length-r+1,...h),t}function KA(t,i,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?r(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(o>999||y===93&&!c||y===null||y===91||Fe(y))return r(y);if(y===93){t.exit("chunkString");const x=t.exit("gfmFootnoteCallString");return s.includes(xn(a.sliceSerialize(x)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(y)}return Fe(y)||(c=!0),o++,t.consume(y),y===92?g:m}function g(y){return y===91||y===92||y===93?(t.consume(y),o++,m):m(y)}}function JA(t,i,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,h;return p;function p(w){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(w),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(w){return w===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(w),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",g):r(w)}function g(w){if(c>999||w===93&&!h||w===null||w===91||Fe(w))return r(w);if(w===93){t.exit("chunkString");const M=t.exit("gfmFootnoteDefinitionLabelString");return o=xn(a.sliceSerialize(M)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(w),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),x}return Fe(w)||(h=!0),c++,t.consume(w),w===92?y:g}function y(w){return w===91||w===92||w===93?(t.consume(w),c++,g):g(w)}function x(w){return w===58?(t.enter("definitionMarker"),t.consume(w),t.exit("definitionMarker"),s.includes(o)||s.push(o),Le(t,S,"gfmFootnoteDefinitionWhitespace")):r(w)}function S(w){return i(w)}}function WA(t,i,r){return t.check(Ll,i,t.attempt(QA,i,r))}function e2(t){t.exit("gfmFootnoteDefinition")}function t2(t,i,r){const a=this;return Le(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?i(o):r(o)}}function n2(t){let r=(t||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,h){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},x=[["enter",g,h],["enter",c[m][1],h],["exit",c[m][1],h],["enter",y,h]],S=h.parser.constructs.insideSpan.null;S&&Kt(x,x.length,0,_s(S,c.slice(m+1,p),h)),Kt(x,x.length,0,[["exit",y,h],["enter",c[p][1],h],["exit",c[p][1],h],["exit",g,h]]),Kt(c,m-1,p-m+3,x),p=m+x.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function o(c,h,p){const m=this.previous,g=this.events;let y=0;return x;function x(w){return m===126&&g[g.length-1][1].type!=="characterEscape"?p(w):(c.enter("strikethroughSequenceTemporary"),S(w))}function S(w){const M=Jr(m);if(w===126)return y>1?p(w):(c.consume(w),y++,S);if(y<2&&!r)return p(w);const U=c.exit("strikethroughSequenceTemporary"),z=Jr(w);return U._open=!z||z===2&&!!M,U._close=!M||M===2&&!!z,h(w)}}}class i2{constructor(){this.map=[]}add(i,r,a){r2(this,i,r,a)}consume(i){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];a.push(i.slice()),i.length=0;let s=a.pop();for(;s;){for(const o of s)i.push(o);s=a.pop()}this.map.length=0}}function r2(t,i,r,a){let s=0;if(!(r===0&&a.length===0)){for(;s<t.map.length;){if(t.map[s][0]===i){t.map[s][1]+=r,t.map[s][2].push(...a);return}s+=1}t.map.push([i,r,a])}}function a2(t,i){let r=!1;const a=[];for(;i<t.length;){const s=t[i];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return a}function l2(){return{flow:{null:{name:"table",tokenize:u2,resolveAll:s2}}}}function u2(t,i,r){const a=this;let s=0,o=0,c;return h;function h(j){let re=a.events.length-1;for(;re>-1;){const ie=a.events[re][1].type;if(ie==="lineEnding"||ie==="linePrefix")re--;else break}const te=re>-1?a.events[re][1].type:null,le=te==="tableHead"||te==="tableRow"?N:p;return le===N&&a.parser.lazy[a.now().line]?r(j):le(j)}function p(j){return t.enter("tableHead"),t.enter("tableRow"),m(j)}function m(j){return j===124||(c=!0,o+=1),g(j)}function g(j){return j===null?r(j):pe(j)?o>1?(o=0,a.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(j),t.exit("lineEnding"),S):r(j):De(j)?Le(t,g,"whitespace")(j):(o+=1,c&&(c=!1,s+=1),j===124?(t.enter("tableCellDivider"),t.consume(j),t.exit("tableCellDivider"),c=!0,g):(t.enter("data"),y(j)))}function y(j){return j===null||j===124||Fe(j)?(t.exit("data"),g(j)):(t.consume(j),j===92?x:y)}function x(j){return j===92||j===124?(t.consume(j),y):y(j)}function S(j){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(j):(t.enter("tableDelimiterRow"),c=!1,De(j)?Le(t,w,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):w(j))}function w(j){return j===45||j===58?U(j):j===124?(c=!0,t.enter("tableCellDivider"),t.consume(j),t.exit("tableCellDivider"),M):G(j)}function M(j){return De(j)?Le(t,U,"whitespace")(j):U(j)}function U(j){return j===58?(o+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(j),t.exit("tableDelimiterMarker"),z):j===45?(o+=1,z(j)):j===null||pe(j)?F(j):G(j)}function z(j){return j===45?(t.enter("tableDelimiterFiller"),P(j)):G(j)}function P(j){return j===45?(t.consume(j),P):j===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(j),t.exit("tableDelimiterMarker"),H):(t.exit("tableDelimiterFiller"),H(j))}function H(j){return De(j)?Le(t,F,"whitespace")(j):F(j)}function F(j){return j===124?w(j):j===null||pe(j)?!c||s!==o?G(j):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(j)):G(j)}function G(j){return r(j)}function N(j){return t.enter("tableRow"),he(j)}function he(j){return j===124?(t.enter("tableCellDivider"),t.consume(j),t.exit("tableCellDivider"),he):j===null||pe(j)?(t.exit("tableRow"),i(j)):De(j)?Le(t,he,"whitespace")(j):(t.enter("data"),Se(j))}function Se(j){return j===null||j===124||Fe(j)?(t.exit("data"),he(j)):(t.consume(j),j===92?_e:Se)}function _e(j){return j===92||j===124?(t.consume(j),Se):Se(j)}}function s2(t,i){let r=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],h=!1,p=0,m,g,y;const x=new i2;for(;++r<t.length;){const S=t[r],w=S[1];S[0]==="enter"?w.type==="tableHead"?(h=!1,p!==0&&(my(x,i,p,m,g),g=void 0,p=0),m={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(r,0,[["enter",m,i]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(a=!0,y=void 0,o=[0,0,0,0],c=[0,r+1,0,0],h&&(h=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(r,0,[["enter",g,i]])),s=w.type==="tableDelimiterRow"?2:g?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],y=rs(x,i,o,s,void 0,y),o=[0,0,0,0]),c[2]=r)):w.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],y=rs(x,i,o,s,void 0,y)),o=c,c=[o[1],r,0,0])):w.type==="tableHead"?(h=!0,p=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=r,o[1]!==0?(c[0]=c[1],y=rs(x,i,o,s,r,y)):c[1]!==0&&(y=rs(x,i,c,s,r,y)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=r)}for(p!==0&&my(x,i,p,m,g),x.consume(i.events),r=-1;++r<i.events.length;){const S=i.events[r];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=a2(i.events,r))}return t}function rs(t,i,r,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",h="tableContent";r[0]!==0&&(o.end=Object.assign({},Gr(i.events,r[0])),t.add(r[0],0,[["exit",o,i]]));const p=Gr(i.events,r[1]);if(o={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(r[1],0,[["enter",o,i]]),r[2]!==0){const m=Gr(i.events,r[2]),g=Gr(i.events,r[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},g)};if(t.add(r[2],0,[["enter",y,i]]),a!==2){const x=i.events[r[2]],S=i.events[r[3]];if(x[1].end=Object.assign({},S[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,M=r[3]-r[2]-1;t.add(w,M,[])}}t.add(r[3]+1,0,[["exit",y,i]])}return s!==void 0&&(o.end=Object.assign({},Gr(i.events,s)),t.add(s,0,[["exit",o,i]]),o=void 0),o}function my(t,i,r,a,s){const o=[],c=Gr(i.events,r);s&&(s.end=Object.assign({},c),o.push(["exit",s,i])),a.end=Object.assign({},c),o.push(["exit",a,i]),t.add(r+1,0,o)}function Gr(t,i){const r=t[i],a=r[0]==="enter"?"start":"end";return r[1][a]}const o2={name:"tasklistCheck",tokenize:f2};function c2(){return{text:{91:o2}}}function f2(t,i,r){const a=this;return s;function s(p){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),o)}function o(p){return Fe(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):r(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):r(p)}function h(p){return pe(p)?i(p):De(p)?t.check({tokenize:h2},i,r)(p):r(p)}}function h2(t,i,r){return Le(t,a,"whitespace");function a(s){return s===null?r(s):i(s)}}function d2(t){return Gy([BA(),XA(),n2(t),l2(),c2()])}const m2={};function p2(t){const i=this,r=t||m2,a=i.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(d2(r)),o.push(NA()),c.push(jA(r))}const g2=({message:t})=>B.jsx("div",{className:"message ai",children:B.jsxs("div",{className:"message-content",children:[B.jsx("div",{className:"message-text markdown-body",children:B.jsx(nE,{remarkPlugins:[p2],children:zy(t.content)})}),B.jsx(qf,{response_metadata:t.response_metadata,usage_metadata:t.usage_metadata||{},spend_time:t.spend_time})]})}),y2=({message:t,client:i,getMessageContent:r,formatTokens:a,isCollapsed:s,onToggleCollapse:o})=>{var c;return B.jsxs("div",{className:"message tool",children:[t.name==="ask_user"&&!((c=t.additional_kwargs)!=null&&c.done)&&B.jsxs("div",{children:[B.jsxs("div",{children:["询问 ",t.tool_input]}),B.jsx("input",{type:"text",onKeyDown:h=>{h.key==="Enter"&&i.doneFEToolWaiting(t.id,h.target.value)}})]}),B.jsxs("div",{className:"tool-message",children:[B.jsx("div",{className:"tool-header",onClick:o,children:B.jsx("div",{className:"tool-title",children:t.name})}),!s&&B.jsxs("div",{className:"tool-content",children:[B.jsx("div",{className:"tool-input",children:t.tool_input}),B.jsx("div",{className:"tool-output",children:r(t.content)}),B.jsx(qf,{response_metadata:t.response_metadata,usage_metadata:t.usage_metadata||{},spend_time:t.spend_time})]})]})]})},v2=localStorage.getItem("withCredentials")==="true"?(t,i)=>(i.credentials="include",fetch(t,i)):fetch,b2=I_("agent",{apiUrl:localStorage.getItem("apiUrl")||"http://localhost:8123",defaultHeaders:JSON.parse(localStorage.getItem("code")||"{}"),callerOptions:{fetch:v2}},{onInit(t){t.tools.bindTools([])}});let kf=(t,i)=>r=>{t.current!==r&&(t.current=r,i())};function x2(t,{keys:i,deps:r=[t,i]}={}){let a=it.useRef();a.current=t.get();let s=it.useCallback(c=>(kf(a,c)(t.value),(i==null?void 0:i.length)>0?Z_(t,i,kf(a,c)):t.listen(kf(a,c))),r),o=()=>a.current;return it.useSyncExternalStore(s,o,o)}const jv=it.createContext(void 0),ws=()=>{const t=it.useContext(jv);if(!t)throw new Error("useChat must be used within a ChatProvider");return t},_2=({children:t})=>{const i=G_(b2,x2);return it.useEffect(()=>{i.initClient().then(r=>{i.refreshHistoryList()})},[i.currentAgent]),B.jsx(jv.Provider,{value:i,children:t})},S2=({onClose:t,formatTime:i})=>{const{historyList:r,currentChatId:a,refreshHistoryList:s,createNewChat:o,deleteHistoryChat:c,toHistoryChat:h}=ws();return B.jsxs("div",{className:"history-list",children:[B.jsxs("div",{className:"history-header",children:[B.jsxs("div",{className:"header-left",children:[B.jsx("h3",{children:"历史记录"}),B.jsx("button",{className:"refresh-button",onClick:s,title:"刷新列表",children:"🔁"})]}),B.jsx("button",{className:"close-button",onClick:t,title:"关闭",children:"❌"})]}),B.jsxs("div",{className:"history-content",children:[B.jsx("div",{className:"history-items",onClick:()=>{o()},children:B.jsx("div",{className:"history-item",children:B.jsx("div",{className:"history-title",children:" New Chat"})})}),r.length===0?B.jsx("div",{className:"empty-history",children:"暂无历史记录"}):B.jsx("div",{className:"history-items",children:r.sort((p,m)=>new Date(m.created_at).getTime()-new Date(p.created_at).getTime()).map(p=>B.jsxs("div",{className:`history-item ${p.thread_id===a?"active":""}`,children:[B.jsxs("div",{className:"history-info",children:[B.jsx("div",{className:"history-title",children:Y_(p)}),B.jsxs("div",{className:"history-meta",children:[B.jsx("span",{className:"history-time",children:i(new Date(p.created_at))}),B.jsx("span",{className:"history-status",children:p.status})]})]}),B.jsxs("div",{className:"history-actions",children:[B.jsx("button",{className:"action-button",onClick:()=>{h(p)},title:"恢复对话",children:"⏪"}),B.jsx("button",{className:"action-button",onClick:async()=>{await c(p)},title:"删除对话",children:"❌"})]})]},p.thread_id))})]}),B.jsx("style",{children:`
|
|
82
82
|
.history-list {
|
|
83
83
|
background: #fff;
|
|
84
84
|
border-radius: 8px;
|
|
@@ -189,4 +189,4 @@ Error generating stack: `+l.message+`
|
|
|
189
189
|
color: #999;
|
|
190
190
|
padding: 32px 0;
|
|
191
191
|
}
|
|
192
|
-
`})]})};class
|
|
192
|
+
`})]})},Lv=it.createContext(void 0),k2=({children:t})=>{const[i,r]=it.useState(()=>{const s=localStorage.getItem("extraParams");try{return s?JSON.parse(s):{}}catch(o){return console.error("Failed to parse extraParams from localStorage",o),{}}});it.useEffect(()=>{localStorage.setItem("extraParams",JSON.stringify(i))},[i]);const a=s=>{r(s)};return B.jsx(Lv.Provider,{value:{extraParams:i,setExtraParams:a},children:t})},Uv=()=>{const t=it.useContext(Lv);if(t===void 0)throw new Error("useExtraParams must be used within an ExtraParamsProvider");return t};class T2{constructor(i={}){$p(this,"apiUrl");this.apiUrl=i.apiUrl||""}createFormData(i,r){const a=new FormData;if(typeof i=="string"){const s=new Blob([i],{type:"text/plain"});a.append("file",s,r||"file.txt")}else a.append("file",i,r||(i instanceof File?i.name:"file"));return a}async upload(i,r={}){const s={method:"POST",body:this.createFormData(i,r.filename)};r.signal&&(s.signal=r.signal);try{const o=await fetch(`${this.apiUrl}${this.getUploadEndpoint()}`,s);if(!o.ok)throw new Error(`Upload failed with status: ${o.status}`);const c=await o.json();return this.processResponse(c)}catch(o){throw new Error(`File upload failed: ${o instanceof Error?o.message:String(o)}`)}}}class w2 extends T2{constructor(i={}){super({apiUrl:i.apiUrl||"https://tmpfiles.org/api/v1"})}getUploadEndpoint(){return"/upload"}processResponse(i){var r;return(r=i.data)!=null&&r.url&&(i.data.url=i.data.url.replace("https://tmpfiles.org/","https://tmpfiles.org/dl/")),i}}const E2=({onFileUploaded:t})=>{const[i,r]=it.useState([]),a=new w2,s=3,o=it.useCallback(async h=>{var g;const m=Array.from(h.target.files||[]).filter(y=>y.type.startsWith("image/"));if(i.length+m.length>s){alert(`最多只能上传${s}张图片`),h.target.value="";return}r(y=>[...y,...m]);for(const y of m)try{const x=await a.upload(y);(g=x.data)!=null&&g.url&&t(x.data.url)}catch(x){console.error("Upload failed:",x)}h.target.value=""},[t,i.length]),c=it.useCallback(h=>{r(p=>p.filter((m,g)=>g!==h))},[]);return B.jsxs("div",{className:"file-list",children:[i.length<s&&B.jsxs("label",{className:`file-upload-button ${i.length===0?"empty":""}`,children:[B.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:[B.jsx("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"}),B.jsx("path",{d:"M20 4h-3.17l-1.24-1.35A1.99 1.99 0 0 0 14.12 2H9.88c-.56 0-1.1.24-1.48.65L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"})]}),B.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:o,style:{display:"none"}})]}),B.jsx("div",{className:"file-list-content",children:i.map((h,p)=>B.jsxs("div",{className:"file-item",children:[B.jsx("img",{src:URL.createObjectURL(h),alt:h.name,className:"file-preview"}),B.jsx("button",{className:"remove-button",onClick:()=>c(p),children:"×"})]},p))})]})},A2=({isOpen:t,initialJson:i,onClose:r,onSave:a})=>{const[s,o]=it.useState(""),[c,h]=it.useState(null);if(it.useEffect(()=>{o(JSON.stringify(i,null,2)),h(null)},[i,t]),!t)return null;const p=()=>{try{const m=JSON.parse(s);a(m),r()}catch(m){h("JSON 格式无效,请检查后重试。"),console.error("Invalid JSON format:",m)}};return B.jsx("div",{className:"json-editor-popup-overlay",children:B.jsxs("div",{className:"json-editor-popup-content",children:[B.jsx("h2",{children:"编辑 Extra Parameters"}),B.jsx("textarea",{value:s,onChange:m=>{o(m.target.value),h(null)},rows:15}),c&&B.jsx("p",{className:"error-message",children:c}),B.jsxs("div",{className:"popup-actions",children:[B.jsx("button",{onClick:r,className:"cancel-button",children:"取消"}),B.jsx("button",{onClick:p,className:"save-button",children:"保存"})]})]})})},C2=()=>{const{renderMessages:t,loading:i,inChatError:r,client:a,collapsedTools:s,toggleToolCollapse:o}=ws();return B.jsxs("div",{className:"chat-messages",children:[t.map(c=>c.type==="human"?B.jsx(o1,{content:c.content},c.unique_id):c.type==="tool"?B.jsx(y2,{message:c,client:a,getMessageContent:zy,formatTokens:V_,isCollapsed:s.includes(c.id),onToggleCollapse:()=>o(c.id)},c.unique_id):B.jsx(g2,{message:c},c.unique_id)),i&&B.jsx("div",{className:"loading-indicator",children:"正在思考中..."}),r&&B.jsx("div",{className:"error-message",children:r})]})},O2=()=>{const{userInput:t,setUserInput:i,loading:r,sendMessage:a,stopGeneration:s,currentAgent:o,setCurrentAgent:c,client:h}=ws(),{extraParams:p}=Uv(),[m,g]=it.useState([]),y=w=>{g(M=>[...M,w])},x=()=>{const w=[{type:"human",content:[{type:"text",text:t},...m.map(M=>({type:"image_url",image_url:{url:M}}))]}];a(w,{extraParams:p}),g([])},S=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),x())};return B.jsxs("div",{className:"chat-input",children:[B.jsxs("div",{className:"chat-input-header",children:[B.jsx(E2,{onFileUploaded:y}),B.jsx(qf,{usage_metadata:(h==null?void 0:h.tokenCounter)||{}}),B.jsx("select",{value:o,onChange:w=>c(w.target.value),children:h==null?void 0:h.availableAssistants.map(w=>B.jsx("option",{value:w.graph_id,children:w.name},w.graph_id))})]}),B.jsxs("div",{className:"input-container",children:[B.jsx("textarea",{className:"input-textarea",rows:2,value:t,onChange:w=>i(w.target.value),onKeyDown:S,placeholder:"输入消息...",disabled:r}),B.jsx("button",{className:`send-button ${r?"interrupt":""}`,onClick:()=>r?s():x(),disabled:!r&&!t.trim()&&m.length===0,children:r?"中断":"发送"})]})]})},z2=()=>{const[t,i]=it.useState(!1),{showHistory:r,toggleHistoryVisible:a}=ws(),{extraParams:s,setExtraParams:o}=Uv();return B.jsxs("div",{className:"chat-container",children:[r&&B.jsx(S2,{onClose:()=>a(),formatTime:q_}),B.jsxs("div",{className:"chat-main",children:[B.jsxs("div",{className:"chat-header",children:[B.jsx("button",{onClick:()=>i(!0),className:"edit-params-button",children:"编辑参数"}),B.jsx("button",{className:"history-button",onClick:()=>a(),children:"历史记录"}),B.jsx("button",{className:"history-button",onClick:()=>{localStorage.setItem("code",""),location.reload()},children:"退出登陆"})]}),B.jsx(C2,{}),B.jsx(O2,{}),B.jsx(A2,{isOpen:t,initialJson:s,onClose:()=>i(!1),onSave:o})]})]})},M2=()=>B.jsx(_2,{children:B.jsx(k2,{children:B.jsx(z2,{})})}),R2=()=>{const[t,i]=it.useState([{key:"authorization",value:""}]),[r,a]=it.useState(localStorage.getItem("withCredentials")==="true"),[s,o]=it.useState(localStorage.getItem("apiUrl")||""),c=()=>{i([...t,{key:"",value:""}])},h=g=>{i(t.filter((y,x)=>x!==g))},p=(g,y,x)=>{const S=[...t];S[g][y]=x,i(S)},m=()=>{const g=Object.fromEntries(t.map(y=>[y.key,y.value]));localStorage.setItem("code",JSON.stringify(g)),localStorage.setItem("withCredentials",JSON.stringify(r)),localStorage.setItem("apiUrl",s),location.reload()};return B.jsx("div",{className:"login-container",children:B.jsxs("form",{onSubmit:g=>{g.preventDefault(),m()},children:[B.jsx("h2",{children:"LangGraph UI"}),B.jsx("p",{children:"登录,自定义请求头配置"}),B.jsxs("div",{className:"form-group api-url-group",children:[B.jsx("label",{htmlFor:"api-url",children:"API URL"}),B.jsx("input",{type:"text",id:"api-url",value:s,onChange:g=>o(g.target.value),placeholder:"例如: http://localhost:8123"})]}),t.map((g,y)=>B.jsxs("div",{className:"header-group",children:[B.jsx("div",{className:"form-group",children:B.jsx("input",{type:"text",id:`header-key-${y}`,value:g.key,onChange:x=>p(y,"key",x.target.value),placeholder:"例如: authorization",required:!0})}),B.jsx("div",{className:"form-group",children:B.jsx("input",{type:"text",id:`header-value-${y}`,value:g.value,onChange:x=>p(y,"value",x.target.value),placeholder:"例如: Bearer token;无则填 1",required:!0})}),y>0&&B.jsx("button",{type:"button",className:"remove-header",onClick:()=>h(y),children:"删除"})]},y)),B.jsx("div",{className:"with-credentials-option",children:B.jsxs("label",{children:[B.jsx("input",{type:"checkbox",checked:r,onChange:g=>a(g.target.checked)}),"启用 withCredentials(跨域请求时发送 Cookie)"]})}),B.jsxs("div",{className:"button-group",children:[B.jsx("button",{type:"button",onClick:c,children:"添加请求头"}),B.jsx("button",{type:"submit",children:"保存配置"})]})]})})};function D2(){const[t,i]=it.useState(localStorage.getItem("code"));return B.jsx(B.Fragment,{children:t?B.jsx(M2,{}):B.jsx(R2,{})})}s1.createRoot(document.getElementById("root")).render(B.jsx(D2,{}));
|