@mobile-reality/mdma-cli 0.1.2 → 0.1.4

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.
@@ -1,646 +0,0 @@
1
- var y1=Object.defineProperty;var g1=(i,n,a)=>n in i?y1(i,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[n]=a;var sl=(i,n,a)=>g1(i,typeof n!="symbol"?n+"":n,a);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const o of u)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function a(u){const o={};return u.integrity&&(o.integrity=u.integrity),u.referrerPolicy&&(o.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?o.credentials="include":u.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(u){if(u.ep)return;u.ep=!0;const o=a(u);fetch(u.href,o)}})();function b1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var pf={exports:{}},xs={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Cy;function v1(){if(Cy)return xs;Cy=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(s,u,o){var f=null;if(o!==void 0&&(f=""+o),u.key!==void 0&&(f=""+u.key),"key"in u){o={};for(var h in u)h!=="key"&&(o[h]=u[h])}else o=u;return u=o.ref,{$$typeof:i,type:s,key:f,ref:u!==void 0?u:null,props:o}}return xs.Fragment=n,xs.jsx=a,xs.jsxs=a,xs}var Oy;function x1(){return Oy||(Oy=1,pf.exports=v1()),pf.exports}var S=x1(),mf={exports:{}},_e={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Ny;function S1(){if(Ny)return _e;Ny=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),_=Symbol.iterator;function v(E){return E===null||typeof E!="object"?null:(E=_&&E[_]||E["@@iterator"],typeof E=="function"?E:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,D={};function C(E,Y,k){this.props=E,this.context=Y,this.refs=D,this.updater=k||N}C.prototype.isReactComponent={},C.prototype.setState=function(E,Y){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,Y,"setState")},C.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function H(){}H.prototype=C.prototype;function M(E,Y,k){this.props=E,this.context=Y,this.refs=D,this.updater=k||N}var Q=M.prototype=new H;Q.constructor=M,w(Q,C.prototype),Q.isPureReactComponent=!0;var X=Array.isArray;function B(){}var K={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function te(E,Y,k){var ne=k.ref;return{$$typeof:i,type:E,key:Y,ref:ne!==void 0?ne:null,props:k}}function fe(E,Y){return te(E.type,Y,E.props)}function W(E){return typeof E=="object"&&E!==null&&E.$$typeof===i}function P(E){var Y={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(k){return Y[k]})}var ye=/\/+/g;function Ee(E,Y){return typeof E=="object"&&E!==null&&E.key!=null?P(""+E.key):Y.toString(36)}function be(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(B,B):(E.status="pending",E.then(function(Y){E.status==="pending"&&(E.status="fulfilled",E.value=Y)},function(Y){E.status==="pending"&&(E.status="rejected",E.reason=Y)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function q(E,Y,k,ne,me){var de=typeof E;(de==="undefined"||de==="boolean")&&(E=null);var ze=!1;if(E===null)ze=!0;else switch(de){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(E.$$typeof){case i:case n:ze=!0;break;case g:return ze=E._init,q(ze(E._payload),Y,k,ne,me)}}if(ze)return me=me(E),ze=ne===""?"."+Ee(E,0):ne,X(me)?(k="",ze!=null&&(k=ze.replace(ye,"$&/")+"/"),q(me,Y,k,"",function(en){return en})):me!=null&&(W(me)&&(me=fe(me,k+(me.key==null||E&&E.key===me.key?"":(""+me.key).replace(ye,"$&/")+"/")+ze)),Y.push(me)),1;ze=0;var tt=ne===""?".":ne+":";if(X(E))for(var Ke=0;Ke<E.length;Ke++)ne=E[Ke],de=tt+Ee(ne,Ke),ze+=q(ne,Y,k,de,me);else if(Ke=v(E),typeof Ke=="function")for(E=Ke.call(E),Ke=0;!(ne=E.next()).done;)ne=ne.value,de=tt+Ee(ne,Ke++),ze+=q(ne,Y,k,de,me);else if(de==="object"){if(typeof E.then=="function")return q(be(E),Y,k,ne,me);throw Y=String(E),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ze}function J(E,Y,k){if(E==null)return E;var ne=[],me=0;return q(E,ne,"","",function(de){return Y.call(k,de,me++)}),ne}function oe(E){if(E._status===-1){var Y=E._result;Y=Y(),Y.then(function(k){(E._status===0||E._status===-1)&&(E._status=1,E._result=k)},function(k){(E._status===0||E._status===-1)&&(E._status=2,E._result=k)}),E._status===-1&&(E._status=0,E._result=Y)}if(E._status===1)return E._result.default;throw E._result}var Ce=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=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(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},A={map:J,forEach:function(E,Y,k){J(E,function(){Y.apply(this,arguments)},k)},count:function(E){var Y=0;return J(E,function(){Y++}),Y},toArray:function(E){return J(E,function(Y){return Y})||[]},only:function(E){if(!W(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return _e.Activity=b,_e.Children=A,_e.Component=C,_e.Fragment=a,_e.Profiler=u,_e.PureComponent=M,_e.StrictMode=s,_e.Suspense=m,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,_e.__COMPILER_RUNTIME={__proto__:null,c:function(E){return K.H.useMemoCache(E)}},_e.cache=function(E){return function(){return E.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(E,Y,k){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ne=w({},E.props),me=E.key;if(Y!=null)for(de in Y.key!==void 0&&(me=""+Y.key),Y)!$.call(Y,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&Y.ref===void 0||(ne[de]=Y[de]);var de=arguments.length-2;if(de===1)ne.children=k;else if(1<de){for(var ze=Array(de),tt=0;tt<de;tt++)ze[tt]=arguments[tt+2];ne.children=ze}return te(E.type,me,ne)},_e.createContext=function(E){return E={$$typeof:f,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:o,_context:E},E},_e.createElement=function(E,Y,k){var ne,me={},de=null;if(Y!=null)for(ne in Y.key!==void 0&&(de=""+Y.key),Y)$.call(Y,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(me[ne]=Y[ne]);var ze=arguments.length-2;if(ze===1)me.children=k;else if(1<ze){for(var tt=Array(ze),Ke=0;Ke<ze;Ke++)tt[Ke]=arguments[Ke+2];me.children=tt}if(E&&E.defaultProps)for(ne in ze=E.defaultProps,ze)me[ne]===void 0&&(me[ne]=ze[ne]);return te(E,de,me)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(E){return{$$typeof:h,render:E}},_e.isValidElement=W,_e.lazy=function(E){return{$$typeof:g,_payload:{_status:-1,_result:E},_init:oe}},_e.memo=function(E,Y){return{$$typeof:p,type:E,compare:Y===void 0?null:Y}},_e.startTransition=function(E){var Y=K.T,k={};K.T=k;try{var ne=E(),me=K.S;me!==null&&me(k,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(B,Ce)}catch(de){Ce(de)}finally{Y!==null&&k.types!==null&&(Y.types=k.types),K.T=Y}},_e.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},_e.use=function(E){return K.H.use(E)},_e.useActionState=function(E,Y,k){return K.H.useActionState(E,Y,k)},_e.useCallback=function(E,Y){return K.H.useCallback(E,Y)},_e.useContext=function(E){return K.H.useContext(E)},_e.useDebugValue=function(){},_e.useDeferredValue=function(E,Y){return K.H.useDeferredValue(E,Y)},_e.useEffect=function(E,Y){return K.H.useEffect(E,Y)},_e.useEffectEvent=function(E){return K.H.useEffectEvent(E)},_e.useId=function(){return K.H.useId()},_e.useImperativeHandle=function(E,Y,k){return K.H.useImperativeHandle(E,Y,k)},_e.useInsertionEffect=function(E,Y){return K.H.useInsertionEffect(E,Y)},_e.useLayoutEffect=function(E,Y){return K.H.useLayoutEffect(E,Y)},_e.useMemo=function(E,Y){return K.H.useMemo(E,Y)},_e.useOptimistic=function(E,Y){return K.H.useOptimistic(E,Y)},_e.useReducer=function(E,Y,k){return K.H.useReducer(E,Y,k)},_e.useRef=function(E){return K.H.useRef(E)},_e.useState=function(E){return K.H.useState(E)},_e.useSyncExternalStore=function(E,Y,k){return K.H.useSyncExternalStore(E,Y,k)},_e.useTransition=function(){return K.H.useTransition()},_e.version="19.2.4",_e}var My;function od(){return My||(My=1,mf.exports=S1()),mf.exports}var re=od(),yf={exports:{}},Ss={},gf={exports:{}},bf={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var zy;function _1(){return zy||(zy=1,(function(i){function n(q,J){var oe=q.length;q.push(J);e:for(;0<oe;){var Ce=oe-1>>>1,A=q[Ce];if(0<u(A,J))q[Ce]=J,q[oe]=A,oe=Ce;else break e}}function a(q){return q.length===0?null:q[0]}function s(q){if(q.length===0)return null;var J=q[0],oe=q.pop();if(oe!==J){q[0]=oe;e:for(var Ce=0,A=q.length,E=A>>>1;Ce<E;){var Y=2*(Ce+1)-1,k=q[Y],ne=Y+1,me=q[ne];if(0>u(k,oe))ne<A&&0>u(me,k)?(q[Ce]=me,q[ne]=oe,Ce=ne):(q[Ce]=k,q[Y]=oe,Ce=Y);else if(ne<A&&0>u(me,oe))q[Ce]=me,q[ne]=oe,Ce=ne;else break e}}return J}function u(q,J){var oe=q.sortIndex-J.sortIndex;return oe!==0?oe:q.id-J.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var f=Date,h=f.now();i.unstable_now=function(){return f.now()-h}}var m=[],p=[],g=1,b=null,_=3,v=!1,N=!1,w=!1,D=!1,C=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function Q(q){for(var J=a(p);J!==null;){if(J.callback===null)s(p);else if(J.startTime<=q)s(p),J.sortIndex=J.expirationTime,n(m,J);else break;J=a(p)}}function X(q){if(w=!1,Q(q),!N)if(a(m)!==null)N=!0,B||(B=!0,P());else{var J=a(p);J!==null&&be(X,J.startTime-q)}}var B=!1,K=-1,$=5,te=-1;function fe(){return D?!0:!(i.unstable_now()-te<$)}function W(){if(D=!1,B){var q=i.unstable_now();te=q;var J=!0;try{e:{N=!1,w&&(w=!1,H(K),K=-1),v=!0;var oe=_;try{t:{for(Q(q),b=a(m);b!==null&&!(b.expirationTime>q&&fe());){var Ce=b.callback;if(typeof Ce=="function"){b.callback=null,_=b.priorityLevel;var A=Ce(b.expirationTime<=q);if(q=i.unstable_now(),typeof A=="function"){b.callback=A,Q(q),J=!0;break t}b===a(m)&&s(m),Q(q)}else s(m);b=a(m)}if(b!==null)J=!0;else{var E=a(p);E!==null&&be(X,E.startTime-q),J=!1}}break e}finally{b=null,_=oe,v=!1}J=void 0}}finally{J?P():B=!1}}}var P;if(typeof M=="function")P=function(){M(W)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Ee=ye.port2;ye.port1.onmessage=W,P=function(){Ee.postMessage(null)}}else P=function(){C(W,0)};function be(q,J){K=C(function(){q(i.unstable_now())},J)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(q){q.callback=null},i.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<q?Math.floor(1e3/q):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(q){switch(_){case 1:case 2:case 3:var J=3;break;default:J=_}var oe=_;_=J;try{return q()}finally{_=oe}},i.unstable_requestPaint=function(){D=!0},i.unstable_runWithPriority=function(q,J){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var oe=_;_=q;try{return J()}finally{_=oe}},i.unstable_scheduleCallback=function(q,J,oe){var Ce=i.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Ce+oe:Ce):oe=Ce,q){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=oe+A,q={id:g++,callback:J,priorityLevel:q,startTime:oe,expirationTime:A,sortIndex:-1},oe>Ce?(q.sortIndex=oe,n(p,q),a(m)===null&&q===a(p)&&(w?(H(K),K=-1):w=!0,be(X,oe-Ce))):(q.sortIndex=A,n(m,q),N||v||(N=!0,B||(B=!0,P()))),q},i.unstable_shouldYield=fe,i.unstable_wrapCallback=function(q){var J=_;return function(){var oe=_;_=J;try{return q.apply(this,arguments)}finally{_=oe}}}})(bf)),bf}var Dy;function k1(){return Dy||(Dy=1,gf.exports=_1()),gf.exports}var vf={exports:{}},Tt={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var jy;function w1(){if(jy)return Tt;jy=1;var i=od();function n(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal");function o(m,p,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:m,containerInfo:p,implementation:g}}var f=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Tt.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return o(m,p,null,g)},Tt.flushSync=function(m){var p=f.T,g=s.p;try{if(f.T=null,s.p=2,m)return m()}finally{f.T=p,s.p=g,s.d.f()}},Tt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(m,p))},Tt.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},Tt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,b=h(g,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?s.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:_,fetchPriority:v}):g==="script"&&s.d.X(m,{crossOrigin:b,integrity:_,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Tt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=h(p.as,p.crossOrigin);s.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(m)},Tt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,b=h(g,p.crossOrigin);s.d.L(m,g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Tt.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=h(p.as,p.crossOrigin);s.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(m)},Tt.requestFormReset=function(m){s.d.r(m)},Tt.unstable_batchedUpdates=function(m,p){return m(p)},Tt.useFormState=function(m,p,g){return f.H.useFormState(m,p,g)},Tt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Tt.version="19.2.4",Tt}var Ry;function A1(){if(Ry)return vf.exports;Ry=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),vf.exports=w1(),vf.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var By;function T1(){if(By)return Ss;By=1;var i=k1(),n=od(),a=A1();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(o(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(s(188));return t!==e?null:e}for(var l=e,r=t;;){var c=l.return;if(c===null)break;var d=c.alternate;if(d===null){if(r=c.return,r!==null){l=r;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===l)return m(c),e;if(d===r)return m(c),t;d=d.sibling}throw Error(s(188))}if(l.return!==r.return)l=c,r=d;else{for(var y=!1,x=c.child;x;){if(x===l){y=!0,l=c,r=d;break}if(x===r){y=!0,r=c,l=d;break}x=x.sibling}if(!y){for(x=d.child;x;){if(x===l){y=!0,l=d,r=c;break}if(x===r){y=!0,r=d,l=c;break}x=x.sibling}if(!y)throw Error(s(189))}}if(l.alternate!==r)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,_=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),M=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function Ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case C:return"Profiler";case D:return"StrictMode";case X:return"Suspense";case B:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case M:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:Ee(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return Ee(e(t))}catch{}}return null}var be=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Ce=[],A=-1;function E(e){return{current:e}}function Y(e){0>A||(e.current=Ce[A],Ce[A]=null,A--)}function k(e,t){A++,Ce[A]=e.current,e.current=t}var ne=E(null),me=E(null),de=E(null),ze=E(null);function tt(e,t){switch(k(de,t),k(me,e),k(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Fm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fm(t),e=Wm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(ne),k(ne,e)}function Ke(){Y(ne),Y(me),Y(de)}function en(e){e.memoizedState!==null&&k(ze,e);var t=ne.current,l=Wm(t,e.type);t!==l&&(k(me,e),k(ne,l))}function Bn(e){me.current===e&&(Y(ne),Y(me)),ze.current===e&&(Y(ze),ys._currentValue=oe)}var El,$s;function Ln(e){if(El===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);El=t&&t[1]||"",$s=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+El+e+$s}var ba=!1;function va(e,t){if(!e||ba)return"";ba=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(U){var L=U}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(U){L=U}e.call(Z.prototype)}}else{try{throw Error()}catch(U){L=U}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(U){if(U&&L&&typeof U.stack=="string")return[U.stack,L.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=r.DetermineComponentFrameRoot(),y=d[0],x=d[1];if(y&&x){var T=y.split(`
44
- `),R=x.split(`
45
- `);for(c=r=0;r<T.length&&!T[r].includes("DetermineComponentFrameRoot");)r++;for(;c<R.length&&!R[c].includes("DetermineComponentFrameRoot");)c++;if(r===T.length||c===R.length)for(r=T.length-1,c=R.length-1;1<=r&&0<=c&&T[r]!==R[c];)c--;for(;1<=r&&0<=c;r--,c--)if(T[r]!==R[c]){if(r!==1||c!==1)do if(r--,c--,0>c||T[r]!==R[c]){var I=`
46
- `+T[r].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=r&&0<=c);break}}}finally{ba=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ln(l):""}function Xs(e,t){switch(e.tag){case 26:case 27:case 5:return Ln(e.type);case 16:return Ln("Lazy");case 13:return e.child!==t&&t!==null?Ln("Suspense Fallback"):Ln("Suspense");case 19:return Ln("SuspenseList");case 0:case 15:return va(e.type,!1);case 11:return va(e.type.render,!1);case 1:return va(e.type,!0);case 31:return Ln("Activity");default:return""}}function Js(e){try{var t="",l=null;do t+=Xs(e,l),l=e,e=e.return;while(e);return t}catch(r){return`
47
- Error generating stack: `+r.message+`
48
- `+r.stack}}var xa=Object.prototype.hasOwnProperty,Sa=i.unstable_scheduleCallback,Cl=i.unstable_cancelCallback,Fu=i.unstable_shouldYield,Wu=i.unstable_requestPaint,Et=i.unstable_now,Pu=i.unstable_getCurrentPriorityLevel,V=i.unstable_ImmediatePriority,ee=i.unstable_UserBlockingPriority,ge=i.unstable_NormalPriority,Oe=i.unstable_LowPriority,Ye=i.unstable_IdlePriority,Kt=i.log,qn=i.unstable_setDisableYieldValue,Ct=null,mt=null;function jt(e){if(typeof Kt=="function"&&qn(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Ct,e)}catch{}}var Xe=Math.clz32?Math.clz32:n0,ci=Math.log,gn=Math.LN2;function n0(e){return e>>>=0,e===0?32:31-(ci(e)/gn|0)|0}var Fs=256,Ws=262144,Ps=4194304;function Vi(e){var t=e&42;if(t!==0)return t;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:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;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 er(e,t,l){var r=e.pendingLanes;if(r===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var x=r&134217727;return x!==0?(r=x&~d,r!==0?c=Vi(r):(y&=x,y!==0?c=Vi(y):l||(l=x&~e,l!==0&&(c=Vi(l))))):(x=r&~d,x!==0?c=Vi(x):y!==0?c=Vi(y):l||(l=r&~e,l!==0&&(c=Vi(l)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,l=t&-t,d>=l||d===32&&(l&4194048)!==0)?t:c}function Ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function i0(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 zd(){var e=Ps;return Ps<<=1,(Ps&62914560)===0&&(Ps=4194304),e}function eo(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Nl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function a0(e,t,l,r,c,d){var y=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 x=e.entanglements,T=e.expirationTimes,R=e.hiddenUpdates;for(l=y&~l;0<l;){var I=31-Xe(l),Z=1<<I;x[I]=0,T[I]=-1;var L=R[I];if(L!==null)for(R[I]=null,I=0;I<L.length;I++){var U=L[I];U!==null&&(U.lane&=-536870913)}l&=~Z}r!==0&&Dd(e,r,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function Dd(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Xe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|l&261930}function jd(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var r=31-Xe(l),c=1<<r;c&t|e[r]&t&&(e[r]|=t),l&=~c}}function Rd(e,t){var l=t&-t;return l=(l&42)!==0?1:to(l),(l&(e.suspendedLanes|t))!==0?0:l}function to(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 no(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Bd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Sy(e.type))}function Ld(e,t){var l=J.p;try{return J.p=e,t()}finally{J.p=l}}var fi=Math.random().toString(36).slice(2),St="__reactFiber$"+fi,Rt="__reactProps$"+fi,_a="__reactContainer$"+fi,io="__reactEvents$"+fi,l0="__reactListeners$"+fi,s0="__reactHandles$"+fi,qd="__reactResources$"+fi,Ml="__reactMarker$"+fi;function ao(e){delete e[St],delete e[Rt],delete e[io],delete e[l0],delete e[s0]}function ka(e){var t=e[St];if(t)return t;for(var l=e.parentNode;l;){if(t=l[_a]||l[St]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=ly(e);e!==null;){if(l=e[St])return l;e=ly(e)}return t}e=l,l=e.parentNode}return null}function wa(e){if(e=e[St]||e[_a]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Aa(e){var t=e[qd];return t||(t=e[qd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Ml]=!0}var Ud=new Set,Hd={};function Gi(e,t){Ta(e,t),Ta(e+"Capture",t)}function Ta(e,t){for(Hd[e]=t,e=0;e<t.length;e++)Ud.add(t[e])}var r0=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]*$"),Id={},Yd={};function u0(e){return xa.call(Yd,e)?!0:xa.call(Id,e)?!1:r0.test(e)?Yd[e]=!0:(Id[e]=!0,!1)}function tr(e,t,l){if(u0(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function nr(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Un(e,t,l,r){if(r===null)e.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+r)}}function tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function o0(e,t,l){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lo(e){if(!e._valueTracker){var t=Vd(e)?"checked":"value";e._valueTracker=o0(e,t,""+e[t])}}function Gd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),r="";return e&&(r=Vd(e)?e.checked?"true":"false":e.value),e=r,e!==l?(t.setValue(e),!0):!1}function ir(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 c0=/[\n"\\]/g;function nn(e){return e.replace(c0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function so(e,t,l,r,c,d,y,x){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+tn(t)):e.value!==""+tn(t)&&(e.value=""+tn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?ro(e,y,tn(t)):l!=null?ro(e,y,tn(l)):r!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+tn(x):e.removeAttribute("name")}function Kd(e,t,l,r,c,d,y,x){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){lo(e);return}l=l!=null?""+tn(l):"",t=t!=null?""+tn(t):l,x||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=x?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),lo(e)}function ro(e,t,l){t==="number"&&ir(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ea(e,t,l,r){if(e=e.options,t){t={};for(var c=0;c<l.length;c++)t["$"+l[c]]=!0;for(l=0;l<e.length;l++)c=t.hasOwnProperty("$"+e[l].value),e[l].selected!==c&&(e[l].selected=c),c&&r&&(e[l].defaultSelected=!0)}else{for(l=""+tn(l),t=null,c=0;c<e.length;c++){if(e[c].value===l){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Zd(e,t,l){if(t!=null&&(t=""+tn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+tn(l):""}function Qd(e,t,l,r){if(t==null){if(r!=null){if(l!=null)throw Error(s(92));if(be(r)){if(1<r.length)throw Error(s(93));r=r[0]}l=r}l==null&&(l=""),t=l}l=tn(t),e.defaultValue=l,r=e.textContent,r===l&&r!==""&&r!==null&&(e.value=r),lo(e)}function Ca(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var f0=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 $d(e,t,l){var r=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,l):typeof l!="number"||l===0||f0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Xd(e,t,l){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&l[c]!==r&&$d(e,c,r)}else for(var d in t)t.hasOwnProperty(d)&&$d(e,d,t[d])}function uo(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 d0=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"]]),h0=/^[\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 ar(e){return h0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Hn(){}var oo=null;function co(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Oa=null,Na=null;function Jd(e){var t=wa(e);if(t&&(e=t.stateNode)){var l=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(so(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+nn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var r=l[t];if(r!==e&&r.form===e.form){var c=r[Rt]||null;if(!c)throw Error(s(90));so(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<l.length;t++)r=l[t],r.form===e.form&&Gd(r)}break e;case"textarea":Zd(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ea(e,!!l.multiple,t,!1)}}}var fo=!1;function Fd(e,t,l){if(fo)return e(t,l);fo=!0;try{var r=e(t);return r}finally{if(fo=!1,(Oa!==null||Na!==null)&&(Kr(),Oa&&(t=Oa,e=Na,Na=Oa=null,Jd(t),e)))for(t=0;t<e.length;t++)Jd(e[t])}}function Dl(e,t){var l=e.stateNode;if(l===null)return null;var r=l[Rt]||null;if(r===null)return null;l=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(s(231,t,typeof l));return l}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ho=!1;if(In)try{var jl={};Object.defineProperty(jl,"passive",{get:function(){ho=!0}}),window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{ho=!1}var di=null,po=null,lr=null;function Wd(){if(lr)return lr;var e,t=po,l=t.length,r,c="value"in di?di.value:di.textContent,d=c.length;for(e=0;e<l&&t[e]===c[e];e++);var y=l-e;for(r=1;r<=y&&t[l-r]===c[d-r];r++);return lr=c.slice(e,1<r?1-r:void 0)}function sr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rr(){return!0}function Pd(){return!1}function Bt(e){function t(l,r,c,d,y){this._reactName=l,this._targetInst=c,this.type=r,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(l=e[x],this[x]=l?l(d):d[x]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?rr:Pd,this.isPropagationStopped=Pd,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var Ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=Bt(Ki),Rl=b({},Ki,{view:0,detail:0}),p0=Bt(Rl),mo,yo,Bl,or=b({},Rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bo,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!==Bl&&(Bl&&e.type==="mousemove"?(mo=e.screenX-Bl.screenX,yo=e.screenY-Bl.screenY):yo=mo=0,Bl=e),mo)},movementY:function(e){return"movementY"in e?e.movementY:yo}}),eh=Bt(or),m0=b({},or,{dataTransfer:0}),y0=Bt(m0),g0=b({},Rl,{relatedTarget:0}),go=Bt(g0),b0=b({},Ki,{animationName:0,elapsedTime:0,pseudoElement:0}),v0=Bt(b0),x0=b({},Ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S0=Bt(x0),_0=b({},Ki,{data:0}),th=Bt(_0),k0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},w0={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 T0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=A0[e])?!!t[e]:!1}function bo(){return T0}var E0=b({},Rl,{key:function(e){if(e.key){var t=k0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?w0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bo,charCode:function(e){return e.type==="keypress"?sr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),C0=Bt(E0),O0=b({},or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nh=Bt(O0),N0=b({},Rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bo}),M0=Bt(N0),z0=b({},Ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),D0=Bt(z0),j0=b({},or,{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}),R0=Bt(j0),B0=b({},Ki,{newState:0,oldState:0}),L0=Bt(B0),q0=[9,13,27,32],vo=In&&"CompositionEvent"in window,Ll=null;In&&"documentMode"in document&&(Ll=document.documentMode);var U0=In&&"TextEvent"in window&&!Ll,ih=In&&(!vo||Ll&&8<Ll&&11>=Ll),ah=" ",lh=!1;function sh(e,t){switch(e){case"keyup":return q0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ma=!1;function H0(e,t){switch(e){case"compositionend":return rh(t);case"keypress":return t.which!==32?null:(lh=!0,ah);case"textInput":return e=t.data,e===ah&&lh?null:e;default:return null}}function I0(e,t){if(Ma)return e==="compositionend"||!vo&&sh(e,t)?(e=Wd(),lr=po=di=null,Ma=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ih&&t.locale!=="ko"?null:t.data;default:return null}}var Y0={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 t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Y0[e.type]:t==="textarea"}function oh(e,t,l,r){Oa?Na?Na.push(r):Na=[r]:Oa=r,t=Wr(t,"onChange"),0<t.length&&(l=new ur("onChange","change",null,l,r),e.push({event:l,listeners:t}))}var ql=null,Ul=null;function V0(e){Km(e,0)}function cr(e){var t=zl(e);if(Gd(t))return e}function ch(e,t){if(e==="change")return t}var fh=!1;if(In){var xo;if(In){var So="oninput"in document;if(!So){var dh=document.createElement("div");dh.setAttribute("oninput","return;"),So=typeof dh.oninput=="function"}xo=So}else xo=!1;fh=xo&&(!document.documentMode||9<document.documentMode)}function hh(){ql&&(ql.detachEvent("onpropertychange",ph),Ul=ql=null)}function ph(e){if(e.propertyName==="value"&&cr(Ul)){var t=[];oh(t,Ul,e,co(e)),Fd(V0,t)}}function G0(e,t,l){e==="focusin"?(hh(),ql=t,Ul=l,ql.attachEvent("onpropertychange",ph)):e==="focusout"&&hh()}function K0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cr(Ul)}function Z0(e,t){if(e==="click")return cr(t)}function Q0(e,t){if(e==="input"||e==="change")return cr(t)}function $0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:$0;function Hl(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),r=Object.keys(t);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var c=l[r];if(!xa.call(t,c)||!Zt(e[c],t[c]))return!1}return!0}function mh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yh(e,t){var l=mh(e);e=0;for(var r;l;){if(l.nodeType===3){if(r=e+l.textContent.length,e<=t&&r>=t)return{node:l,offset:t-e};e=r}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=mh(l)}}function gh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ir(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=ir(e.document)}return t}function _o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var X0=In&&"documentMode"in document&&11>=document.documentMode,za=null,ko=null,Il=null,wo=!1;function vh(e,t,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;wo||za==null||za!==ir(r)||(r=za,"selectionStart"in r&&_o(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Il&&Hl(Il,r)||(Il=r,r=Wr(ko,"onSelect"),0<r.length&&(t=new ur("onSelect","select",null,t,l),e.push({event:t,listeners:r}),t.target=za)))}function Zi(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Da={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},Ao={},xh={};In&&(xh=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function Qi(e){if(Ao[e])return Ao[e];if(!Da[e])return e;var t=Da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in xh)return Ao[e]=t[l];return e}var Sh=Qi("animationend"),_h=Qi("animationiteration"),kh=Qi("animationstart"),J0=Qi("transitionrun"),F0=Qi("transitionstart"),W0=Qi("transitioncancel"),wh=Qi("transitionend"),Ah=new Map,To="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(" ");To.push("scrollEnd");function bn(e,t){Ah.set(e,t),Gi(t,[e])}var fr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},an=[],ja=0,Eo=0;function dr(){for(var e=ja,t=Eo=ja=0;t<e;){var l=an[t];an[t++]=null;var r=an[t];an[t++]=null;var c=an[t];an[t++]=null;var d=an[t];if(an[t++]=null,r!==null&&c!==null){var y=r.pending;y===null?c.next=c:(c.next=y.next,y.next=c),r.pending=c}d!==0&&Th(l,c,d)}}function hr(e,t,l,r){an[ja++]=e,an[ja++]=t,an[ja++]=l,an[ja++]=r,Eo|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Co(e,t,l,r){return hr(e,t,l,r),pr(e)}function $i(e,t){return hr(e,null,null,t),pr(e)}function Th(e,t,l){e.lanes|=l;var r=e.alternate;r!==null&&(r.lanes|=l);for(var c=!1,d=e.return;d!==null;)d.childLanes|=l,r=d.alternate,r!==null&&(r.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-Xe(l),e=d.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=l|536870912),d):null}function pr(e){if(50<os)throw os=0,Lc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ra={};function P0(e,t,l,r){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=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,t,l,r){return new P0(e,t,l,r)}function Oo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var l=e.alternate;return l===null?(l=Qt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,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,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Eh(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,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,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mr(e,t,l,r,c,d){var y=0;if(r=e,typeof e=="function")Oo(e)&&(y=1);else if(typeof e=="string")y=a1(e,l,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=Qt(31,l,t,c),e.elementType=te,e.lanes=d,e;case w:return Xi(l.children,c,d,t);case D:y=8,c|=24;break;case C:return e=Qt(12,l,t,c|2),e.elementType=C,e.lanes=d,e;case X:return e=Qt(13,l,t,c),e.elementType=X,e.lanes=d,e;case B:return e=Qt(19,l,t,c),e.elementType=B,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:y=10;break e;case H:y=9;break e;case Q:y=11;break e;case K:y=14;break e;case $:y=16,r=null;break e}y=29,l=Error(s(130,e===null?"null":typeof e,"")),r=null}return t=Qt(y,l,t,c),t.elementType=e,t.type=r,t.lanes=d,t}function Xi(e,t,l,r){return e=Qt(7,e,r,t),e.lanes=l,e}function No(e,t,l){return e=Qt(6,e,null,t),e.lanes=l,e}function Ch(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function Mo(e,t,l){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oh=new WeakMap;function ln(e,t){if(typeof e=="object"&&e!==null){var l=Oh.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Js(t)},Oh.set(e,t),t)}return{value:e,source:t,stack:Js(t)}}var Ba=[],La=0,yr=null,Yl=0,sn=[],rn=0,hi=null,wn=1,An="";function Vn(e,t){Ba[La++]=Yl,Ba[La++]=yr,yr=e,Yl=t}function Nh(e,t,l){sn[rn++]=wn,sn[rn++]=An,sn[rn++]=hi,hi=e;var r=wn;e=An;var c=32-Xe(r)-1;r&=~(1<<c),l+=1;var d=32-Xe(t)+c;if(30<d){var y=c-c%5;d=(r&(1<<y)-1).toString(32),r>>=y,c-=y,wn=1<<32-Xe(t)+c|l<<c|r,An=d+e}else wn=1<<d|l<<c|r,An=e}function zo(e){e.return!==null&&(Vn(e,1),Nh(e,1,0))}function Do(e){for(;e===yr;)yr=Ba[--La],Ba[La]=null,Yl=Ba[--La],Ba[La]=null;for(;e===hi;)hi=sn[--rn],sn[rn]=null,An=sn[--rn],sn[rn]=null,wn=sn[--rn],sn[rn]=null}function Mh(e,t){sn[rn++]=wn,sn[rn++]=An,sn[rn++]=hi,wn=t.id,An=t.overflow,hi=e}var _t=null,Pe=null,Be=!1,pi=null,un=!1,jo=Error(s(519));function mi(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vl(ln(t,e)),jo}function zh(e){var t=e.stateNode,l=e.type,r=e.memoizedProps;switch(t[St]=e,t[Rt]=r,l){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(l=0;l<fs.length;l++)Me(fs[l],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),Kd(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),Qd(t,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||r.suppressHydrationWarning===!0||Xm(t.textContent,l)?(r.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),r.onScroll!=null&&Me("scroll",t),r.onScrollEnd!=null&&Me("scrollend",t),r.onClick!=null&&(t.onclick=Hn),t=!0):t=!1,t||mi(e,!0)}function Dh(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:un=!1;return;case 27:case 3:un=!0;return;default:_t=_t.return}}function qa(e){if(e!==_t)return!1;if(!Be)return Dh(e),Be=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Wc(e.type,e.memoizedProps)),l=!l),l&&Pe&&mi(e),Dh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Pe=ay(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Pe=ay(e)}else t===27?(t=Pe,Oi(e.type)?(e=af,af=null,Pe=e):Pe=t):Pe=_t?cn(e.stateNode.nextSibling):null;return!0}function Ji(){Pe=_t=null,Be=!1}function Ro(){var e=pi;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),pi=null),e}function Vl(e){pi===null?pi=[e]:pi.push(e)}var Bo=E(null),Fi=null,Gn=null;function yi(e,t,l){k(Bo,t._currentValue),t._currentValue=l}function Kn(e){e._currentValue=Bo.current,Y(Bo)}function Lo(e,t,l){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===l)break;e=e.return}}function qo(e,t,l,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var x=d;d=c;for(var T=0;T<t.length;T++)if(x.context===t[T]){d.lanes|=l,x=d.alternate,x!==null&&(x.lanes|=l),Lo(d.return,l,e),r||(y=null);break e}d=x.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(s(341));y.lanes|=l,d=y.alternate,d!==null&&(d.lanes|=l),Lo(y,l,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function Ua(e,t,l,r){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(s(387));if(y=y.memoizedProps,y!==null){var x=c.type;Zt(c.pendingProps.value,y.value)||(e!==null?e.push(x):e=[x])}}else if(c===ze.current){if(y=c.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ys):e=[ys])}c=c.return}e!==null&&qo(t,e,l,r),t.flags|=262144}function gr(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wi(e){Fi=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return jh(Fi,e)}function br(e,t){return Fi===null&&Wi(e),jh(e,t)}function jh(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Gn===null){if(e===null)throw Error(s(308));Gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gn=Gn.next=t;return l}var ev=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},tv=i.unstable_scheduleCallback,nv=i.unstable_NormalPriority,ct={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uo(){return{controller:new ev,data:new Map,refCount:0}}function Gl(e){e.refCount--,e.refCount===0&&tv(nv,function(){e.controller.abort()})}var Kl=null,Ho=0,Ha=0,Ia=null;function iv(e,t){if(Kl===null){var l=Kl=[];Ho=0,Ha=Vc(),Ia={status:"pending",value:void 0,then:function(r){l.push(r)}}}return Ho++,t.then(Rh,Rh),t}function Rh(){if(--Ho===0&&Kl!==null){Ia!==null&&(Ia.status="fulfilled");var e=Kl;Kl=null,Ha=0,Ia=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function av(e,t){var l=[],r={status:"pending",value:null,reason:null,then:function(c){l.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<l.length;c++)(0,l[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<l.length;c++)(0,l[c])(void 0)}),r}var Bh=q.S;q.S=function(e,t){vm=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iv(e,t),Bh!==null&&Bh(e,t)};var Pi=E(null);function Io(){var e=Pi.current;return e!==null?e:Je.pooledCache}function vr(e,t){t===null?k(Pi,Pi.current):k(Pi,t.pool)}function Lh(){var e=Io();return e===null?null:{parent:ct._currentValue,pool:e}}var Ya=Error(s(460)),Yo=Error(s(474)),xr=Error(s(542)),Sr={then:function(){}};function qh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uh(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Hn,Hn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e;default:if(typeof t.status=="string")t.then(Hn,Hn);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e}throw ta=t,Ya}}function ea(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ta=l,Ya):l}}var ta=null;function Hh(){if(ta===null)throw Error(s(459));var e=ta;return ta=null,e}function Ih(e){if(e===Ya||e===xr)throw Error(s(483))}var Va=null,Zl=0;function _r(e){var t=Zl;return Zl+=1,Va===null&&(Va=[]),Uh(Va,e,t)}function Ql(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function kr(e,t){throw t.$$typeof===_?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Yh(e){function t(z,O){if(e){var j=z.deletions;j===null?(z.deletions=[O],z.flags|=16):j.push(O)}}function l(z,O){if(!e)return null;for(;O!==null;)t(z,O),O=O.sibling;return null}function r(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function c(z,O){return z=Yn(z,O),z.index=0,z.sibling=null,z}function d(z,O,j){return z.index=j,e?(j=z.alternate,j!==null?(j=j.index,j<O?(z.flags|=67108866,O):j):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function y(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function x(z,O,j,G){return O===null||O.tag!==6?(O=No(j,z.mode,G),O.return=z,O):(O=c(O,j),O.return=z,O)}function T(z,O,j,G){var he=j.type;return he===w?I(z,O,j.props.children,G,j.key):O!==null&&(O.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===$&&ea(he)===O.type)?(O=c(O,j.props),Ql(O,j),O.return=z,O):(O=mr(j.type,j.key,j.props,null,z.mode,G),Ql(O,j),O.return=z,O)}function R(z,O,j,G){return O===null||O.tag!==4||O.stateNode.containerInfo!==j.containerInfo||O.stateNode.implementation!==j.implementation?(O=Mo(j,z.mode,G),O.return=z,O):(O=c(O,j.children||[]),O.return=z,O)}function I(z,O,j,G,he){return O===null||O.tag!==7?(O=Xi(j,z.mode,G,he),O.return=z,O):(O=c(O,j),O.return=z,O)}function Z(z,O,j){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=No(""+O,z.mode,j),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case v:return j=mr(O.type,O.key,O.props,null,z.mode,j),Ql(j,O),j.return=z,j;case N:return O=Mo(O,z.mode,j),O.return=z,O;case $:return O=ea(O),Z(z,O,j)}if(be(O)||P(O))return O=Xi(O,z.mode,j,null),O.return=z,O;if(typeof O.then=="function")return Z(z,_r(O),j);if(O.$$typeof===M)return Z(z,br(z,O),j);kr(z,O)}return null}function L(z,O,j,G){var he=O!==null?O.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return he!==null?null:x(z,O,""+j,G);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case v:return j.key===he?T(z,O,j,G):null;case N:return j.key===he?R(z,O,j,G):null;case $:return j=ea(j),L(z,O,j,G)}if(be(j)||P(j))return he!==null?null:I(z,O,j,G,null);if(typeof j.then=="function")return L(z,O,_r(j),G);if(j.$$typeof===M)return L(z,O,br(z,j),G);kr(z,j)}return null}function U(z,O,j,G,he){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return z=z.get(j)||null,x(O,z,""+G,he);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case v:return z=z.get(G.key===null?j:G.key)||null,T(O,z,G,he);case N:return z=z.get(G.key===null?j:G.key)||null,R(O,z,G,he);case $:return G=ea(G),U(z,O,j,G,he)}if(be(G)||P(G))return z=z.get(j)||null,I(O,z,G,he,null);if(typeof G.then=="function")return U(z,O,j,_r(G),he);if(G.$$typeof===M)return U(z,O,j,br(O,G),he);kr(O,G)}return null}function se(z,O,j,G){for(var he=null,qe=null,ue=O,Ae=O=0,je=null;ue!==null&&Ae<j.length;Ae++){ue.index>Ae?(je=ue,ue=null):je=ue.sibling;var Ue=L(z,ue,j[Ae],G);if(Ue===null){ue===null&&(ue=je);break}e&&ue&&Ue.alternate===null&&t(z,ue),O=d(Ue,O,Ae),qe===null?he=Ue:qe.sibling=Ue,qe=Ue,ue=je}if(Ae===j.length)return l(z,ue),Be&&Vn(z,Ae),he;if(ue===null){for(;Ae<j.length;Ae++)ue=Z(z,j[Ae],G),ue!==null&&(O=d(ue,O,Ae),qe===null?he=ue:qe.sibling=ue,qe=ue);return Be&&Vn(z,Ae),he}for(ue=r(ue);Ae<j.length;Ae++)je=U(ue,z,Ae,j[Ae],G),je!==null&&(e&&je.alternate!==null&&ue.delete(je.key===null?Ae:je.key),O=d(je,O,Ae),qe===null?he=je:qe.sibling=je,qe=je);return e&&ue.forEach(function(ji){return t(z,ji)}),Be&&Vn(z,Ae),he}function pe(z,O,j,G){if(j==null)throw Error(s(151));for(var he=null,qe=null,ue=O,Ae=O=0,je=null,Ue=j.next();ue!==null&&!Ue.done;Ae++,Ue=j.next()){ue.index>Ae?(je=ue,ue=null):je=ue.sibling;var ji=L(z,ue,Ue.value,G);if(ji===null){ue===null&&(ue=je);break}e&&ue&&ji.alternate===null&&t(z,ue),O=d(ji,O,Ae),qe===null?he=ji:qe.sibling=ji,qe=ji,ue=je}if(Ue.done)return l(z,ue),Be&&Vn(z,Ae),he;if(ue===null){for(;!Ue.done;Ae++,Ue=j.next())Ue=Z(z,Ue.value,G),Ue!==null&&(O=d(Ue,O,Ae),qe===null?he=Ue:qe.sibling=Ue,qe=Ue);return Be&&Vn(z,Ae),he}for(ue=r(ue);!Ue.done;Ae++,Ue=j.next())Ue=U(ue,z,Ae,Ue.value,G),Ue!==null&&(e&&Ue.alternate!==null&&ue.delete(Ue.key===null?Ae:Ue.key),O=d(Ue,O,Ae),qe===null?he=Ue:qe.sibling=Ue,qe=Ue);return e&&ue.forEach(function(m1){return t(z,m1)}),Be&&Vn(z,Ae),he}function $e(z,O,j,G){if(typeof j=="object"&&j!==null&&j.type===w&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case v:e:{for(var he=j.key;O!==null;){if(O.key===he){if(he=j.type,he===w){if(O.tag===7){l(z,O.sibling),G=c(O,j.props.children),G.return=z,z=G;break e}}else if(O.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===$&&ea(he)===O.type){l(z,O.sibling),G=c(O,j.props),Ql(G,j),G.return=z,z=G;break e}l(z,O);break}else t(z,O);O=O.sibling}j.type===w?(G=Xi(j.props.children,z.mode,G,j.key),G.return=z,z=G):(G=mr(j.type,j.key,j.props,null,z.mode,G),Ql(G,j),G.return=z,z=G)}return y(z);case N:e:{for(he=j.key;O!==null;){if(O.key===he)if(O.tag===4&&O.stateNode.containerInfo===j.containerInfo&&O.stateNode.implementation===j.implementation){l(z,O.sibling),G=c(O,j.children||[]),G.return=z,z=G;break e}else{l(z,O);break}else t(z,O);O=O.sibling}G=Mo(j,z.mode,G),G.return=z,z=G}return y(z);case $:return j=ea(j),$e(z,O,j,G)}if(be(j))return se(z,O,j,G);if(P(j)){if(he=P(j),typeof he!="function")throw Error(s(150));return j=he.call(j),pe(z,O,j,G)}if(typeof j.then=="function")return $e(z,O,_r(j),G);if(j.$$typeof===M)return $e(z,O,br(z,j),G);kr(z,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,O!==null&&O.tag===6?(l(z,O.sibling),G=c(O,j),G.return=z,z=G):(l(z,O),G=No(j,z.mode,G),G.return=z,z=G),y(z)):l(z,O)}return function(z,O,j,G){try{Zl=0;var he=$e(z,O,j,G);return Va=null,he}catch(ue){if(ue===Ya||ue===xr)throw ue;var qe=Qt(29,ue,null,z.mode);return qe.lanes=G,qe.return=z,qe}finally{}}}var na=Yh(!0),Vh=Yh(!1),gi=!1;function Vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Go(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vi(e,t,l){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(He&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=pr(e),Th(e,null,l),t}return hr(e,r,t,l),pr(e)}function $l(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,jd(e,l)}}function Ko(e,t){var l=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var c=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,l=l.next}while(l!==null);d===null?c=d=t:d=d.next=t}else c=d=t;l={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Zo=!1;function Xl(){if(Zo){var e=Ia;if(e!==null)throw e}}function Jl(e,t,l,r){Zo=!1;var c=e.updateQueue;gi=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var T=x,R=T.next;T.next=null,y===null?d=R:y.next=R,y=T;var I=e.alternate;I!==null&&(I=I.updateQueue,x=I.lastBaseUpdate,x!==y&&(x===null?I.firstBaseUpdate=R:x.next=R,I.lastBaseUpdate=T))}if(d!==null){var Z=c.baseState;y=0,I=R=T=null,x=d;do{var L=x.lane&-536870913,U=L!==x.lane;if(U?(De&L)===L:(r&L)===L){L!==0&&L===Ha&&(Zo=!0),I!==null&&(I=I.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var se=e,pe=x;L=t;var $e=l;switch(pe.tag){case 1:if(se=pe.payload,typeof se=="function"){Z=se.call($e,Z,L);break e}Z=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=pe.payload,L=typeof se=="function"?se.call($e,Z,L):se,L==null)break e;Z=b({},Z,L);break e;case 2:gi=!0}}L=x.callback,L!==null&&(e.flags|=64,U&&(e.flags|=8192),U=c.callbacks,U===null?c.callbacks=[L]:U.push(L))}else U={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},I===null?(R=I=U,T=Z):I=I.next=U,y|=L;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;U=x,x=U.next,U.next=null,c.lastBaseUpdate=U,c.shared.pending=null}}while(!0);I===null&&(T=Z),c.baseState=T,c.firstBaseUpdate=R,c.lastBaseUpdate=I,d===null&&(c.shared.lanes=0),wi|=y,e.lanes=y,e.memoizedState=Z}}function Gh(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Kh(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Gh(l[e],t)}var Ga=E(null),wr=E(0);function Zh(e,t){e=ei,k(wr,e),k(Ga,t),ei=e|t.baseLanes}function Qo(){k(wr,ei),k(Ga,Ga.current)}function $o(){ei=wr.current,Y(Ga),Y(wr)}var $t=E(null),on=null;function xi(e){var t=e.alternate;k(lt,lt.current&1),k($t,e),on===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(on=e)}function Xo(e){k(lt,lt.current),k($t,e),on===null&&(on=e)}function Qh(e){e.tag===22?(k(lt,lt.current),k($t,e),on===null&&(on=e)):Si()}function Si(){k(lt,lt.current),k($t,$t.current)}function Xt(e){Y($t),on===e&&(on=null),Y(lt)}var lt=E(0);function Ar(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||tf(l)||nf(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zn=0,we=null,Ze=null,ft=null,Tr=!1,Ka=!1,ia=!1,Er=0,Fl=0,Za=null,lv=0;function it(){throw Error(s(321))}function Jo(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Zt(e[l],t[l]))return!1;return!0}function Fo(e,t,l,r,c,d){return Zn=d,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Np:dc,ia=!1,d=l(r,c),ia=!1,Ka&&(d=Xh(t,l,r,c)),$h(e),d}function $h(e){q.H=es;var t=Ze!==null&&Ze.next!==null;if(Zn=0,ft=Ze=we=null,Tr=!1,Fl=0,Za=null,t)throw Error(s(300));e===null||dt||(e=e.dependencies,e!==null&&gr(e)&&(dt=!0))}function Xh(e,t,l,r){we=e;var c=0;do{if(Ka&&(Za=null),Fl=0,Ka=!1,25<=c)throw Error(s(301));if(c+=1,ft=Ze=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}q.H=Mp,d=t(l,r)}while(Ka);return d}function sv(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Wl(t):t,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(we.flags|=1024),t}function Wo(){var e=Er!==0;return Er=0,e}function Po(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function ec(e){if(Tr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Tr=!1}Zn=0,ft=Ze=we=null,Ka=!1,Fl=Er=0,Za=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?we.memoizedState=ft=e:ft=ft.next=e,ft}function st(){if(Ze===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=ft===null?we.memoizedState:ft.next;if(t!==null)ft=t,Ze=e;else{if(e===null)throw we.alternate===null?Error(s(467)):Error(s(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},ft===null?we.memoizedState=ft=e:ft=ft.next=e}return ft}function Cr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wl(e){var t=Fl;return Fl+=1,Za===null&&(Za=[]),e=Uh(Za,e,t),t=we,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Np:dc),e}function Or(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wl(e);if(e.$$typeof===M)return kt(e)}throw Error(s(438,String(e)))}function tc(e){var t=null,l=we.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var r=we.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Cr(),we.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),r=0;r<e;r++)l[r]=fe;return t.index++,l}function Qn(e,t){return typeof t=="function"?t(e):t}function Nr(e){var t=st();return nc(t,Ze,e)}function nc(e,t,l){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=l;var c=e.baseQueue,d=r.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}t.baseQueue=c=d,r.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var x=y=null,T=null,R=t,I=!1;do{var Z=R.lane&-536870913;if(Z!==R.lane?(De&Z)===Z:(Zn&Z)===Z){var L=R.revertLane;if(L===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Z===Ha&&(I=!0);else if((Zn&L)===L){R=R.next,L===Ha&&(I=!0);continue}else Z={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},T===null?(x=T=Z,y=d):T=T.next=Z,we.lanes|=L,wi|=L;Z=R.action,ia&&l(d,Z),d=R.hasEagerState?R.eagerState:l(d,Z)}else L={lane:Z,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},T===null?(x=T=L,y=d):T=T.next=L,we.lanes|=Z,wi|=Z;R=R.next}while(R!==null&&R!==t);if(T===null?y=d:T.next=x,!Zt(d,e.memoizedState)&&(dt=!0,I&&(l=Ia,l!==null)))throw l;e.memoizedState=d,e.baseState=y,e.baseQueue=T,r.lastRenderedState=d}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ic(e){var t=st(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var r=l.dispatch,c=l.pending,d=t.memoizedState;if(c!==null){l.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);Zt(d,t.memoizedState)||(dt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),l.lastRenderedState=d}return[d,r]}function Jh(e,t,l){var r=we,c=st(),d=Be;if(d){if(l===void 0)throw Error(s(407));l=l()}else l=t();var y=!Zt((Ze||c).memoizedState,l);if(y&&(c.memoizedState=l,dt=!0),c=c.queue,sc(Ph.bind(null,r,c,e),[e]),c.getSnapshot!==t||y||ft!==null&&ft.memoizedState.tag&1){if(r.flags|=2048,Qa(9,{destroy:void 0},Wh.bind(null,r,c,l,t),null),Je===null)throw Error(s(349));d||(Zn&127)!==0||Fh(r,t,l)}return l}function Fh(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=we.updateQueue,t===null?(t=Cr(),we.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Wh(e,t,l,r){t.value=l,t.getSnapshot=r,ep(t)&&tp(e)}function Ph(e,t,l){return l(function(){ep(t)&&tp(e)})}function ep(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Zt(e,l)}catch{return!0}}function tp(e){var t=$i(e,2);t!==null&&It(t,e,2)}function ac(e){var t=Ot();if(typeof e=="function"){var l=e;if(e=l(),ia){jt(!0);try{l()}finally{jt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:e},t}function np(e,t,l,r){return e.baseState=l,nc(e,Ze,typeof r=="function"?r:Qn)}function rv(e,t,l,r,c){if(Dr(e))throw Error(s(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};q.T!==null?l(!0):d.isTransition=!1,r(d),l=t.pending,l===null?(d.next=t.pending=d,ip(t,d)):(d.next=l.next,t.pending=l.next=d)}}function ip(e,t){var l=t.action,r=t.payload,c=e.state;if(t.isTransition){var d=q.T,y={};q.T=y;try{var x=l(c,r),T=q.S;T!==null&&T(y,x),ap(e,t,x)}catch(R){lc(e,t,R)}finally{d!==null&&y.types!==null&&(d.types=y.types),q.T=d}}else try{d=l(c,r),ap(e,t,d)}catch(R){lc(e,t,R)}}function ap(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){lp(e,t,r)},function(r){return lc(e,t,r)}):lp(e,t,l)}function lp(e,t,l){t.status="fulfilled",t.value=l,sp(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,ip(e,l)))}function lc(e,t,l){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=l,sp(t),t=t.next;while(t!==r)}e.action=null}function sp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rp(e,t){return t}function up(e,t){if(Be){var l=Je.formState;if(l!==null){e:{var r=we;if(Be){if(Pe){t:{for(var c=Pe,d=un;c.nodeType!==8;){if(!d){c=null;break t}if(c=cn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){Pe=cn(c.nextSibling),r=c.data==="F!";break e}}mi(r)}r=!1}r&&(t=l[0])}}return l=Ot(),l.memoizedState=l.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rp,lastRenderedState:t},l.queue=r,l=Ep.bind(null,we,r),r.dispatch=l,r=ac(!1),d=fc.bind(null,we,!1,r.queue),r=Ot(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,l=rv.bind(null,we,c,d,l),c.dispatch=l,r.memoizedState=e,[t,l,!1]}function op(e){var t=st();return cp(t,Ze,e)}function cp(e,t,l){if(t=nc(e,t,rp)[0],e=Nr(Qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Wl(t)}catch(y){throw y===Ya?xr:y}else r=t;t=st();var c=t.queue,d=c.dispatch;return l!==t.memoizedState&&(we.flags|=2048,Qa(9,{destroy:void 0},uv.bind(null,c,l),null)),[r,d,e]}function uv(e,t){e.action=t}function fp(e){var t=st(),l=Ze;if(l!==null)return cp(t,l,e);st(),t=t.memoizedState,l=st();var r=l.queue.dispatch;return l.memoizedState=e,[t,r,!1]}function Qa(e,t,l,r){return e={tag:e,create:l,deps:r,inst:t,next:null},t=we.updateQueue,t===null&&(t=Cr(),we.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(r=l.next,l.next=e,e.next=r,t.lastEffect=e),e}function dp(){return st().memoizedState}function Mr(e,t,l,r){var c=Ot();we.flags|=e,c.memoizedState=Qa(1|t,{destroy:void 0},l,r===void 0?null:r)}function zr(e,t,l,r){var c=st();r=r===void 0?null:r;var d=c.memoizedState.inst;Ze!==null&&r!==null&&Jo(r,Ze.memoizedState.deps)?c.memoizedState=Qa(t,d,l,r):(we.flags|=e,c.memoizedState=Qa(1|t,d,l,r))}function hp(e,t){Mr(8390656,8,e,t)}function sc(e,t){zr(2048,8,e,t)}function ov(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Cr(),we.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function pp(e){var t=st().memoizedState;return ov({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function mp(e,t){return zr(4,2,e,t)}function yp(e,t){return zr(4,4,e,t)}function gp(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bp(e,t,l){l=l!=null?l.concat([e]):null,zr(4,4,gp.bind(null,t,e),l)}function rc(){}function vp(e,t){var l=st();t=t===void 0?null:t;var r=l.memoizedState;return t!==null&&Jo(t,r[1])?r[0]:(l.memoizedState=[e,t],e)}function xp(e,t){var l=st();t=t===void 0?null:t;var r=l.memoizedState;if(t!==null&&Jo(t,r[1]))return r[0];if(r=e(),ia){jt(!0);try{e()}finally{jt(!1)}}return l.memoizedState=[r,t],r}function uc(e,t,l){return l===void 0||(Zn&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Sm(),we.lanes|=e,wi|=e,l)}function Sp(e,t,l,r){return Zt(l,t)?l:Ga.current!==null?(e=uc(e,l,r),Zt(e,t)||(dt=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(De&261930)===0?(dt=!0,e.memoizedState=l):(e=Sm(),we.lanes|=e,wi|=e,t)}function _p(e,t,l,r,c){var d=J.p;J.p=d!==0&&8>d?d:8;var y=q.T,x={};q.T=x,fc(e,!1,t,l);try{var T=c(),R=q.S;if(R!==null&&R(x,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var I=av(T,r);Pl(e,t,I,Wt(e))}else Pl(e,t,r,Wt(e))}catch(Z){Pl(e,t,{then:function(){},status:"rejected",reason:Z},Wt())}finally{J.p=d,y!==null&&x.types!==null&&(y.types=x.types),q.T=y}}function cv(){}function oc(e,t,l,r){if(e.tag!==5)throw Error(s(476));var c=kp(e).queue;_p(e,c,t,oe,l===null?cv:function(){return wp(e),l(r)})}function kp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:oe},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wp(e){var t=kp(e);t.next===null&&(t=e.alternate.memoizedState),Pl(e,t.next.queue,{},Wt())}function cc(){return kt(ys)}function Ap(){return st().memoizedState}function Tp(){return st().memoizedState}function fv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=bi(l);var r=vi(t,e,l);r!==null&&(It(r,t,l),$l(r,t,l)),t={cache:Uo()},e.payload=t;return}t=t.return}}function dv(e,t,l){var r=Wt();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Dr(e)?Cp(t,l):(l=Co(e,t,l,r),l!==null&&(It(l,e,r),Op(l,t,r)))}function Ep(e,t,l){var r=Wt();Pl(e,t,l,r)}function Pl(e,t,l,r){var c={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Dr(e))Cp(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,x=d(y,l);if(c.hasEagerState=!0,c.eagerState=x,Zt(x,y))return hr(e,t,c,0),Je===null&&dr(),!1}catch{}finally{}if(l=Co(e,t,c,r),l!==null)return It(l,e,r),Op(l,t,r),!0}return!1}function fc(e,t,l,r){if(r={lane:2,revertLane:Vc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Dr(e)){if(t)throw Error(s(479))}else t=Co(e,l,r,2),t!==null&&It(t,e,2)}function Dr(e){var t=e.alternate;return e===we||t!==null&&t===we}function Cp(e,t){Ka=Tr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Op(e,t,l){if((l&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,jd(e,l)}}var es={readContext:kt,use:Or,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};es.useEffectEvent=it;var Np={readContext:kt,use:Or,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:hp,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Mr(4194308,4,gp.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Mr(4194308,4,e,t)},useInsertionEffect:function(e,t){Mr(4,2,e,t)},useMemo:function(e,t){var l=Ot();t=t===void 0?null:t;var r=e();if(ia){jt(!0);try{e()}finally{jt(!1)}}return l.memoizedState=[r,t],r},useReducer:function(e,t,l){var r=Ot();if(l!==void 0){var c=l(t);if(ia){jt(!0);try{l(t)}finally{jt(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=dv.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=ac(e);var t=e.queue,l=Ep.bind(null,we,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:rc,useDeferredValue:function(e,t){var l=Ot();return uc(l,e,t)},useTransition:function(){var e=ac(!1);return e=_p.bind(null,we,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var r=we,c=Ot();if(Be){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),Je===null)throw Error(s(349));(De&127)!==0||Fh(r,t,l)}c.memoizedState=l;var d={value:l,getSnapshot:t};return c.queue=d,hp(Ph.bind(null,r,d,e),[e]),r.flags|=2048,Qa(9,{destroy:void 0},Wh.bind(null,r,d,l,t),null),l},useId:function(){var e=Ot(),t=Je.identifierPrefix;if(Be){var l=An,r=wn;l=(r&~(1<<32-Xe(r)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Er++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=lv++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:up,useActionState:up,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=fc.bind(null,we,!0,l),l.dispatch=t,[e,t]},useMemoCache:tc,useCacheRefresh:function(){return Ot().memoizedState=fv.bind(null,we)},useEffectEvent:function(e){var t=Ot(),l={impl:e};return t.memoizedState=l,function(){if((He&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},dc={readContext:kt,use:Or,useCallback:vp,useContext:kt,useEffect:sc,useImperativeHandle:bp,useInsertionEffect:mp,useLayoutEffect:yp,useMemo:xp,useReducer:Nr,useRef:dp,useState:function(){return Nr(Qn)},useDebugValue:rc,useDeferredValue:function(e,t){var l=st();return Sp(l,Ze.memoizedState,e,t)},useTransition:function(){var e=Nr(Qn)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Wl(e),t]},useSyncExternalStore:Jh,useId:Ap,useHostTransitionStatus:cc,useFormState:op,useActionState:op,useOptimistic:function(e,t){var l=st();return np(l,Ze,e,t)},useMemoCache:tc,useCacheRefresh:Tp};dc.useEffectEvent=pp;var Mp={readContext:kt,use:Or,useCallback:vp,useContext:kt,useEffect:sc,useImperativeHandle:bp,useInsertionEffect:mp,useLayoutEffect:yp,useMemo:xp,useReducer:ic,useRef:dp,useState:function(){return ic(Qn)},useDebugValue:rc,useDeferredValue:function(e,t){var l=st();return Ze===null?uc(l,e,t):Sp(l,Ze.memoizedState,e,t)},useTransition:function(){var e=ic(Qn)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Wl(e),t]},useSyncExternalStore:Jh,useId:Ap,useHostTransitionStatus:cc,useFormState:fp,useActionState:fp,useOptimistic:function(e,t){var l=st();return Ze!==null?np(l,Ze,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:tc,useCacheRefresh:Tp};Mp.useEffectEvent=pp;function hc(e,t,l,r){t=e.memoizedState,l=l(r,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var pc={enqueueSetState:function(e,t,l){e=e._reactInternals;var r=Wt(),c=bi(r);c.payload=t,l!=null&&(c.callback=l),t=vi(e,c,r),t!==null&&(It(t,e,r),$l(t,e,r))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var r=Wt(),c=bi(r);c.tag=1,c.payload=t,l!=null&&(c.callback=l),t=vi(e,c,r),t!==null&&(It(t,e,r),$l(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),r=bi(l);r.tag=2,t!=null&&(r.callback=t),t=vi(e,r,l),t!==null&&(It(t,e,l),$l(t,e,l))}};function zp(e,t,l,r,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,y):t.prototype&&t.prototype.isPureReactComponent?!Hl(l,r)||!Hl(c,d):!0}function Dp(e,t,l,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,r),t.state!==e&&pc.enqueueReplaceState(t,t.state,null)}function aa(e,t){var l=t;if("ref"in t){l={};for(var r in t)r!=="ref"&&(l[r]=t[r])}if(e=e.defaultProps){l===t&&(l=b({},l));for(var c in e)l[c]===void 0&&(l[c]=e[c])}return l}function jp(e){fr(e)}function Rp(e){console.error(e)}function Bp(e){fr(e)}function jr(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Lp(e,t,l){try{var r=e.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function mc(e,t,l){return l=bi(l),l.tag=3,l.payload={element:null},l.callback=function(){jr(e,t)},l}function qp(e){return e=bi(e),e.tag=3,e}function Up(e,t,l,r){var c=l.type.getDerivedStateFromError;if(typeof c=="function"){var d=r.value;e.payload=function(){return c(d)},e.callback=function(){Lp(t,l,r)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Lp(t,l,r),typeof c!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var x=r.stack;this.componentDidCatch(r.value,{componentStack:x!==null?x:""})})}function hv(e,t,l,r,c){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=l.alternate,t!==null&&Ua(t,l,c,!0),l=$t.current,l!==null){switch(l.tag){case 31:case 13:return on===null?Zr():l.alternate===null&&at===0&&(at=3),l.flags&=-257,l.flags|=65536,l.lanes=c,r===Sr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([r]):t.add(r),Hc(e,r,c)),!1;case 22:return l.flags|=65536,r===Sr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([r]):l.add(r)),Hc(e,r,c)),!1}throw Error(s(435,l.tag))}return Hc(e,r,c),Zr(),!1}if(Be)return t=$t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==jo&&(e=Error(s(422),{cause:r}),Vl(ln(e,l)))):(r!==jo&&(t=Error(s(423),{cause:r}),Vl(ln(t,l))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=ln(r,l),c=mc(e.stateNode,r,c),Ko(e,c),at!==4&&(at=2)),!1;var d=Error(s(520),{cause:r});if(d=ln(d,l),us===null?us=[d]:us.push(d),at!==4&&(at=2),t===null)return!0;r=ln(r,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=c&-c,l.lanes|=e,e=mc(l.stateNode,r,e),Ko(l,e),!1;case 1:if(t=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ai===null||!Ai.has(d))))return l.flags|=65536,c&=-c,l.lanes|=c,c=qp(c),Up(c,e,l,r),Ko(l,c),!1}l=l.return}while(l!==null);return!1}var yc=Error(s(461)),dt=!1;function wt(e,t,l,r){t.child=e===null?Vh(t,null,l,r):na(t,e.child,l,r)}function Hp(e,t,l,r,c){l=l.render;var d=t.ref;if("ref"in r){var y={};for(var x in r)x!=="ref"&&(y[x]=r[x])}else y=r;return Wi(t),r=Fo(e,t,l,y,d,c),x=Wo(),e!==null&&!dt?(Po(e,t,c),$n(e,t,c)):(Be&&x&&zo(t),t.flags|=1,wt(e,t,r,c),t.child)}function Ip(e,t,l,r,c){if(e===null){var d=l.type;return typeof d=="function"&&!Oo(d)&&d.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=d,Yp(e,t,d,r,c)):(e=mr(l.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!wc(e,c)){var y=d.memoizedProps;if(l=l.compare,l=l!==null?l:Hl,l(y,r)&&e.ref===t.ref)return $n(e,t,c)}return t.flags|=1,e=Yn(d,r),e.ref=t.ref,e.return=t,t.child=e}function Yp(e,t,l,r,c){if(e!==null){var d=e.memoizedProps;if(Hl(d,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=d,wc(e,c))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,$n(e,t,c)}return gc(e,t,l,r,c)}function Vp(e,t,l,r){var c=r.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~d}else r=0,t.child=null;return Gp(e,t,d,l,r)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,d!==null?d.cachePool:null),d!==null?Zh(t,d):Qo(),Qh(t);else return r=t.lanes=536870912,Gp(e,t,d!==null?d.baseLanes|l:l,l,r)}else d!==null?(vr(t,d.cachePool),Zh(t,d),Si(),t.memoizedState=null):(e!==null&&vr(t,null),Qo(),Si());return wt(e,t,c,l),t.child}function ts(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Gp(e,t,l,r,c){var d=Io();return d=d===null?null:{parent:ct._currentValue,pool:d},t.memoizedState={baseLanes:l,cachePool:d},e!==null&&vr(t,null),Qo(),Qh(t),e!==null&&Ua(e,t,r,!0),t.childLanes=c,null}function Rr(e,t){return t=Lr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kp(e,t,l){return na(t,e.child,null,l),e=Rr(t,t.pendingProps),e.flags|=2,Xt(t),t.memoizedState=null,e}function pv(e,t,l){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(r.mode==="hidden")return e=Rr(t,r),t.lanes=536870912,ts(null,e);if(Xo(t),(e=Pe)?(e=iy(e,un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi!==null?{id:wn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},l=Ch(e),l.return=t,t.child=l,_t=t,Pe=null)):e=null,e===null)throw mi(t);return t.lanes=536870912,null}return Rr(t,r)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Xo(t),c)if(t.flags&256)t.flags&=-257,t=Kp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(dt||Ua(e,t,l,!1),c=(l&e.childLanes)!==0,dt||c){if(r=Je,r!==null&&(y=Rd(r,l),y!==0&&y!==d.retryLane))throw d.retryLane=y,$i(e,y),It(r,e,y),yc;Zr(),t=Kp(e,t,l)}else e=d.treeContext,Pe=cn(y.nextSibling),_t=t,Be=!0,pi=null,un=!1,e!==null&&Mh(t,e),t=Rr(t,r),t.flags|=4096;return t}return e=Yn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Br(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function gc(e,t,l,r,c){return Wi(t),l=Fo(e,t,l,r,void 0,c),r=Wo(),e!==null&&!dt?(Po(e,t,c),$n(e,t,c)):(Be&&r&&zo(t),t.flags|=1,wt(e,t,l,c),t.child)}function Zp(e,t,l,r,c,d){return Wi(t),t.updateQueue=null,l=Xh(t,r,l,c),$h(e),r=Wo(),e!==null&&!dt?(Po(e,t,d),$n(e,t,d)):(Be&&r&&zo(t),t.flags|=1,wt(e,t,l,d),t.child)}function Qp(e,t,l,r,c){if(Wi(t),t.stateNode===null){var d=Ra,y=l.contextType;typeof y=="object"&&y!==null&&(d=kt(y)),d=new l(r,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=pc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=r,d.state=t.memoizedState,d.refs={},Vo(t),y=l.contextType,d.context=typeof y=="object"&&y!==null?kt(y):Ra,d.state=t.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(hc(t,l,y,r),d.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&pc.enqueueReplaceState(d,d.state,null),Jl(t,r,d,c),Xl(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){d=t.stateNode;var x=t.memoizedProps,T=aa(l,x);d.props=T;var R=d.context,I=l.contextType;y=Ra,typeof I=="object"&&I!==null&&(y=kt(I));var Z=l.getDerivedStateFromProps;I=typeof Z=="function"||typeof d.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,I||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x||R!==y)&&Dp(t,d,r,y),gi=!1;var L=t.memoizedState;d.state=L,Jl(t,r,d,c),Xl(),R=t.memoizedState,x||L!==R||gi?(typeof Z=="function"&&(hc(t,l,Z,r),R=t.memoizedState),(T=gi||zp(t,l,T,r,L,R,y))?(I||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"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=R),d.props=r,d.state=R,d.context=y,r=T):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{d=t.stateNode,Go(e,t),y=t.memoizedProps,I=aa(l,y),d.props=I,Z=t.pendingProps,L=d.context,R=l.contextType,T=Ra,typeof R=="object"&&R!==null&&(T=kt(R)),x=l.getDerivedStateFromProps,(R=typeof x=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==Z||L!==T)&&Dp(t,d,r,T),gi=!1,L=t.memoizedState,d.state=L,Jl(t,r,d,c),Xl();var U=t.memoizedState;y!==Z||L!==U||gi||e!==null&&e.dependencies!==null&&gr(e.dependencies)?(typeof x=="function"&&(hc(t,l,x,r),U=t.memoizedState),(I=gi||zp(t,l,I,r,L,U,T)||e!==null&&e.dependencies!==null&&gr(e.dependencies))?(R||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,U,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,U,T)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=U),d.props=r,d.state=U,d.context=T,r=I):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),r=!1)}return d=r,Br(e,t),r=(t.flags&128)!==0,d||r?(d=t.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&r?(t.child=na(t,e.child,null,c),t.child=na(t,null,l,c)):wt(e,t,l,c),t.memoizedState=d.state,e=t.child):e=$n(e,t,c),e}function $p(e,t,l,r){return Ji(),t.flags|=256,wt(e,t,l,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:Lh()}}function xc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ft),e}function Xp(e,t,l){var r=t.pendingProps,c=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(c?xi(t):Si(),(e=Pe)?(e=iy(e,un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi!==null?{id:wn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},l=Ch(e),l.return=t,t.child=l,_t=t,Pe=null)):e=null,e===null)throw mi(t);return nf(e)?t.lanes=32:t.lanes=536870912,null}var x=r.children;return r=r.fallback,c?(Si(),c=t.mode,x=Lr({mode:"hidden",children:x},c),r=Xi(r,c,l,null),x.return=t,r.return=t,x.sibling=r,t.child=x,r=t.child,r.memoizedState=vc(l),r.childLanes=xc(e,y,l),t.memoizedState=bc,ts(null,r)):(xi(t),Sc(t,x))}var T=e.memoizedState;if(T!==null&&(x=T.dehydrated,x!==null)){if(d)t.flags&256?(xi(t),t.flags&=-257,t=_c(e,t,l)):t.memoizedState!==null?(Si(),t.child=e.child,t.flags|=128,t=null):(Si(),x=r.fallback,c=t.mode,r=Lr({mode:"visible",children:r.children},c),x=Xi(x,c,l,null),x.flags|=2,r.return=t,x.return=t,r.sibling=x,t.child=r,na(t,e.child,null,l),r=t.child,r.memoizedState=vc(l),r.childLanes=xc(e,y,l),t.memoizedState=bc,t=ts(null,r));else if(xi(t),nf(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var R=y.dgst;y=R,r=Error(s(419)),r.stack="",r.digest=y,Vl({value:r,source:null,stack:null}),t=_c(e,t,l)}else if(dt||Ua(e,t,l,!1),y=(l&e.childLanes)!==0,dt||y){if(y=Je,y!==null&&(r=Rd(y,l),r!==0&&r!==T.retryLane))throw T.retryLane=r,$i(e,r),It(y,e,r),yc;tf(x)||Zr(),t=_c(e,t,l)}else tf(x)?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,Pe=cn(x.nextSibling),_t=t,Be=!0,pi=null,un=!1,e!==null&&Mh(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return c?(Si(),x=r.fallback,c=t.mode,T=e.child,R=T.sibling,r=Yn(T,{mode:"hidden",children:r.children}),r.subtreeFlags=T.subtreeFlags&65011712,R!==null?x=Yn(R,x):(x=Xi(x,c,l,null),x.flags|=2),x.return=t,r.return=t,r.sibling=x,t.child=r,ts(null,r),r=t.child,x=e.child.memoizedState,x===null?x=vc(l):(c=x.cachePool,c!==null?(T=ct._currentValue,c=c.parent!==T?{parent:T,pool:T}:c):c=Lh(),x={baseLanes:x.baseLanes|l,cachePool:c}),r.memoizedState=x,r.childLanes=xc(e,y,l),t.memoizedState=bc,ts(e.child,r)):(xi(t),l=e.child,e=l.sibling,l=Yn(l,{mode:"visible",children:r.children}),l.return=t,l.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=l,t.memoizedState=null,l)}function Sc(e,t){return t=Lr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Lr(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function _c(e,t,l){return na(t,e.child,null,l),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jp(e,t,l){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lo(e.return,t,l)}function kc(e,t,l,r,c,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:c,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=l,y.tailMode=c,y.treeForkCount=d)}function Fp(e,t,l){var r=t.pendingProps,c=r.revealOrder,d=r.tail;r=r.children;var y=lt.current,x=(y&2)!==0;if(x?(y=y&1|2,t.flags|=128):y&=1,k(lt,y),wt(e,t,r,l),r=Be?Yl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jp(e,l,t);else if(e.tag===19)Jp(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(l=t.child,c=null;l!==null;)e=l.alternate,e!==null&&Ar(e)===null&&(c=l),l=l.sibling;l=c,l===null?(c=t.child,t.child=null):(c=l.sibling,l.sibling=null),kc(t,!1,c,l,d,r);break;case"backwards":case"unstable_legacy-backwards":for(l=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ar(e)===null){t.child=c;break}e=c.sibling,c.sibling=l,l=c,c=e}kc(t,!0,l,null,d,r);break;case"together":kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function $n(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),wi|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ua(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,l=Yn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Yn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function wc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&gr(e)))}function mv(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),yi(t,ct,e.memoizedState.cache),Ji();break;case 27:case 5:en(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(xi(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Xp(e,t,l):(xi(t),e=$n(e,t,l),e!==null?e.sibling:null);xi(t);break;case 19:var c=(e.flags&128)!==0;if(r=(l&t.childLanes)!==0,r||(Ua(e,t,l,!1),r=(l&t.childLanes)!==0),c){if(r)return Fp(e,t,l);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),k(lt,lt.current),r)break;return null;case 22:return t.lanes=0,Vp(e,t,l,t.pendingProps);case 24:yi(t,ct,e.memoizedState.cache)}return $n(e,t,l)}function Wp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!wc(e,l)&&(t.flags&128)===0)return dt=!1,mv(e,t,l);dt=(e.flags&131072)!==0}else dt=!1,Be&&(t.flags&1048576)!==0&&Nh(t,Yl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ea(t.elementType),t.type=e,typeof e=="function")Oo(e)?(r=aa(e,r),t.tag=1,t=Qp(null,t,e,r,l)):(t.tag=0,t=gc(null,t,e,r,l));else{if(e!=null){var c=e.$$typeof;if(c===Q){t.tag=11,t=Hp(null,t,e,r,l);break e}else if(c===K){t.tag=14,t=Ip(null,t,e,r,l);break e}}throw t=Ee(e)||e,Error(s(306,t,""))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,l);case 1:return r=t.type,c=aa(r,t.pendingProps),Qp(e,t,r,c,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var d=t.memoizedState;c=d.element,Go(e,t),Jl(t,r,null,l);var y=t.memoizedState;if(r=y.cache,yi(t,ct,r),r!==d.cache&&qo(t,[ct],l,!0),Xl(),r=y.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=$p(e,t,r,l);break e}else if(r!==c){c=ln(Error(s(424)),t),Vl(c),t=$p(e,t,r,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Pe=cn(e.firstChild),_t=t,Be=!0,pi=null,un=!0,l=Vh(t,null,r,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ji(),r===c){t=$n(e,t,l);break e}wt(e,t,r,l)}t=t.child}return t;case 26:return Br(e,t),e===null?(l=oy(t.type,null,t.pendingProps,null))?t.memoizedState=l:Be||(l=t.type,e=t.pendingProps,r=Pr(de.current).createElement(l),r[St]=t,r[Rt]=e,At(r,l,e),bt(r),t.stateNode=r):t.memoizedState=oy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return en(t),e===null&&Be&&(r=t.stateNode=sy(t.type,t.pendingProps,de.current),_t=t,un=!0,c=Pe,Oi(t.type)?(af=c,Pe=cn(r.firstChild)):Pe=c),wt(e,t,t.pendingProps.children,l),Br(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((c=r=Pe)&&(r=Kv(r,t.type,t.pendingProps,un),r!==null?(t.stateNode=r,_t=t,Pe=cn(r.firstChild),un=!1,c=!0):c=!1),c||mi(t)),en(t),c=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,r=d.children,Wc(c,d)?r=null:y!==null&&Wc(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=Fo(e,t,sv,null,null,l),ys._currentValue=c),Br(e,t),wt(e,t,r,l),t.child;case 6:return e===null&&Be&&((e=l=Pe)&&(l=Zv(l,t.pendingProps,un),l!==null?(t.stateNode=l,_t=t,Pe=null,e=!0):e=!1),e||mi(t)),null;case 13:return Xp(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=na(t,null,r,l):wt(e,t,r,l),t.child;case 11:return Hp(e,t,t.type,t.pendingProps,l);case 7:return wt(e,t,t.pendingProps,l),t.child;case 8:return wt(e,t,t.pendingProps.children,l),t.child;case 12:return wt(e,t,t.pendingProps.children,l),t.child;case 10:return r=t.pendingProps,yi(t,t.type,r.value),wt(e,t,r.children,l),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,Wi(t),c=kt(c),r=r(c),t.flags|=1,wt(e,t,r,l),t.child;case 14:return Ip(e,t,t.type,t.pendingProps,l);case 15:return Yp(e,t,t.type,t.pendingProps,l);case 19:return Fp(e,t,l);case 31:return pv(e,t,l);case 22:return Vp(e,t,l,t.pendingProps);case 24:return Wi(t),r=kt(ct),e===null?(c=Io(),c===null&&(c=Je,d=Uo(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=l),c=d),t.memoizedState={parent:r,cache:c},Vo(t),yi(t,ct,c)):((e.lanes&l)!==0&&(Go(e,t),Jl(t,null,null,l),Xl()),c=e.memoizedState,d=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),yi(t,ct,r)):(r=d.cache,yi(t,ct,r),r!==c.cache&&qo(t,[ct],l,!0))),wt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Xn(e){e.flags|=4}function Ac(e,t,l,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Am())e.flags|=8192;else throw ta=Sr,Yo}else e.flags&=-16777217}function Pp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!py(t))if(Am())e.flags|=8192;else throw ta=Sr,Yo}function qr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?zd():536870912,e.lanes|=t,Fa|=t)}function ns(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,r=0;if(t)for(var c=e.child;c!==null;)l|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)l|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=l,t}function yv(e,t,l){var r=t.pendingProps;switch(Do(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return l=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Kn(ct),Ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(qa(t)?Xn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ro())),et(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Xn(t),d!==null?(et(t),Pp(t,d)):(et(t),Ac(t,c,null,r,l))):d?d!==e.memoizedState?(Xn(t),et(t),Pp(t,d)):(et(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Xn(t),et(t),Ac(t,c,e,r,l)),null;case 27:if(Bn(t),l=de.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Xn(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return et(t),null}e=ne.current,qa(t)?zh(t):(e=sy(c,r,l),t.stateNode=e,Xn(t))}return et(t),null;case 5:if(Bn(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Xn(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return et(t),null}if(d=ne.current,qa(t))zh(t);else{var y=Pr(de.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?y.createElement(c,{is:r.is}):y.createElement(c)}}d[St]=t,d[Rt]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(At(d,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Xn(t)}}return et(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Xn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(e=de.current,qa(t)){if(e=t.stateNode,l=t.memoizedProps,r=null,c=_t,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[St]=t,e=!!(e.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||Xm(e.nodeValue,l)),e||mi(t,!0)}else e=Pr(e).createTextNode(r),e[St]=t,t.stateNode=e}return et(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(r=qa(t),l!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[St]=t}else Ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else l=Ro(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Xt(t),t):(Xt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return et(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=qa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[St]=t}else Ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),c=!1}else c=Ro(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Xt(t),t):(Xt(t),null)}return Xt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=r!==null,e=e!==null&&e.memoizedState!==null,l&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==c&&(r.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),qr(t,t.updateQueue),et(t),null);case 4:return Ke(),e===null&&Qc(t.stateNode.containerInfo),et(t),null;case 10:return Kn(t.type),et(t),null;case 19:if(Y(lt),r=t.memoizedState,r===null)return et(t),null;if(c=(t.flags&128)!==0,d=r.rendering,d===null)if(c)ns(r,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Ar(e),d!==null){for(t.flags|=128,ns(r,!1),e=d.updateQueue,t.updateQueue=e,qr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Eh(l,e),l=l.sibling;return k(lt,lt.current&1|2),Be&&Vn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Et()>Vr&&(t.flags|=128,c=!0,ns(r,!1),t.lanes=4194304)}else{if(!c)if(e=Ar(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,qr(t,e),ns(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!Be)return et(t),null}else 2*Et()-r.renderingStartTime>Vr&&l!==536870912&&(t.flags|=128,c=!0,ns(r,!1),t.lanes=4194304);r.isBackwards?(d.sibling=t.child,t.child=d):(e=r.last,e!==null?e.sibling=d:t.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Et(),e.sibling=null,l=lt.current,k(lt,c?l&1|2:l&1),Be&&Vn(t,r.treeForkCount),e):(et(t),null);case 22:case 23:return Xt(t),$o(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(l&536870912)!==0&&(t.flags&128)===0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),l=t.updateQueue,l!==null&&qr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==l&&(t.flags|=2048),e!==null&&Y(Pi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kn(ct),et(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function gv(e,t){switch(Do(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kn(ct),Ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Bn(t),null;case 31:if(t.memoizedState!==null){if(Xt(t),t.alternate===null)throw Error(s(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(lt),null;case 4:return Ke(),null;case 10:return Kn(t.type),null;case 22:case 23:return Xt(t),$o(),e!==null&&Y(Pi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kn(ct),null;case 25:return null;default:return null}}function em(e,t){switch(Do(t),t.tag){case 3:Kn(ct),Ke();break;case 26:case 27:case 5:Bn(t);break;case 4:Ke();break;case 31:t.memoizedState!==null&&Xt(t);break;case 13:Xt(t);break;case 19:Y(lt);break;case 10:Kn(t.type);break;case 22:case 23:Xt(t),$o(),e!==null&&Y(Pi);break;case 24:Kn(ct)}}function is(e,t){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var c=r.next;l=c;do{if((l.tag&e)===e){r=void 0;var d=l.create,y=l.inst;r=d(),y.destroy=r}l=l.next}while(l!==c)}}catch(x){Ge(t,t.return,x)}}function _i(e,t,l){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var d=c.next;r=d;do{if((r.tag&e)===e){var y=r.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,c=t;var T=l,R=x;try{R()}catch(I){Ge(c,T,I)}}}r=r.next}while(r!==d)}}catch(I){Ge(t,t.return,I)}}function tm(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Kh(t,l)}catch(r){Ge(e,e.return,r)}}}function nm(e,t,l){l.props=aa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(r){Ge(e,t,r)}}function as(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof l=="function"?e.refCleanup=l(r):l.current=r}}catch(c){Ge(e,t,c)}}function Tn(e,t){var l=e.ref,r=e.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(c){Ge(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Ge(e,t,c)}else l.current=null}function im(e){var t=e.type,l=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break e;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(c){Ge(e,e.return,c)}}function Tc(e,t,l){try{var r=e.stateNode;Uv(r,e.type,l,t),r[Rt]=t}catch(c){Ge(e,e.return,c)}}function am(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oi(e.type)||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||am(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&&Oi(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 Cc(e,t,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Hn));else if(r!==4&&(r===27&&Oi(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Cc(e,t,l),e=e.sibling;e!==null;)Cc(e,t,l),e=e.sibling}function Ur(e,t,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(r!==4&&(r===27&&Oi(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ur(e,t,l),e=e.sibling;e!==null;)Ur(e,t,l),e=e.sibling}function lm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);At(t,r,l),t[St]=e,t[Rt]=l}catch(d){Ge(e,e.return,d)}}var Jn=!1,ht=!1,Oc=!1,sm=typeof WeakSet=="function"?WeakSet:Set,vt=null;function bv(e,t){if(e=e.containerInfo,Jc=su,e=bh(e),_o(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var c=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var y=0,x=-1,T=-1,R=0,I=0,Z=e,L=null;t:for(;;){for(var U;Z!==l||c!==0&&Z.nodeType!==3||(x=y+c),Z!==d||r!==0&&Z.nodeType!==3||(T=y+r),Z.nodeType===3&&(y+=Z.nodeValue.length),(U=Z.firstChild)!==null;)L=Z,Z=U;for(;;){if(Z===e)break t;if(L===l&&++R===c&&(x=y),L===d&&++I===r&&(T=y),(U=Z.nextSibling)!==null)break;Z=L,L=Z.parentNode}Z=U}l=x===-1||T===-1?null:{start:x,end:T}}else l=null}l=l||{start:0,end:0}}else l=null;for(Fc={focusedElem:e,selectionRange:l},su=!1,vt=t;vt!==null;)if(t=vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,vt=e;else for(;vt!==null;){switch(t=vt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)c=e[l],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=t,c=d.memoizedProps,d=d.memoizedState,r=l.stateNode;try{var se=aa(l.type,c);e=r.getSnapshotBeforeUpdate(se,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ge(l,l.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)ef(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ef(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,vt=e;break}vt=t.return}}function rm(e,t,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Wn(e,l),r&4&&is(5,l);break;case 1:if(Wn(e,l),r&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(y){Ge(l,l.return,y)}else{var c=aa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ge(l,l.return,y)}}r&64&&tm(l),r&512&&as(l,l.return);break;case 3:if(Wn(e,l),r&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Kh(e,t)}catch(y){Ge(l,l.return,y)}}break;case 27:t===null&&r&4&&lm(l);case 26:case 5:Wn(e,l),t===null&&r&4&&im(l),r&512&&as(l,l.return);break;case 12:Wn(e,l);break;case 31:Wn(e,l),r&4&&cm(e,l);break;case 13:Wn(e,l),r&4&&fm(e,l),r&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ev.bind(null,l),Qv(e,l))));break;case 22:if(r=l.memoizedState!==null||Jn,!r){t=t!==null&&t.memoizedState!==null||ht,c=Jn;var d=ht;Jn=r,(ht=t)&&!d?Pn(e,l,(l.subtreeFlags&8772)!==0):Wn(e,l),Jn=c,ht=d}break;case 30:break;default:Wn(e,l)}}function um(e){var t=e.alternate;t!==null&&(e.alternate=null,um(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ao(t)),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 nt=null,Lt=!1;function Fn(e,t,l){for(l=l.child;l!==null;)om(e,t,l),l=l.sibling}function om(e,t,l){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Ct,l)}catch{}switch(l.tag){case 26:ht||Tn(l,t),Fn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ht||Tn(l,t);var r=nt,c=Lt;Oi(l.type)&&(nt=l.stateNode,Lt=!1),Fn(e,t,l),hs(l.stateNode),nt=r,Lt=c;break;case 5:ht||Tn(l,t);case 6:if(r=nt,c=Lt,nt=null,Fn(e,t,l),nt=r,Lt=c,nt!==null)if(Lt)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(l.stateNode)}catch(d){Ge(l,t,d)}else try{nt.removeChild(l.stateNode)}catch(d){Ge(l,t,d)}break;case 18:nt!==null&&(Lt?(e=nt,ty(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ll(e)):ty(nt,l.stateNode));break;case 4:r=nt,c=Lt,nt=l.stateNode.containerInfo,Lt=!0,Fn(e,t,l),nt=r,Lt=c;break;case 0:case 11:case 14:case 15:_i(2,l,t),ht||_i(4,l,t),Fn(e,t,l);break;case 1:ht||(Tn(l,t),r=l.stateNode,typeof r.componentWillUnmount=="function"&&nm(l,t,r)),Fn(e,t,l);break;case 21:Fn(e,t,l);break;case 22:ht=(r=ht)||l.memoizedState!==null,Fn(e,t,l),ht=r;break;default:Fn(e,t,l)}}function cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ll(e)}catch(l){Ge(t,t.return,l)}}}function fm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ll(e)}catch(l){Ge(t,t.return,l)}}function vv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sm),t;default:throw Error(s(435,e.tag))}}function Hr(e,t){var l=vv(e);t.forEach(function(r){if(!l.has(r)){l.add(r);var c=Cv.bind(null,e,r);r.then(c,c)}})}function qt(e,t){var l=t.deletions;if(l!==null)for(var r=0;r<l.length;r++){var c=l[r],d=e,y=t,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(Oi(x.type)){nt=x.stateNode,Lt=!1;break e}break;case 5:nt=x.stateNode,Lt=!1;break e;case 3:case 4:nt=x.stateNode.containerInfo,Lt=!0;break e}x=x.return}if(nt===null)throw Error(s(160));om(d,y,c),nt=null,Lt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dm(t,e),t=t.sibling}var vn=null;function dm(e,t){var l=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qt(t,e),Ut(e),r&4&&(_i(3,e,e.return),is(3,e),_i(5,e,e.return));break;case 1:qt(t,e),Ut(e),r&512&&(ht||l===null||Tn(l,l.return)),r&64&&Jn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:var c=vn;if(qt(t,e),Ut(e),r&512&&(ht||l===null||Tn(l,l.return)),r&4){var d=l!==null?l.memoizedState:null;if(r=e.memoizedState,l===null)if(r===null)if(e.stateNode===null){e:{r=e.type,l=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Ml]||d[St]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(r),c.head.insertBefore(d,c.querySelector("head > title"))),At(d,r,l),d[St]=e,bt(d),r=d;break e;case"link":var y=dy("link","href",c).get(r+(l.href||""));if(y){for(var x=0;x<y.length;x++)if(d=y[x],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)){y.splice(x,1);break t}}d=c.createElement(r),At(d,r,l),c.head.appendChild(d);break;case"meta":if(y=dy("meta","content",c).get(r+(l.content||""))){for(x=0;x<y.length;x++)if(d=y[x],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)){y.splice(x,1);break t}}d=c.createElement(r),At(d,r,l),c.head.appendChild(d);break;default:throw Error(s(468,r))}d[St]=e,bt(d),r=d}e.stateNode=r}else hy(c,e.type,e.stateNode);else e.stateNode=fy(c,r,e.memoizedProps);else d!==r?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,r===null?hy(c,e.type,e.stateNode):fy(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Tc(e,e.memoizedProps,l.memoizedProps)}break;case 27:qt(t,e),Ut(e),r&512&&(ht||l===null||Tn(l,l.return)),l!==null&&r&4&&Tc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(qt(t,e),Ut(e),r&512&&(ht||l===null||Tn(l,l.return)),e.flags&32){c=e.stateNode;try{Ca(c,"")}catch(se){Ge(e,e.return,se)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,Tc(e,c,l!==null?l.memoizedProps:c)),r&1024&&(Oc=!0);break;case 6:if(qt(t,e),Ut(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,l=e.stateNode;try{l.nodeValue=r}catch(se){Ge(e,e.return,se)}}break;case 3:if(nu=null,c=vn,vn=eu(t.containerInfo),qt(t,e),vn=c,Ut(e),r&4&&l!==null&&l.memoizedState.isDehydrated)try{ll(t.containerInfo)}catch(se){Ge(e,e.return,se)}Oc&&(Oc=!1,hm(e));break;case 4:r=vn,vn=eu(e.stateNode.containerInfo),qt(t,e),Ut(e),vn=r;break;case 12:qt(t,e),Ut(e);break;case 31:qt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hr(e,r)));break;case 13:qt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Yr=Et()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hr(e,r)));break;case 22:c=e.memoizedState!==null;var T=l!==null&&l.memoizedState!==null,R=Jn,I=ht;if(Jn=R||c,ht=I||T,qt(t,e),ht=I,Jn=R,Ut(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(l===null||T||Jn||ht||la(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){T=l=t;try{if(d=T.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=T.stateNode;var Z=T.memoizedProps.style,L=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;x.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(se){Ge(T,T.return,se)}}}else if(t.tag===6){if(l===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(se){Ge(T,T.return,se)}}}else if(t.tag===18){if(l===null){T=t;try{var U=T.stateNode;c?ny(U,!0):ny(T.stateNode,!1)}catch(se){Ge(T,T.return,se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,Hr(e,l))));break;case 19:qt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hr(e,r)));break;case 30:break;case 21:break;default:qt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var l,r=e.return;r!==null;){if(am(r)){l=r;break}r=r.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var c=l.stateNode,d=Ec(e);Ur(e,d,c);break;case 5:var y=l.stateNode;l.flags&32&&(Ca(y,""),l.flags&=-33);var x=Ec(e);Ur(e,x,y);break;case 3:case 4:var T=l.stateNode.containerInfo,R=Ec(e);Cc(e,R,T);break;default:throw Error(s(161))}}catch(I){Ge(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rm(e,t.alternate,t),t=t.sibling}function la(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_i(4,t,t.return),la(t);break;case 1:Tn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&nm(t,t.return,l),la(t);break;case 27:hs(t.stateNode);case 26:case 5:Tn(t,t.return),la(t);break;case 22:t.memoizedState===null&&la(t);break;case 30:la(t);break;default:la(t)}e=e.sibling}}function Pn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:Pn(c,d,l),is(4,d);break;case 1:if(Pn(c,d,l),r=d,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(R){Ge(r,r.return,R)}if(r=d,c=r.updateQueue,c!==null){var x=r.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)Gh(T[c],x)}catch(R){Ge(r,r.return,R)}}l&&y&64&&tm(d),as(d,d.return);break;case 27:lm(d);case 26:case 5:Pn(c,d,l),l&&r===null&&y&4&&im(d),as(d,d.return);break;case 12:Pn(c,d,l);break;case 31:Pn(c,d,l),l&&y&4&&cm(c,d);break;case 13:Pn(c,d,l),l&&y&4&&fm(c,d);break;case 22:d.memoizedState===null&&Pn(c,d,l),as(d,d.return);break;case 30:break;default:Pn(c,d,l)}t=t.sibling}}function Nc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Gl(l))}function Mc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gl(e))}function xn(e,t,l,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pm(e,t,l,r),t=t.sibling}function pm(e,t,l,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:xn(e,t,l,r),c&2048&&is(9,t);break;case 1:xn(e,t,l,r);break;case 3:xn(e,t,l,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gl(e)));break;case 12:if(c&2048){xn(e,t,l,r),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,x=d.onPostCommit;typeof x=="function"&&x(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Ge(t,t.return,T)}}else xn(e,t,l,r);break;case 31:xn(e,t,l,r);break;case 13:xn(e,t,l,r);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?xn(e,t,l,r):ls(e,t):d._visibility&2?xn(e,t,l,r):(d._visibility|=2,$a(e,t,l,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Nc(y,t);break;case 24:xn(e,t,l,r),c&2048&&Mc(t.alternate,t);break;default:xn(e,t,l,r)}}function $a(e,t,l,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,x=l,T=r,R=y.flags;switch(y.tag){case 0:case 11:case 15:$a(d,y,x,T,c),is(8,y);break;case 23:break;case 22:var I=y.stateNode;y.memoizedState!==null?I._visibility&2?$a(d,y,x,T,c):ls(d,y):(I._visibility|=2,$a(d,y,x,T,c)),c&&R&2048&&Nc(y.alternate,y);break;case 24:$a(d,y,x,T,c),c&&R&2048&&Mc(y.alternate,y);break;default:$a(d,y,x,T,c)}t=t.sibling}}function ls(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,r=t,c=r.flags;switch(r.tag){case 22:ls(l,r),c&2048&&Nc(r.alternate,r);break;case 24:ls(l,r),c&2048&&Mc(r.alternate,r);break;default:ls(l,r)}t=t.sibling}}var ss=8192;function Xa(e,t,l){if(e.subtreeFlags&ss)for(e=e.child;e!==null;)mm(e,t,l),e=e.sibling}function mm(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&ss&&e.memoizedState!==null&&l1(l,vn,e.memoizedState,e.memoizedProps);break;case 5:Xa(e,t,l);break;case 3:case 4:var r=vn;vn=eu(e.stateNode.containerInfo),Xa(e,t,l),vn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ss,ss=16777216,Xa(e,t,l),ss=r):Xa(e,t,l));break;default:Xa(e,t,l)}}function ym(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];vt=r,bm(r,e)}ym(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gm(e),e=e.sibling}function gm(e){switch(e.tag){case 0:case 11:case 15:rs(e),e.flags&2048&&_i(9,e,e.return);break;case 3:rs(e);break;case 12:rs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ir(e)):rs(e);break;default:rs(e)}}function Ir(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];vt=r,bm(r,e)}ym(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_i(8,t,t.return),Ir(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ir(t));break;default:Ir(t)}e=e.sibling}}function bm(e,t){for(;vt!==null;){var l=vt;switch(l.tag){case 0:case 11:case 15:_i(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Gl(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,vt=r;else e:for(l=e;vt!==null;){r=vt;var c=r.sibling,d=r.return;if(um(r),r===l){vt=null;break e}if(c!==null){c.return=d,vt=c;break e}vt=d}}}var xv={getCacheForType:function(e){var t=kt(ct),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return kt(ct).controller.signal}},Sv=typeof WeakMap=="function"?WeakMap:Map,He=0,Je=null,Ne=null,De=0,Ve=0,Jt=null,ki=!1,Ja=!1,zc=!1,ei=0,at=0,wi=0,sa=0,Dc=0,Ft=0,Fa=0,us=null,Ht=null,jc=!1,Yr=0,vm=0,Vr=1/0,Gr=null,Ai=null,yt=0,Ti=null,Wa=null,ti=0,Rc=0,Bc=null,xm=null,os=0,Lc=null;function Wt(){return(He&2)!==0&&De!==0?De&-De:q.T!==null?Vc():Bd()}function Sm(){if(Ft===0)if((De&536870912)===0||Be){var e=Ws;Ws<<=1,(Ws&3932160)===0&&(Ws=262144),Ft=e}else Ft=536870912;return e=$t.current,e!==null&&(e.flags|=32),Ft}function It(e,t,l){(e===Je&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Pa(e,0),Ei(e,De,Ft,!1)),Nl(e,l),((He&2)===0||e!==Je)&&(e===Je&&((He&2)===0&&(sa|=l),at===4&&Ei(e,De,Ft,!1)),En(e))}function _m(e,t,l){if((He&6)!==0)throw Error(s(327));var r=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ol(e,t),c=r?wv(e,t):Uc(e,t,!0),d=r;do{if(c===0){Ja&&!r&&Ei(e,t,0,!1);break}else{if(l=e.current.alternate,d&&!_v(l)){c=Uc(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var x=e;c=us;var T=x.current.memoizedState.isDehydrated;if(T&&(Pa(x,y).flags|=256),y=Uc(x,y,!1),y!==2){if(zc&&!T){x.errorRecoveryDisabledLanes|=d,sa|=d,c=4;break e}d=Ht,Ht=c,d!==null&&(Ht===null?Ht=d:Ht.push.apply(Ht,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){Pa(e,0),Ei(e,t,0,!0);break}e:{switch(r=e,d=c,d){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ei(r,t,Ft,!ki);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(c=Yr+300-Et(),10<c)){if(Ei(r,t,Ft,!ki),er(r,0,!0)!==0)break e;ti=t,r.timeoutHandle=Pm(km.bind(null,r,l,Ht,Gr,jc,t,Ft,sa,Fa,ki,d,"Throttled",-0,0),c);break e}km(r,l,Ht,Gr,jc,t,Ft,sa,Fa,ki,d,null,-0,0)}}break}while(!0);En(e)}function km(e,t,l,r,c,d,y,x,T,R,I,Z,L,U){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},mm(t,d,Z);var se=(d&62914560)===d?Yr-Et():(d&4194048)===d?vm-Et():0;if(se=s1(Z,se),se!==null){ti=d,e.cancelPendingCommit=se(Mm.bind(null,e,t,d,l,r,c,y,x,T,I,Z,null,L,U)),Ei(e,d,y,!R);return}}Mm(e,t,d,l,r,c,y,x,T)}function _v(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var c=l[r],d=c.getSnapshot;c=c.value;try{if(!Zt(d(),c))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ei(e,t,l,r){t&=~Dc,t&=~sa,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var d=31-Xe(c),y=1<<d;r[d]=-1,c&=~y}l!==0&&Dd(e,l,t)}function Kr(){return(He&6)===0?(cs(0),!1):!0}function qc(){if(Ne!==null){if(Ve===0)var e=Ne.return;else e=Ne,Gn=Fi=null,ec(e),Va=null,Zl=0,e=Ne;for(;e!==null;)em(e.alternate,e),e=e.return;Ne=null}}function Pa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yv(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ti=0,qc(),Je=e,Ne=l=Yn(e.current,null),De=t,Ve=0,Jt=null,ki=!1,Ja=Ol(e,t),zc=!1,Fa=Ft=Dc=sa=wi=at=0,Ht=us=null,jc=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-Xe(r),d=1<<c;t|=e[c],r&=~d}return ei=t,dr(),l}function wm(e,t){we=null,q.H=es,t===Ya||t===xr?(t=Hh(),Ve=3):t===Yo?(t=Hh(),Ve=4):Ve=t===yc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Ne===null&&(at=1,jr(e,ln(t,e.current)))}function Am(){var e=$t.current;return e===null?!0:(De&4194048)===De?on===null:(De&62914560)===De||(De&536870912)!==0?e===on:!1}function Tm(){var e=q.H;return q.H=es,e===null?es:e}function Em(){var e=q.A;return q.A=xv,e}function Zr(){at=4,ki||(De&4194048)!==De&&$t.current!==null||(Ja=!0),(wi&134217727)===0&&(sa&134217727)===0||Je===null||Ei(Je,De,Ft,!1)}function Uc(e,t,l){var r=He;He|=2;var c=Tm(),d=Em();(Je!==e||De!==t)&&(Gr=null,Pa(e,t)),t=!1;var y=at;e:do try{if(Ve!==0&&Ne!==null){var x=Ne,T=Jt;switch(Ve){case 8:qc(),y=6;break e;case 3:case 2:case 9:case 6:$t.current===null&&(t=!0);var R=Ve;if(Ve=0,Jt=null,el(e,x,T,R),l&&Ja){y=0;break e}break;default:R=Ve,Ve=0,Jt=null,el(e,x,T,R)}}kv(),y=at;break}catch(I){wm(e,I)}while(!0);return t&&e.shellSuspendCounter++,Gn=Fi=null,He=r,q.H=c,q.A=d,Ne===null&&(Je=null,De=0,dr()),y}function kv(){for(;Ne!==null;)Cm(Ne)}function wv(e,t){var l=He;He|=2;var r=Tm(),c=Em();Je!==e||De!==t?(Gr=null,Vr=Et()+500,Pa(e,t)):Ja=Ol(e,t);e:do try{if(Ve!==0&&Ne!==null){t=Ne;var d=Jt;t:switch(Ve){case 1:Ve=0,Jt=null,el(e,t,d,1);break;case 2:case 9:if(qh(d)){Ve=0,Jt=null,Om(t);break}t=function(){Ve!==2&&Ve!==9||Je!==e||(Ve=7),En(e)},d.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:qh(d)?(Ve=0,Jt=null,Om(t)):(Ve=0,Jt=null,el(e,t,d,7));break;case 5:var y=null;switch(Ne.tag){case 26:y=Ne.memoizedState;case 5:case 27:var x=Ne;if(y?py(y):x.stateNode.complete){Ve=0,Jt=null;var T=x.sibling;if(T!==null)Ne=T;else{var R=x.return;R!==null?(Ne=R,Qr(R)):Ne=null}break t}}Ve=0,Jt=null,el(e,t,d,5);break;case 6:Ve=0,Jt=null,el(e,t,d,6);break;case 8:qc(),at=6;break e;default:throw Error(s(462))}}Av();break}catch(I){wm(e,I)}while(!0);return Gn=Fi=null,q.H=r,q.A=c,He=l,Ne!==null?0:(Je=null,De=0,dr(),at)}function Av(){for(;Ne!==null&&!Fu();)Cm(Ne)}function Cm(e){var t=Wp(e.alternate,e,ei);e.memoizedProps=e.pendingProps,t===null?Qr(e):Ne=t}function Om(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Zp(l,t,t.pendingProps,t.type,void 0,De);break;case 11:t=Zp(l,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:ec(t);default:em(l,t),t=Ne=Eh(t,ei),t=Wp(l,t,ei)}e.memoizedProps=e.pendingProps,t===null?Qr(e):Ne=t}function el(e,t,l,r){Gn=Fi=null,ec(t),Va=null,Zl=0;var c=t.return;try{if(hv(e,c,t,l,De)){at=1,jr(e,ln(l,e.current)),Ne=null;return}}catch(d){if(c!==null)throw Ne=c,d;at=1,jr(e,ln(l,e.current)),Ne=null;return}t.flags&32768?(Be||r===1?e=!0:Ja||(De&536870912)!==0?e=!1:(ki=e=!0,(r===2||r===9||r===3||r===6)&&(r=$t.current,r!==null&&r.tag===13&&(r.flags|=16384))),Nm(t,e)):Qr(t)}function Qr(e){var t=e;do{if((t.flags&32768)!==0){Nm(t,ki);return}e=t.return;var l=yv(t.alternate,t,ei);if(l!==null){Ne=l;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);at===0&&(at=5)}function Nm(e,t){do{var l=gv(e.alternate,e);if(l!==null){l.flags&=32767,Ne=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=l}while(e!==null);at=6,Ne=null}function Mm(e,t,l,r,c,d,y,x,T){e.cancelPendingCommit=null;do $r();while(yt!==0);if((He&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(d=t.lanes|t.childLanes,d|=Eo,a0(e,l,d,y,x,T),e===Je&&(Ne=Je=null,De=0),Wa=t,Ti=e,ti=l,Rc=d,Bc=c,xm=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ov(ge,function(){return Bm(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=q.T,q.T=null,c=J.p,J.p=2,y=He,He|=4;try{bv(e,t,l)}finally{He=y,J.p=c,q.T=r}}yt=1,zm(),Dm(),jm()}}function zm(){if(yt===1){yt=0;var e=Ti,t=Wa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var r=J.p;J.p=2;var c=He;He|=4;try{dm(t,e);var d=Fc,y=bh(e.containerInfo),x=d.focusedElem,T=d.selectionRange;if(y!==x&&x&&x.ownerDocument&&gh(x.ownerDocument.documentElement,x)){if(T!==null&&_o(x)){var R=T.start,I=T.end;if(I===void 0&&(I=R),"selectionStart"in x)x.selectionStart=R,x.selectionEnd=Math.min(I,x.value.length);else{var Z=x.ownerDocument||document,L=Z&&Z.defaultView||window;if(L.getSelection){var U=L.getSelection(),se=x.textContent.length,pe=Math.min(T.start,se),$e=T.end===void 0?pe:Math.min(T.end,se);!U.extend&&pe>$e&&(y=$e,$e=pe,pe=y);var z=yh(x,pe),O=yh(x,$e);if(z&&O&&(U.rangeCount!==1||U.anchorNode!==z.node||U.anchorOffset!==z.offset||U.focusNode!==O.node||U.focusOffset!==O.offset)){var j=Z.createRange();j.setStart(z.node,z.offset),U.removeAllRanges(),pe>$e?(U.addRange(j),U.extend(O.node,O.offset)):(j.setEnd(O.node,O.offset),U.addRange(j))}}}}for(Z=[],U=x;U=U.parentNode;)U.nodeType===1&&Z.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Z.length;x++){var G=Z[x];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}su=!!Jc,Fc=Jc=null}finally{He=c,J.p=r,q.T=l}}e.current=t,yt=2}}function Dm(){if(yt===2){yt=0;var e=Ti,t=Wa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var r=J.p;J.p=2;var c=He;He|=4;try{rm(e,t.alternate,t)}finally{He=c,J.p=r,q.T=l}}yt=3}}function jm(){if(yt===4||yt===3){yt=0,Wu();var e=Ti,t=Wa,l=ti,r=xm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,Wa=Ti=null,Rm(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ai=null),no(l),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Ct,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=q.T,c=J.p,J.p=2,q.T=null;try{for(var d=e.onRecoverableError,y=0;y<r.length;y++){var x=r[y];d(x.value,{componentStack:x.stack})}}finally{q.T=t,J.p=c}}(ti&3)!==0&&$r(),En(e),c=e.pendingLanes,(l&261930)!==0&&(c&42)!==0?e===Lc?os++:(os=0,Lc=e):os=0,cs(0)}}function Rm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gl(t)))}function $r(){return zm(),Dm(),jm(),Bm()}function Bm(){if(yt!==5)return!1;var e=Ti,t=Rc;Rc=0;var l=no(ti),r=q.T,c=J.p;try{J.p=32>l?32:l,q.T=null,l=Bc,Bc=null;var d=Ti,y=ti;if(yt=0,Wa=Ti=null,ti=0,(He&6)!==0)throw Error(s(331));var x=He;if(He|=4,gm(d.current),pm(d,d.current,y,l),He=x,cs(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Ct,d)}catch{}return!0}finally{J.p=c,q.T=r,Rm(e,t)}}function Lm(e,t,l){t=ln(l,t),t=mc(e.stateNode,t,2),e=vi(e,t,2),e!==null&&(Nl(e,2),En(e))}function Ge(e,t,l){if(e.tag===3)Lm(e,e,l);else for(;t!==null;){if(t.tag===3){Lm(t,e,l);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ai===null||!Ai.has(r))){e=ln(l,e),l=qp(2),r=vi(t,l,2),r!==null&&(Up(l,r,t,e),Nl(r,2),En(r));break}}t=t.return}}function Hc(e,t,l){var r=e.pingCache;if(r===null){r=e.pingCache=new Sv;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(l)||(zc=!0,c.add(l),e=Tv.bind(null,e,t,l),t.then(e,e))}function Tv(e,t,l){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Je===e&&(De&l)===l&&(at===4||at===3&&(De&62914560)===De&&300>Et()-Yr?(He&2)===0&&Pa(e,0):Dc|=l,Fa===De&&(Fa=0)),En(e)}function qm(e,t){t===0&&(t=zd()),e=$i(e,t),e!==null&&(Nl(e,t),En(e))}function Ev(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),qm(e,l)}function Cv(e,t){var l=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(l=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qm(e,l)}function Ov(e,t){return Sa(e,t)}var Xr=null,tl=null,Ic=!1,Jr=!1,Yc=!1,Ci=0;function En(e){e!==tl&&e.next===null&&(tl===null?Xr=tl=e:tl=tl.next=e),Jr=!0,Ic||(Ic=!0,Mv())}function cs(e,t){if(!Yc&&Jr){Yc=!0;do for(var l=!1,r=Xr;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var d=0;else{var y=r.suspendedLanes,x=r.pingedLanes;d=(1<<31-Xe(42|e)+1)-1,d&=c&~(y&~x),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,Ym(r,d))}else d=De,d=er(r,r===Je?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||Ol(r,d)||(l=!0,Ym(r,d));r=r.next}while(l);Yc=!1}}function Nv(){Um()}function Um(){Jr=Ic=!1;var e=0;Ci!==0&&Iv()&&(e=Ci);for(var t=Et(),l=null,r=Xr;r!==null;){var c=r.next,d=Hm(r,t);d===0?(r.next=null,l===null?Xr=c:l.next=c,c===null&&(tl=l)):(l=r,(e!==0||(d&3)!==0)&&(Jr=!0)),r=c}yt!==0&&yt!==5||cs(e),Ci!==0&&(Ci=0)}function Hm(e,t){for(var l=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Xe(d),x=1<<y,T=c[y];T===-1?((x&l)===0||(x&r)!==0)&&(c[y]=i0(x,t)):T<=t&&(e.expiredLanes|=x),d&=~x}if(t=Je,l=De,l=er(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,l===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Cl(r),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ol(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(r!==null&&Cl(r),no(l)){case 2:case 8:l=ee;break;case 32:l=ge;break;case 268435456:l=Ye;break;default:l=ge}return r=Im.bind(null,e),l=Sa(l,r),e.callbackPriority=t,e.callbackNode=l,t}return r!==null&&r!==null&&Cl(r),e.callbackPriority=2,e.callbackNode=null,2}function Im(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if($r()&&e.callbackNode!==l)return null;var r=De;return r=er(e,e===Je?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_m(e,r,t),Hm(e,Et()),e.callbackNode!=null&&e.callbackNode===l?Im.bind(null,e):null)}function Ym(e,t){if($r())return null;_m(e,t,!0)}function Mv(){Vv(function(){(He&6)!==0?Sa(V,Nv):Um()})}function Vc(){if(Ci===0){var e=Ha;e===0&&(e=Fs,Fs<<=1,(Fs&261888)===0&&(Fs=256)),Ci=e}return Ci}function Vm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ar(""+e)}function Gm(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function zv(e,t,l,r,c){if(t==="submit"&&l&&l.stateNode===c){var d=Vm((c[Rt]||null).action),y=r.submitter;y&&(t=(t=y[Rt]||null)?Vm(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var x=new ur("action","action",null,r,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ci!==0){var T=y?Gm(c,y):new FormData(c);oc(l,{pending:!0,data:T,method:c.method,action:d},null,T)}}else typeof d=="function"&&(x.preventDefault(),T=y?Gm(c,y):new FormData(c),oc(l,{pending:!0,data:T,method:c.method,action:d},d,T))},currentTarget:c}]})}}for(var Gc=0;Gc<To.length;Gc++){var Kc=To[Gc],Dv=Kc.toLowerCase(),jv=Kc[0].toUpperCase()+Kc.slice(1);bn(Dv,"on"+jv)}bn(Sh,"onAnimationEnd"),bn(_h,"onAnimationIteration"),bn(kh,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(J0,"onTransitionRun"),bn(F0,"onTransitionStart"),bn(W0,"onTransitionCancel"),bn(wh,"onTransitionEnd"),Ta("onMouseEnter",["mouseout","mouseover"]),Ta("onMouseLeave",["mouseout","mouseover"]),Ta("onPointerEnter",["pointerout","pointerover"]),Ta("onPointerLeave",["pointerout","pointerover"]),Gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),Rv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fs));function Km(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var r=e[l],c=r.event;r=r.listeners;e:{var d=void 0;if(t)for(var y=r.length-1;0<=y;y--){var x=r[y],T=x.instance,R=x.currentTarget;if(x=x.listener,T!==d&&c.isPropagationStopped())break e;d=x,c.currentTarget=R;try{d(c)}catch(I){fr(I)}c.currentTarget=null,d=T}else for(y=0;y<r.length;y++){if(x=r[y],T=x.instance,R=x.currentTarget,x=x.listener,T!==d&&c.isPropagationStopped())break e;d=x,c.currentTarget=R;try{d(c)}catch(I){fr(I)}c.currentTarget=null,d=T}}}}function Me(e,t){var l=t[io];l===void 0&&(l=t[io]=new Set);var r=e+"__bubble";l.has(r)||(Zm(t,e,2,!1),l.add(r))}function Zc(e,t,l){var r=0;t&&(r|=4),Zm(l,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Qc(e){if(!e[Fr]){e[Fr]=!0,Ud.forEach(function(l){l!=="selectionchange"&&(Rv.has(l)||Zc(l,!1,e),Zc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fr]||(t[Fr]=!0,Zc("selectionchange",!1,t))}}function Zm(e,t,l,r){switch(Sy(t)){case 2:var c=o1;break;case 8:c=c1;break;default:c=of}l=c.bind(null,t,l,e),c=void 0,!ho||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,l,{capture:!0,passive:c}):e.addEventListener(t,l,!0):c!==void 0?e.addEventListener(t,l,{passive:c}):e.addEventListener(t,l,!1)}function $c(e,t,l,r,c){var d=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var x=r.stateNode.containerInfo;if(x===c)break;if(y===4)for(y=r.return;y!==null;){var T=y.tag;if((T===3||T===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;x!==null;){if(y=ka(x),y===null)return;if(T=y.tag,T===5||T===6||T===26||T===27){r=d=y;continue e}x=x.parentNode}}r=r.return}Fd(function(){var R=d,I=co(l),Z=[];e:{var L=Ah.get(e);if(L!==void 0){var U=ur,se=e;switch(e){case"keypress":if(sr(l)===0)break e;case"keydown":case"keyup":U=C0;break;case"focusin":se="focus",U=go;break;case"focusout":se="blur",U=go;break;case"beforeblur":case"afterblur":U=go;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":U=eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=y0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=M0;break;case Sh:case _h:case kh:U=v0;break;case wh:U=D0;break;case"scroll":case"scrollend":U=p0;break;case"wheel":U=R0;break;case"copy":case"cut":case"paste":U=S0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=nh;break;case"toggle":case"beforetoggle":U=L0}var pe=(t&4)!==0,$e=!pe&&(e==="scroll"||e==="scrollend"),z=pe?L!==null?L+"Capture":null:L;pe=[];for(var O=R,j;O!==null;){var G=O;if(j=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||j===null||z===null||(G=Dl(O,z),G!=null&&pe.push(ds(O,G,j))),$e)break;O=O.return}0<pe.length&&(L=new U(L,se,null,l,I),Z.push({event:L,listeners:pe}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",L&&l!==oo&&(se=l.relatedTarget||l.fromElement)&&(ka(se)||se[_a]))break e;if((U||L)&&(L=I.window===I?I:(L=I.ownerDocument)?L.defaultView||L.parentWindow:window,U?(se=l.relatedTarget||l.toElement,U=R,se=se?ka(se):null,se!==null&&($e=o(se),pe=se.tag,se!==$e||pe!==5&&pe!==27&&pe!==6)&&(se=null)):(U=null,se=R),U!==se)){if(pe=eh,G="onMouseLeave",z="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(pe=nh,G="onPointerLeave",z="onPointerEnter",O="pointer"),$e=U==null?L:zl(U),j=se==null?L:zl(se),L=new pe(G,O+"leave",U,l,I),L.target=$e,L.relatedTarget=j,G=null,ka(I)===R&&(pe=new pe(z,O+"enter",se,l,I),pe.target=j,pe.relatedTarget=$e,G=pe),$e=G,U&&se)t:{for(pe=Bv,z=U,O=se,j=0,G=z;G;G=pe(G))j++;G=0;for(var he=O;he;he=pe(he))G++;for(;0<j-G;)z=pe(z),j--;for(;0<G-j;)O=pe(O),G--;for(;j--;){if(z===O||O!==null&&z===O.alternate){pe=z;break t}z=pe(z),O=pe(O)}pe=null}else pe=null;U!==null&&Qm(Z,L,U,pe,!1),se!==null&&$e!==null&&Qm(Z,$e,se,pe,!0)}}e:{if(L=R?zl(R):window,U=L.nodeName&&L.nodeName.toLowerCase(),U==="select"||U==="input"&&L.type==="file")var qe=ch;else if(uh(L))if(fh)qe=Q0;else{qe=K0;var ue=G0}else U=L.nodeName,!U||U.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&uo(R.elementType)&&(qe=ch):qe=Z0;if(qe&&(qe=qe(e,R))){oh(Z,qe,l,I);break e}ue&&ue(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&ro(L,"number",L.value)}switch(ue=R?zl(R):window,e){case"focusin":(uh(ue)||ue.contentEditable==="true")&&(za=ue,ko=R,Il=null);break;case"focusout":Il=ko=za=null;break;case"mousedown":wo=!0;break;case"contextmenu":case"mouseup":case"dragend":wo=!1,vh(Z,l,I);break;case"selectionchange":if(X0)break;case"keydown":case"keyup":vh(Z,l,I)}var Ae;if(vo)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Ma?sh(e,l)&&(je="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(je="onCompositionStart");je&&(ih&&l.locale!=="ko"&&(Ma||je!=="onCompositionStart"?je==="onCompositionEnd"&&Ma&&(Ae=Wd()):(di=I,po="value"in di?di.value:di.textContent,Ma=!0)),ue=Wr(R,je),0<ue.length&&(je=new th(je,e,null,l,I),Z.push({event:je,listeners:ue}),Ae?je.data=Ae:(Ae=rh(l),Ae!==null&&(je.data=Ae)))),(Ae=U0?H0(e,l):I0(e,l))&&(je=Wr(R,"onBeforeInput"),0<je.length&&(ue=new th("onBeforeInput","beforeinput",null,l,I),Z.push({event:ue,listeners:je}),ue.data=Ae)),zv(Z,e,R,l,I)}Km(Z,t)})}function ds(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Wr(e,t){for(var l=t+"Capture",r=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Dl(e,l),c!=null&&r.unshift(ds(e,c,d)),c=Dl(e,t),c!=null&&r.push(ds(e,c,d))),e.tag===3)return r;e=e.return}return[]}function Bv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qm(e,t,l,r,c){for(var d=t._reactName,y=[];l!==null&&l!==r;){var x=l,T=x.alternate,R=x.stateNode;if(x=x.tag,T!==null&&T===r)break;x!==5&&x!==26&&x!==27||R===null||(T=R,c?(R=Dl(l,d),R!=null&&y.unshift(ds(l,R,T))):c||(R=Dl(l,d),R!=null&&y.push(ds(l,R,T)))),l=l.return}y.length!==0&&e.push({event:t,listeners:y})}var Lv=/\r\n?/g,qv=/\u0000|\uFFFD/g;function $m(e){return(typeof e=="string"?e:""+e).replace(Lv,`
49
- `).replace(qv,"")}function Xm(e,t){return t=$m(t),$m(e)===t}function Qe(e,t,l,r,c,d){switch(l){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Ca(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Ca(e,""+r);break;case"className":nr(e,"class",r);break;case"tabIndex":nr(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":nr(e,l,r);break;case"style":Xd(e,r,d);break;case"data":if(t!=="object"){nr(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=ar(""+r),e.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="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"?(t!=="input"&&Qe(e,t,"name",c.name,c,null),Qe(e,t,"formEncType",c.formEncType,c,null),Qe(e,t,"formMethod",c.formMethod,c,null),Qe(e,t,"formTarget",c.formTarget,c,null)):(Qe(e,t,"encType",c.encType,c,null),Qe(e,t,"method",c.method,c,null),Qe(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=ar(""+r),e.setAttribute(l,r);break;case"onClick":r!=null&&(e.onclick=Hn);break;case"onScroll":r!=null&&Me("scroll",e);break;case"onScrollEnd":r!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(l=r.__html,l!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}l=ar(""+r),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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""+r):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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":r===!0?e.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,r):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(l,r):e.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(l):e.setAttribute(l,r);break;case"popover":Me("beforetoggle",e),Me("toggle",e),tr(e,"popover",r);break;case"xlinkActuate":Un(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Un(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Un(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Un(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Un(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Un(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Un(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Un(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Un(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":tr(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=d0.get(l)||l,tr(e,l,r))}}function Xc(e,t,l,r,c,d){switch(l){case"style":Xd(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(l=r.__html,l!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof r=="string"?Ca(e,r):(typeof r=="number"||typeof r=="bigint")&&Ca(e,""+r);break;case"onScroll":r!=null&&Me("scroll",e);break;case"onScrollEnd":r!=null&&Me("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(c=l.endsWith("Capture"),t=l.slice(2,c?l.length-7:void 0),d=e[Rt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof r=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,r,c);break e}l in e?e[l]=r:r===!0?e.setAttribute(l,""):tr(e,l,r)}}}function At(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var r=!1,c=!1,d;for(d in l)if(l.hasOwnProperty(d)){var y=l[d];if(y!=null)switch(d){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Qe(e,t,d,y,l,null)}}c&&Qe(e,t,"srcSet",l.srcSet,l,null),r&&Qe(e,t,"src",l.src,l,null);return;case"input":Me("invalid",e);var x=d=y=c=null,T=null,R=null;for(r in l)if(l.hasOwnProperty(r)){var I=l[r];if(I!=null)switch(r){case"name":c=I;break;case"type":y=I;break;case"checked":T=I;break;case"defaultChecked":R=I;break;case"value":d=I;break;case"defaultValue":x=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(s(137,t));break;default:Qe(e,t,r,I,l,null)}}Kd(e,d,x,T,R,y,c,!1);return;case"select":Me("invalid",e),r=y=d=null;for(c in l)if(l.hasOwnProperty(c)&&(x=l[c],x!=null))switch(c){case"value":d=x;break;case"defaultValue":y=x;break;case"multiple":r=x;default:Qe(e,t,c,x,l,null)}t=d,l=y,e.multiple=!!r,t!=null?Ea(e,!!r,t,!1):l!=null&&Ea(e,!!r,l,!0);return;case"textarea":Me("invalid",e),d=c=r=null;for(y in l)if(l.hasOwnProperty(y)&&(x=l[y],x!=null))switch(y){case"value":r=x;break;case"defaultValue":c=x;break;case"children":d=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(s(91));break;default:Qe(e,t,y,x,l,null)}Qd(e,r,c,d);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(r=l[T],r!=null))switch(T){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Qe(e,t,T,r,l,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(r=0;r<fs.length;r++)Me(fs[r],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(R in l)if(l.hasOwnProperty(R)&&(r=l[R],r!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Qe(e,t,R,r,l,null)}return;default:if(uo(t)){for(I in l)l.hasOwnProperty(I)&&(r=l[I],r!==void 0&&Xc(e,t,I,r,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(r=l[x],r!=null&&Qe(e,t,x,r,l,null))}function Uv(e,t,l,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,x=null,T=null,R=null,I=null;for(U in l){var Z=l[U];if(l.hasOwnProperty(U)&&Z!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":T=Z;default:r.hasOwnProperty(U)||Qe(e,t,U,null,r,Z)}}for(var L in r){var U=r[L];if(Z=l[L],r.hasOwnProperty(L)&&(U!=null||Z!=null))switch(L){case"type":d=U;break;case"name":c=U;break;case"checked":R=U;break;case"defaultChecked":I=U;break;case"value":y=U;break;case"defaultValue":x=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:U!==Z&&Qe(e,t,L,U,r,Z)}}so(e,y,x,T,R,I,d,c);return;case"select":U=y=x=L=null;for(d in l)if(T=l[d],l.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":U=T;default:r.hasOwnProperty(d)||Qe(e,t,d,null,r,T)}for(c in r)if(d=r[c],T=l[c],r.hasOwnProperty(c)&&(d!=null||T!=null))switch(c){case"value":L=d;break;case"defaultValue":x=d;break;case"multiple":y=d;default:d!==T&&Qe(e,t,c,d,r,T)}t=x,l=y,r=U,L!=null?Ea(e,!!l,L,!1):!!r!=!!l&&(t!=null?Ea(e,!!l,t,!0):Ea(e,!!l,l?[]:"",!1));return;case"textarea":U=L=null;for(x in l)if(c=l[x],l.hasOwnProperty(x)&&c!=null&&!r.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Qe(e,t,x,null,r,c)}for(y in r)if(c=r[y],d=l[y],r.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":L=c;break;case"defaultValue":U=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(s(91));break;default:c!==d&&Qe(e,t,y,c,r,d)}Zd(e,L,U);return;case"option":for(var se in l)if(L=l[se],l.hasOwnProperty(se)&&L!=null&&!r.hasOwnProperty(se))switch(se){case"selected":e.selected=!1;break;default:Qe(e,t,se,null,r,L)}for(T in r)if(L=r[T],U=l[T],r.hasOwnProperty(T)&&L!==U&&(L!=null||U!=null))switch(T){case"selected":e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:Qe(e,t,T,L,r,U)}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 pe in l)L=l[pe],l.hasOwnProperty(pe)&&L!=null&&!r.hasOwnProperty(pe)&&Qe(e,t,pe,null,r,L);for(R in r)if(L=r[R],U=l[R],r.hasOwnProperty(R)&&L!==U&&(L!=null||U!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,t));break;default:Qe(e,t,R,L,r,U)}return;default:if(uo(t)){for(var $e in l)L=l[$e],l.hasOwnProperty($e)&&L!==void 0&&!r.hasOwnProperty($e)&&Xc(e,t,$e,void 0,r,L);for(I in r)L=r[I],U=l[I],!r.hasOwnProperty(I)||L===U||L===void 0&&U===void 0||Xc(e,t,I,L,r,U);return}}for(var z in l)L=l[z],l.hasOwnProperty(z)&&L!=null&&!r.hasOwnProperty(z)&&Qe(e,t,z,null,r,L);for(Z in r)L=r[Z],U=l[Z],!r.hasOwnProperty(Z)||L===U||L==null&&U==null||Qe(e,t,Z,L,r,U)}function Jm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var c=l[r],d=c.transferSize,y=c.initiatorType,x=c.duration;if(d&&x&&Jm(y)){for(y=0,x=c.responseEnd,r+=1;r<l.length;r++){var T=l[r],R=T.startTime;if(R>x)break;var I=T.transferSize,Z=T.initiatorType;I&&Jm(Z)&&(T=T.responseEnd,y+=I*(T<x?1:(x-R)/(T-R)))}if(--r,t+=8*(d+y)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jc=null,Fc=null;function Pr(e){return e.nodeType===9?e:e.ownerDocument}function Fm(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 Wm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pc=null;function Iv(){var e=window.event;return e&&e.type==="popstate"?e===Pc?!1:(Pc=e,!0):(Pc=null,!1)}var Pm=typeof setTimeout=="function"?setTimeout:void 0,Yv=typeof clearTimeout=="function"?clearTimeout:void 0,ey=typeof Promise=="function"?Promise:void 0,Vv=typeof queueMicrotask=="function"?queueMicrotask:typeof ey<"u"?function(e){return ey.resolve(null).then(e).catch(Gv)}:Pm;function Gv(e){setTimeout(function(){throw e})}function Oi(e){return e==="head"}function ty(e,t){var l=t,r=0;do{var c=l.nextSibling;if(e.removeChild(l),c&&c.nodeType===8)if(l=c.data,l==="/$"||l==="/&"){if(r===0){e.removeChild(c),ll(t);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")hs(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,hs(l);for(var d=l.firstChild;d;){var y=d.nextSibling,x=d.nodeName;d[Ml]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=y}}else l==="body"&&hs(e.ownerDocument.body);l=c}while(l);ll(t)}function ny(e,t){var l=e;e=0;do{var r=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=r}while(l)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ef(l),ao(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Kv(e,t,l,r){for(;e.nodeType===1;){var c=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ml])switch(t){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!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=cn(e.nextSibling),e===null)break}return null}function Zv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=cn(e.nextSibling),e===null))return null;return e}function iy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=cn(e.nextSibling),e===null))return null;return e}function tf(e){return e.data==="$?"||e.data==="$~"}function nf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Qv(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var r=function(){t(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function cn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var af=null;function ay(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return cn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function ly(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function sy(e,t,l){switch(t=Pr(l),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function hs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ao(e)}var fn=new Map,ry=new Set;function eu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ni=J.d;J.d={f:$v,r:Xv,D:Jv,C:Fv,L:Wv,m:Pv,X:t1,S:e1,M:n1};function $v(){var e=ni.f(),t=Kr();return e||t}function Xv(e){var t=wa(e);t!==null&&t.tag===5&&t.type==="form"?wp(t):ni.r(e)}var nl=typeof document>"u"?null:document;function uy(e,t,l){var r=nl;if(r&&typeof t=="string"&&t){var c=nn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),ry.has(c)||(ry.add(c),e={rel:e,crossOrigin:l,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),At(t,"link",e),bt(t),r.head.appendChild(t)))}}function Jv(e){ni.D(e),uy("dns-prefetch",e,null)}function Fv(e,t){ni.C(e,t),uy("preconnect",e,t)}function Wv(e,t,l){ni.L(e,t,l);var r=nl;if(r&&e&&t){var c='link[rel="preload"][as="'+nn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+nn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+nn(l.imageSizes)+'"]')):c+='[href="'+nn(e)+'"]';var d=c;switch(t){case"style":d=il(e);break;case"script":d=al(e)}fn.has(d)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),fn.set(d,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(ps(d))||t==="script"&&r.querySelector(ms(d))||(t=r.createElement("link"),At(t,"link",e),bt(t),r.head.appendChild(t)))}}function Pv(e,t){ni.m(e,t);var l=nl;if(l&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+nn(r)+'"][href="'+nn(e)+'"]',d=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=al(e)}if(!fn.has(d)&&(e=b({rel:"modulepreload",href:e},t),fn.set(d,e),l.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ms(d)))return}r=l.createElement("link"),At(r,"link",e),bt(r),l.head.appendChild(r)}}}function e1(e,t,l){ni.S(e,t,l);var r=nl;if(r&&e){var c=Aa(r).hoistableStyles,d=il(e);t=t||"default";var y=c.get(d);if(!y){var x={loading:0,preload:null};if(y=r.querySelector(ps(d)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=fn.get(d))&&lf(e,l);var T=y=r.createElement("link");bt(T),At(T,"link",e),T._p=new Promise(function(R,I){T.onload=R,T.onerror=I}),T.addEventListener("load",function(){x.loading|=1}),T.addEventListener("error",function(){x.loading|=2}),x.loading|=4,tu(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:x},c.set(d,y)}}}function t1(e,t){ni.X(e,t);var l=nl;if(l&&e){var r=Aa(l).hoistableScripts,c=al(e),d=r.get(c);d||(d=l.querySelector(ms(c)),d||(e=b({src:e,async:!0},t),(t=fn.get(c))&&sf(e,t),d=l.createElement("script"),bt(d),At(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(c,d))}}function n1(e,t){ni.M(e,t);var l=nl;if(l&&e){var r=Aa(l).hoistableScripts,c=al(e),d=r.get(c);d||(d=l.querySelector(ms(c)),d||(e=b({src:e,async:!0,type:"module"},t),(t=fn.get(c))&&sf(e,t),d=l.createElement("script"),bt(d),At(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(c,d))}}function oy(e,t,l,r){var c=(c=de.current)?eu(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=il(l.href),l=Aa(c).hoistableStyles,r=l.get(t),r||(r={type:"style",instance:null,count:0,state:null},l.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=il(l.href);var d=Aa(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(ps(e)))&&!d._p&&(y.instance=d,y.state.loading=5),fn.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},fn.set(e,l),d||i1(c,e,l,y.state))),t&&r===null)throw Error(s(528,""));return y}if(t&&r!==null)throw Error(s(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=al(l),l=Aa(c).hoistableScripts,r=l.get(t),r||(r={type:"script",instance:null,count:0,state:null},l.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function il(e){return'href="'+nn(e)+'"'}function ps(e){return'link[rel="stylesheet"]['+e+"]"}function cy(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function i1(e,t,l,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),At(t,"link",l),bt(t),e.head.appendChild(t))}function al(e){return'[src="'+nn(e)+'"]'}function ms(e){return"script[async]"+e}function fy(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+nn(l.href)+'"]');if(r)return t.instance=r,bt(r),r;var c=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),bt(r),At(r,"style",c),tu(r,l.precedence,e),t.instance=r;case"stylesheet":c=il(l.href);var d=e.querySelector(ps(c));if(d)return t.state.loading|=4,t.instance=d,bt(d),d;r=cy(l),(c=fn.get(c))&&lf(r,c),d=(e.ownerDocument||e).createElement("link"),bt(d);var y=d;return y._p=new Promise(function(x,T){y.onload=x,y.onerror=T}),At(d,"link",r),t.state.loading|=4,tu(d,l.precedence,e),t.instance=d;case"script":return d=al(l.src),(c=e.querySelector(ms(d)))?(t.instance=c,bt(c),c):(r=l,(c=fn.get(d))&&(r=b({},l),sf(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),bt(c),At(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,tu(r,l.precedence,e));return t.instance}function tu(e,t,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,d=c,y=0;y<r.length;y++){var x=r[y];if(x.dataset.precedence===t)d=x;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var nu=null;function dy(e,t,l){if(nu===null){var r=new Map,c=nu=new Map;c.set(l,r)}else c=nu,r=c.get(l),r||(r=new Map,c.set(l,r));if(r.has(e))return r;for(r.set(e,null),l=l.getElementsByTagName(e),c=0;c<l.length;c++){var d=l[c];if(!(d[Ml]||d[St]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var x=r.get(y);x?x.push(d):r.set(y,[d])}}return r}function hy(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function a1(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function py(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function l1(e,t,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var c=il(r.href),d=t.querySelector(ps(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=iu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=d,bt(d);return}d=t.ownerDocument||t,r=cy(r),(c=fn.get(c))&&lf(r,c),d=d.createElement("link"),bt(d);var y=d;y._p=new Promise(function(x,T){y.onload=x,y.onerror=T}),At(d,"link",r),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=iu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var rf=0;function s1(e,t){return e.stylesheets&&e.count===0&&lu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var r=setTimeout(function(){if(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&rf===0&&(rf=62500*Hv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>rf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function iu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var au=null;function lu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,au=new Map,t.forEach(r1,e),au=null,iu.call(e))}function r1(e,t){if(!(t.state.loading&4)){var l=au.get(e);if(l)var r=l.get(null);else{l=new Map,au.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),r=y)}r&&l.set(null,r)}c=t.instance,y=c.getAttribute("data-precedence"),d=l.get(y)||r,d===r&&l.set(null,c),l.set(y,c),this.count++,r=iu.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var ys={$$typeof:M,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function u1(e,t,l,r,c,d,y,x,T){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=eo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eo(0),this.hiddenUpdates=eo(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function my(e,t,l,r,c,d,y,x,T,R,I,Z){return e=new u1(e,t,l,y,T,R,I,Z,x),t=1,d===!0&&(t|=24),d=Qt(3,null,null,t),e.current=d,d.stateNode=e,t=Uo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:r,isDehydrated:l,cache:t},Vo(d),e}function yy(e){return e?(e=Ra,e):Ra}function gy(e,t,l,r,c,d){c=yy(c),r.context===null?r.context=c:r.pendingContext=c,r=bi(t),r.payload={element:l},d=d===void 0?null:d,d!==null&&(r.callback=d),l=vi(e,r,t),l!==null&&(It(l,e,t),$l(l,e,t))}function by(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function uf(e,t){by(e,t),(e=e.alternate)&&by(e,t)}function vy(e){if(e.tag===13||e.tag===31){var t=$i(e,67108864);t!==null&&It(t,e,67108864),uf(e,67108864)}}function xy(e){if(e.tag===13||e.tag===31){var t=Wt();t=to(t);var l=$i(e,t);l!==null&&It(l,e,t),uf(e,t)}}var su=!0;function o1(e,t,l,r){var c=q.T;q.T=null;var d=J.p;try{J.p=2,of(e,t,l,r)}finally{J.p=d,q.T=c}}function c1(e,t,l,r){var c=q.T;q.T=null;var d=J.p;try{J.p=8,of(e,t,l,r)}finally{J.p=d,q.T=c}}function of(e,t,l,r){if(su){var c=cf(r);if(c===null)$c(e,t,r,ru,l),_y(e,r);else if(d1(c,e,t,l,r))r.stopPropagation();else if(_y(e,r),t&4&&-1<f1.indexOf(e)){for(;c!==null;){var d=wa(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Vi(d.pendingLanes);if(y!==0){var x=d;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var T=1<<31-Xe(y);x.entanglements[1]|=T,y&=~T}En(d),(He&6)===0&&(Vr=Et()+500,cs(0))}}break;case 31:case 13:x=$i(d,2),x!==null&&It(x,d,2),Kr(),uf(d,2)}if(d=cf(r),d===null&&$c(e,t,r,ru,l),d===c)break;c=d}c!==null&&r.stopPropagation()}else $c(e,t,r,null,l)}}function cf(e){return e=co(e),ff(e)}var ru=null;function ff(e){if(ru=null,e=ka(e),e!==null){var t=o(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ru=e,null}function Sy(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(Pu()){case V:return 2;case ee:return 8;case ge:case Oe:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var df=!1,Ni=null,Mi=null,zi=null,gs=new Map,bs=new Map,Di=[],f1="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 _y(e,t){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":gs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function vs(e,t,l,r,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:l,eventSystemFlags:r,nativeEvent:d,targetContainers:[c]},t!==null&&(t=wa(t),t!==null&&vy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function d1(e,t,l,r,c){switch(t){case"focusin":return Ni=vs(Ni,e,t,l,r,c),!0;case"dragenter":return Mi=vs(Mi,e,t,l,r,c),!0;case"mouseover":return zi=vs(zi,e,t,l,r,c),!0;case"pointerover":var d=c.pointerId;return gs.set(d,vs(gs.get(d)||null,e,t,l,r,c)),!0;case"gotpointercapture":return d=c.pointerId,bs.set(d,vs(bs.get(d)||null,e,t,l,r,c)),!0}return!1}function ky(e){var t=ka(e.target);if(t!==null){var l=o(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Ld(e.priority,function(){xy(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Ld(e.priority,function(){xy(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=cf(e.nativeEvent);if(l===null){l=e.nativeEvent;var r=new l.constructor(l.type,l);oo=r,l.target.dispatchEvent(r),oo=null}else return t=wa(l),t!==null&&vy(t),e.blockedOn=l,!1;t.shift()}return!0}function wy(e,t,l){uu(e)&&l.delete(t)}function h1(){df=!1,Ni!==null&&uu(Ni)&&(Ni=null),Mi!==null&&uu(Mi)&&(Mi=null),zi!==null&&uu(zi)&&(zi=null),gs.forEach(wy),bs.forEach(wy)}function ou(e,t){e.blockedOn===t&&(e.blockedOn=null,df||(df=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,h1)))}var cu=null;function Ay(e){cu!==e&&(cu=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){cu===e&&(cu=null);for(var t=0;t<e.length;t+=3){var l=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(ff(r||l)===null)continue;break}var d=wa(l);d!==null&&(e.splice(t,3),t-=3,oc(d,{pending:!0,data:c,method:l.method,action:r},r,c))}}))}function ll(e){function t(T){return ou(T,e)}Ni!==null&&ou(Ni,e),Mi!==null&&ou(Mi,e),zi!==null&&ou(zi,e),gs.forEach(t),bs.forEach(t);for(var l=0;l<Di.length;l++){var r=Di[l];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Di.length&&(l=Di[0],l.blockedOn===null);)ky(l),l.blockedOn===null&&Di.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var c=l[r],d=l[r+1],y=c[Rt]||null;if(typeof d=="function")y||Ay(l);else if(y){var x=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[Rt]||null)x=y.formAction;else if(ff(c)!==null)continue}else x=y.action;typeof x=="function"?l[r+1]=x:(l.splice(r,3),r-=3),Ay(l)}}}function Ty(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function hf(e){this._internalRoot=e}fu.prototype.render=hf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,r=Wt();gy(l,r,e,t,null,null)},fu.prototype.unmount=hf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gy(e.current,2,null,e,null,null),Kr(),t[_a]=null}};function fu(e){this._internalRoot=e}fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bd();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Di.length&&t!==0&&t<Di[l].priority;l++);Di.splice(l,0,e),l===0&&ky(e)}};var Ey=n.version;if(Ey!=="19.2.4")throw Error(s(527,Ey,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var p1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{Ct=du.inject(p1),mt=du}catch{}}return Ss.createRoot=function(e,t){if(!u(e))throw Error(s(299));var l=!1,r="",c=jp,d=Rp,y=Bp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=my(e,1,!1,null,null,l,r,null,c,d,y,Ty),e[_a]=t.current,Qc(e),new hf(t)},Ss.hydrateRoot=function(e,t,l){if(!u(e))throw Error(s(299));var r=!1,c="",d=jp,y=Rp,x=Bp,T=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(c=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(T=l.formState)),t=my(e,1,!0,t,l??null,r,c,T,d,y,x,Ty),t.context=yy(null),l=t.current,r=Wt(),r=to(r),c=bi(r),c.callback=null,vi(l,c,r),l=r,t.current.lanes=l,Nl(t,l),En(t),e[_a]=t.current,Qc(e),new fu(t)},Ss.version="19.2.4",Ss}var Ly;function E1(){if(Ly)return yf.exports;Ly=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),yf.exports=T1(),yf.exports}var C1=E1();const O1=[{mode:"keyword",label:"Keyword / Phrase",description:"User says a specific word or phrase"},{mode:"immediate",label:"Immediate",description:"Right when conversation starts"},{mode:"contextual",label:"Contextual",description:"Based on conversation context"}];function N1({domain:i,onChange:n,onSample:a}){const s=(o,f)=>{n({...i,[o]:f})},u=o=>{n({...i,triggerMode:o,trigger:o==="immediate"?"":i.trigger})};return S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[S.jsx("h3",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#e0e0e0"},children:"Domain Context"}),S.jsx("button",{type:"button",onClick:a,style:M1,title:"Fill with random sample data",children:"Sample"})]}),S.jsxs("label",{style:hu,children:[S.jsx("span",{style:_s,children:"Flow Name"}),S.jsx("input",{type:"text",value:i.name,onChange:o=>s("name",o.target.value),placeholder:"e.g., kyc-verification",style:rl})]}),S.jsxs("label",{style:hu,children:[S.jsx("span",{style:_s,children:"Domain"}),S.jsx("input",{type:"text",value:i.domain,onChange:o=>s("domain",o.target.value),placeholder:"e.g., finance, healthcare, engineering",style:rl})]}),S.jsxs("label",{style:hu,children:[S.jsx("span",{style:_s,children:"Description"}),S.jsx("textarea",{value:i.description,onChange:o=>s("description",o.target.value),placeholder:"What should this flow accomplish?",rows:3,style:{...rl,resize:"vertical"}})]}),S.jsxs("label",{style:hu,children:[S.jsx("span",{style:_s,children:"Business Rules"}),S.jsx("textarea",{value:i.businessRules,onChange:o=>s("businessRules",o.target.value),placeholder:"Constraints, requirements, compliance rules...",rows:3,style:{...rl,resize:"vertical"}})]}),S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[S.jsx("span",{style:_s,children:"When to Display"}),S.jsx("div",{style:{display:"flex",gap:"6px"},children:O1.map(o=>S.jsx("button",{type:"button",onClick:()=>u(o.mode),title:o.description,style:{...z1,...i.triggerMode===o.mode?{borderColor:"#6366f1",color:"#a5b4fc",background:"#1e1b4b"}:{}},children:o.label},o.mode))}),i.triggerMode==="keyword"&&S.jsx("input",{type:"text",value:i.trigger,onChange:o=>s("trigger",o.target.value),placeholder:'e.g., "start KYC", "new incident", "onboard vendor"',style:rl}),i.triggerMode==="immediate"&&S.jsx("span",{style:{fontSize:"11px",color:"#666",fontStyle:"italic"},children:"Components will be generated in the first response."}),i.triggerMode==="contextual"&&S.jsx("textarea",{value:i.trigger,onChange:o=>s("trigger",o.target.value),placeholder:'Describe the situation, e.g., "After user provides customer name and issue description" or "When 3 resolution attempts have failed"',rows:3,style:{...rl,resize:"vertical"}})]})]})}const hu={display:"flex",flexDirection:"column",gap:"4px"},_s={fontSize:"12px",fontWeight:500,color:"#aaa"},rl={padding:"8px 10px",border:"1px solid #333",borderRadius:"6px",background:"#1a1a1a",color:"#e0e0e0",fontSize:"13px",fontFamily:"inherit",outline:"none"},M1={padding:"4px 10px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#6366f1",fontSize:"11px",fontWeight:500,cursor:"pointer"},z1={padding:"5px 10px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#888",fontSize:"11px",fontWeight:500,cursor:"pointer",flex:1,textAlign:"center"},D1={form:{label:"Form",description:"Collect structured user input",icon:"📋"},button:{label:"Button",description:"Trigger actions on click",icon:"🔘"},tasklist:{label:"Tasklist",description:"Checklist with completion tracking",icon:"✅"},table:{label:"Table",description:"Display tabular data",icon:"📊"},callout:{label:"Callout",description:"Highlighted info/warning blocks",icon:"💡"},"approval-gate":{label:"Approval Gate",description:"Require approvals to proceed",icon:"🔒"},webhook:{label:"Webhook",description:"HTTP requests on action",icon:"🔗"},chart:{label:"Chart",description:"Data visualization",icon:"📈"},thinking:{label:"Thinking",description:"AI reasoning display",icon:"🧠"}};function j1({components:i,onToggle:n}){return S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[S.jsx("h3",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#e0e0e0"},children:"Components"}),S.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"8px"},children:i.map(a=>{const s=D1[a.type];return S.jsxs("button",{onClick:()=>n(a.type),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",padding:"10px 6px",border:a.enabled?"2px solid #6366f1":"1px solid #333",borderRadius:"8px",background:a.enabled?"#1e1b4b":"#1a1a1a",color:a.enabled?"#a5b4fc":"#888",cursor:"pointer",transition:"all 0.15s",fontSize:"11px",textAlign:"center"},children:[S.jsx("span",{style:{fontSize:"20px"},children:s.icon}),S.jsx("span",{style:{fontWeight:600,fontSize:"12px"},children:s.label}),S.jsx("span",{style:{fontSize:"10px",color:"#666",lineHeight:1.2},children:s.description})]},a.type)})})]})}function R1({components:i,onUpdate:n}){const a=i.filter(s=>s.enabled&&s.type!=="thinking");return a.length===0?S.jsx("p",{style:{color:"#666",fontSize:"13px",fontStyle:"italic"},children:"Select components above to configure them."}):S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[S.jsx("h3",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#e0e0e0"},children:"Configure Components"}),a.map(s=>S.jsx(B1,{config:s,onUpdate:n},s.type))]})}function B1({config:i,onUpdate:n}){switch(i.type){case"form":return S.jsx(L1,{config:i,onUpdate:n});case"approval-gate":return S.jsx(q1,{config:i,onUpdate:n});case"tasklist":return S.jsx(U1,{config:i,onUpdate:n});case"table":return S.jsx(H1,{config:i,onUpdate:n});default:return S.jsxs("div",{style:Hs,children:[S.jsx("span",{style:Is,children:i.type}),S.jsx("span",{style:{fontSize:"12px",color:"#666"},children:"No additional configuration needed."})]})}}function L1({config:i,onUpdate:n}){var h;const a=((h=i.form)==null?void 0:h.fields)??[],[s,u]=re.useState({name:"",type:"text",label:"",required:!1,sensitive:!1}),o=()=>{!s.name||!s.label||(n("form",{form:{fields:[...a,{...s}]}}),u({name:"",type:"text",label:"",required:!1,sensitive:!1}))},f=m=>{n("form",{form:{fields:a.filter((p,g)=>g!==m)}})};return S.jsxs("div",{style:Hs,children:[S.jsx("span",{style:Is,children:"Form Fields"}),a.map((m,p)=>S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"12px"},children:[S.jsx("span",{style:{color:"#a5b4fc",fontWeight:500},children:m.name}),S.jsxs("span",{style:{color:"#666"},children:["(",m.type,")"]}),S.jsxs("span",{style:{color:"#888"},children:['"',m.label,'"']}),m.required&&S.jsx("span",{style:{color:"#f59e0b",fontSize:"10px"},children:"required"}),m.sensitive&&S.jsx("span",{style:{color:"#ef4444",fontSize:"10px"},children:"sensitive"}),S.jsx("button",{onClick:()=>f(p),style:qu,children:"x"})]},p)),S.jsxs("div",{style:{display:"flex",gap:"6px",flexWrap:"wrap",alignItems:"center"},children:[S.jsx("input",{placeholder:"name",value:s.name,onChange:m=>u(p=>({...p,name:m.target.value})),style:{...qi,width:"80px"}}),S.jsx("input",{placeholder:"label",value:s.label,onChange:m=>u(p=>({...p,label:m.target.value})),style:{...qi,width:"100px"}}),S.jsx("select",{value:s.type,onChange:m=>u(p=>({...p,type:m.target.value})),style:qi,children:["text","number","email","date","select","checkbox","textarea"].map(m=>S.jsx("option",{value:m,children:m},m))}),S.jsxs("label",{style:{fontSize:"11px",color:"#888",display:"flex",gap:"3px",alignItems:"center"},children:[S.jsx("input",{type:"checkbox",checked:s.required,onChange:m=>u(p=>({...p,required:m.target.checked}))}),"req"]}),S.jsxs("label",{style:{fontSize:"11px",color:"#888",display:"flex",gap:"3px",alignItems:"center"},children:[S.jsx("input",{type:"checkbox",checked:s.sensitive,onChange:m=>u(p=>({...p,sensitive:m.target.checked}))}),"PII"]}),S.jsx("button",{onClick:o,style:Lu,children:"+ Add"})]})]})}function q1({config:i,onUpdate:n}){const a=i.approvalGate??{roles:[],requiredApprovers:1,requireReason:!1},[s,u]=re.useState(""),o=()=>{s&&(n("approval-gate",{approvalGate:{...a,roles:[...a.roles,s]}}),u(""))};return S.jsxs("div",{style:Hs,children:[S.jsx("span",{style:Is,children:"Approval Gate"}),S.jsx("div",{style:{display:"flex",gap:"6px",flexWrap:"wrap"},children:a.roles.map((f,h)=>S.jsxs("span",{style:{background:"#1e1b4b",color:"#a5b4fc",padding:"2px 8px",borderRadius:"4px",fontSize:"11px"},children:[f,S.jsx("button",{onClick:()=>n("approval-gate",{approvalGate:{...a,roles:a.roles.filter((m,p)=>p!==h)}}),style:{...qu,marginLeft:"4px"},children:"x"})]},h))}),S.jsxs("div",{style:{display:"flex",gap:"6px",alignItems:"center"},children:[S.jsx("input",{placeholder:"role name",value:s,onChange:f=>u(f.target.value),onKeyDown:f=>f.key==="Enter"&&o(),style:qi}),S.jsx("button",{onClick:o,style:Lu,children:"+ Role"})]}),S.jsxs("label",{style:{fontSize:"12px",color:"#888",display:"flex",gap:"8px",alignItems:"center"},children:["Required approvers:",S.jsx("input",{type:"number",min:1,value:a.requiredApprovers,onChange:f=>n("approval-gate",{approvalGate:{...a,requiredApprovers:Number(f.target.value)}}),style:{...qi,width:"50px"}})]}),S.jsxs("label",{style:{fontSize:"12px",color:"#888",display:"flex",gap:"4px",alignItems:"center"},children:[S.jsx("input",{type:"checkbox",checked:a.requireReason,onChange:f=>n("approval-gate",{approvalGate:{...a,requireReason:f.target.checked}})}),"Require reason on denial"]})]})}function U1({config:i,onUpdate:n}){var f;const a=((f=i.tasklist)==null?void 0:f.items)??[],[s,u]=re.useState(""),o=()=>{s&&(n("tasklist",{tasklist:{items:[...a,s]}}),u(""))};return S.jsxs("div",{style:Hs,children:[S.jsx("span",{style:Is,children:"Tasklist Items"}),a.map((h,m)=>S.jsxs("div",{style:{display:"flex",gap:"6px",alignItems:"center",fontSize:"12px"},children:[S.jsx("span",{style:{color:"#e0e0e0"},children:h}),S.jsx("button",{onClick:()=>n("tasklist",{tasklist:{items:a.filter((p,g)=>g!==m)}}),style:qu,children:"x"})]},m)),S.jsxs("div",{style:{display:"flex",gap:"6px"},children:[S.jsx("input",{placeholder:"New task item",value:s,onChange:h=>u(h.target.value),onKeyDown:h=>h.key==="Enter"&&o(),style:{...qi,flex:1}}),S.jsx("button",{onClick:o,style:Lu,children:"+ Add"})]})]})}function H1({config:i,onUpdate:n}){var f;const a=((f=i.table)==null?void 0:f.columns)??[],[s,u]=re.useState({key:"",header:""}),o=()=>{!s.key||!s.header||(n("table",{table:{columns:[...a,{...s}]}}),u({key:"",header:""}))};return S.jsxs("div",{style:Hs,children:[S.jsx("span",{style:Is,children:"Table Columns"}),a.map((h,m)=>S.jsxs("div",{style:{display:"flex",gap:"6px",alignItems:"center",fontSize:"12px"},children:[S.jsx("span",{style:{color:"#a5b4fc"},children:h.key}),S.jsxs("span",{style:{color:"#888"},children:['"',h.header,'"']}),S.jsx("button",{onClick:()=>n("table",{table:{columns:a.filter((p,g)=>g!==m)}}),style:qu,children:"x"})]},m)),S.jsxs("div",{style:{display:"flex",gap:"6px"},children:[S.jsx("input",{placeholder:"key",value:s.key,onChange:h=>u(m=>({...m,key:h.target.value})),style:{...qi,width:"80px"}}),S.jsx("input",{placeholder:"header",value:s.header,onChange:h=>u(m=>({...m,header:h.target.value})),style:{...qi,flex:1}}),S.jsx("button",{onClick:o,style:Lu,children:"+ Add"})]})]})}const Hs={display:"flex",flexDirection:"column",gap:"8px",padding:"10px",border:"1px solid #333",borderRadius:"6px",background:"#111"},Is={fontSize:"13px",fontWeight:600,color:"#a5b4fc",textTransform:"capitalize"},qi={padding:"4px 8px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#e0e0e0",fontSize:"12px",outline:"none"},Lu={padding:"4px 10px",border:"1px solid #6366f1",borderRadius:"4px",background:"#1e1b4b",color:"#a5b4fc",fontSize:"11px",cursor:"pointer",whiteSpace:"nowrap"},qu={border:"none",background:"none",color:"#666",cursor:"pointer",fontSize:"12px",padding:"0 2px"},I1={baseUrl:"http://localhost:11434/v1",apiKey:"",model:"llama3"},xu={openai:{label:"OpenAI",baseUrl:"https://api.openai.com/v1",apiKey:"",model:"gpt-4o",requiresKey:!0},anthropic:{label:"Anthropic",baseUrl:"https://api.anthropic.com/v1",apiKey:"",model:"claude-sonnet-4-5-20250929",requiresKey:!0},gemini:{label:"Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",apiKey:"",model:"gemini-2.0-flash",requiresKey:!0},openrouter:{label:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",apiKey:"",model:"anthropic/claude-sonnet-4-5-20250929",requiresKey:!0},groq:{label:"Groq",baseUrl:"https://api.groq.com/openai/v1",apiKey:"",model:"llama-3.3-70b-versatile",requiresKey:!0},ollama:{label:"Ollama",baseUrl:"http://localhost:11434/v1",apiKey:"",model:"llama3",requiresKey:!1}};async function*jg(i,n,a){var p,g,b,_;const s=`${i.baseUrl.replace(/\/+$/,"")}/chat/completions`,u={"Content-Type":"application/json"};i.apiKey&&(u.Authorization=`Bearer ${i.apiKey}`);const o=await fetch(s,{method:"POST",headers:u,body:JSON.stringify({model:i.model,messages:n,stream:!0}),signal:a});if(!o.ok){const v=await o.text();throw new Error(`LLM API error ${o.status}: ${v}`)}const f=(p=o.body)==null?void 0:p.getReader();if(!f)throw new Error("No response body");const h=new TextDecoder;let m="";for(;;){const{done:v,value:N}=await f.read();if(v)break;m+=h.decode(N,{stream:!0});const w=m.split(`
50
- `);m=w.pop()??"";for(const D of w){const C=D.trim();if(!C||!C.startsWith("data: "))continue;const H=C.slice(6);if(H==="[DONE]")return;try{const Q=(_=(b=(g=JSON.parse(H).choices)==null?void 0:g[0])==null?void 0:b.delta)==null?void 0:_.content;Q&&(yield Q)}catch{}}}}async function Rg(i,n,a){var h,m,p;const s=`${i.baseUrl.replace(/\/+$/,"")}/chat/completions`,u={"Content-Type":"application/json"};i.apiKey&&(u.Authorization=`Bearer ${i.apiKey}`);const o=await fetch(s,{method:"POST",headers:u,body:JSON.stringify({model:i.model,messages:n,stream:!1}),signal:a});if(!o.ok){const g=await o.text();throw new Error(`LLM API error ${o.status}: ${g}`)}return((p=(m=(h=(await o.json()).choices)==null?void 0:h[0])==null?void 0:m.message)==null?void 0:p.content)??""}const Bg="mdma-builder-api-keys";function Lg(){try{return JSON.parse(localStorage.getItem(Bg)||"{}")}catch{return{}}}function Y1(i,n){const a=Lg();a[i]=n,localStorage.setItem(Bg,JSON.stringify(a))}function V1(i){for(const[n,a]of Object.entries(xu))if(i===a.baseUrl)return n;return null}function G1({messages:i,isGenerating:n,error:a,onGenerate:s,onStop:u,onReset:o,config:f,onConfigChange:h}){const[m,p]=re.useState(""),[g,b]=re.useState(!1),_=re.useMemo(()=>V1(f.baseUrl),[f.baseUrl]),v=_?xu[_]:null,N=H=>{const M=xu[H],Q=Lg();h({baseUrl:M.baseUrl,model:M.model,apiKey:Q[H]||""})},w=H=>{h({...f,apiKey:H}),_&&Y1(_,H)},D=()=>{const H=m.trim();p(""),s(H||void 0)},C=!(v!=null&&v.requiresKey)||f.apiKey.length>0;return S.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[S.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center",padding:"8px 0"},children:[S.jsx("button",{onClick:()=>b(H=>!H),style:qy,children:g?"Hide Settings":"Settings"}),S.jsxs("span",{style:{fontSize:"11px",color:"#666"},children:[(v==null?void 0:v.label)||"Custom"," / ",f.model]}),!C&&S.jsx("span",{style:{fontSize:"11px",color:"#f59e0b"},children:"API key required"}),S.jsx("div",{style:{flex:1}}),S.jsx("button",{onClick:o,style:qy,children:"Clear"})]}),g&&S.jsxs("div",{style:{padding:"12px",border:"1px solid #333",borderRadius:"8px",background:"#111",marginBottom:"8px",display:"flex",flexDirection:"column",gap:"10px"},children:[S.jsx("span",{style:{fontSize:"12px",color:"#888",fontWeight:500},children:"Provider"}),S.jsx("div",{style:{display:"flex",gap:"6px",flexWrap:"wrap"},children:Object.entries(xu).map(([H,M])=>S.jsx("button",{onClick:()=>N(H),style:{...K1,..._===H?{borderColor:"#6366f1",color:"#a5b4fc",background:"#1e1b4b"}:{}},children:M.label},H))}),(v==null?void 0:v.requiresKey)&&S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[S.jsxs("span",{style:{fontSize:"11px",color:"#888"},children:[v.label," API Key"]}),S.jsx("input",{placeholder:`Enter your ${v.label} API key...`,type:"password",value:f.apiKey,onChange:H=>w(H.target.value),style:{...xf,borderColor:f.apiKey?"#22c55e33":"#f59e0b33"}}),f.apiKey&&S.jsxs("span",{style:{fontSize:"10px",color:"#22c55e"},children:["Key saved for ",v.label]})]}),S.jsxs("div",{style:{display:"flex",gap:"8px"},children:[S.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"4px"},children:[S.jsx("span",{style:{fontSize:"11px",color:"#888"},children:"Model"}),S.jsx("input",{placeholder:"Model",value:f.model,onChange:H=>h({...f,model:H.target.value}),style:xf})]}),S.jsxs("div",{style:{flex:2,display:"flex",flexDirection:"column",gap:"4px"},children:[S.jsx("span",{style:{fontSize:"11px",color:"#888"},children:"Base URL"}),S.jsx("input",{placeholder:"Base URL",value:f.baseUrl,onChange:H=>h({...f,baseUrl:H.target.value}),style:xf})]})]})]}),S.jsxs("div",{style:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"8px",padding:"4px 0"},children:[i.length===0&&!n&&S.jsx("div",{style:{color:"#555",fontSize:"13px",textAlign:"center",padding:"40px 20px"},children:C?S.jsxs(S.Fragment,{children:["Configure components on the left, then click ",S.jsx("strong",{children:"Generate"}),"."]}):S.jsxs(S.Fragment,{children:["Set your ",S.jsx("strong",{children:(v==null?void 0:v.label)||"LLM"})," API key in Settings above to get started."]})}),i.filter(H=>H.role!=="system").map((H,M)=>S.jsx("div",{style:{padding:"8px 12px",borderRadius:"8px",fontSize:"13px",lineHeight:1.5,background:H.role==="user"?"#1e1b4b":"#1a1a1a",color:H.role==="user"?"#c7d2fe":"#e0e0e0",alignSelf:H.role==="user"?"flex-end":"flex-start",maxWidth:"90%",whiteSpace:"pre-wrap"},children:H.content},M)),n&&S.jsx("div",{style:{fontSize:"12px",color:"#6366f1",padding:"4px"},children:"Generating..."}),a&&S.jsx("div",{style:{fontSize:"12px",color:"#ef4444",padding:"4px"},children:a})]}),S.jsxs("div",{style:{display:"flex",gap:"8px",paddingTop:"8px",borderTop:"1px solid #222"},children:[S.jsx("textarea",{value:m,onChange:H=>p(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),!n&&C&&D())},placeholder:i.length===0?"Click Generate or type to refine...":"Refine the prompt...",rows:2,disabled:!C,style:{flex:1,padding:"8px 10px",border:"1px solid #333",borderRadius:"6px",background:"#1a1a1a",color:"#e0e0e0",fontSize:"13px",fontFamily:"inherit",resize:"none",outline:"none",opacity:C?1:.5}}),n?S.jsx("button",{onClick:u,style:{...Uy,background:"#7f1d1d",borderColor:"#ef4444"},children:"Stop"}):S.jsx("button",{type:"button",onClick:D,disabled:!C,style:{...Uy,opacity:C?1:.5},children:i.length===0?"Generate":"Send"})]})]})}const qy={border:"none",background:"none",color:"#6366f1",cursor:"pointer",fontSize:"12px",padding:0},K1={padding:"6px 12px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#888",fontSize:"12px",cursor:"pointer",fontWeight:500},xf={padding:"6px 8px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#e0e0e0",fontSize:"12px",outline:"none"},Uy={padding:"8px 16px",border:"1px solid #6366f1",borderRadius:"6px",background:"#1e1b4b",color:"#a5b4fc",fontSize:"13px",fontWeight:600,cursor:"pointer",alignSelf:"flex-end"};function Z1({prompt:i,isGenerating:n}){const[a,s]=re.useState(!1),u=async()=>{await navigator.clipboard.writeText(i),s(!0),setTimeout(()=>s(!1),2e3)},o=()=>{const f=new Blob([i],{type:"text/plain"}),h=URL.createObjectURL(f),m=document.createElement("a");m.href=h,m.download="mdma-custom-prompt.txt",m.click(),URL.revokeObjectURL(h)};return!i&&!n?S.jsx("div",{style:Hy,children:S.jsxs("div",{style:{color:"#666",fontSize:"13px",textAlign:"center",padding:"40px 20px"},children:[S.jsxs("p",{style:{marginBottom:"8px"},children:["Configure your components and click ",S.jsx("strong",{children:"Generate"}),"."]}),S.jsxs("p",{style:{fontSize:"11px"},children:["The generated prompt will be used with:",S.jsx("br",{}),S.jsxs("code",{style:{color:"#a5b4fc"},children:["buildSystemPrompt(","{ customPrompt }",")"]})]})]})}):S.jsxs("div",{style:Hy,children:[S.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[S.jsx("h3",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#e0e0e0"},children:"Generated Prompt"}),S.jsxs("div",{style:{display:"flex",gap:"6px"},children:[S.jsx("button",{onClick:u,style:Iy,disabled:!i,children:a?"Copied!":"Copy"}),S.jsx("button",{onClick:o,style:Iy,disabled:!i,children:"Save"})]})]}),S.jsxs("pre",{style:{flex:1,overflowY:"auto",padding:"12px",border:"1px solid #333",borderRadius:"6px",background:"#0a0a0a",color:"#d4d4d4",fontSize:"12px",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:[i,n&&S.jsx("span",{style:{color:"#6366f1"},children:"|"})]}),i&&S.jsxs("div",{style:{marginTop:"10px",padding:"10px",border:"1px solid #1e1b4b",borderRadius:"6px",background:"#0f0e26"},children:[S.jsx("p",{style:{margin:0,fontSize:"11px",color:"#888"},children:"Usage in your app:"}),S.jsxs("code",{style:{fontSize:"12px",color:"#a5b4fc"},children:["import { buildSystemPrompt } from '@mobile-reality/mdma-prompt-pack';",S.jsx("br",{}),S.jsx("br",{}),"const systemPrompt = buildSystemPrompt({",S.jsx("br",{})," customPrompt: `<paste generated prompt here>`",S.jsx("br",{}),"});"]})]})]})}const Hy={display:"flex",flexDirection:"column",height:"100%"},Iy={padding:"4px 12px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#e0e0e0",fontSize:"11px",cursor:"pointer"},Yy=`You are an expert MDMA document author. MDMA (Markdown Document with Micro-Applications) extends standard Markdown with interactive components defined in fenced code blocks using the \`mdma\` language tag. Think before you generate content, and ensure it adheres to the MDMA format and authoring rules.
51
-
52
- CRITICAL: Your output IS the Markdown document — write headings, paragraphs, and \`\`\`mdma blocks directly. NEVER wrap your response in \`\`\`markdown code fences. Your response is already rendered as Markdown.
53
-
54
- ## Document Format
55
-
56
- An MDMA document is a standard Markdown file that contains one or more interactive component blocks. Each component block is a YAML snippet inside a fenced code block tagged with \`mdma\`. Here is an example of what your output should look like — note there are NO outer \`\`\`markdown fences:
57
-
58
- # My Document Title
59
-
60
- Some regular Markdown content here.
61
-
62
- \`\`\`mdma
63
- type: form
64
- id: contact-form
65
- fields:
66
- - name: email
67
- type: email
68
- label: Email Address
69
- required: true
70
- \`\`\`
71
-
72
- More Markdown content can follow.
73
-
74
- ## Component Types
75
-
76
- MDMA supports 9 component types. Every component shares these base fields:
77
-
78
- - **id** (string, required) — Unique identifier within the document
79
- - **type** (string, required) — Component type name
80
- - **label** (string, optional) — Display label
81
- - **sensitive** (boolean, default: false) — If true, values are redacted in logs
82
- - **disabled** (boolean | binding, default: false)
83
- - **visible** (boolean | binding, default: true)
84
- - **meta** (object, optional) — Arbitrary metadata
85
-
86
- ### 1. form
87
-
88
- Collects user input via structured fields.
89
-
90
- \`\`\`yaml
91
- type: form
92
- id: <unique-id>
93
- fields:
94
- - name: <field-name> # required, string
95
- type: text | number | email | date | select | checkbox | textarea
96
- label: <display-label> # required, string
97
- required: true | false # default: false
98
- sensitive: true | false # default: false — set true for PII
99
- defaultValue: <any> # optional
100
- options: # required when type is "select"
101
- - label: <label>
102
- value: <value>
103
- validation: # optional
104
- pattern: <regex>
105
- min: <number>
106
- max: <number>
107
- message: <error-message>
108
- bind: "{{variable.path}}" # optional binding
109
- onSubmit: <action-id> # optional — action triggered on submit
110
- \`\`\`
111
-
112
- ### 2. button
113
-
114
- Triggers an action when clicked.
115
-
116
- \`\`\`yaml
117
- type: button
118
- id: <unique-id>
119
- text: <button-label> # required, string
120
- variant: primary | secondary | danger | ghost # default: primary
121
- onAction: <action-id> # required — action triggered on click
122
- confirm: # optional confirmation dialog
123
- title: <dialog-title>
124
- message: <dialog-message>
125
- confirmText: <confirm-label> # default: "Confirm"
126
- cancelText: <cancel-label> # default: "Cancel"
127
- \`\`\`
128
-
129
- ### 3. tasklist
130
-
131
- A checklist of items that can be individually checked off.
132
-
133
- \`\`\`yaml
134
- type: tasklist
135
- id: <unique-id>
136
- items:
137
- - id: <item-id> # required, unique within tasklist
138
- text: <item-description> # required, string
139
- checked: true | false # default: false
140
- required: true | false # default: false
141
- bind: "{{variable.path}}" # optional binding
142
- onComplete: <action-id> # optional — triggered when all items checked
143
- \`\`\`
144
-
145
- ### 4. table
146
-
147
- Displays tabular data with optional sorting, filtering, and pagination.
148
-
149
- \`\`\`yaml
150
- type: table
151
- id: <unique-id>
152
- columns:
153
- - key: <field-key> # required, string
154
- header: <column-header> # required, string
155
- sortable: true | false # default: false
156
- sensitive: true | false # default: false
157
- width: <css-width> # optional, e.g. "200px"
158
- data: # array of row objects OR a binding
159
- - { key1: value1, key2: value2 }
160
- # OR: data: "{{variable.path}}"
161
- sortable: true | false # default: false (table-level)
162
- filterable: true | false # default: false
163
- pageSize: <number> # optional, positive integer
164
- \`\`\`
165
-
166
- ### 5. callout
167
-
168
- Displays a highlighted message block.
169
-
170
- \`\`\`yaml
171
- type: callout
172
- id: <unique-id>
173
- variant: info | warning | error | success # default: info
174
- title: <optional-title>
175
- content: <message-text> # required, string
176
- dismissible: true | false # default: false
177
- \`\`\`
178
-
179
- ### 6. approval-gate
180
-
181
- Blocks workflow progression until required approvals are received.
182
-
183
- \`\`\`yaml
184
- type: approval-gate
185
- id: <unique-id>
186
- title: <gate-title> # required, string
187
- description: <details> # optional
188
- requiredApprovers: <number> # default: 1, positive integer
189
- allowedRoles: # optional — restrict who can approve
190
- - <role-name>
191
- onApprove: <action-id> # optional
192
- onDeny: <action-id> # optional
193
- requireReason: true | false # default: false — require reason on denial
194
- \`\`\`
195
-
196
- ### 7. webhook
197
-
198
- Makes an HTTP request when triggered by an action.
199
-
200
- \`\`\`yaml
201
- type: webhook
202
- id: <unique-id>
203
- url: <endpoint-url> # required, valid URL or binding
204
- method: GET | POST | PUT | PATCH | DELETE # default: POST
205
- headers: # optional, key-value pairs
206
- Content-Type: application/json
207
- body: # optional, object or binding
208
- key: value
209
- trigger: <action-id> # required — action ID that triggers this webhook
210
- retries: <0-5> # default: 0
211
- timeout: <milliseconds> # default: 30000
212
- \`\`\`
213
-
214
- ### 8. chart
215
-
216
- Displays data as a visual chart. Data is provided as a compact CSV-like multiline string where the first row contains column headers and subsequent rows contain comma-separated values.
217
-
218
- \`\`\`yaml
219
- type: chart
220
- id: <unique-id>
221
- variant: line | bar | area | pie # default: line
222
- label: <chart-title> # optional
223
- data: | # required — CSV multiline string or binding
224
- <col1>, <col2>, <col3>
225
- <val1>, <val2>, <val3>
226
- <val1>, <val2>, <val3>
227
- xAxis: <column-name> # optional — column for x-axis (default: first column)
228
- yAxis: <column-name> | [<col1>, <col2>] # optional — column(s) for y-axis (default: all numeric non-xAxis columns)
229
- colors: # optional — custom color palette
230
- - "<hex-color>"
231
- showLegend: true | false # default: true
232
- showGrid: true | false # default: true
233
- height: <number> # default: 300 (pixels)
234
- stacked: true | false # default: false (for bar/area)
235
- \`\`\`
236
-
237
- **Data format rules:**
238
- - First line of \`data\` = column headers (comma-separated, trimmed)
239
- - Subsequent lines = data rows (comma-separated, trimmed)
240
- - Numeric values are auto-detected and coerced
241
- - Use YAML \`|\` block scalar for multi-line data
242
-
243
- **Example — line chart:**
244
- \`\`\`yaml
245
- type: chart
246
- id: revenue-chart
247
- variant: line
248
- label: Revenue Trend
249
- data: |
250
- month, revenue, costs
251
- Jan, 45000, 32000
252
- Feb, 52000, 35000
253
- Mar, 48000, 31000
254
- Apr, 61000, 38000
255
- xAxis: month
256
- \`\`\`
257
-
258
- **Example — pie chart:**
259
- \`\`\`yaml
260
- type: chart
261
- id: market-share
262
- variant: pie
263
- label: Market Share
264
- data: |
265
- company, share
266
- Ours, 35
267
- Competitor A, 25
268
- Competitor B, 20
269
- Others, 20
270
- xAxis: company
271
- \`\`\`
272
-
273
- ### 9. thinking
274
-
275
- Displays a collapsible block that shows AI reasoning or thinking process. Useful for transparency about how the AI arrived at conclusions or recommendations.
276
-
277
- \`\`\`yaml
278
- type: thinking
279
- id: <unique-id>
280
- label: <header-text> # optional — default: "Thinking"
281
- content: | # required — free-form reasoning text
282
- <reasoning text>
283
- status: thinking | done # default: done — "thinking" shows pulsing animation
284
- collapsed: true | false # default: true — starts collapsed
285
- \`\`\`
286
-
287
- - \`content\`: free-form reasoning text — use YAML \`|\` block scalar for multi-line
288
- - \`collapsed: true\` by default — thinking is supplementary information
289
- - \`status: thinking\` shows a pulsing animation (use during streaming), \`done\` when complete
290
-
291
- **Example — analysis reasoning:**
292
- \`\`\`yaml
293
- type: thinking
294
- id: analysis-reasoning
295
- label: Analyzing revenue data...
296
- status: done
297
- collapsed: true
298
- content: |
299
- First, I examined the quarterly revenue trends.
300
- Q3 shows a 15% dip which correlates with seasonal patterns.
301
- However, year-over-year growth remains strong at 23%.
302
- Recommendation: maintain current strategy with Q3 adjustments.
303
- \`\`\`
304
-
305
- ## Binding Syntax
306
-
307
- Use \`{{variable.path}}\` to create dynamic bindings between components. Bindings must:
308
- - Start with \`{{\` and end with \`}}\`
309
- - Contain a valid dot-notation path starting with a letter or underscore
310
- - Reference existing component IDs or context variables
311
-
312
- Examples:
313
- - \`{{contact_form.email}}\` — bind to the email field of a form
314
- - \`{{user.name}}\` — bind to a context variable
315
-
316
- ## Authoring Rules
317
-
318
- 1. **Unique IDs** — Every component \`id\` must be unique within the document. Use descriptive kebab-case names (e.g., \`employee-onboarding-form\`, \`submit-btn\`).
319
- 2. **Sensitive data** — Set \`sensitive: true\` on any field or column that contains PII (personally identifiable information) such as email addresses, phone numbers, SSNs, addresses, or financial data.
320
- 3. **Required fields** — Mark form fields as \`required: true\` when the workflow cannot proceed without them.
321
- 4. **Action references** — All \`onSubmit\`, \`onAction\`, \`onComplete\`, \`onApprove\`, \`onDeny\`, and \`trigger\` values should reference valid action IDs within the document.
322
- 5. **Binding validity** — Every \`{{binding}}\` must reference a valid source. Do not leave unresolved bindings.
323
- 6. **Minimal components** — Only include components that are necessary for the workflow. Avoid empty or placeholder components.
324
- 7. **YAML correctness** — Ensure all YAML in mdma blocks is valid and properly indented. Always wrap string values in double quotes if they contain a colon followed by a space (\`: \`), e.g. \`label: "Step 1: Enter your info"\`.
325
- 8. **Always include thinking** — When generating MDMA components, ALWAYS include a \`thinking\` block BEFORE the main content to show your reasoning process. Use \`status: done\` and \`collapsed: true\`.
326
- 9. **Never expose MDMA internals to the user** — Do NOT mention thinking blocks, sensitive flags, bindings, component IDs, YAML structure, or any other MDMA implementation details in your visible Markdown text. The user should see a natural, helpful response — not commentary about how the document is built. All reasoning belongs inside the \`thinking\` block, not in the prose. Never write things like "I included a thinking block" or "the email field is marked as sensitive".
327
-
328
- ## Self-Check Checklist
329
-
330
- Before finalizing an MDMA document, verify:
331
-
332
- - [ ] Every component has a unique \`id\`
333
- - [ ] All PII fields have \`sensitive: true\`
334
- - [ ] All \`{{bindings}}\` reference valid sources
335
- - [ ] Required form fields are marked \`required: true\`
336
- - [ ] Action IDs referenced in event handlers exist in the document
337
- - [ ] Select fields include an \`options\` array
338
- - [ ] YAML syntax is valid in all mdma blocks
339
- - [ ] Table \`data\` matches the declared \`columns\` keys
340
- - [ ] Approval gates have at least one approver configured
341
- - [ ] Webhook URLs are valid or use binding syntax
342
- `;function Q1(i={}){const{customPrompt:n}=i;return n?`${Yy}
343
-
344
- ---
345
-
346
- ${n}
347
-
348
- ---
349
-
350
- Reminder — when generating MDMA components you MUST:
351
- - Include a \`thinking\` block BEFORE the main content (status: done, collapsed: true).
352
- - Use unique kebab-case IDs for every component.
353
- - Mark PII fields with \`sensitive: true\`.
354
- - NEVER mention thinking blocks, sensitive flags, bindings, component IDs, or any MDMA implementation details in your visible text. All reasoning goes inside the thinking block. The user should see a natural response, not meta-commentary about how the document is structured.
355
- - Respond in plain Markdown — do NOT wrap the entire response in code fences.`:Yy}const qg="mdma";var Le;(function(i){i.assertEqual=u=>{};function n(u){}i.assertIs=n;function a(u){throw new Error}i.assertNever=a,i.arrayToEnum=u=>{const o={};for(const f of u)o[f]=f;return o},i.getValidEnumValues=u=>{const o=i.objectKeys(u).filter(h=>typeof u[u[h]]!="number"),f={};for(const h of o)f[h]=u[h];return i.objectValues(f)},i.objectValues=u=>i.objectKeys(u).map(function(o){return u[o]}),i.objectKeys=typeof Object.keys=="function"?u=>Object.keys(u):u=>{const o=[];for(const f in u)Object.prototype.hasOwnProperty.call(u,f)&&o.push(f);return o},i.find=(u,o)=>{for(const f of u)if(o(f))return f},i.isInteger=typeof Number.isInteger=="function"?u=>Number.isInteger(u):u=>typeof u=="number"&&Number.isFinite(u)&&Math.floor(u)===u;function s(u,o=" | "){return u.map(f=>typeof f=="string"?`'${f}'`:f).join(o)}i.joinValues=s,i.jsonStringifyReplacer=(u,o)=>typeof o=="bigint"?o.toString():o})(Le||(Le={}));var Vy;(function(i){i.mergeShapes=(n,a)=>({...n,...a})})(Vy||(Vy={}));const le=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Bi=i=>{switch(typeof i){case"undefined":return le.undefined;case"string":return le.string;case"number":return Number.isNaN(i)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(i)?le.array:i===null?le.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?le.promise:typeof Map<"u"&&i instanceof Map?le.map:typeof Set<"u"&&i instanceof Set?le.set:typeof Date<"u"&&i instanceof Date?le.date:le.object;default:return le.unknown}},F=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ui extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=n}format(n){const a=n||function(o){return o.message},s={_errors:[]},u=o=>{for(const f of o.issues)if(f.code==="invalid_union")f.unionErrors.map(u);else if(f.code==="invalid_return_type")u(f.returnTypeError);else if(f.code==="invalid_arguments")u(f.argumentsError);else if(f.path.length===0)s._errors.push(a(f));else{let h=s,m=0;for(;m<f.path.length;){const p=f.path[m];m===f.path.length-1?(h[p]=h[p]||{_errors:[]},h[p]._errors.push(a(f))):h[p]=h[p]||{_errors:[]},h=h[p],m++}}};return u(this),s}static assert(n){if(!(n instanceof ui))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=a=>a.message){const a={},s=[];for(const u of this.issues)if(u.path.length>0){const o=u.path[0];a[o]=a[o]||[],a[o].push(n(u))}else s.push(n(u));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}ui.create=i=>new ui(i);const Vf=(i,n)=>{let a;switch(i.code){case F.invalid_type:i.received===le.undefined?a="Required":a=`Expected ${i.expected}, received ${i.received}`;break;case F.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(i.expected,Le.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:a=`Unrecognized key(s) in object: ${Le.joinValues(i.keys,", ")}`;break;case F.invalid_union:a="Invalid input";break;case F.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${Le.joinValues(i.options)}`;break;case F.invalid_enum_value:a=`Invalid enum value. Expected ${Le.joinValues(i.options)}, received '${i.received}'`;break;case F.invalid_arguments:a="Invalid function arguments";break;case F.invalid_return_type:a="Invalid function return type";break;case F.invalid_date:a="Invalid date";break;case F.invalid_string:typeof i.validation=="object"?"includes"in i.validation?(a=`Invalid input: must include "${i.validation.includes}"`,typeof i.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${i.validation.position}`)):"startsWith"in i.validation?a=`Invalid input: must start with "${i.validation.startsWith}"`:"endsWith"in i.validation?a=`Invalid input: must end with "${i.validation.endsWith}"`:Le.assertNever(i.validation):i.validation!=="regex"?a=`Invalid ${i.validation}`:a="Invalid";break;case F.too_small:i.type==="array"?a=`Array must contain ${i.exact?"exactly":i.inclusive?"at least":"more than"} ${i.minimum} element(s)`:i.type==="string"?a=`String must contain ${i.exact?"exactly":i.inclusive?"at least":"over"} ${i.minimum} character(s)`:i.type==="number"?a=`Number must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${i.minimum}`:i.type==="bigint"?a=`Number must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${i.minimum}`:i.type==="date"?a=`Date must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(i.minimum))}`:a="Invalid input";break;case F.too_big:i.type==="array"?a=`Array must contain ${i.exact?"exactly":i.inclusive?"at most":"less than"} ${i.maximum} element(s)`:i.type==="string"?a=`String must contain ${i.exact?"exactly":i.inclusive?"at most":"under"} ${i.maximum} character(s)`:i.type==="number"?a=`Number must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="bigint"?a=`BigInt must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="date"?a=`Date must be ${i.exact?"exactly":i.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(i.maximum))}`:a="Invalid input";break;case F.custom:a="Invalid input";break;case F.invalid_intersection_types:a="Intersection results could not be merged";break;case F.not_multiple_of:a=`Number must be a multiple of ${i.multipleOf}`;break;case F.not_finite:a="Number must be finite";break;default:a=n.defaultError,Le.assertNever(i)}return{message:a}};let $1=Vf;function X1(){return $1}const J1=i=>{const{data:n,path:a,errorMaps:s,issueData:u}=i,o=[...a,...u.path||[]],f={...u,path:o};if(u.message!==void 0)return{...u,path:o,message:u.message};let h="";const m=s.filter(p=>!!p).slice().reverse();for(const p of m)h=p(f,{data:n,defaultError:h}).message;return{...u,path:o,message:h}};function ie(i,n){const a=X1(),s=J1({issueData:n,data:i.data,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,a,a===Vf?void 0:Vf].filter(u=>!!u)});i.common.issues.push(s)}class Dt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,a){const s=[];for(const u of a){if(u.status==="aborted")return xe;u.status==="dirty"&&n.dirty(),s.push(u.value)}return{status:n.value,value:s}}static async mergeObjectAsync(n,a){const s=[];for(const u of a){const o=await u.key,f=await u.value;s.push({key:o,value:f})}return Dt.mergeObjectSync(n,s)}static mergeObjectSync(n,a){const s={};for(const u of a){const{key:o,value:f}=u;if(o.status==="aborted"||f.status==="aborted")return xe;o.status==="dirty"&&n.dirty(),f.status==="dirty"&&n.dirty(),o.value!=="__proto__"&&(typeof f.value<"u"||u.alwaysSet)&&(s[o.value]=f.value)}return{status:n.value,value:s}}}const xe=Object.freeze({status:"aborted"}),Cs=i=>({status:"dirty",value:i}),yn=i=>({status:"valid",value:i}),Gy=i=>i.status==="aborted",Ky=i=>i.status==="dirty",vl=i=>i.status==="valid",Au=i=>typeof Promise<"u"&&i instanceof Promise;var ce;(function(i){i.errToObj=n=>typeof n=="string"?{message:n}:n||{},i.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(ce||(ce={}));class Mn{constructor(n,a,s,u){this._cachedPath=[],this.parent=n,this.data=a,this._path=s,this._key=u}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zy=(i,n)=>{if(vl(n))return{success:!0,data:n.value};if(!i.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new ui(i.common.issues);return this._error=a,this._error}}};function Te(i){if(!i)return{};const{errorMap:n,invalid_type_error:a,required_error:s,description:u}=i;if(n&&(a||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:u}:{errorMap:(f,h)=>{const{message:m}=i;return f.code==="invalid_enum_value"?{message:m??h.defaultError}:typeof h.data>"u"?{message:m??s??h.defaultError}:f.code!=="invalid_type"?{message:h.defaultError}:{message:m??a??h.defaultError}},description:u}}class Re{get description(){return this._def.description}_getType(n){return Bi(n.data)}_getOrReturnCtx(n,a){return a||{common:n.parent.common,data:n.data,parsedType:Bi(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new Dt,ctx:{common:n.parent.common,data:n.data,parsedType:Bi(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const a=this._parse(n);if(Au(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(n){const a=this._parse(n);return Promise.resolve(a)}parse(n,a){const s=this.safeParse(n,a);if(s.success)return s.data;throw s.error}safeParse(n,a){const s={common:{issues:[],async:(a==null?void 0:a.async)??!1,contextualErrorMap:a==null?void 0:a.errorMap},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Bi(n)},u=this._parseSync({data:n,path:s.path,parent:s});return Zy(s,u)}"~validate"(n){var s,u;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Bi(n)};if(!this["~standard"].async)try{const o=this._parseSync({data:n,path:[],parent:a});return vl(o)?{value:o.value}:{issues:a.common.issues}}catch(o){(u=(s=o==null?void 0:o.message)==null?void 0:s.toLowerCase())!=null&&u.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:a}).then(o=>vl(o)?{value:o.value}:{issues:a.common.issues})}async parseAsync(n,a){const s=await this.safeParseAsync(n,a);if(s.success)return s.data;throw s.error}async safeParseAsync(n,a){const s={common:{issues:[],contextualErrorMap:a==null?void 0:a.errorMap,async:!0},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Bi(n)},u=this._parse({data:n,path:s.path,parent:s}),o=await(Au(u)?u:Promise.resolve(u));return Zy(s,o)}refine(n,a){const s=u=>typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(u):a;return this._refinement((u,o)=>{const f=n(u),h=()=>o.addIssue({code:F.custom,...s(u)});return typeof Promise<"u"&&f instanceof Promise?f.then(m=>m?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(n,a){return this._refinement((s,u)=>n(s)?!0:(u.addIssue(typeof a=="function"?a(s,u):a),!1))}_refinement(n){return new Ii({schema:this,typeName:Se.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,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:a=>this["~validate"](a)}}optional(){return si.create(this,this._def)}nullable(){return da.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nn.create(this)}promise(){return Mu.create(this,this._def)}or(n){return Eu.create([this,n],this._def)}and(n){return Cu.create(this,n,this._def)}transform(n){return new Ii({...Te(this._def),schema:this,typeName:Se.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const a=typeof n=="function"?n:()=>n;return new zu({...Te(this._def),innerType:this,defaultValue:a,typeName:Se.ZodDefault})}brand(){return new Yg({typeName:Se.ZodBranded,type:this,...Te(this._def)})}catch(n){const a=typeof n=="function"?n:()=>n;return new Du({...Te(this._def),innerType:this,catchValue:a,typeName:Se.ZodCatch})}describe(n){const a=this.constructor;return new a({...this._def,description:n})}pipe(n){return fd.create(this,n)}readonly(){return ju.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const F1=/^c[^\s-]{8,}$/i,W1=/^[0-9a-z]+$/,P1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ex=/^[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,tx=/^[a-z0-9_-]{21}$/i,nx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ix=/^[-+]?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)?)??$/,ax=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Sf;const sx=/^(?:(?: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])$/,rx=/^(?:(?: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])$/,ux=/^(([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]))$/,ox=/^(([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])$/,cx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,fx=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ug="((\\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])))",dx=new RegExp(`^${Ug}$`);function Hg(i){let n="[0-5]\\d";i.precision?n=`${n}\\.\\d{${i.precision}}`:i.precision==null&&(n=`${n}(\\.\\d+)?`);const a=i.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${n})${a}`}function hx(i){return new RegExp(`^${Hg(i)}$`)}function px(i){let n=`${Ug}T${Hg(i)}`;const a=[];return a.push(i.local?"Z?":"Z"),i.offset&&a.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${a.join("|")})`,new RegExp(`^${n}$`)}function mx(i,n){return!!((n==="v4"||!n)&&sx.test(i)||(n==="v6"||!n)&&ux.test(i))}function yx(i,n){if(!nx.test(i))return!1;try{const[a]=i.split(".");if(!a)return!1;const s=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),u=JSON.parse(atob(s));return!(typeof u!="object"||u===null||"typ"in u&&(u==null?void 0:u.typ)!=="JWT"||!u.alg||n&&u.alg!==n)}catch{return!1}}function gx(i,n){return!!((n==="v4"||!n)&&rx.test(i)||(n==="v6"||!n)&&ox.test(i))}class ai extends Re{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==le.string){const o=this._getOrReturnCtx(n);return ie(o,{code:F.invalid_type,expected:le.string,received:o.parsedType}),xe}const s=new Dt;let u;for(const o of this._def.checks)if(o.kind==="min")n.data.length<o.value&&(u=this._getOrReturnCtx(n,u),ie(u,{code:F.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),s.dirty());else if(o.kind==="max")n.data.length>o.value&&(u=this._getOrReturnCtx(n,u),ie(u,{code:F.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),s.dirty());else if(o.kind==="length"){const f=n.data.length>o.value,h=n.data.length<o.value;(f||h)&&(u=this._getOrReturnCtx(n,u),f?ie(u,{code:F.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&ie(u,{code:F.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),s.dirty())}else if(o.kind==="email")ax.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"email",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="emoji")Sf||(Sf=new RegExp(lx,"u")),Sf.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"emoji",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="uuid")ex.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"uuid",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="nanoid")tx.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"nanoid",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="cuid")F1.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"cuid",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="cuid2")W1.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"cuid2",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="ulid")P1.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"ulid",code:F.invalid_string,message:o.message}),s.dirty());else if(o.kind==="url")try{new URL(n.data)}catch{u=this._getOrReturnCtx(n,u),ie(u,{validation:"url",code:F.invalid_string,message:o.message}),s.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"regex",code:F.invalid_string,message:o.message}),s.dirty())):o.kind==="trim"?n.data=n.data.trim():o.kind==="includes"?n.data.includes(o.value,o.position)||(u=this._getOrReturnCtx(n,u),ie(u,{code:F.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),s.dirty()):o.kind==="toLowerCase"?n.data=n.data.toLowerCase():o.kind==="toUpperCase"?n.data=n.data.toUpperCase():o.kind==="startsWith"?n.data.startsWith(o.value)||(u=this._getOrReturnCtx(n,u),ie(u,{code:F.invalid_string,validation:{startsWith:o.value},message:o.message}),s.dirty()):o.kind==="endsWith"?n.data.endsWith(o.value)||(u=this._getOrReturnCtx(n,u),ie(u,{code:F.invalid_string,validation:{endsWith:o.value},message:o.message}),s.dirty()):o.kind==="datetime"?px(o).test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{code:F.invalid_string,validation:"datetime",message:o.message}),s.dirty()):o.kind==="date"?dx.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{code:F.invalid_string,validation:"date",message:o.message}),s.dirty()):o.kind==="time"?hx(o).test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{code:F.invalid_string,validation:"time",message:o.message}),s.dirty()):o.kind==="duration"?ix.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"duration",code:F.invalid_string,message:o.message}),s.dirty()):o.kind==="ip"?mx(n.data,o.version)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"ip",code:F.invalid_string,message:o.message}),s.dirty()):o.kind==="jwt"?yx(n.data,o.alg)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"jwt",code:F.invalid_string,message:o.message}),s.dirty()):o.kind==="cidr"?gx(n.data,o.version)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"cidr",code:F.invalid_string,message:o.message}),s.dirty()):o.kind==="base64"?cx.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"base64",code:F.invalid_string,message:o.message}),s.dirty()):o.kind==="base64url"?fx.test(n.data)||(u=this._getOrReturnCtx(n,u),ie(u,{validation:"base64url",code:F.invalid_string,message:o.message}),s.dirty()):Le.assertNever(o);return{status:s.value,value:n.data}}_regex(n,a,s){return this.refinement(u=>n.test(u),{validation:a,code:F.invalid_string,...ce.errToObj(s)})}_addCheck(n){return new ai({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...ce.errToObj(n)})}url(n){return this._addCheck({kind:"url",...ce.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...ce.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...ce.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...ce.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...ce.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...ce.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...ce.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...ce.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...ce.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...ce.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...ce.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...ce.errToObj(n)})}datetime(n){return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(n==null?void 0:n.offset)??!1,local:(n==null?void 0:n.local)??!1,...ce.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...ce.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...ce.errToObj(n)})}regex(n,a){return this._addCheck({kind:"regex",regex:n,...ce.errToObj(a)})}includes(n,a){return this._addCheck({kind:"includes",value:n,position:a==null?void 0:a.position,...ce.errToObj(a==null?void 0:a.message)})}startsWith(n,a){return this._addCheck({kind:"startsWith",value:n,...ce.errToObj(a)})}endsWith(n,a){return this._addCheck({kind:"endsWith",value:n,...ce.errToObj(a)})}min(n,a){return this._addCheck({kind:"min",value:n,...ce.errToObj(a)})}max(n,a){return this._addCheck({kind:"max",value:n,...ce.errToObj(a)})}length(n,a){return this._addCheck({kind:"length",value:n,...ce.errToObj(a)})}nonempty(n){return this.min(1,ce.errToObj(n))}trim(){return new ai({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ai({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ai({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n}get maxLength(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n}}ai.create=i=>new ai({checks:[],typeName:Se.ZodString,coerce:(i==null?void 0:i.coerce)??!1,...Te(i)});function bx(i,n){const a=(i.toString().split(".")[1]||"").length,s=(n.toString().split(".")[1]||"").length,u=a>s?a:s,o=Number.parseInt(i.toFixed(u).replace(".","")),f=Number.parseInt(n.toFixed(u).replace(".",""));return o%f/10**u}class xl extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==le.number){const o=this._getOrReturnCtx(n);return ie(o,{code:F.invalid_type,expected:le.number,received:o.parsedType}),xe}let s;const u=new Dt;for(const o of this._def.checks)o.kind==="int"?Le.isInteger(n.data)||(s=this._getOrReturnCtx(n,s),ie(s,{code:F.invalid_type,expected:"integer",received:"float",message:o.message}),u.dirty()):o.kind==="min"?(o.inclusive?n.data<o.value:n.data<=o.value)&&(s=this._getOrReturnCtx(n,s),ie(s,{code:F.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),u.dirty()):o.kind==="max"?(o.inclusive?n.data>o.value:n.data>=o.value)&&(s=this._getOrReturnCtx(n,s),ie(s,{code:F.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),u.dirty()):o.kind==="multipleOf"?bx(n.data,o.value)!==0&&(s=this._getOrReturnCtx(n,s),ie(s,{code:F.not_multiple_of,multipleOf:o.value,message:o.message}),u.dirty()):o.kind==="finite"?Number.isFinite(n.data)||(s=this._getOrReturnCtx(n,s),ie(s,{code:F.not_finite,message:o.message}),u.dirty()):Le.assertNever(o);return{status:u.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,ce.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ce.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ce.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ce.toString(a))}setLimit(n,a,s,u){return new xl({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:s,message:ce.toString(u)}]})}_addCheck(n){return new xl({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:ce.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ce.toString(a)})}finite(n){return this._addCheck({kind:"finite",message:ce.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(n)})}get minValue(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&Le.isInteger(n.value))}get isFinite(){let n=null,a=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(a===null||s.value>a)&&(a=s.value):s.kind==="max"&&(n===null||s.value<n)&&(n=s.value)}return Number.isFinite(a)&&Number.isFinite(n)}}xl.create=i=>new xl({checks:[],typeName:Se.ZodNumber,coerce:(i==null?void 0:i.coerce)||!1,...Te(i)});class Rs extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==le.bigint)return this._getInvalidInput(n);let s;const u=new Dt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?n.data<o.value:n.data<=o.value)&&(s=this._getOrReturnCtx(n,s),ie(s,{code:F.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),u.dirty()):o.kind==="max"?(o.inclusive?n.data>o.value:n.data>=o.value)&&(s=this._getOrReturnCtx(n,s),ie(s,{code:F.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),u.dirty()):o.kind==="multipleOf"?n.data%o.value!==BigInt(0)&&(s=this._getOrReturnCtx(n,s),ie(s,{code:F.not_multiple_of,multipleOf:o.value,message:o.message}),u.dirty()):Le.assertNever(o);return{status:u.value,value:n.data}}_getInvalidInput(n){const a=this._getOrReturnCtx(n);return ie(a,{code:F.invalid_type,expected:le.bigint,received:a.parsedType}),xe}gte(n,a){return this.setLimit("min",n,!0,ce.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ce.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ce.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ce.toString(a))}setLimit(n,a,s,u){return new Rs({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:s,message:ce.toString(u)}]})}_addCheck(n){return new Rs({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ce.toString(a)})}get minValue(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n}}Rs.create=i=>new Rs({checks:[],typeName:Se.ZodBigInt,coerce:(i==null?void 0:i.coerce)??!1,...Te(i)});class Gf extends Re{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==le.boolean){const s=this._getOrReturnCtx(n);return ie(s,{code:F.invalid_type,expected:le.boolean,received:s.parsedType}),xe}return yn(n.data)}}Gf.create=i=>new Gf({typeName:Se.ZodBoolean,coerce:(i==null?void 0:i.coerce)||!1,...Te(i)});class Tu extends Re{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==le.date){const o=this._getOrReturnCtx(n);return ie(o,{code:F.invalid_type,expected:le.date,received:o.parsedType}),xe}if(Number.isNaN(n.data.getTime())){const o=this._getOrReturnCtx(n);return ie(o,{code:F.invalid_date}),xe}const s=new Dt;let u;for(const o of this._def.checks)o.kind==="min"?n.data.getTime()<o.value&&(u=this._getOrReturnCtx(n,u),ie(u,{code:F.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),s.dirty()):o.kind==="max"?n.data.getTime()>o.value&&(u=this._getOrReturnCtx(n,u),ie(u,{code:F.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),s.dirty()):Le.assertNever(o);return{status:s.value,value:new Date(n.data.getTime())}}_addCheck(n){return new Tu({...this._def,checks:[...this._def.checks,n]})}min(n,a){return this._addCheck({kind:"min",value:n.getTime(),message:ce.toString(a)})}max(n,a){return this._addCheck({kind:"max",value:n.getTime(),message:ce.toString(a)})}get minDate(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n!=null?new Date(n):null}}Tu.create=i=>new Tu({checks:[],coerce:(i==null?void 0:i.coerce)||!1,typeName:Se.ZodDate,...Te(i)});class Qy extends Re{_parse(n){if(this._getType(n)!==le.symbol){const s=this._getOrReturnCtx(n);return ie(s,{code:F.invalid_type,expected:le.symbol,received:s.parsedType}),xe}return yn(n.data)}}Qy.create=i=>new Qy({typeName:Se.ZodSymbol,...Te(i)});class Kf extends Re{_parse(n){if(this._getType(n)!==le.undefined){const s=this._getOrReturnCtx(n);return ie(s,{code:F.invalid_type,expected:le.undefined,received:s.parsedType}),xe}return yn(n.data)}}Kf.create=i=>new Kf({typeName:Se.ZodUndefined,...Te(i)});class Zf extends Re{_parse(n){if(this._getType(n)!==le.null){const s=this._getOrReturnCtx(n);return ie(s,{code:F.invalid_type,expected:le.null,received:s.parsedType}),xe}return yn(n.data)}}Zf.create=i=>new Zf({typeName:Se.ZodNull,...Te(i)});class $y extends Re{constructor(){super(...arguments),this._any=!0}_parse(n){return yn(n.data)}}$y.create=i=>new $y({typeName:Se.ZodAny,...Te(i)});class Qf extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(n){return yn(n.data)}}Qf.create=i=>new Qf({typeName:Se.ZodUnknown,...Te(i)});class Hi extends Re{_parse(n){const a=this._getOrReturnCtx(n);return ie(a,{code:F.invalid_type,expected:le.never,received:a.parsedType}),xe}}Hi.create=i=>new Hi({typeName:Se.ZodNever,...Te(i)});class Xy extends Re{_parse(n){if(this._getType(n)!==le.undefined){const s=this._getOrReturnCtx(n);return ie(s,{code:F.invalid_type,expected:le.void,received:s.parsedType}),xe}return yn(n.data)}}Xy.create=i=>new Xy({typeName:Se.ZodVoid,...Te(i)});class Nn extends Re{_parse(n){const{ctx:a,status:s}=this._processInputParams(n),u=this._def;if(a.parsedType!==le.array)return ie(a,{code:F.invalid_type,expected:le.array,received:a.parsedType}),xe;if(u.exactLength!==null){const f=a.data.length>u.exactLength.value,h=a.data.length<u.exactLength.value;(f||h)&&(ie(a,{code:f?F.too_big:F.too_small,minimum:h?u.exactLength.value:void 0,maximum:f?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),s.dirty())}if(u.minLength!==null&&a.data.length<u.minLength.value&&(ie(a,{code:F.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),s.dirty()),u.maxLength!==null&&a.data.length>u.maxLength.value&&(ie(a,{code:F.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),s.dirty()),a.common.async)return Promise.all([...a.data].map((f,h)=>u.type._parseAsync(new Mn(a,f,a.path,h)))).then(f=>Dt.mergeArray(s,f));const o=[...a.data].map((f,h)=>u.type._parseSync(new Mn(a,f,a.path,h)));return Dt.mergeArray(s,o)}get element(){return this._def.type}min(n,a){return new Nn({...this._def,minLength:{value:n,message:ce.toString(a)}})}max(n,a){return new Nn({...this._def,maxLength:{value:n,message:ce.toString(a)}})}length(n,a){return new Nn({...this._def,exactLength:{value:n,message:ce.toString(a)}})}nonempty(n){return this.min(1,n)}}Nn.create=(i,n)=>new Nn({type:i,minLength:null,maxLength:null,exactLength:null,typeName:Se.ZodArray,...Te(n)});function cl(i){if(i instanceof pt){const n={};for(const a in i.shape){const s=i.shape[a];n[a]=si.create(cl(s))}return new pt({...i._def,shape:()=>n})}else return i instanceof Nn?new Nn({...i._def,type:cl(i.element)}):i instanceof si?si.create(cl(i.unwrap())):i instanceof da?da.create(cl(i.unwrap())):i instanceof ca?ca.create(i.items.map(n=>cl(n))):i}class pt extends Re{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),a=Le.objectKeys(n);return this._cached={shape:n,keys:a},this._cached}_parse(n){if(this._getType(n)!==le.object){const p=this._getOrReturnCtx(n);return ie(p,{code:F.invalid_type,expected:le.object,received:p.parsedType}),xe}const{status:s,ctx:u}=this._processInputParams(n),{shape:o,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof Hi&&this._def.unknownKeys==="strip"))for(const p in u.data)f.includes(p)||h.push(p);const m=[];for(const p of f){const g=o[p],b=u.data[p];m.push({key:{status:"valid",value:p},value:g._parse(new Mn(u,b,u.path,p)),alwaysSet:p in u.data})}if(this._def.catchall instanceof Hi){const p=this._def.unknownKeys;if(p==="passthrough")for(const g of h)m.push({key:{status:"valid",value:g},value:{status:"valid",value:u.data[g]}});else if(p==="strict")h.length>0&&(ie(u,{code:F.unrecognized_keys,keys:h}),s.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const g of h){const b=u.data[g];m.push({key:{status:"valid",value:g},value:p._parse(new Mn(u,b,u.path,g)),alwaysSet:g in u.data})}}return u.common.async?Promise.resolve().then(async()=>{const p=[];for(const g of m){const b=await g.key,_=await g.value;p.push({key:b,value:_,alwaysSet:g.alwaysSet})}return p}).then(p=>Dt.mergeObjectSync(s,p)):Dt.mergeObjectSync(s,m)}get shape(){return this._def.shape()}strict(n){return ce.errToObj,new pt({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(a,s)=>{var o,f;const u=((f=(o=this._def).errorMap)==null?void 0:f.call(o,a,s).message)??s.defaultError;return a.code==="unrecognized_keys"?{message:ce.errToObj(n).message??u}:{message:u}}}:{}})}strip(){return new pt({...this._def,unknownKeys:"strip"})}passthrough(){return new pt({...this._def,unknownKeys:"passthrough"})}extend(n){return new pt({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new pt({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:Se.ZodObject})}setKey(n,a){return this.augment({[n]:a})}catchall(n){return new pt({...this._def,catchall:n})}pick(n){const a={};for(const s of Le.objectKeys(n))n[s]&&this.shape[s]&&(a[s]=this.shape[s]);return new pt({...this._def,shape:()=>a})}omit(n){const a={};for(const s of Le.objectKeys(this.shape))n[s]||(a[s]=this.shape[s]);return new pt({...this._def,shape:()=>a})}deepPartial(){return cl(this)}partial(n){const a={};for(const s of Le.objectKeys(this.shape)){const u=this.shape[s];n&&!n[s]?a[s]=u:a[s]=u.optional()}return new pt({...this._def,shape:()=>a})}required(n){const a={};for(const s of Le.objectKeys(this.shape))if(n&&!n[s])a[s]=this.shape[s];else{let o=this.shape[s];for(;o instanceof si;)o=o._def.innerType;a[s]=o}return new pt({...this._def,shape:()=>a})}keyof(){return Ig(Le.objectKeys(this.shape))}}pt.create=(i,n)=>new pt({shape:()=>i,unknownKeys:"strip",catchall:Hi.create(),typeName:Se.ZodObject,...Te(n)});pt.strictCreate=(i,n)=>new pt({shape:()=>i,unknownKeys:"strict",catchall:Hi.create(),typeName:Se.ZodObject,...Te(n)});pt.lazycreate=(i,n)=>new pt({shape:i,unknownKeys:"strip",catchall:Hi.create(),typeName:Se.ZodObject,...Te(n)});class Eu extends Re{_parse(n){const{ctx:a}=this._processInputParams(n),s=this._def.options;function u(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 a.common.issues.push(...h.ctx.common.issues),h.result;const f=o.map(h=>new ui(h.ctx.common.issues));return ie(a,{code:F.invalid_union,unionErrors:f}),xe}if(a.common.async)return Promise.all(s.map(async o=>{const f={...a,common:{...a.common,issues:[]},parent:null};return{result:await o._parseAsync({data:a.data,path:a.path,parent:f}),ctx:f}})).then(u);{let o;const f=[];for(const m of s){const p={...a,common:{...a.common,issues:[]},parent:null},g=m._parseSync({data:a.data,path:a.path,parent:p});if(g.status==="valid")return g;g.status==="dirty"&&!o&&(o={result:g,ctx:p}),p.common.issues.length&&f.push(p.common.issues)}if(o)return a.common.issues.push(...o.ctx.common.issues),o.result;const h=f.map(m=>new ui(m));return ie(a,{code:F.invalid_union,unionErrors:h}),xe}}get options(){return this._def.options}}Eu.create=(i,n)=>new Eu({options:i,typeName:Se.ZodUnion,...Te(n)});const ii=i=>i instanceof Xf?ii(i.schema):i instanceof Ii?ii(i.innerType()):i instanceof Nu?[i.value]:i instanceof fa?i.options:i instanceof Jf?Le.objectValues(i.enum):i instanceof zu?ii(i._def.innerType):i instanceof Kf?[void 0]:i instanceof Zf?[null]:i instanceof si?[void 0,...ii(i.unwrap())]:i instanceof da?[null,...ii(i.unwrap())]:i instanceof Yg||i instanceof ju?ii(i.unwrap()):i instanceof Du?ii(i._def.innerType):[];class cd extends Re{_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==le.object)return ie(a,{code:F.invalid_type,expected:le.object,received:a.parsedType}),xe;const s=this.discriminator,u=a.data[s],o=this.optionsMap.get(u);return o?a.common.async?o._parseAsync({data:a.data,path:a.path,parent:a}):o._parseSync({data:a.data,path:a.path,parent:a}):(ie(a,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,a,s){const u=new Map;for(const o of a){const f=ii(o.shape[n]);if(!f.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const h of f){if(u.has(h))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(h)}`);u.set(h,o)}}return new cd({typeName:Se.ZodDiscriminatedUnion,discriminator:n,options:a,optionsMap:u,...Te(s)})}}function $f(i,n){const a=Bi(i),s=Bi(n);if(i===n)return{valid:!0,data:i};if(a===le.object&&s===le.object){const u=Le.objectKeys(n),o=Le.objectKeys(i).filter(h=>u.indexOf(h)!==-1),f={...i,...n};for(const h of o){const m=$f(i[h],n[h]);if(!m.valid)return{valid:!1};f[h]=m.data}return{valid:!0,data:f}}else if(a===le.array&&s===le.array){if(i.length!==n.length)return{valid:!1};const u=[];for(let o=0;o<i.length;o++){const f=i[o],h=n[o],m=$f(f,h);if(!m.valid)return{valid:!1};u.push(m.data)}return{valid:!0,data:u}}else return a===le.date&&s===le.date&&+i==+n?{valid:!0,data:i}:{valid:!1}}class Cu extends Re{_parse(n){const{status:a,ctx:s}=this._processInputParams(n),u=(o,f)=>{if(Gy(o)||Gy(f))return xe;const h=$f(o.value,f.value);return h.valid?((Ky(o)||Ky(f))&&a.dirty(),{status:a.value,value:h.data}):(ie(s,{code:F.invalid_intersection_types}),xe)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([o,f])=>u(o,f)):u(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Cu.create=(i,n,a)=>new Cu({left:i,right:n,typeName:Se.ZodIntersection,...Te(a)});class ca extends Re{_parse(n){const{status:a,ctx:s}=this._processInputParams(n);if(s.parsedType!==le.array)return ie(s,{code:F.invalid_type,expected:le.array,received:s.parsedType}),xe;if(s.data.length<this._def.items.length)return ie(s,{code:F.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&s.data.length>this._def.items.length&&(ie(s,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const o=[...s.data].map((f,h)=>{const m=this._def.items[h]||this._def.rest;return m?m._parse(new Mn(s,f,s.path,h)):null}).filter(f=>!!f);return s.common.async?Promise.all(o).then(f=>Dt.mergeArray(a,f)):Dt.mergeArray(a,o)}get items(){return this._def.items}rest(n){return new ca({...this._def,rest:n})}}ca.create=(i,n)=>{if(!Array.isArray(i))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ca({items:i,typeName:Se.ZodTuple,rest:null,...Te(n)})};class Ou extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:a,ctx:s}=this._processInputParams(n);if(s.parsedType!==le.object)return ie(s,{code:F.invalid_type,expected:le.object,received:s.parsedType}),xe;const u=[],o=this._def.keyType,f=this._def.valueType;for(const h in s.data)u.push({key:o._parse(new Mn(s,h,s.path,h)),value:f._parse(new Mn(s,s.data[h],s.path,h)),alwaysSet:h in s.data});return s.common.async?Dt.mergeObjectAsync(a,u):Dt.mergeObjectSync(a,u)}get element(){return this._def.valueType}static create(n,a,s){return a instanceof Re?new Ou({keyType:n,valueType:a,typeName:Se.ZodRecord,...Te(s)}):new Ou({keyType:ai.create(),valueType:n,typeName:Se.ZodRecord,...Te(a)})}}class Jy extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:a,ctx:s}=this._processInputParams(n);if(s.parsedType!==le.map)return ie(s,{code:F.invalid_type,expected:le.map,received:s.parsedType}),xe;const u=this._def.keyType,o=this._def.valueType,f=[...s.data.entries()].map(([h,m],p)=>({key:u._parse(new Mn(s,h,s.path,[p,"key"])),value:o._parse(new Mn(s,m,s.path,[p,"value"]))}));if(s.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const m of f){const p=await m.key,g=await m.value;if(p.status==="aborted"||g.status==="aborted")return xe;(p.status==="dirty"||g.status==="dirty")&&a.dirty(),h.set(p.value,g.value)}return{status:a.value,value:h}})}else{const h=new Map;for(const m of f){const p=m.key,g=m.value;if(p.status==="aborted"||g.status==="aborted")return xe;(p.status==="dirty"||g.status==="dirty")&&a.dirty(),h.set(p.value,g.value)}return{status:a.value,value:h}}}}Jy.create=(i,n,a)=>new Jy({valueType:n,keyType:i,typeName:Se.ZodMap,...Te(a)});class Bs extends Re{_parse(n){const{status:a,ctx:s}=this._processInputParams(n);if(s.parsedType!==le.set)return ie(s,{code:F.invalid_type,expected:le.set,received:s.parsedType}),xe;const u=this._def;u.minSize!==null&&s.data.size<u.minSize.value&&(ie(s,{code:F.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),a.dirty()),u.maxSize!==null&&s.data.size>u.maxSize.value&&(ie(s,{code:F.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),a.dirty());const o=this._def.valueType;function f(m){const p=new Set;for(const g of m){if(g.status==="aborted")return xe;g.status==="dirty"&&a.dirty(),p.add(g.value)}return{status:a.value,value:p}}const h=[...s.data.values()].map((m,p)=>o._parse(new Mn(s,m,s.path,p)));return s.common.async?Promise.all(h).then(m=>f(m)):f(h)}min(n,a){return new Bs({...this._def,minSize:{value:n,message:ce.toString(a)}})}max(n,a){return new Bs({...this._def,maxSize:{value:n,message:ce.toString(a)}})}size(n,a){return this.min(n,a).max(n,a)}nonempty(n){return this.min(1,n)}}Bs.create=(i,n)=>new Bs({valueType:i,minSize:null,maxSize:null,typeName:Se.ZodSet,...Te(n)});class Xf extends Re{get schema(){return this._def.getter()}_parse(n){const{ctx:a}=this._processInputParams(n);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Xf.create=(i,n)=>new Xf({getter:i,typeName:Se.ZodLazy,...Te(n)});class Nu extends Re{_parse(n){if(n.data!==this._def.value){const a=this._getOrReturnCtx(n);return ie(a,{received:a.data,code:F.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:n.data}}get value(){return this._def.value}}Nu.create=(i,n)=>new Nu({value:i,typeName:Se.ZodLiteral,...Te(n)});function Ig(i,n){return new fa({values:i,typeName:Se.ZodEnum,...Te(n)})}class fa extends Re{_parse(n){if(typeof n.data!="string"){const a=this._getOrReturnCtx(n),s=this._def.values;return ie(a,{expected:Le.joinValues(s),received:a.parsedType,code:F.invalid_type}),xe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(n.data)){const a=this._getOrReturnCtx(n),s=this._def.values;return ie(a,{received:a.data,code:F.invalid_enum_value,options:s}),xe}return yn(n.data)}get options(){return this._def.values}get enum(){const n={};for(const a of this._def.values)n[a]=a;return n}get Values(){const n={};for(const a of this._def.values)n[a]=a;return n}get Enum(){const n={};for(const a of this._def.values)n[a]=a;return n}extract(n,a=this._def){return fa.create(n,{...this._def,...a})}exclude(n,a=this._def){return fa.create(this.options.filter(s=>!n.includes(s)),{...this._def,...a})}}fa.create=Ig;class Jf extends Re{_parse(n){const a=Le.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(n);if(s.parsedType!==le.string&&s.parsedType!==le.number){const u=Le.objectValues(a);return ie(s,{expected:Le.joinValues(u),received:s.parsedType,code:F.invalid_type}),xe}if(this._cache||(this._cache=new Set(Le.getValidEnumValues(this._def.values))),!this._cache.has(n.data)){const u=Le.objectValues(a);return ie(s,{received:s.data,code:F.invalid_enum_value,options:u}),xe}return yn(n.data)}get enum(){return this._def.values}}Jf.create=(i,n)=>new Jf({values:i,typeName:Se.ZodNativeEnum,...Te(n)});class Mu extends Re{unwrap(){return this._def.type}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==le.promise&&a.common.async===!1)return ie(a,{code:F.invalid_type,expected:le.promise,received:a.parsedType}),xe;const s=a.parsedType===le.promise?a.data:Promise.resolve(a.data);return yn(s.then(u=>this._def.type.parseAsync(u,{path:a.path,errorMap:a.common.contextualErrorMap})))}}Mu.create=(i,n)=>new Mu({type:i,typeName:Se.ZodPromise,...Te(n)});class Ii extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:a,ctx:s}=this._processInputParams(n),u=this._def.effect||null,o={addIssue:f=>{ie(s,f),f.fatal?a.abort():a.dirty()},get path(){return s.path}};if(o.addIssue=o.addIssue.bind(o),u.type==="preprocess"){const f=u.transform(s.data,o);if(s.common.async)return Promise.resolve(f).then(async h=>{if(a.value==="aborted")return xe;const m=await this._def.schema._parseAsync({data:h,path:s.path,parent:s});return m.status==="aborted"?xe:m.status==="dirty"||a.value==="dirty"?Cs(m.value):m});{if(a.value==="aborted")return xe;const h=this._def.schema._parseSync({data:f,path:s.path,parent:s});return h.status==="aborted"?xe:h.status==="dirty"||a.value==="dirty"?Cs(h.value):h}}if(u.type==="refinement"){const f=h=>{const m=u.refinement(h,o);if(s.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return h.status==="aborted"?xe:(h.status==="dirty"&&a.dirty(),f(h.value),{status:a.value,value:h.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>h.status==="aborted"?xe:(h.status==="dirty"&&a.dirty(),f(h.value).then(()=>({status:a.value,value:h.value}))))}if(u.type==="transform")if(s.common.async===!1){const f=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!vl(f))return xe;const h=u.transform(f.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:h}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(f=>vl(f)?Promise.resolve(u.transform(f.value,o)).then(h=>({status:a.value,value:h})):xe);Le.assertNever(u)}}Ii.create=(i,n,a)=>new Ii({schema:i,typeName:Se.ZodEffects,effect:n,...Te(a)});Ii.createWithPreprocess=(i,n,a)=>new Ii({schema:n,effect:{type:"preprocess",transform:i},typeName:Se.ZodEffects,...Te(a)});class si extends Re{_parse(n){return this._getType(n)===le.undefined?yn(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}si.create=(i,n)=>new si({innerType:i,typeName:Se.ZodOptional,...Te(n)});class da extends Re{_parse(n){return this._getType(n)===le.null?yn(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}da.create=(i,n)=>new da({innerType:i,typeName:Se.ZodNullable,...Te(n)});class zu extends Re{_parse(n){const{ctx:a}=this._processInputParams(n);let s=a.data;return a.parsedType===le.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}zu.create=(i,n)=>new zu({innerType:i,typeName:Se.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...Te(n)});class Du extends Re{_parse(n){const{ctx:a}=this._processInputParams(n),s={...a,common:{...a.common,issues:[]}},u=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Au(u)?u.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ui(s.common.issues)},input:s.data})})):{status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new ui(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Du.create=(i,n)=>new Du({innerType:i,typeName:Se.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...Te(n)});class Fy extends Re{_parse(n){if(this._getType(n)!==le.nan){const s=this._getOrReturnCtx(n);return ie(s,{code:F.invalid_type,expected:le.nan,received:s.parsedType}),xe}return{status:"valid",value:n.data}}}Fy.create=i=>new Fy({typeName:Se.ZodNaN,...Te(i)});class Yg extends Re{_parse(n){const{ctx:a}=this._processInputParams(n),s=a.data;return this._def.type._parse({data:s,path:a.path,parent:a})}unwrap(){return this._def.type}}class fd extends Re{_parse(n){const{status:a,ctx:s}=this._processInputParams(n);if(s.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?xe:o.status==="dirty"?(a.dirty(),Cs(o.value)):this._def.out._parseAsync({data:o.value,path:s.path,parent:s})})();{const u=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return u.status==="aborted"?xe:u.status==="dirty"?(a.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:s.path,parent:s})}}static create(n,a){return new fd({in:n,out:a,typeName:Se.ZodPipeline})}}class ju extends Re{_parse(n){const a=this._def.innerType._parse(n),s=u=>(vl(u)&&(u.value=Object.freeze(u.value)),u);return Au(a)?a.then(u=>s(u)):s(a)}unwrap(){return this._def.innerType}}ju.create=(i,n)=>new ju({innerType:i,typeName:Se.ZodReadonly,...Te(n)});var Se;(function(i){i.ZodString="ZodString",i.ZodNumber="ZodNumber",i.ZodNaN="ZodNaN",i.ZodBigInt="ZodBigInt",i.ZodBoolean="ZodBoolean",i.ZodDate="ZodDate",i.ZodSymbol="ZodSymbol",i.ZodUndefined="ZodUndefined",i.ZodNull="ZodNull",i.ZodAny="ZodAny",i.ZodUnknown="ZodUnknown",i.ZodNever="ZodNever",i.ZodVoid="ZodVoid",i.ZodArray="ZodArray",i.ZodObject="ZodObject",i.ZodUnion="ZodUnion",i.ZodDiscriminatedUnion="ZodDiscriminatedUnion",i.ZodIntersection="ZodIntersection",i.ZodTuple="ZodTuple",i.ZodRecord="ZodRecord",i.ZodMap="ZodMap",i.ZodSet="ZodSet",i.ZodFunction="ZodFunction",i.ZodLazy="ZodLazy",i.ZodLiteral="ZodLiteral",i.ZodEnum="ZodEnum",i.ZodEffects="ZodEffects",i.ZodNativeEnum="ZodNativeEnum",i.ZodOptional="ZodOptional",i.ZodNullable="ZodNullable",i.ZodDefault="ZodDefault",i.ZodCatch="ZodCatch",i.ZodPromise="ZodPromise",i.ZodBranded="ZodBranded",i.ZodPipeline="ZodPipeline",i.ZodReadonly="ZodReadonly"})(Se||(Se={}));const ae=ai.create,ha=xl.create,gt=Gf.create,Ys=Qf.create;Hi.create;const xt=Nn.create,Mt=pt.create,pa=Eu.create,vx=cd.create;Cu.create;ca.create;const Ls=Ou.create,jn=Nu.create,Rn=fa.create;Mu.create;si.create;da.create;const Vg=Ii.createWithPreprocess,ma=ae().regex(/^\{\{.+\}\}$/s,"Binding must be wrapped in {{ }}");function Wy(i){return pa([i,ma])}const oi=Mt({id:ae().min(1).describe("Unique component identifier within the document"),type:ae().min(1).describe("Component type name"),label:ae().optional(),sensitive:gt().default(!1).describe("If true, values are redacted in logs"),disabled:Wy(gt()).default(!1),visible:Wy(gt()).default(!0),meta:Ls(Ys()).optional()}),xx=Mt({name:ae().min(1),type:Rn(["text","number","email","date","select","checkbox","textarea"]),label:ae(),required:gt().default(!1),sensitive:gt().default(!1),defaultValue:Ys().optional(),options:Vg(i=>Array.isArray(i)?i.map(n=>typeof n=="string"?{label:n,value:n}:n):i,pa([xt(Mt({label:ae(),value:ae()})),ae().min(1)]).optional()),validation:Mt({pattern:ae().optional(),min:ha().optional(),max:ha().optional(),message:ae().optional()}).optional(),bind:ma.optional()}),Gg=oi.extend({type:jn("form"),fields:xt(xx).min(1),onSubmit:ae().optional().describe("Action ID to trigger on submit")}),Kg=oi.extend({type:jn("button"),text:ae().min(1),variant:Rn(["primary","secondary","danger","ghost"]).default("primary"),onAction:ae().describe("Action ID to trigger on click").optional(),confirm:Mt({title:ae(),message:ae(),confirmText:ae().default("Confirm"),cancelText:ae().default("Cancel")}).optional()}),Sx=Mt({id:ae().min(1),text:ae().min(1),checked:gt().default(!1),required:gt().default(!1),bind:ma.optional()}),Zg=oi.extend({type:jn("tasklist"),items:xt(Sx).min(1),onComplete:ae().optional().describe("Action ID triggered when all items are checked")}),_x=Vg(i=>{if(typeof i!="object"||i===null)return i;const a={...i};return"field"in a&&!("key"in a)&&(a.key=a.field,a.field=void 0),"label"in a&&!("header"in a)&&(a.header=a.label,a.label=void 0),a},Mt({key:ae().min(1),header:ae().min(1),sortable:gt().default(!1),sensitive:gt().default(!1),width:ae().optional()})),Qg=oi.extend({type:jn("table"),columns:xt(_x).min(1),data:pa([xt(Ls(Ys())),ma]),sortable:gt().default(!1),filterable:gt().default(!1),pageSize:ha().positive().optional()}),$g=oi.extend({type:jn("callout"),variant:Rn(["info","warning","error","success"]).default("info"),title:ae().optional(),content:ae().min(1),dismissible:gt().default(!1)}),Xg=oi.extend({type:jn("approval-gate"),title:ae().min(1),description:ae().optional(),requiredApprovers:ha().int().positive().default(1),allowedRoles:xt(ae()).optional(),onApprove:ae().optional().describe("Action ID triggered on approval"),onDeny:ae().optional().describe("Action ID triggered on denial"),requireReason:gt().default(!1).describe("Require reason on denial")}),Jg=oi.extend({type:jn("webhook"),url:pa([ae().url(),ma]),method:Rn(["GET","POST","PUT","PATCH","DELETE"]).default("POST"),headers:Ls(ae()).optional(),body:pa([Ls(Ys()),ma]).optional(),trigger:ae().describe("Action ID that triggers this webhook"),retries:ha().int().min(0).max(5).default(0),timeout:ha().int().positive().default(3e4).describe("Timeout in milliseconds")}),Fg=oi.extend({type:jn("chart"),variant:Rn(["line","bar","area","pie"]).default("line"),data:pa([ae(),ma]),xAxis:ae().optional(),yAxis:pa([ae(),xt(ae())]).optional(),colors:xt(ae()).optional(),showLegend:gt().default(!0),showGrid:gt().default(!0),height:ha().default(300),stacked:gt().default(!1)}),Wg=oi.extend({type:jn("thinking"),content:ae().min(1),status:Rn(["thinking","done"]).default("done"),collapsed:gt().default(!0)}),kx=vx("type",[Gg,Kg,Zg,Qg,$g,Xg,Jg,Fg,Wg]),wx=new Map([["form",Gg],["button",Kg],["tasklist",Zg],["table",Qg],["callout",$g],["approval-gate",Xg],["webhook",Jg],["chart",Fg],["thinking",Wg]]),Ax=Rn(["component_rendered","field_changed","action_triggered","integration_called","approval_granted","approval_denied","validation_error","policy_violation"]),Tx=Mt({id:ae(),role:ae().optional()});Mt({timestamp:ae().datetime(),sessionId:ae().uuid(),documentId:ae(),eventType:Ax,componentId:ae(),payload:Ls(Ys()),redacted:gt().default(!1),actor:Tx.optional()});const Ex=Mt({action:ae().describe("Action type to control"),environments:xt(ae()).describe("Environments where this rule applies"),effect:Rn(["allow","deny"]),reason:ae().optional()});Mt({version:jn(1),rules:xt(Ex),defaultEffect:Rn(["allow","deny"]).default("deny")});Mt({title:ae().optional(),version:ae().optional(),author:ae().optional(),description:ae().optional(),tags:xt(ae()).optional(),domain:ae().optional()});const Cx=Rn(["experimental","stable","enterprise-ready"]),Ox=Mt({name:ae(),type:ae(),description:ae().optional(),mock:gt().default(!0)}),Nx=Mt({security:xt(ae()).optional(),logging:xt(ae()).optional(),schema:xt(ae()).optional(),mocks:xt(ae()).optional(),docs:xt(ae()).optional()});Mt({name:ae().min(1),version:ae(),maturity:Cx,description:ae(),outcome:ae(),domain:ae(),components_used:xt(ae()),integrations:xt(Ox).optional(),checklists:Nx.optional()});const Pg=re.createContext(null);function dd(){const i=re.useContext(Pg);if(!i)throw new Error("useMdmaContext must be used within a MdmaProvider");return i}function Mx({store:i,dataSources:n,children:a}){const s=re.useMemo(()=>({store:i,dataSources:n}),[i,n]);return S.jsx(Pg.Provider,{value:s,children:a})}const eb=re.createContext(null);function zx({value:i,children:n}){const a=re.useMemo(()=>i??null,[i]);return S.jsx(eb.Provider,{value:a,children:n})}function ks(i,n){var s,u;const a=re.useContext(eb);if(a)return((s=a[i])==null?void 0:s[n])??((u=a["*"])==null?void 0:u[n])}function Dx(){const{store:i}=dd();return i}function jx(i){const{store:n}=dd(),a=re.useRef(void 0),s=re.useCallback(o=>n.subscribe(o),[n]),u=re.useCallback(()=>{const o=n.getComponentState(i);if(!o){a.current=void 0;return}const f=a.current;if(f&&f.id===o.id&&f.touched===o.touched&&f.visible===o.visible&&f.disabled===o.disabled&&f.values===o.values&&f.errors===o.errors)return f;const h={...o};return a.current=h,h},[n,i]);return re.useSyncExternalStore(s,u,u)}function Rx({id:i,type:n,value:a,onChange:s,required:u}){return S.jsx("input",{id:i,type:n,value:a,required:u,onChange:o=>s(o.target.value)})}function Bx({id:i,value:n,onChange:a,required:s,options:u}){return S.jsxs("select",{id:i,value:n,required:s,onChange:o=>a(o.target.value),children:[S.jsx("option",{value:"",children:"Select..."}),u.map(o=>S.jsx("option",{value:o.value,children:o.label},o.value))]})}function Lx({id:i,checked:n,onChange:a}){return S.jsx("input",{id:i,type:"checkbox",checked:n,onChange:s=>a(s.target.checked)})}function qx({id:i,value:n,onChange:a,required:s}){return S.jsx("textarea",{id:i,value:n,required:s,onChange:u=>a(u.target.value)})}function Ux({onClick:i,label:n}){return S.jsx("button",{type:"button",className:"mdma-form-submit",onClick:i,children:n})}const Hx=re.memo(function({component:n,componentState:a,dispatch:s}){const{dataSources:u}=dd(),o=ks("form","input")??Rx,f=ks("form","select")??Bx,h=ks("form","checkbox")??Lx,m=ks("form","textarea")??qx,p=ks("form","submitButton")??Ux;return n.type!=="form"?null:S.jsxs("div",{className:"mdma-form","data-component-id":n.id,children:[n.label&&S.jsx("h3",{className:"mdma-form-label",children:n.label}),n.fields.map(g=>{const b=`${n.id}-${g.name}`,_=String((a==null?void 0:a.values[g.name])??""),v=w=>s({type:"FIELD_CHANGED",componentId:n.id,field:g.name,value:w}),N=w=>s({type:"FIELD_CHANGED",componentId:n.id,field:g.name,value:w});return S.jsxs("div",{className:"mdma-form-field",children:[S.jsx("label",{htmlFor:b,children:g.label}),g.type==="select"?S.jsx(f,{id:b,name:g.name,label:g.label,type:"select",value:_,onChange:v,required:g.required,options:typeof g.options=="string"?(u==null?void 0:u[g.options])??[]:g.options??[]}):g.type==="checkbox"?S.jsx(h,{id:b,name:g.name,label:g.label,checked:!!(a!=null&&a.values[g.name]),onChange:N}):g.type==="textarea"?S.jsx(m,{id:b,name:g.name,label:g.label,value:_,onChange:v,required:g.required}):S.jsx(o,{id:b,name:g.name,label:g.label,type:g.type,value:_,onChange:v,required:g.required})]},g.name)}),n.onSubmit&&S.jsx(p,{onClick:()=>s({type:"ACTION_TRIGGERED",componentId:n.id,actionId:n.onSubmit}),label:"Submit"})]})}),Ix=re.memo(function({component:n,dispatch:a}){if(n.type!=="button")return null;const s=`mdma-button--${n.variant??"primary"}`;return S.jsx("button",{type:"button",className:`mdma-button ${s}`,"data-component-id":n.id,onClick:()=>{n.onAction&&a({type:"ACTION_TRIGGERED",componentId:n.id,actionId:n.onAction})},children:n.text})}),Yx=re.memo(function({component:n,componentState:a,dispatch:s}){return n.type!=="tasklist"?null:S.jsxs("div",{className:"mdma-tasklist","data-component-id":n.id,children:[n.label&&S.jsx("h3",{className:"mdma-tasklist-label",children:n.label}),S.jsx("ul",{className:"mdma-tasklist-items",children:n.items.map(u=>S.jsx("li",{className:"mdma-tasklist-item",children:S.jsxs("label",{children:[S.jsx("input",{type:"checkbox",checked:!!(a!=null&&a.values[u.id]),onChange:o=>s({type:"FIELD_CHANGED",componentId:n.id,field:u.id,value:o.target.checked})}),S.jsx("span",{children:u.text})]})},u.id))})]})}),Vx=re.memo(function({component:n,resolveBinding:a}){if(n.type!=="table")return null;const s=typeof n.data=="string"?a(n.data):n.data,u=Array.isArray(s)?s:[];return S.jsxs("div",{className:"mdma-table","data-component-id":n.id,children:[n.label&&S.jsx("h3",{className:"mdma-table-label",children:n.label}),S.jsxs("table",{children:[S.jsx("thead",{children:S.jsx("tr",{children:n.columns.map(o=>S.jsx("th",{style:o.width?{width:o.width}:void 0,children:o.header},o.key))})}),S.jsxs("tbody",{children:[u.map((o,f)=>S.jsx("tr",{children:n.columns.map(h=>S.jsx("td",{children:String(o[h.key]??"")},h.key))},f)),u.length===0&&S.jsx("tr",{children:S.jsx("td",{colSpan:n.columns.length,className:"mdma-table-empty",children:"No data"})})]})]})]})}),Gx=re.memo(function({component:n,componentState:a,dispatch:s}){if(n.type!=="callout"||a!=null&&a.values.dismissed)return null;const u=`mdma-callout--${n.variant??"info"}`;return S.jsxs("div",{className:`mdma-callout ${u}`,"data-component-id":n.id,role:"alert",children:[n.title&&S.jsx("strong",{className:"mdma-callout-title",children:n.title}),S.jsx("p",{className:"mdma-callout-content",children:n.content}),n.dismissible&&S.jsx("button",{type:"button",className:"mdma-callout-dismiss","aria-label":"Dismiss",onClick:()=>s({type:"FIELD_CHANGED",componentId:n.id,field:"dismissed",value:!0}),children:"×"})]})}),Kx=re.memo(function({component:n,componentState:a,dispatch:s}){if(n.type!=="approval-gate")return null;const u=(a==null?void 0:a.values.status)??"pending";return S.jsxs("div",{className:`mdma-approval-gate mdma-approval-gate--${u}`,"data-component-id":n.id,children:[S.jsx("h3",{className:"mdma-approval-gate-title",children:n.title}),n.description&&S.jsx("p",{className:"mdma-approval-gate-description",children:n.description}),S.jsxs("div",{className:"mdma-approval-gate-status",children:["Status: ",S.jsx("strong",{children:u})]}),u==="pending"&&S.jsxs("div",{className:"mdma-approval-gate-actions",children:[S.jsx("button",{type:"button",className:"mdma-button mdma-button--primary",onClick:()=>s({type:"APPROVAL_GRANTED",componentId:n.id,actor:{id:"current-user"}}),children:"Approve"}),S.jsx("button",{type:"button",className:"mdma-button mdma-button--danger",onClick:()=>s({type:"APPROVAL_DENIED",componentId:n.id,actor:{id:"current-user"},reason:""}),children:"Deny"})]})]})}),Zx=re.memo(function({component:n,componentState:a}){if(n.type!=="webhook")return null;const s=(a==null?void 0:a.values.status)??"idle";return S.jsxs("div",{className:"mdma-webhook","data-component-id":n.id,children:[n.label&&S.jsx("span",{className:"mdma-webhook-label",children:n.label}),S.jsxs("span",{className:`mdma-webhook-status mdma-webhook-status--${s}`,children:["Webhook: ",s]})]})});function Py(i){const n=i.trim().split(`
356
- `).filter(u=>u.trim()!=="");if(n.length===0)return{headers:[],rows:[]};const a=n[0].split(",").map(u=>u.trim()),s=n.slice(1).map(u=>{const o=u.split(",").map(h=>h.trim()),f={};return a.forEach((h,m)=>{const p=o[m]??"",g=Number(p);f[h]=p!==""&&!Number.isNaN(g)?g:p}),f});return{headers:a,rows:s}}const Qx=re.memo(function({component:n,resolveBinding:a}){if(n.type!=="chart")return null;const s=re.useMemo(()=>{const u=n.data;if(typeof u=="string"&&u.startsWith("{{")){const o=a(u);return typeof o=="string"?Py(o):{headers:[],rows:[]}}return Py(u)},[n.data,a]);return s.rows.length===0?S.jsxs("div",{className:"mdma-chart mdma-chart--empty","data-component-id":n.id,children:[n.label&&S.jsx("div",{className:"mdma-chart-label",children:n.label}),S.jsx("div",{className:"mdma-chart-empty",children:"No chart data"})]}):S.jsxs("div",{className:"mdma-chart","data-component-id":n.id,children:[n.label&&S.jsx("div",{className:"mdma-chart-label",children:n.label}),S.jsxs("div",{className:"mdma-chart-variant",children:[n.variant??"line"," chart"]}),S.jsxs("table",{className:"mdma-chart-data",children:[S.jsx("thead",{children:S.jsx("tr",{children:s.headers.map(u=>S.jsx("th",{children:u},u))})}),S.jsx("tbody",{children:s.rows.map((u,o)=>S.jsx("tr",{children:s.headers.map(f=>S.jsx("td",{children:String(u[f]??"")},f))},o))})]})]})}),$x=re.memo(function({component:n,componentState:a,dispatch:s}){if(n.type!=="thinking")return null;const u=(a==null?void 0:a.values.collapsed)??n.collapsed??!0,o=n.status??"done",f=n.label??"Thinking",h=m=>{m.preventDefault(),s({type:"FIELD_CHANGED",componentId:n.id,field:"collapsed",value:!u})};return S.jsxs("details",{className:`mdma-thinking mdma-thinking--${o}`,"data-component-id":n.id,open:!u,children:[S.jsxs("summary",{className:"mdma-thinking-summary",onClick:h,children:[o==="thinking"&&S.jsx("span",{className:"mdma-thinking-indicator"}),S.jsx("span",{className:"mdma-thinking-label",children:f})]}),S.jsx("div",{className:"mdma-thinking-content",children:n.content})]})}),Xx={form:Hx,button:Ix,tasklist:Yx,table:Vx,callout:Gx,"approval-gate":Kx,webhook:Zx,chart:Qx,thinking:$x},_f=re.memo(function({block:n,renderers:a}){const s=Dx(),u=jx(n.component.id),o=re.useCallback(m=>s.dispatch(m),[s]),f=re.useCallback(m=>s.resolveBinding(m),[s]),h=(a==null?void 0:a[n.component.type])??Xx[n.component.type];return h?S.jsx(h,{component:n.component,componentState:u,dispatch:o,resolveBinding:f}):S.jsxs("div",{className:"mdma-unknown-component",children:["Unknown component type: ",n.component.type]})});function Jx(i){if(!i)return null;const n=i.match(/^\s*type:\s*(\S+)/m);return n?n[1]:null}const Fx=re.memo(function({node:n}){const a=Jx(n.value);return S.jsxs("div",{className:"mdma-block-loading",children:[S.jsx("div",{className:"mdma-block-loading-shimmer"}),S.jsxs("div",{className:"mdma-block-loading-content",children:[S.jsx("span",{className:"mdma-block-loading-icon"}),S.jsx("span",{className:"mdma-block-loading-text",children:a?`Loading ${a} component...`:"Loading component..."})]})]})});function Pt(i){return!i||i.length===0?null:i.map((n,a)=>S.jsx(tb,{node:n},a))}function tb({node:i}){switch(i.type){case"heading":{const n=`h${i.depth??1}`;return S.jsx(n,{children:Pt(i.children)})}case"paragraph":return S.jsx("p",{children:Pt(i.children)});case"blockquote":return S.jsx("blockquote",{children:Pt(i.children)});case"list":{const n=i.ordered?"ol":"ul";return S.jsx(n,{start:i.ordered?i.start??1:void 0,children:Pt(i.children)})}case"listItem":return i.checked!=null?S.jsxs("li",{className:"mdast-task-item",children:[S.jsx("input",{type:"checkbox",checked:i.checked,readOnly:!0}),Pt(i.children)]}):S.jsx("li",{children:Pt(i.children)});case"code":return S.jsx("pre",{className:"mdast-code-block",children:S.jsx("code",{className:i.lang?`language-${i.lang}`:void 0,children:i.value})});case"thematicBreak":return S.jsx("hr",{});case"html":return S.jsx("div",{className:"mdast-raw-html",children:i.value});case"table":{const n=i.children??[],a=n[0],s=n.slice(1);return S.jsxs("table",{className:"mdast-table",children:[a&&S.jsx("thead",{children:S.jsx("tr",{children:(a.children??[]).map((u,o)=>{var f;return S.jsx("th",{style:(f=i.align)!=null&&f[o]?{textAlign:i.align[o]}:void 0,children:Pt(u.children)},o)})})}),s.length>0&&S.jsx("tbody",{children:s.map((u,o)=>S.jsx("tr",{children:(u.children??[]).map((f,h)=>{var m;return S.jsx("td",{style:(m=i.align)!=null&&m[h]?{textAlign:i.align[h]}:void 0,children:Pt(f.children)},h)})},o))})]})}case"text":return S.jsx(S.Fragment,{children:i.value});case"emphasis":return S.jsx("em",{children:Pt(i.children)});case"strong":return S.jsx("strong",{children:Pt(i.children)});case"delete":return S.jsx("del",{children:Pt(i.children)});case"inlineCode":return S.jsx("code",{className:"mdast-inline-code",children:i.value});case"link":return S.jsx("a",{href:i.url,title:i.title??void 0,target:"_blank",rel:"noopener noreferrer",children:Pt(i.children)});case"image":return S.jsx("img",{src:i.url,alt:i.alt??"",title:i.title??void 0});case"break":return S.jsx("br",{});default:return i.children?S.jsx(S.Fragment,{children:Pt(i.children)}):i.value?S.jsx(S.Fragment,{children:i.value}):null}}const Wx=re.memo(function({node:n}){return S.jsx("div",{className:"mdma-markdown-content",children:S.jsx(tb,{node:n})})});function Px(i){return typeof i=="object"&&i!==null&&("renderer"in i||"elements"in i)}function eS(i){if(!i)return{renderers:void 0,elementOverrides:void 0};const n={},a={};for(const[s,u]of Object.entries(i))Px(u)?(u.renderer&&(n[s]=u.renderer),u.elements&&(a[s]=u.elements)):n[s]=u;return{renderers:Object.keys(n).length>0?n:void 0,elementOverrides:Object.keys(a).length>0?a:void 0}}function nb(i){if(!i)return null;const n=i.match(/^\s*id:\s*(\S+)/m);return n?n[1]:null}function tS(i){if(!i)return null;const n=i.match(/^\s*type:\s*(\S+)/m);return n?n[1]:null}function nS(i){const n=nb(i);if(!n)return null;const a=i.match(/^\s*label:\s*(.+)$/m),s=a?a[1].trim():void 0;let u="";const o=i.match(/^\s*content:\s*\|\s*\n([\s\S]*)$/m);if(o){const f=o[1],h=[];for(const m of f.split(`
357
- `)){if(m.length>0&&!m.startsWith(" ")&&!m.startsWith(" "))break;h.push(m.replace(/^ {1,2}/,""))}u=h.join(`
358
- `).trimEnd()}else{const f=i.match(/^\s*content:\s*(?:"([^"]*)"|'([^']*)'|(.+))$/m);f&&(u=(f[1]??f[2]??f[3]??"").trim())}return{type:"mdmaBlock",rawYaml:i,component:{type:"thinking",id:n,content:u||"...",status:"thinking",collapsed:!1,...s?{label:s}:{}}}}function iS({ast:i,store:n,customizations:a,className:s}){const{renderers:u,elementOverrides:o}=re.useMemo(()=>eS(a==null?void 0:a.components),[a==null?void 0:a.components]),f=re.useRef(new Map);return S.jsx(Mx,{store:n,dataSources:a==null?void 0:a.dataSources,children:S.jsx(zx,{value:o,children:S.jsx("div",{className:`mdma-document ${s??""}`,children:i.children.map((h,m)=>{if(aS(h))return f.current.set(h.component.id,h),S.jsx(_f,{block:h,renderers:u},h.component.id);if(lS(h)){const p=h.value,g=nb(p),b=g?f.current.get(g):null;if(b)return S.jsx(_f,{block:b,renderers:u},b.component.id);if(tS(p)==="thinking"&&p){const v=nS(p);if(v)return S.jsx(_f,{block:v,renderers:u},v.component.id)}return S.jsx(Fx,{node:h},m)}return S.jsx(Wx,{node:h},m)})})})})}function aS(i){return typeof i=="object"&&i!==null&&"type"in i&&i.type==="mdmaBlock"}function lS(i){return typeof i=="object"&&i!==null&&"type"in i&&i.type==="code"&&"lang"in i&&i.lang===qg}function eg(i){if(i)throw i}var kf,tg;function sS(){if(tg)return kf;tg=1;var i=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(p){return typeof Array.isArray=="function"?Array.isArray(p):n.call(p)==="[object Array]"},o=function(p){if(!p||n.call(p)!=="[object Object]")return!1;var g=i.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&i.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!b)return!1;var _;for(_ in p);return typeof _>"u"||i.call(p,_)},f=function(p,g){a&&g.name==="__proto__"?a(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},h=function(p,g){if(g==="__proto__")if(i.call(p,g)){if(s)return s(p,g).value}else return;return p[g]};return kf=function m(){var p,g,b,_,v,N,w=arguments[0],D=1,C=arguments.length,H=!1;for(typeof w=="boolean"&&(H=w,w=arguments[1]||{},D=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});D<C;++D)if(p=arguments[D],p!=null)for(g in p)b=h(w,g),_=h(p,g),w!==_&&(H&&_&&(o(_)||(v=u(_)))?(v?(v=!1,N=b&&u(b)?b:[]):N=b&&o(b)?b:{},f(w,{name:g,newValue:m(H,N,_)})):typeof _<"u"&&f(w,{name:g,newValue:_}));return w},kf}var rS=sS();const wf=b1(rS);function Ff(i){if(typeof i!="object"||i===null)return!1;const n=Object.getPrototypeOf(i);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function uS(){const i=[],n={run:a,use:s};return n;function a(...u){let o=-1;const f=u.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...u);function h(m,...p){const g=i[++o];let b=-1;if(m){f(m);return}for(;++b<u.length;)(p[b]===null||p[b]===void 0)&&(p[b]=u[b]);u=p,g?oS(g,h)(...p):f(null,...p)}}function s(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return i.push(u),n}}function oS(i,n){let a;return s;function s(...f){const h=i.length>f.length;let m;h&&f.push(u);try{m=i.apply(this,f)}catch(p){const g=p;if(h&&a)throw g;return u(g)}h||(m&&m.then&&typeof m.then=="function"?m.then(o,u):m instanceof Error?u(m):o(m))}function u(f,...h){a||(a=!0,n(f,...h))}function o(f){u(null,f)}}function Ms(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?ng(i.position):"start"in i||"end"in i?ng(i):"line"in i||"column"in i?Wf(i):""}function Wf(i){return ig(i&&i.line)+":"+ig(i&&i.column)}function ng(i){return Wf(i&&i.start)+"-"+Wf(i&&i.end)}function ig(i){return i&&typeof i=="number"?i:1}class Gt extends Error{constructor(n,a,s){super(),typeof a=="string"&&(s=a,a=void 0);let u="",o={},f=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof n=="string"?u=n:!o.cause&&n&&(f=!0,u=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof s=="string"){const m=s.indexOf(":");m===-1?o.ruleId=s:(o.source=s.slice(0,m),o.ruleId=s.slice(m+1))}if(!o.place&&o.ancestors&&o.ancestors){const m=o.ancestors[o.ancestors.length-1];m&&(o.place=m.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=u,this.line=h?h.line:void 0,this.name=Ms(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=f&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Gt.prototype.file="";Gt.prototype.name="";Gt.prototype.reason="";Gt.prototype.message="";Gt.prototype.stack="";Gt.prototype.column=void 0;Gt.prototype.line=void 0;Gt.prototype.ancestors=void 0;Gt.prototype.cause=void 0;Gt.prototype.fatal=void 0;Gt.prototype.place=void 0;Gt.prototype.ruleId=void 0;Gt.prototype.source=void 0;const Cn={basename:cS,dirname:fS,extname:dS,join:hS,sep:"/"};function cS(i,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Vs(i);let a=0,s=-1,u=i.length,o;if(n===void 0||n.length===0||n.length>i.length){for(;u--;)if(i.codePointAt(u)===47){if(o){a=u+1;break}}else s<0&&(o=!0,s=u+1);return s<0?"":i.slice(a,s)}if(n===i)return"";let f=-1,h=n.length-1;for(;u--;)if(i.codePointAt(u)===47){if(o){a=u+1;break}}else f<0&&(o=!0,f=u+1),h>-1&&(i.codePointAt(u)===n.codePointAt(h--)?h<0&&(s=u):(h=-1,s=f));return a===s?s=f:s<0&&(s=i.length),i.slice(a,s)}function fS(i){if(Vs(i),i.length===0)return".";let n=-1,a=i.length,s;for(;--a;)if(i.codePointAt(a)===47){if(s){n=a;break}}else s||(s=!0);return n<0?i.codePointAt(0)===47?"/":".":n===1&&i.codePointAt(0)===47?"//":i.slice(0,n)}function dS(i){Vs(i);let n=i.length,a=-1,s=0,u=-1,o=0,f;for(;n--;){const h=i.codePointAt(n);if(h===47){if(f){s=n+1;break}continue}a<0&&(f=!0,a=n+1),h===46?u<0?u=n:o!==1&&(o=1):u>-1&&(o=-1)}return u<0||a<0||o===0||o===1&&u===a-1&&u===s+1?"":i.slice(u,a)}function hS(...i){let n=-1,a;for(;++n<i.length;)Vs(i[n]),i[n]&&(a=a===void 0?i[n]:a+"/"+i[n]);return a===void 0?".":pS(a)}function pS(i){Vs(i);const n=i.codePointAt(0)===47;let a=mS(i,!n);return a.length===0&&!n&&(a="."),a.length>0&&i.codePointAt(i.length-1)===47&&(a+="/"),n?"/"+a:a}function mS(i,n){let a="",s=0,u=-1,o=0,f=-1,h,m;for(;++f<=i.length;){if(f<i.length)h=i.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(u===f-1||o===1))if(u!==f-1&&o===2){if(a.length<2||s!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(m=a.lastIndexOf("/"),m!==a.length-1){m<0?(a="",s=0):(a=a.slice(0,m),s=a.length-1-a.lastIndexOf("/")),u=f,o=0;continue}}else if(a.length>0){a="",s=0,u=f,o=0;continue}}n&&(a=a.length>0?a+"/..":"..",s=2)}else a.length>0?a+="/"+i.slice(u+1,f):a=i.slice(u+1,f),s=f-u-1;u=f,o=0}else h===46&&o>-1?o++:o=-1}return a}function Vs(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}const yS={cwd:gS};function gS(){return"/"}function Pf(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function bS(i){if(typeof i=="string")i=new URL(i);else if(!Pf(i)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(i.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return vS(i)}function vS(i){if(i.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const n=i.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const s=n.codePointAt(a+2);if(s===70||s===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(n)}const Af=["history","path","basename","stem","extname","dirname"];class xS{constructor(n){let a;n?Pf(n)?a={path:n}:typeof n=="string"||SS(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":yS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<Af.length;){const o=Af[s];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let u;for(u in a)Af.includes(u)||(this[u]=a[u])}get basename(){return typeof this.path=="string"?Cn.basename(this.path):void 0}set basename(n){Ef(n,"basename"),Tf(n,"basename"),this.path=Cn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Cn.dirname(this.path):void 0}set dirname(n){ag(this.basename,"dirname"),this.path=Cn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Cn.extname(this.path):void 0}set extname(n){if(Tf(n,"extname"),ag(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Cn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Pf(n)&&(n=bS(n)),Ef(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Cn.basename(this.path,this.extname):void 0}set stem(n){Ef(n,"stem"),Tf(n,"stem"),this.path=Cn.join(this.dirname||"",n+(this.extname||""))}fail(n,a,s){const u=this.message(n,a,s);throw u.fatal=!0,u}info(n,a,s){const u=this.message(n,a,s);return u.fatal=void 0,u}message(n,a,s){const u=new Gt(n,a,s);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Tf(i,n){if(i&&i.includes(Cn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Cn.sep+"`")}function Ef(i,n){if(!i)throw new Error("`"+n+"` cannot be empty")}function ag(i,n){if(!i)throw new Error("Setting `"+n+"` requires `path` to be set too")}function SS(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}const _S=(function(i){const s=this.constructor.prototype,u=s[i],o=function(){return u.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),kS={}.hasOwnProperty;class hd extends _S{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=uS()}copy(){const n=new hd;let a=-1;for(;++a<this.attachers.length;){const s=this.attachers[a];n.use(...s)}return n.data(wf(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(Nf("data",this.frozen),this.namespace[n]=a,this):kS.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Nf("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const u=a.call(n,...s);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=pu(n),s=this.parser||this.Parser;return Cf("parse",s),s(String(a),a)}process(n,a){const s=this;return this.freeze(),Cf("process",this.parser||this.Parser),Of("process",this.compiler||this.Compiler),a?u(void 0,a):new Promise(u);function u(o,f){const h=pu(n),m=s.parse(h);s.run(m,h,function(g,b,_){if(g||!b||!_)return p(g);const v=b,N=s.stringify(v,_);TS(N)?_.value=N:_.result=N,p(g,_)});function p(g,b){g||!b?f(g):o?o(b):a(void 0,b)}}}processSync(n){let a=!1,s;return this.freeze(),Cf("processSync",this.parser||this.Parser),Of("processSync",this.compiler||this.Compiler),this.process(n,u),sg("processSync","process",a),s;function u(o,f){a=!0,eg(o),s=f}}run(n,a,s){lg(n),this.freeze();const u=this.transformers;return!s&&typeof a=="function"&&(s=a,a=void 0),s?o(void 0,s):new Promise(o);function o(f,h){const m=pu(a);u.run(n,m,p);function p(g,b,_){const v=b||n;g?h(g):f?f(v):s(void 0,v,_)}}}runSync(n,a){let s=!1,u;return this.run(n,a,o),sg("runSync","run",s),u;function o(f,h){eg(f),u=h,s=!0}}stringify(n,a){this.freeze();const s=pu(a),u=this.compiler||this.Compiler;return Of("stringify",u),lg(n),u(n,s)}use(n,...a){const s=this.attachers,u=this.namespace;if(Nf("use",this.frozen),n!=null)if(typeof n=="function")m(n,a);else if(typeof n=="object")Array.isArray(n)?h(n):f(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...b]=p;m(g,b)}else f(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function f(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(p.plugins),p.settings&&(u.settings=wf(!0,u.settings,p.settings))}function h(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const b=p[g];o(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,g){let b=-1,_=-1;for(;++b<s.length;)if(s[b][0]===p){_=b;break}if(_===-1)s.push([p,...g]);else if(g.length>0){let[v,...N]=g;const w=s[_][1];Ff(w)&&Ff(v)&&(v=wf(!0,w,v)),s[_]=[p,v,...N]}}}}const wS=new hd().freeze();function Cf(i,n){if(typeof n!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function Of(i,n){if(typeof n!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function Nf(i,n){if(n)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lg(i){if(!Ff(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function sg(i,n,a){if(!a)throw new Error("`"+i+"` finished async. Use `"+n+"` instead")}function pu(i){return AS(i)?i:new xS(i)}function AS(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function TS(i){return typeof i=="string"||ES(i)}function ES(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}const CS={};function OS(i,n){const a=CS,s=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,u=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return ib(i,s,u)}function ib(i,n,a){if(NS(i)){if("value"in i)return i.type==="html"&&!a?"":i.value;if(n&&"alt"in i&&i.alt)return i.alt;if("children"in i)return rg(i.children,n,a)}return Array.isArray(i)?rg(i,n,a):""}function rg(i,n,a){const s=[];let u=-1;for(;++u<i.length;)s[u]=ib(i[u],n,a);return s.join("")}function NS(i){return!!(i&&typeof i=="object")}const ug=document.createElement("i");function pd(i){const n="&"+i+";";ug.innerHTML=n;const a=ug.textContent;return a.charCodeAt(a.length-1)===59&&i!=="semi"||a===n?!1:a}function zn(i,n,a,s){const u=i.length;let o=0,f;if(n<0?n=-n>u?0:u+n:n=n>u?u:n,a=a>0?a:0,s.length<1e4)f=Array.from(s),f.unshift(n,a),i.splice(...f);else for(a&&i.splice(n,a);o<s.length;)f=s.slice(o,o+1e4),f.unshift(n,0),i.splice(...f),o+=1e4,n+=1e4}function dn(i,n){return i.length>0?(zn(i,i.length,0,n),i):n}const og={}.hasOwnProperty;function MS(i){const n={};let a=-1;for(;++a<i.length;)zS(n,i[a]);return n}function zS(i,n){let a;for(a in n){const u=(og.call(i,a)?i[a]:void 0)||(i[a]={}),o=n[a];let f;if(o)for(f in o){og.call(u,f)||(u[f]=[]);const h=o[f];DS(u[f],Array.isArray(h)?h:h?[h]:[])}}}function DS(i,n){let a=-1;const s=[];for(;++a<n.length;)(n[a].add==="after"?i:s).push(n[a]);zn(i,0,0,s)}function ab(i,n){const a=Number.parseInt(i,n);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function yl(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const On=Yi(/[A-Za-z]/),_n=Yi(/[\dA-Za-z]/),jS=Yi(/[#-'*+\--9=?A-Z^-~]/);function ed(i){return i!==null&&(i<32||i===127)}const td=Yi(/\d/),RS=Yi(/[\dA-Fa-f]/),BS=Yi(/[!-/:-@[-`{-~]/);function ve(i){return i!==null&&i<-2}function Vt(i){return i!==null&&(i<0||i===32)}function Ie(i){return i===-2||i===-1||i===32}const LS=Yi(new RegExp("\\p{P}|\\p{S}","u")),qS=Yi(/\s/);function Yi(i){return n;function n(a){return a!==null&&a>-1&&i.test(String.fromCharCode(a))}}function Fe(i,n,a,s){const u=s?s-1:Number.POSITIVE_INFINITY;let o=0;return f;function f(m){return Ie(m)?(i.enter(a),h(m)):n(m)}function h(m){return Ie(m)&&o++<u?(i.consume(m),h):(i.exit(a),n(m))}}const US={tokenize:HS};function HS(i){const n=i.attempt(this.parser.constructs.contentInitial,s,u);let a;return n;function s(h){if(h===null){i.consume(h);return}return i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),Fe(i,n,"linePrefix")}function u(h){return i.enter("paragraph"),o(h)}function o(h){const m=i.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=m),a=m,f(h)}function f(h){if(h===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(h);return}return ve(h)?(i.consume(h),i.exit("chunkText"),o):(i.consume(h),f)}}const IS={tokenize:YS},cg={tokenize:VS};function YS(i){const n=this,a=[];let s=0,u,o,f;return h;function h(M){if(s<a.length){const Q=a[s];return n.containerState=Q[1],i.attempt(Q[0].continuation,m,p)(M)}return p(M)}function m(M){if(s++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,u&&H();const Q=n.events.length;let X=Q,B;for(;X--;)if(n.events[X][0]==="exit"&&n.events[X][1].type==="chunkFlow"){B=n.events[X][1].end;break}C(s);let K=Q;for(;K<n.events.length;)n.events[K][1].end={...B},K++;return zn(n.events,X+1,0,n.events.slice(Q)),n.events.length=K,p(M)}return h(M)}function p(M){if(s===a.length){if(!u)return _(M);if(u.currentConstruct&&u.currentConstruct.concrete)return N(M);n.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return n.containerState={},i.check(cg,g,b)(M)}function g(M){return u&&H(),C(s),_(M)}function b(M){return n.parser.lazy[n.now().line]=s!==a.length,f=n.now().offset,N(M)}function _(M){return n.containerState={},i.attempt(cg,v,N)(M)}function v(M){return s++,a.push([n.currentConstruct,n.containerState]),_(M)}function N(M){if(M===null){u&&H(),C(0),i.consume(M);return}return u=u||n.parser.flow(n.now()),i.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:o}),w(M)}function w(M){if(M===null){D(i.exit("chunkFlow"),!0),C(0),i.consume(M);return}return ve(M)?(i.consume(M),D(i.exit("chunkFlow")),s=0,n.interrupt=void 0,h):(i.consume(M),w)}function D(M,Q){const X=n.sliceStream(M);if(Q&&X.push(null),M.previous=o,o&&(o.next=M),o=M,u.defineSkip(M.start),u.write(X),n.parser.lazy[M.start.line]){let B=u.events.length;for(;B--;)if(u.events[B][1].start.offset<f&&(!u.events[B][1].end||u.events[B][1].end.offset>f))return;const K=n.events.length;let $=K,te,fe;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(te){fe=n.events[$][1].end;break}te=!0}for(C(s),B=K;B<n.events.length;)n.events[B][1].end={...fe},B++;zn(n.events,$+1,0,n.events.slice(K)),n.events.length=B}}function C(M){let Q=a.length;for(;Q-- >M;){const X=a[Q];n.containerState=X[1],X[0].exit.call(n,i)}a.length=M}function H(){u.write([null]),o=void 0,u=void 0,n.containerState._closeFlow=void 0}}function VS(i,n,a){return Fe(i,i.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fg(i){if(i===null||Vt(i)||qS(i))return 1;if(LS(i))return 2}function md(i,n,a){const s=[];let u=-1;for(;++u<i.length;){const o=i[u].resolveAll;o&&!s.includes(o)&&(n=o(n,a),s.push(o))}return n}const nd={name:"attention",resolveAll:GS,tokenize:KS};function GS(i,n){let a=-1,s,u,o,f,h,m,p,g;for(;++a<i.length;)if(i[a][0]==="enter"&&i[a][1].type==="attentionSequence"&&i[a][1]._close){for(s=a;s--;)if(i[s][0]==="exit"&&i[s][1].type==="attentionSequence"&&i[s][1]._open&&n.sliceSerialize(i[s][1]).charCodeAt(0)===n.sliceSerialize(i[a][1]).charCodeAt(0)){if((i[s][1]._close||i[a][1]._open)&&(i[a][1].end.offset-i[a][1].start.offset)%3&&!((i[s][1].end.offset-i[s][1].start.offset+i[a][1].end.offset-i[a][1].start.offset)%3))continue;m=i[s][1].end.offset-i[s][1].start.offset>1&&i[a][1].end.offset-i[a][1].start.offset>1?2:1;const b={...i[s][1].end},_={...i[a][1].start};dg(b,-m),dg(_,m),f={type:m>1?"strongSequence":"emphasisSequence",start:b,end:{...i[s][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...i[a][1].start},end:_},o={type:m>1?"strongText":"emphasisText",start:{...i[s][1].end},end:{...i[a][1].start}},u={type:m>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},i[s][1].end={...f.start},i[a][1].start={...h.end},p=[],i[s][1].end.offset-i[s][1].start.offset&&(p=dn(p,[["enter",i[s][1],n],["exit",i[s][1],n]])),p=dn(p,[["enter",u,n],["enter",f,n],["exit",f,n],["enter",o,n]]),p=dn(p,md(n.parser.constructs.insideSpan.null,i.slice(s+1,a),n)),p=dn(p,[["exit",o,n],["enter",h,n],["exit",h,n],["exit",u,n]]),i[a][1].end.offset-i[a][1].start.offset?(g=2,p=dn(p,[["enter",i[a][1],n],["exit",i[a][1],n]])):g=0,zn(i,s-1,a-s+3,p),a=s+p.length-g-2;break}}for(a=-1;++a<i.length;)i[a][1].type==="attentionSequence"&&(i[a][1].type="data");return i}function KS(i,n){const a=this.parser.constructs.attentionMarkers.null,s=this.previous,u=fg(s);let o;return f;function f(m){return o=m,i.enter("attentionSequence"),h(m)}function h(m){if(m===o)return i.consume(m),h;const p=i.exit("attentionSequence"),g=fg(m),b=!g||g===2&&u||a.includes(m),_=!u||u===2&&g||a.includes(s);return p._open=!!(o===42?b:b&&(u||!_)),p._close=!!(o===42?_:_&&(g||!b)),n(m)}}function dg(i,n){i.column+=n,i.offset+=n,i._bufferIndex+=n}const ZS={name:"autolink",tokenize:QS};function QS(i,n,a){let s=0;return u;function u(v){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(v),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),o}function o(v){return On(v)?(i.consume(v),f):v===64?a(v):p(v)}function f(v){return v===43||v===45||v===46||_n(v)?(s=1,h(v)):p(v)}function h(v){return v===58?(i.consume(v),s=0,m):(v===43||v===45||v===46||_n(v))&&s++<32?(i.consume(v),h):(s=0,p(v))}function m(v){return v===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(v),i.exit("autolinkMarker"),i.exit("autolink"),n):v===null||v===32||v===60||ed(v)?a(v):(i.consume(v),m)}function p(v){return v===64?(i.consume(v),g):jS(v)?(i.consume(v),p):a(v)}function g(v){return _n(v)?b(v):a(v)}function b(v){return v===46?(i.consume(v),s=0,g):v===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(v),i.exit("autolinkMarker"),i.exit("autolink"),n):_(v)}function _(v){if((v===45||_n(v))&&s++<63){const N=v===45?_:b;return i.consume(v),N}return a(v)}}const Uu={partial:!0,tokenize:$S};function $S(i,n,a){return s;function s(o){return Ie(o)?Fe(i,u,"linePrefix")(o):u(o)}function u(o){return o===null||ve(o)?n(o):a(o)}}const lb={continuation:{tokenize:JS},exit:FS,name:"blockQuote",tokenize:XS};function XS(i,n,a){const s=this;return u;function u(f){if(f===62){const h=s.containerState;return h.open||(i.enter("blockQuote",{_container:!0}),h.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(f),i.exit("blockQuoteMarker"),o}return a(f)}function o(f){return Ie(f)?(i.enter("blockQuotePrefixWhitespace"),i.consume(f),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),n):(i.exit("blockQuotePrefix"),n(f))}}function JS(i,n,a){const s=this;return u;function u(f){return Ie(f)?Fe(i,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):o(f)}function o(f){return i.attempt(lb,n,a)(f)}}function FS(i){i.exit("blockQuote")}const sb={name:"characterEscape",tokenize:WS};function WS(i,n,a){return s;function s(o){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(o),i.exit("escapeMarker"),u}function u(o){return BS(o)?(i.enter("characterEscapeValue"),i.consume(o),i.exit("characterEscapeValue"),i.exit("characterEscape"),n):a(o)}}const rb={name:"characterReference",tokenize:PS};function PS(i,n,a){const s=this;let u=0,o,f;return h;function h(b){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(b),i.exit("characterReferenceMarker"),m}function m(b){return b===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(b),i.exit("characterReferenceMarkerNumeric"),p):(i.enter("characterReferenceValue"),o=31,f=_n,g(b))}function p(b){return b===88||b===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(b),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),o=6,f=RS,g):(i.enter("characterReferenceValue"),o=7,f=td,g(b))}function g(b){if(b===59&&u){const _=i.exit("characterReferenceValue");return f===_n&&!pd(s.sliceSerialize(_))?a(b):(i.enter("characterReferenceMarker"),i.consume(b),i.exit("characterReferenceMarker"),i.exit("characterReference"),n)}return f(b)&&u++<o?(i.consume(b),g):a(b)}}const hg={partial:!0,tokenize:t_},pg={concrete:!0,name:"codeFenced",tokenize:e_};function e_(i,n,a){const s=this,u={partial:!0,tokenize:X};let o=0,f=0,h;return m;function m(B){return p(B)}function p(B){const K=s.events[s.events.length-1];return o=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,h=B,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),g(B)}function g(B){return B===h?(f++,i.consume(B),g):f<3?a(B):(i.exit("codeFencedFenceSequence"),Ie(B)?Fe(i,b,"whitespace")(B):b(B))}function b(B){return B===null||ve(B)?(i.exit("codeFencedFence"),s.interrupt?n(B):i.check(hg,w,Q)(B)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||ve(B)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),b(B)):Ie(B)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Fe(i,v,"whitespace")(B)):B===96&&B===h?a(B):(i.consume(B),_)}function v(B){return B===null||ve(B)?b(B):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),N(B))}function N(B){return B===null||ve(B)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),b(B)):B===96&&B===h?a(B):(i.consume(B),N)}function w(B){return i.attempt(u,Q,D)(B)}function D(B){return i.enter("lineEnding"),i.consume(B),i.exit("lineEnding"),C}function C(B){return o>0&&Ie(B)?Fe(i,H,"linePrefix",o+1)(B):H(B)}function H(B){return B===null||ve(B)?i.check(hg,w,Q)(B):(i.enter("codeFlowValue"),M(B))}function M(B){return B===null||ve(B)?(i.exit("codeFlowValue"),H(B)):(i.consume(B),M)}function Q(B){return i.exit("codeFenced"),n(B)}function X(B,K,$){let te=0;return fe;function fe(be){return B.enter("lineEnding"),B.consume(be),B.exit("lineEnding"),W}function W(be){return B.enter("codeFencedFence"),Ie(be)?Fe(B,P,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):P(be)}function P(be){return be===h?(B.enter("codeFencedFenceSequence"),ye(be)):$(be)}function ye(be){return be===h?(te++,B.consume(be),ye):te>=f?(B.exit("codeFencedFenceSequence"),Ie(be)?Fe(B,Ee,"whitespace")(be):Ee(be)):$(be)}function Ee(be){return be===null||ve(be)?(B.exit("codeFencedFence"),K(be)):$(be)}}}function t_(i,n,a){const s=this;return u;function u(f){return f===null?a(f):(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),o)}function o(f){return s.parser.lazy[s.now().line]?a(f):n(f)}}const Mf={name:"codeIndented",tokenize:i_},n_={partial:!0,tokenize:a_};function i_(i,n,a){const s=this;return u;function u(p){return i.enter("codeIndented"),Fe(i,o,"linePrefix",5)(p)}function o(p){const g=s.events[s.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?f(p):a(p)}function f(p){return p===null?m(p):ve(p)?i.attempt(n_,f,m)(p):(i.enter("codeFlowValue"),h(p))}function h(p){return p===null||ve(p)?(i.exit("codeFlowValue"),f(p)):(i.consume(p),h)}function m(p){return i.exit("codeIndented"),n(p)}}function a_(i,n,a){const s=this;return u;function u(f){return s.parser.lazy[s.now().line]?a(f):ve(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),u):Fe(i,o,"linePrefix",5)(f)}function o(f){const h=s.events[s.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(f):ve(f)?u(f):a(f)}}const l_={name:"codeText",previous:r_,resolve:s_,tokenize:u_};function s_(i){let n=i.length-4,a=3,s,u;if((i[a][1].type==="lineEnding"||i[a][1].type==="space")&&(i[n][1].type==="lineEnding"||i[n][1].type==="space")){for(s=a;++s<n;)if(i[s][1].type==="codeTextData"){i[a][1].type="codeTextPadding",i[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(s=a-1,n++;++s<=n;)u===void 0?s!==n&&i[s][1].type!=="lineEnding"&&(u=s):(s===n||i[s][1].type==="lineEnding")&&(i[u][1].type="codeTextData",s!==u+2&&(i[u][1].end=i[s-1][1].end,i.splice(u+2,s-u-2),n-=s-u-2,s=u+2),u=void 0);return i}function r_(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function u_(i,n,a){let s=0,u,o;return f;function f(b){return i.enter("codeText"),i.enter("codeTextSequence"),h(b)}function h(b){return b===96?(i.consume(b),s++,h):(i.exit("codeTextSequence"),m(b))}function m(b){return b===null?a(b):b===32?(i.enter("space"),i.consume(b),i.exit("space"),m):b===96?(o=i.enter("codeTextSequence"),u=0,g(b)):ve(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),m):(i.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||ve(b)?(i.exit("codeTextData"),m(b)):(i.consume(b),p)}function g(b){return b===96?(i.consume(b),u++,g):u===s?(i.exit("codeTextSequence"),i.exit("codeText"),n(b)):(o.type="codeTextData",p(b))}}class o_{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,a){const s=a??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(n,s):n>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(n,a,s){const u=a||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return s&&ws(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),ws(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),ws(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const a=this.left.splice(n,Number.POSITIVE_INFINITY);ws(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);ws(this.left,a.reverse())}}}function ws(i,n){let a=0;if(n.length<1e4)i.push(...n);else for(;a<n.length;)i.push(...n.slice(a,a+1e4)),a+=1e4}function ub(i){const n={};let a=-1,s,u,o,f,h,m,p;const g=new o_(i);for(;++a<g.length;){for(;a in n;)a=n[a];if(s=g.get(a),a&&s[1].type==="chunkFlow"&&g.get(a-1)[1].type==="listItemPrefix"&&(m=s[1]._tokenizer.events,o=0,o<m.length&&m[o][1].type==="lineEndingBlank"&&(o+=2),o<m.length&&m[o][1].type==="content"))for(;++o<m.length&&m[o][1].type!=="content";)m[o][1].type==="chunkText"&&(m[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(n,c_(g,a)),a=n[a],p=!0);else if(s[1]._container){for(o=a,u=void 0;o--;)if(f=g.get(o),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),f[1].type="lineEnding",u=o);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;u&&(s[1].end={...g.get(u)[1].start},h=g.slice(u,a),h.unshift(s),g.splice(u,a-u+1,h))}}return zn(i,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function c_(i,n){const a=i.get(n)[1],s=i.get(n)[2];let u=n-1;const o=[];let f=a._tokenizer;f||(f=s.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,m=[],p={};let g,b,_=-1,v=a,N=0,w=0;const D=[w];for(;v;){for(;i.get(++u)[1]!==v;);o.push(u),v._tokenizer||(g=s.sliceStream(v),v.next||g.push(null),b&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(g),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),b=v,v=v.next}for(v=a;++_<h.length;)h[_][0]==="exit"&&h[_-1][0]==="enter"&&h[_][1].type===h[_-1][1].type&&h[_][1].start.line!==h[_][1].end.line&&(w=_+1,D.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):D.pop(),_=D.length;_--;){const C=h.slice(D[_],D[_+1]),H=o.pop();m.push([H,H+C.length-1]),i.splice(H,2,C)}for(m.reverse(),_=-1;++_<m.length;)p[N+m[_][0]]=N+m[_][1],N+=m[_][1]-m[_][0]-1;return p}const f_={resolve:h_,tokenize:p_},d_={partial:!0,tokenize:m_};function h_(i){return ub(i),i}function p_(i,n){let a;return s;function s(h){return i.enter("content"),a=i.enter("chunkContent",{contentType:"content"}),u(h)}function u(h){return h===null?o(h):ve(h)?i.check(d_,f,o)(h):(i.consume(h),u)}function o(h){return i.exit("chunkContent"),i.exit("content"),n(h)}function f(h){return i.consume(h),i.exit("chunkContent"),a.next=i.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,u}}function m_(i,n,a){const s=this;return u;function u(f){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),Fe(i,o,"linePrefix")}function o(f){if(f===null||ve(f))return a(f);const h=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(f):i.interrupt(s.parser.constructs.flow,a,n)(f)}}function ob(i,n,a,s,u,o,f,h,m){const p=m||Number.POSITIVE_INFINITY;let g=0;return b;function b(C){return C===60?(i.enter(s),i.enter(u),i.enter(o),i.consume(C),i.exit(o),_):C===null||C===32||C===41||ed(C)?a(C):(i.enter(s),i.enter(f),i.enter(h),i.enter("chunkString",{contentType:"string"}),w(C))}function _(C){return C===62?(i.enter(o),i.consume(C),i.exit(o),i.exit(u),i.exit(s),n):(i.enter(h),i.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(i.exit("chunkString"),i.exit(h),_(C)):C===null||C===60||ve(C)?a(C):(i.consume(C),C===92?N:v)}function N(C){return C===60||C===62||C===92?(i.consume(C),v):v(C)}function w(C){return!g&&(C===null||C===41||Vt(C))?(i.exit("chunkString"),i.exit(h),i.exit(f),i.exit(s),n(C)):g<p&&C===40?(i.consume(C),g++,w):C===41?(i.consume(C),g--,w):C===null||C===32||C===40||ed(C)?a(C):(i.consume(C),C===92?D:w)}function D(C){return C===40||C===41||C===92?(i.consume(C),w):w(C)}}function cb(i,n,a,s,u,o){const f=this;let h=0,m;return p;function p(v){return i.enter(s),i.enter(u),i.consume(v),i.exit(u),i.enter(o),g}function g(v){return h>999||v===null||v===91||v===93&&!m||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?a(v):v===93?(i.exit(o),i.enter(u),i.consume(v),i.exit(u),i.exit(s),n):ve(v)?(i.enter("lineEnding"),i.consume(v),i.exit("lineEnding"),g):(i.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||v===91||v===93||ve(v)||h++>999?(i.exit("chunkString"),g(v)):(i.consume(v),m||(m=!Ie(v)),v===92?_:b)}function _(v){return v===91||v===92||v===93?(i.consume(v),h++,b):b(v)}}function fb(i,n,a,s,u,o){let f;return h;function h(_){return _===34||_===39||_===40?(i.enter(s),i.enter(u),i.consume(_),i.exit(u),f=_===40?41:_,m):a(_)}function m(_){return _===f?(i.enter(u),i.consume(_),i.exit(u),i.exit(s),n):(i.enter(o),p(_))}function p(_){return _===f?(i.exit(o),m(f)):_===null?a(_):ve(_)?(i.enter("lineEnding"),i.consume(_),i.exit("lineEnding"),Fe(i,p,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),g(_))}function g(_){return _===f||_===null||ve(_)?(i.exit("chunkString"),p(_)):(i.consume(_),_===92?b:g)}function b(_){return _===f||_===92?(i.consume(_),g):g(_)}}function zs(i,n){let a;return s;function s(u){return ve(u)?(i.enter("lineEnding"),i.consume(u),i.exit("lineEnding"),a=!0,s):Ie(u)?Fe(i,s,a?"linePrefix":"lineSuffix")(u):n(u)}}const y_={name:"definition",tokenize:b_},g_={partial:!0,tokenize:v_};function b_(i,n,a){const s=this;let u;return o;function o(v){return i.enter("definition"),f(v)}function f(v){return cb.call(s,i,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return u=yl(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),v===58?(i.enter("definitionMarker"),i.consume(v),i.exit("definitionMarker"),m):a(v)}function m(v){return Vt(v)?zs(i,p)(v):p(v)}function p(v){return ob(i,g,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return i.attempt(g_,b,b)(v)}function b(v){return Ie(v)?Fe(i,_,"whitespace")(v):_(v)}function _(v){return v===null||ve(v)?(i.exit("definition"),s.parser.defined.push(u),n(v)):a(v)}}function v_(i,n,a){return s;function s(h){return Vt(h)?zs(i,u)(h):a(h)}function u(h){return fb(i,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Ie(h)?Fe(i,f,"whitespace")(h):f(h)}function f(h){return h===null||ve(h)?n(h):a(h)}}const x_={name:"hardBreakEscape",tokenize:S_};function S_(i,n,a){return s;function s(o){return i.enter("hardBreakEscape"),i.consume(o),u}function u(o){return ve(o)?(i.exit("hardBreakEscape"),n(o)):a(o)}}const __={name:"headingAtx",resolve:k_,tokenize:w_};function k_(i,n){let a=i.length-2,s=3,u,o;return i[s][1].type==="whitespace"&&(s+=2),a-2>s&&i[a][1].type==="whitespace"&&(a-=2),i[a][1].type==="atxHeadingSequence"&&(s===a-1||a-4>s&&i[a-2][1].type==="whitespace")&&(a-=s+1===a?2:4),a>s&&(u={type:"atxHeadingText",start:i[s][1].start,end:i[a][1].end},o={type:"chunkText",start:i[s][1].start,end:i[a][1].end,contentType:"text"},zn(i,s,a-s+1,[["enter",u,n],["enter",o,n],["exit",o,n],["exit",u,n]])),i}function w_(i,n,a){let s=0;return u;function u(g){return i.enter("atxHeading"),o(g)}function o(g){return i.enter("atxHeadingSequence"),f(g)}function f(g){return g===35&&s++<6?(i.consume(g),f):g===null||Vt(g)?(i.exit("atxHeadingSequence"),h(g)):a(g)}function h(g){return g===35?(i.enter("atxHeadingSequence"),m(g)):g===null||ve(g)?(i.exit("atxHeading"),n(g)):Ie(g)?Fe(i,h,"whitespace")(g):(i.enter("atxHeadingText"),p(g))}function m(g){return g===35?(i.consume(g),m):(i.exit("atxHeadingSequence"),h(g))}function p(g){return g===null||g===35||Vt(g)?(i.exit("atxHeadingText"),h(g)):(i.consume(g),p)}}const A_=["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"],mg=["pre","script","style","textarea"],T_={concrete:!0,name:"htmlFlow",resolveTo:O_,tokenize:N_},E_={partial:!0,tokenize:z_},C_={partial:!0,tokenize:M_};function O_(i){let n=i.length;for(;n--&&!(i[n][0]==="enter"&&i[n][1].type==="htmlFlow"););return n>1&&i[n-2][1].type==="linePrefix"&&(i[n][1].start=i[n-2][1].start,i[n+1][1].start=i[n-2][1].start,i.splice(n-2,2)),i}function N_(i,n,a){const s=this;let u,o,f,h,m;return p;function p(k){return g(k)}function g(k){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(k),b}function b(k){return k===33?(i.consume(k),_):k===47?(i.consume(k),o=!0,w):k===63?(i.consume(k),u=3,s.interrupt?n:A):On(k)?(i.consume(k),f=String.fromCharCode(k),D):a(k)}function _(k){return k===45?(i.consume(k),u=2,v):k===91?(i.consume(k),u=5,h=0,N):On(k)?(i.consume(k),u=4,s.interrupt?n:A):a(k)}function v(k){return k===45?(i.consume(k),s.interrupt?n:A):a(k)}function N(k){const ne="CDATA[";return k===ne.charCodeAt(h++)?(i.consume(k),h===ne.length?s.interrupt?n:P:N):a(k)}function w(k){return On(k)?(i.consume(k),f=String.fromCharCode(k),D):a(k)}function D(k){if(k===null||k===47||k===62||Vt(k)){const ne=k===47,me=f.toLowerCase();return!ne&&!o&&mg.includes(me)?(u=1,s.interrupt?n(k):P(k)):A_.includes(f.toLowerCase())?(u=6,ne?(i.consume(k),C):s.interrupt?n(k):P(k)):(u=7,s.interrupt&&!s.parser.lazy[s.now().line]?a(k):o?H(k):M(k))}return k===45||_n(k)?(i.consume(k),f+=String.fromCharCode(k),D):a(k)}function C(k){return k===62?(i.consume(k),s.interrupt?n:P):a(k)}function H(k){return Ie(k)?(i.consume(k),H):fe(k)}function M(k){return k===47?(i.consume(k),fe):k===58||k===95||On(k)?(i.consume(k),Q):Ie(k)?(i.consume(k),M):fe(k)}function Q(k){return k===45||k===46||k===58||k===95||_n(k)?(i.consume(k),Q):X(k)}function X(k){return k===61?(i.consume(k),B):Ie(k)?(i.consume(k),X):M(k)}function B(k){return k===null||k===60||k===61||k===62||k===96?a(k):k===34||k===39?(i.consume(k),m=k,K):Ie(k)?(i.consume(k),B):$(k)}function K(k){return k===m?(i.consume(k),m=null,te):k===null||ve(k)?a(k):(i.consume(k),K)}function $(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Vt(k)?X(k):(i.consume(k),$)}function te(k){return k===47||k===62||Ie(k)?M(k):a(k)}function fe(k){return k===62?(i.consume(k),W):a(k)}function W(k){return k===null||ve(k)?P(k):Ie(k)?(i.consume(k),W):a(k)}function P(k){return k===45&&u===2?(i.consume(k),q):k===60&&u===1?(i.consume(k),J):k===62&&u===4?(i.consume(k),E):k===63&&u===3?(i.consume(k),A):k===93&&u===5?(i.consume(k),Ce):ve(k)&&(u===6||u===7)?(i.exit("htmlFlowData"),i.check(E_,Y,ye)(k)):k===null||ve(k)?(i.exit("htmlFlowData"),ye(k)):(i.consume(k),P)}function ye(k){return i.check(C_,Ee,Y)(k)}function Ee(k){return i.enter("lineEnding"),i.consume(k),i.exit("lineEnding"),be}function be(k){return k===null||ve(k)?ye(k):(i.enter("htmlFlowData"),P(k))}function q(k){return k===45?(i.consume(k),A):P(k)}function J(k){return k===47?(i.consume(k),f="",oe):P(k)}function oe(k){if(k===62){const ne=f.toLowerCase();return mg.includes(ne)?(i.consume(k),E):P(k)}return On(k)&&f.length<8?(i.consume(k),f+=String.fromCharCode(k),oe):P(k)}function Ce(k){return k===93?(i.consume(k),A):P(k)}function A(k){return k===62?(i.consume(k),E):k===45&&u===2?(i.consume(k),A):P(k)}function E(k){return k===null||ve(k)?(i.exit("htmlFlowData"),Y(k)):(i.consume(k),E)}function Y(k){return i.exit("htmlFlow"),n(k)}}function M_(i,n,a){const s=this;return u;function u(f){return ve(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),o):a(f)}function o(f){return s.parser.lazy[s.now().line]?a(f):n(f)}}function z_(i,n,a){return s;function s(u){return i.enter("lineEnding"),i.consume(u),i.exit("lineEnding"),i.attempt(Uu,n,a)}}const D_={name:"htmlText",tokenize:j_};function j_(i,n,a){const s=this;let u,o,f;return h;function h(A){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(A),m}function m(A){return A===33?(i.consume(A),p):A===47?(i.consume(A),X):A===63?(i.consume(A),M):On(A)?(i.consume(A),$):a(A)}function p(A){return A===45?(i.consume(A),g):A===91?(i.consume(A),o=0,N):On(A)?(i.consume(A),H):a(A)}function g(A){return A===45?(i.consume(A),v):a(A)}function b(A){return A===null?a(A):A===45?(i.consume(A),_):ve(A)?(f=b,J(A)):(i.consume(A),b)}function _(A){return A===45?(i.consume(A),v):b(A)}function v(A){return A===62?q(A):A===45?_(A):b(A)}function N(A){const E="CDATA[";return A===E.charCodeAt(o++)?(i.consume(A),o===E.length?w:N):a(A)}function w(A){return A===null?a(A):A===93?(i.consume(A),D):ve(A)?(f=w,J(A)):(i.consume(A),w)}function D(A){return A===93?(i.consume(A),C):w(A)}function C(A){return A===62?q(A):A===93?(i.consume(A),C):w(A)}function H(A){return A===null||A===62?q(A):ve(A)?(f=H,J(A)):(i.consume(A),H)}function M(A){return A===null?a(A):A===63?(i.consume(A),Q):ve(A)?(f=M,J(A)):(i.consume(A),M)}function Q(A){return A===62?q(A):M(A)}function X(A){return On(A)?(i.consume(A),B):a(A)}function B(A){return A===45||_n(A)?(i.consume(A),B):K(A)}function K(A){return ve(A)?(f=K,J(A)):Ie(A)?(i.consume(A),K):q(A)}function $(A){return A===45||_n(A)?(i.consume(A),$):A===47||A===62||Vt(A)?te(A):a(A)}function te(A){return A===47?(i.consume(A),q):A===58||A===95||On(A)?(i.consume(A),fe):ve(A)?(f=te,J(A)):Ie(A)?(i.consume(A),te):q(A)}function fe(A){return A===45||A===46||A===58||A===95||_n(A)?(i.consume(A),fe):W(A)}function W(A){return A===61?(i.consume(A),P):ve(A)?(f=W,J(A)):Ie(A)?(i.consume(A),W):te(A)}function P(A){return A===null||A===60||A===61||A===62||A===96?a(A):A===34||A===39?(i.consume(A),u=A,ye):ve(A)?(f=P,J(A)):Ie(A)?(i.consume(A),P):(i.consume(A),Ee)}function ye(A){return A===u?(i.consume(A),u=void 0,be):A===null?a(A):ve(A)?(f=ye,J(A)):(i.consume(A),ye)}function Ee(A){return A===null||A===34||A===39||A===60||A===61||A===96?a(A):A===47||A===62||Vt(A)?te(A):(i.consume(A),Ee)}function be(A){return A===47||A===62||Vt(A)?te(A):a(A)}function q(A){return A===62?(i.consume(A),i.exit("htmlTextData"),i.exit("htmlText"),n):a(A)}function J(A){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(A),i.exit("lineEnding"),oe}function oe(A){return Ie(A)?Fe(i,Ce,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):Ce(A)}function Ce(A){return i.enter("htmlTextData"),f(A)}}const yd={name:"labelEnd",resolveAll:q_,resolveTo:U_,tokenize:H_},R_={tokenize:I_},B_={tokenize:Y_},L_={tokenize:V_};function q_(i){let n=-1;const a=[];for(;++n<i.length;){const s=i[n][1];if(a.push(i[n]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const u=s.type==="labelImage"?4:2;s.type="data",n+=u}}return i.length!==a.length&&zn(i,0,i.length,a),i}function U_(i,n){let a=i.length,s=0,u,o,f,h;for(;a--;)if(u=i[a][1],o){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;i[a][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(f){if(i[a][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(o=a,u.type!=="labelLink")){s=2;break}}else u.type==="labelEnd"&&(f=a);const m={type:i[o][1].type==="labelLink"?"link":"image",start:{...i[o][1].start},end:{...i[i.length-1][1].end}},p={type:"label",start:{...i[o][1].start},end:{...i[f][1].end}},g={type:"labelText",start:{...i[o+s+2][1].end},end:{...i[f-2][1].start}};return h=[["enter",m,n],["enter",p,n]],h=dn(h,i.slice(o+1,o+s+3)),h=dn(h,[["enter",g,n]]),h=dn(h,md(n.parser.constructs.insideSpan.null,i.slice(o+s+4,f-3),n)),h=dn(h,[["exit",g,n],i[f-2],i[f-1],["exit",p,n]]),h=dn(h,i.slice(f+1)),h=dn(h,[["exit",m,n]]),zn(i,o,i.length,h),i}function H_(i,n,a){const s=this;let u=s.events.length,o,f;for(;u--;)if((s.events[u][1].type==="labelImage"||s.events[u][1].type==="labelLink")&&!s.events[u][1]._balanced){o=s.events[u][1];break}return h;function h(_){return o?o._inactive?b(_):(f=s.parser.defined.includes(yl(s.sliceSerialize({start:o.end,end:s.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(_),i.exit("labelMarker"),i.exit("labelEnd"),m):a(_)}function m(_){return _===40?i.attempt(R_,g,f?g:b)(_):_===91?i.attempt(B_,g,f?p:b)(_):f?g(_):b(_)}function p(_){return i.attempt(L_,g,b)(_)}function g(_){return n(_)}function b(_){return o._balanced=!0,a(_)}}function I_(i,n,a){return s;function s(b){return i.enter("resource"),i.enter("resourceMarker"),i.consume(b),i.exit("resourceMarker"),u}function u(b){return Vt(b)?zs(i,o)(b):o(b)}function o(b){return b===41?g(b):ob(i,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function f(b){return Vt(b)?zs(i,m)(b):g(b)}function h(b){return a(b)}function m(b){return b===34||b===39||b===40?fb(i,p,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):g(b)}function p(b){return Vt(b)?zs(i,g)(b):g(b)}function g(b){return b===41?(i.enter("resourceMarker"),i.consume(b),i.exit("resourceMarker"),i.exit("resource"),n):a(b)}}function Y_(i,n,a){const s=this;return u;function u(h){return cb.call(s,i,o,f,"reference","referenceMarker","referenceString")(h)}function o(h){return s.parser.defined.includes(yl(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?n(h):a(h)}function f(h){return a(h)}}function V_(i,n,a){return s;function s(o){return i.enter("reference"),i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),u}function u(o){return o===93?(i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),i.exit("reference"),n):a(o)}}const G_={name:"labelStartImage",resolveAll:yd.resolveAll,tokenize:K_};function K_(i,n,a){const s=this;return u;function u(h){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(h),i.exit("labelImageMarker"),o}function o(h){return h===91?(i.enter("labelMarker"),i.consume(h),i.exit("labelMarker"),i.exit("labelImage"),f):a(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in s.parser.constructs?a(h):n(h)}}const Z_={name:"labelStartLink",resolveAll:yd.resolveAll,tokenize:Q_};function Q_(i,n,a){const s=this;return u;function u(f){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(f),i.exit("labelMarker"),i.exit("labelLink"),o}function o(f){return f===94&&"_hiddenFootnoteSupport"in s.parser.constructs?a(f):n(f)}}const zf={name:"lineEnding",tokenize:$_};function $_(i,n){return a;function a(s){return i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),Fe(i,n,"linePrefix")}}const Su={name:"thematicBreak",tokenize:X_};function X_(i,n,a){let s=0,u;return o;function o(p){return i.enter("thematicBreak"),f(p)}function f(p){return u=p,h(p)}function h(p){return p===u?(i.enter("thematicBreakSequence"),m(p)):s>=3&&(p===null||ve(p))?(i.exit("thematicBreak"),n(p)):a(p)}function m(p){return p===u?(i.consume(p),s++,m):(i.exit("thematicBreakSequence"),Ie(p)?Fe(i,h,"whitespace")(p):h(p))}}const Yt={continuation:{tokenize:P_},exit:tk,name:"list",tokenize:W_},J_={partial:!0,tokenize:nk},F_={partial:!0,tokenize:ek};function W_(i,n,a){const s=this,u=s.events[s.events.length-1];let o=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,f=0;return h;function h(v){const N=s.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!s.containerState.marker||v===s.containerState.marker:td(v)){if(s.containerState.type||(s.containerState.type=N,i.enter(N,{_container:!0})),N==="listUnordered")return i.enter("listItemPrefix"),v===42||v===45?i.check(Su,a,p)(v):p(v);if(!s.interrupt||v===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),m(v)}return a(v)}function m(v){return td(v)&&++f<10?(i.consume(v),m):(!s.interrupt||f<2)&&(s.containerState.marker?v===s.containerState.marker:v===41||v===46)?(i.exit("listItemValue"),p(v)):a(v)}function p(v){return i.enter("listItemMarker"),i.consume(v),i.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||v,i.check(Uu,s.interrupt?a:g,i.attempt(J_,_,b))}function g(v){return s.containerState.initialBlankLine=!0,o++,_(v)}function b(v){return Ie(v)?(i.enter("listItemPrefixWhitespace"),i.consume(v),i.exit("listItemPrefixWhitespace"),_):a(v)}function _(v){return s.containerState.size=o+s.sliceSerialize(i.exit("listItemPrefix"),!0).length,n(v)}}function P_(i,n,a){const s=this;return s.containerState._closeFlow=void 0,i.check(Uu,u,o);function u(h){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Fe(i,n,"listItemIndent",s.containerState.size+1)(h)}function o(h){return s.containerState.furtherBlankLines||!Ie(h)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,f(h)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,i.attempt(F_,n,f)(h))}function f(h){return s.containerState._closeFlow=!0,s.interrupt=void 0,Fe(i,i.attempt(Yt,n,a),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function ek(i,n,a){const s=this;return Fe(i,u,"listItemIndent",s.containerState.size+1);function u(o){const f=s.events[s.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===s.containerState.size?n(o):a(o)}}function tk(i){i.exit(this.containerState.type)}function nk(i,n,a){const s=this;return Fe(i,u,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(o){const f=s.events[s.events.length-1];return!Ie(o)&&f&&f[1].type==="listItemPrefixWhitespace"?n(o):a(o)}}const yg={name:"setextUnderline",resolveTo:ik,tokenize:ak};function ik(i,n){let a=i.length,s,u,o;for(;a--;)if(i[a][0]==="enter"){if(i[a][1].type==="content"){s=a;break}i[a][1].type==="paragraph"&&(u=a)}else i[a][1].type==="content"&&i.splice(a,1),!o&&i[a][1].type==="definition"&&(o=a);const f={type:"setextHeading",start:{...i[s][1].start},end:{...i[i.length-1][1].end}};return i[u][1].type="setextHeadingText",o?(i.splice(u,0,["enter",f,n]),i.splice(o+1,0,["exit",i[s][1],n]),i[s][1].end={...i[o][1].end}):i[s][1]=f,i.push(["exit",f,n]),i}function ak(i,n,a){const s=this;let u;return o;function o(p){let g=s.events.length,b;for(;g--;)if(s.events[g][1].type!=="lineEnding"&&s.events[g][1].type!=="linePrefix"&&s.events[g][1].type!=="content"){b=s.events[g][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||b)?(i.enter("setextHeadingLine"),u=p,f(p)):a(p)}function f(p){return i.enter("setextHeadingLineSequence"),h(p)}function h(p){return p===u?(i.consume(p),h):(i.exit("setextHeadingLineSequence"),Ie(p)?Fe(i,m,"lineSuffix")(p):m(p))}function m(p){return p===null||ve(p)?(i.exit("setextHeadingLine"),n(p)):a(p)}}const lk={tokenize:sk};function sk(i){const n=this,a=i.attempt(Uu,s,i.attempt(this.parser.constructs.flowInitial,u,Fe(i,i.attempt(this.parser.constructs.flow,u,i.attempt(f_,u)),"linePrefix")));return a;function s(o){if(o===null){i.consume(o);return}return i.enter("lineEndingBlank"),i.consume(o),i.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function u(o){if(o===null){i.consume(o);return}return i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),n.currentConstruct=void 0,a}}const rk={resolveAll:hb()},uk=db("string"),ok=db("text");function db(i){return{resolveAll:hb(i==="text"?ck:void 0),tokenize:n};function n(a){const s=this,u=this.parser.constructs[i],o=a.attempt(u,f,h);return f;function f(g){return p(g)?o(g):h(g)}function h(g){if(g===null){a.consume(g);return}return a.enter("data"),a.consume(g),m}function m(g){return p(g)?(a.exit("data"),o(g)):(a.consume(g),m)}function p(g){if(g===null)return!0;const b=u[g];let _=-1;if(b)for(;++_<b.length;){const v=b[_];if(!v.previous||v.previous.call(s,s.previous))return!0}return!1}}}function hb(i){return n;function n(a,s){let u=-1,o;for(;++u<=a.length;)o===void 0?a[u]&&a[u][1].type==="data"&&(o=u,u++):(!a[u]||a[u][1].type!=="data")&&(u!==o+2&&(a[o][1].end=a[u-1][1].end,a.splice(o+2,u-o-2),u=o+2),o=void 0);return i?i(a,s):a}}function ck(i,n){let a=0;for(;++a<=i.length;)if((a===i.length||i[a][1].type==="lineEnding")&&i[a-1][1].type==="data"){const s=i[a-1][1],u=n.sliceStream(s);let o=u.length,f=-1,h=0,m;for(;o--;){const p=u[o];if(typeof p=="string"){for(f=p.length;p.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(p===-2)m=!0,h++;else if(p!==-1){o++;break}}if(n._contentTypeTextTrailing&&a===i.length&&(h=0),h){const p={type:a===i.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?f:s.start._bufferIndex+f,_index:s.start._index+o,line:s.end.line,column:s.end.column-h,offset:s.end.offset-h},end:{...s.end}};s.end={...p.start},s.start.offset===s.end.offset?Object.assign(s,p):(i.splice(a,0,["enter",p,n],["exit",p,n]),a+=2)}a++}return i}const fk={42:Yt,43:Yt,45:Yt,48:Yt,49:Yt,50:Yt,51:Yt,52:Yt,53:Yt,54:Yt,55:Yt,56:Yt,57:Yt,62:lb},dk={91:y_},hk={[-2]:Mf,[-1]:Mf,32:Mf},pk={35:__,42:Su,45:[yg,Su],60:T_,61:yg,95:Su,96:pg,126:pg},mk={38:rb,92:sb},yk={[-5]:zf,[-4]:zf,[-3]:zf,33:G_,38:rb,42:nd,60:[ZS,D_],91:Z_,92:[x_,sb],93:yd,95:nd,96:l_},gk={null:[nd,rk]},bk={null:[42,95]},vk={null:[]},xk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bk,contentInitial:dk,disable:vk,document:fk,flow:pk,flowInitial:hk,insideSpan:gk,string:mk,text:yk},Symbol.toStringTag,{value:"Module"}));function Sk(i,n,a){let s={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const u={},o=[];let f=[],h=[];const m={attempt:K(X),check:K(B),consume:H,enter:M,exit:Q,interrupt:K(B,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,events:[],now:N,parser:i,previous:null,sliceSerialize:_,sliceStream:v,write:b};let g=n.tokenize.call(p,m);return n.resolveAll&&o.push(n),p;function b(W){return f=dn(f,W),D(),f[f.length-1]!==null?[]:($(n,0),p.events=md(o,p.events,p),p.events)}function _(W,P){return kk(v(W),P)}function v(W){return _k(f,W)}function N(){const{_bufferIndex:W,_index:P,line:ye,column:Ee,offset:be}=s;return{_bufferIndex:W,_index:P,line:ye,column:Ee,offset:be}}function w(W){u[W.line]=W.column,fe()}function D(){let W;for(;s._index<f.length;){const P=f[s._index];if(typeof P=="string")for(W=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===W&&s._bufferIndex<P.length;)C(P.charCodeAt(s._bufferIndex));else C(P)}}function C(W){g=g(W)}function H(W){ve(W)?(s.line++,s.column=1,s.offset+=W===-3?2:1,fe()):W!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===f[s._index].length&&(s._bufferIndex=-1,s._index++)),p.previous=W}function M(W,P){const ye=P||{};return ye.type=W,ye.start=N(),p.events.push(["enter",ye,p]),h.push(ye),ye}function Q(W){const P=h.pop();return P.end=N(),p.events.push(["exit",P,p]),P}function X(W,P){$(W,P.from)}function B(W,P){P.restore()}function K(W,P){return ye;function ye(Ee,be,q){let J,oe,Ce,A;return Array.isArray(Ee)?Y(Ee):"tokenize"in Ee?Y([Ee]):E(Ee);function E(de){return ze;function ze(tt){const Ke=tt!==null&&de[tt],en=tt!==null&&de.null,Bn=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(en)?en:en?[en]:[]];return Y(Bn)(tt)}}function Y(de){return J=de,oe=0,de.length===0?q:k(de[oe])}function k(de){return ze;function ze(tt){return A=te(),Ce=de,de.partial||(p.currentConstruct=de),de.name&&p.parser.constructs.disable.null.includes(de.name)?me():de.tokenize.call(P?Object.assign(Object.create(p),P):p,m,ne,me)(tt)}}function ne(de){return W(Ce,A),be}function me(de){return A.restore(),++oe<J.length?k(J[oe]):q}}}function $(W,P){W.resolveAll&&!o.includes(W)&&o.push(W),W.resolve&&zn(p.events,P,p.events.length-P,W.resolve(p.events.slice(P),p)),W.resolveTo&&(p.events=W.resolveTo(p.events,p))}function te(){const W=N(),P=p.previous,ye=p.currentConstruct,Ee=p.events.length,be=Array.from(h);return{from:Ee,restore:q};function q(){s=W,p.previous=P,p.currentConstruct=ye,p.events.length=Ee,h=be,fe()}}function fe(){s.line in u&&s.column<2&&(s.column=u[s.line],s.offset+=u[s.line]-1)}}function _k(i,n){const a=n.start._index,s=n.start._bufferIndex,u=n.end._index,o=n.end._bufferIndex;let f;if(a===u)f=[i[a].slice(s,o)];else{if(f=i.slice(a,u),s>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(s):f.shift()}o>0&&f.push(i[u].slice(0,o))}return f}function kk(i,n){let a=-1;const s=[];let u;for(;++a<i.length;){const o=i[a];let f;if(typeof o=="string")f=o;else switch(o){case-5:{f="\r";break}case-4:{f=`
359
- `;break}case-3:{f=`\r
360
- `;break}case-2:{f=n?" ":" ";break}case-1:{if(!n&&u)continue;f=" ";break}default:f=String.fromCharCode(o)}u=o===-2,s.push(f)}return s.join("")}function wk(i){const s={constructs:MS([xk,...(i||{}).extensions||[]]),content:u(US),defined:[],document:u(IS),flow:u(lk),lazy:{},string:u(uk),text:u(ok)};return s;function u(o){return f;function f(h){return Sk(s,o,h)}}}function Ak(i){for(;!ub(i););return i}const gg=/[\0\t\n\r]/g;function Tk(){let i=1,n="",a=!0,s;return u;function u(o,f,h){const m=[];let p,g,b,_,v;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(f||void 0).decode(o)),b=0,n="",a&&(o.charCodeAt(0)===65279&&b++,a=void 0);b<o.length;){if(gg.lastIndex=b,p=gg.exec(o),_=p&&p.index!==void 0?p.index:o.length,v=o.charCodeAt(_),!p){n=o.slice(b);break}if(v===10&&b===_&&s)m.push(-3),s=void 0;else switch(s&&(m.push(-5),s=void 0),b<_&&(m.push(o.slice(b,_)),i+=_-b),v){case 0:{m.push(65533),i++;break}case 9:{for(g=Math.ceil(i/4)*4,m.push(-2);i++<g;)m.push(-1);break}case 10:{m.push(-4),i=1;break}default:s=!0,i=1}b=_+1}return h&&(s&&m.push(-5),n&&m.push(n),m.push(null)),m}}const Ek=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ck(i){return i.replace(Ek,Ok)}function Ok(i,n,a){if(n)return n;if(a.charCodeAt(0)===35){const u=a.charCodeAt(1),o=u===120||u===88;return ab(a.slice(o?2:1),o?16:10)}return pd(a)||i}const pb={}.hasOwnProperty;function Nk(i,n,a){return typeof n!="string"&&(a=n,n=void 0),Mk(a)(Ak(wk(a).document().write(Tk()(i,n,!0))))}function Mk(i){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(xa),autolinkProtocol:te,autolinkEmail:te,atxHeading:o(ba),blockQuote:o(en),characterEscape:te,characterReference:te,codeFenced:o(Bn),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:o(Bn,f),codeText:o(El,f),codeTextData:te,data:te,codeFlowValue:te,definition:o($s),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:o(Ln),hardBreakEscape:o(va),hardBreakTrailing:o(va),htmlFlow:o(Xs,f),htmlFlowData:te,htmlText:o(Xs,f),htmlTextData:te,image:o(Js),label:f,link:o(xa),listItem:o(Cl),listItemValue:_,listOrdered:o(Sa,b),listUnordered:o(Sa),paragraph:o(Fu),reference:k,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:o(ba),strong:o(Wu),thematicBreak:o(Pu)},exit:{atxHeading:m(),atxHeadingSequence:X,autolink:m(),autolinkEmail:Ke,autolinkProtocol:tt,blockQuote:m(),characterEscapeValue:fe,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:de,characterReference:ze,codeFenced:m(D),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:fe,codeIndented:m(C),codeText:m(be),codeTextData:fe,data:fe,definition:m(),definitionDestinationString:Q,definitionLabelString:H,definitionTitleString:M,emphasis:m(),hardBreakEscape:m(P),hardBreakTrailing:m(P),htmlFlow:m(ye),htmlFlowData:fe,htmlText:m(Ee),htmlTextData:fe,image:m(J),label:Ce,labelText:oe,lineEnding:W,link:m(q),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ne,resourceDestinationString:A,resourceTitleString:E,resource:Y,setextHeading:m($),setextHeadingLineSequence:K,setextHeadingText:B,strong:m(),thematicBreak:m()}};mb(n,(i||{}).mdastExtensions||[]);const a={};return s;function s(V){let ee={type:"root",children:[]};const ge={stack:[ee],tokenStack:[],config:n,enter:h,exit:p,buffer:f,resume:g,data:a},Oe=[];let Ye=-1;for(;++Ye<V.length;)if(V[Ye][1].type==="listOrdered"||V[Ye][1].type==="listUnordered")if(V[Ye][0]==="enter")Oe.push(Ye);else{const Kt=Oe.pop();Ye=u(V,Kt,Ye)}for(Ye=-1;++Ye<V.length;){const Kt=n[V[Ye][0]];pb.call(Kt,V[Ye][1].type)&&Kt[V[Ye][1].type].call(Object.assign({sliceSerialize:V[Ye][2].sliceSerialize},ge),V[Ye][1])}if(ge.tokenStack.length>0){const Kt=ge.tokenStack[ge.tokenStack.length-1];(Kt[1]||bg).call(ge,void 0,Kt[0])}for(ee.position={start:Ri(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:Ri(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<n.transforms.length;)ee=n.transforms[Ye](ee)||ee;return ee}function u(V,ee,ge){let Oe=ee-1,Ye=-1,Kt=!1,qn,Ct,mt,jt;for(;++Oe<=ge;){const Xe=V[Oe];switch(Xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xe[0]==="enter"?Ye++:Ye--,jt=void 0;break}case"lineEndingBlank":{Xe[0]==="enter"&&(qn&&!jt&&!Ye&&!mt&&(mt=Oe),jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:jt=void 0}if(!Ye&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||Ye===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(qn){let ci=Oe;for(Ct=void 0;ci--;){const gn=V[ci];if(gn[1].type==="lineEnding"||gn[1].type==="lineEndingBlank"){if(gn[0]==="exit")continue;Ct&&(V[Ct][1].type="lineEndingBlank",Kt=!0),gn[1].type="lineEnding",Ct=ci}else if(!(gn[1].type==="linePrefix"||gn[1].type==="blockQuotePrefix"||gn[1].type==="blockQuotePrefixWhitespace"||gn[1].type==="blockQuoteMarker"||gn[1].type==="listItemIndent"))break}mt&&(!Ct||mt<Ct)&&(qn._spread=!0),qn.end=Object.assign({},Ct?V[Ct][1].start:Xe[1].end),V.splice(Ct||Oe,0,["exit",qn,Xe[2]]),Oe++,ge++}if(Xe[1].type==="listItemPrefix"){const ci={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start),end:void 0};qn=ci,V.splice(Oe,0,["enter",ci,Xe[2]]),Oe++,ge++,mt=void 0,jt=!0}}}return V[ee][1]._spread=Kt,ge}function o(V,ee){return ge;function ge(Oe){h.call(this,V(Oe),Oe),ee&&ee.call(this,Oe)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(V,ee,ge){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([ee,ge||void 0]),V.position={start:Ri(ee.start),end:void 0}}function m(V){return ee;function ee(ge){V&&V.call(this,ge),p.call(this,ge)}}function p(V,ee){const ge=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==V.type&&(ee?ee.call(this,V,Oe[0]):(Oe[1]||bg).call(this,V,Oe[0]));else throw new Error("Cannot close `"+V.type+"` ("+Ms({start:V.start,end:V.end})+"): it’s not open");ge.position.end=Ri(V.end)}function g(){return OS(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function _(V){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function v(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=V}function N(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=V}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V.replace(/(\r?\n|\r)$/g,"")}function H(V){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=yl(this.sliceSerialize(V)).toLowerCase()}function M(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.title=V}function Q(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.url=V}function X(V){const ee=this.stack[this.stack.length-1];if(!ee.depth){const ge=this.sliceSerialize(V).length;ee.depth=ge}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function K(V){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function te(V){const ge=this.stack[this.stack.length-1].children;let Oe=ge[ge.length-1];(!Oe||Oe.type!=="text")&&(Oe=Et(),Oe.position={start:Ri(V.start),end:void 0},ge.push(Oe)),this.stack.push(Oe)}function fe(V){const ee=this.stack.pop();ee.value+=this.sliceSerialize(V),ee.position.end=Ri(V.end)}function W(V){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ee.children[ee.children.length-1];ge.position.end=Ri(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ee.type)&&(te.call(this,V),fe.call(this,V))}function P(){this.data.atHardBreak=!0}function ye(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V}function Ee(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V}function be(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V}function q(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ee,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function J(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ee,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function oe(V){const ee=this.sliceSerialize(V),ge=this.stack[this.stack.length-2];ge.label=Ck(ee),ge.identifier=yl(ee).toLowerCase()}function Ce(){const V=this.stack[this.stack.length-1],ee=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Oe=V.children;ge.children=Oe}else ge.alt=ee}function A(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.url=V}function E(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.title=V}function Y(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ne(V){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=yl(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function me(V){this.data.characterReferenceType=V.type}function de(V){const ee=this.sliceSerialize(V),ge=this.data.characterReferenceType;let Oe;ge?(Oe=ab(ee,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=pd(ee);const Ye=this.stack[this.stack.length-1];Ye.value+=Oe}function ze(V){const ee=this.stack.pop();ee.position.end=Ri(V.end)}function tt(V){fe.call(this,V);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(V)}function Ke(V){fe.call(this,V);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(V)}function en(){return{type:"blockquote",children:[]}}function Bn(){return{type:"code",lang:null,meta:null,value:""}}function El(){return{type:"inlineCode",value:""}}function $s(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ln(){return{type:"emphasis",children:[]}}function ba(){return{type:"heading",depth:0,children:[]}}function va(){return{type:"break"}}function Xs(){return{type:"html",value:""}}function Js(){return{type:"image",title:null,url:"",alt:null}}function xa(){return{type:"link",title:null,url:"",children:[]}}function Sa(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function Cl(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function Fu(){return{type:"paragraph",children:[]}}function Wu(){return{type:"strong",children:[]}}function Et(){return{type:"text",value:""}}function Pu(){return{type:"thematicBreak"}}}function Ri(i){return{line:i.line,column:i.column,offset:i.offset}}function mb(i,n){let a=-1;for(;++a<n.length;){const s=n[a];Array.isArray(s)?mb(i,s):zk(i,s)}}function zk(i,n){let a;for(a in n)if(pb.call(n,a))switch(a){case"canContainEols":{const s=n[a];s&&i[a].push(...s);break}case"transforms":{const s=n[a];s&&i[a].push(...s);break}case"enter":case"exit":{const s=n[a];s&&Object.assign(i[a],s);break}}}function bg(i,n){throw i?new Error("Cannot close `"+i.type+"` ("+Ms({start:i.start,end:i.end})+"): a different token (`"+n.type+"`, "+Ms({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ms({start:n.start,end:n.end})+") is still open")}function Dk(i){const n=this;n.parser=a;function a(s){return Nk(s,{...n.data("settings"),...i,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}const yb=(function(i){if(i==null)return Lk;if(typeof i=="function")return Hu(i);if(typeof i=="object")return Array.isArray(i)?jk(i):Rk(i);if(typeof i=="string")return Bk(i);throw new Error("Expected function, string, or object as test")});function jk(i){const n=[];let a=-1;for(;++a<i.length;)n[a]=yb(i[a]);return Hu(s);function s(...u){let o=-1;for(;++o<n.length;)if(n[o].apply(this,u))return!0;return!1}}function Rk(i){const n=i;return Hu(a);function a(s){const u=s;let o;for(o in i)if(u[o]!==n[o])return!1;return!0}}function Bk(i){return Hu(n);function n(a){return a&&a.type===i}}function Hu(i){return n;function n(a,s,u){return!!(qk(a)&&i.call(this,a,typeof s=="number"?s:void 0,u||void 0))}}function Lk(){return!0}function qk(i){return i!==null&&typeof i=="object"&&"type"in i}const gb=[],Uk=!0,vg=!1,bb="skip";function Hk(i,n,a,s){let u;typeof n=="function"&&typeof a!="function"?(s=a,a=n):u=n;const o=yb(u),f=s?-1:1;h(i,void 0,[])();function h(m,p,g){const b=m&&typeof m=="object"?m:{};if(typeof b.type=="string"){const v=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(m.type+(v?"<"+v+">":""))+")"})}return _;function _(){let v=gb,N,w,D;if((!n||o(m,p,g[g.length-1]||void 0))&&(v=Ik(a(m,g)),v[0]===vg))return v;if("children"in m&&m.children){const C=m;if(C.children&&v[0]!==bb)for(w=(s?C.children.length:-1)+f,D=g.concat(C);w>-1&&w<C.children.length;){const H=C.children[w];if(N=h(H,w,D)(),N[0]===vg)return N;w=typeof N[1]=="number"?N[1]:w+f}}return v}}}function Ik(i){return Array.isArray(i)?i:typeof i=="number"?[Uk,i]:i==null?gb:[i]}function Yk(i,n,a,s){let u,o,f;o=n,f=a,u=s,Hk(i,o,h,u);function h(m,p){const g=p[p.length-1],b=g?g.children.indexOf(m):void 0;return f(m,b,g)}}const gd=Symbol.for("yaml.alias"),id=Symbol.for("yaml.document"),Ui=Symbol.for("yaml.map"),vb=Symbol.for("yaml.pair"),Dn=Symbol.for("yaml.scalar"),kl=Symbol.for("yaml.seq"),mn=Symbol.for("yaml.node.type"),ga=i=>!!i&&typeof i=="object"&&i[mn]===gd,Iu=i=>!!i&&typeof i=="object"&&i[mn]===id,Gs=i=>!!i&&typeof i=="object"&&i[mn]===Ui,ot=i=>!!i&&typeof i=="object"&&i[mn]===vb,We=i=>!!i&&typeof i=="object"&&i[mn]===Dn,Ks=i=>!!i&&typeof i=="object"&&i[mn]===kl;function rt(i){if(i&&typeof i=="object")switch(i[mn]){case Ui:case kl:return!0}return!1}function ut(i){if(i&&typeof i=="object")switch(i[mn]){case gd:case Ui:case Dn:case kl:return!0}return!1}const xb=i=>(We(i)||rt(i))&&!!i.anchor,ra=Symbol("break visit"),Vk=Symbol("skip children"),Ds=Symbol("remove node");function wl(i,n){const a=Gk(n);Iu(i)?fl(null,i.contents,a,Object.freeze([i]))===Ds&&(i.contents=null):fl(null,i,a,Object.freeze([]))}wl.BREAK=ra;wl.SKIP=Vk;wl.REMOVE=Ds;function fl(i,n,a,s){const u=Kk(i,n,a,s);if(ut(u)||ot(u))return Zk(i,s,u),fl(i,u,a,s);if(typeof u!="symbol"){if(rt(n)){s=Object.freeze(s.concat(n));for(let o=0;o<n.items.length;++o){const f=fl(o,n.items[o],a,s);if(typeof f=="number")o=f-1;else{if(f===ra)return ra;f===Ds&&(n.items.splice(o,1),o-=1)}}}else if(ot(n)){s=Object.freeze(s.concat(n));const o=fl("key",n.key,a,s);if(o===ra)return ra;o===Ds&&(n.key=null);const f=fl("value",n.value,a,s);if(f===ra)return ra;f===Ds&&(n.value=null)}}return u}function Gk(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Kk(i,n,a,s){var u,o,f,h,m;if(typeof a=="function")return a(i,n,s);if(Gs(n))return(u=a.Map)==null?void 0:u.call(a,i,n,s);if(Ks(n))return(o=a.Seq)==null?void 0:o.call(a,i,n,s);if(ot(n))return(f=a.Pair)==null?void 0:f.call(a,i,n,s);if(We(n))return(h=a.Scalar)==null?void 0:h.call(a,i,n,s);if(ga(n))return(m=a.Alias)==null?void 0:m.call(a,i,n,s)}function Zk(i,n,a){const s=n[n.length-1];if(rt(s))s.items[i]=a;else if(ot(s))i==="key"?s.key=a:s.value=a;else if(Iu(s))s.contents=a;else{const u=ga(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${u} parent`)}}const Qk={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},$k=i=>i.replace(/[!,[\]{}]/g,n=>Qk[n]);class Nt{constructor(n,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Nt.defaultYaml,n),this.tags=Object.assign({},Nt.defaultTags,a)}clone(){const n=new Nt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Nt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Nt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Nt.defaultTags);break}return n}add(n,a){this.atNextDocument&&(this.yaml={explicit:Nt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Nt.defaultTags),this.atNextDocument=!1);const s=n.trim().split(/[ \t]+/),u=s.shift();switch(u){case"%TAG":{if(s.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,f]=s;return this.tags[o]=f,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const f=/^\d+\.\d+$/.test(o);return a(6,`Unsupported YAML version ${o}`,f),!1}}default:return a(0,`Unknown directive ${u}`,!0),!1}}tagName(n,a){if(n==="!")return"!";if(n[0]!=="!")return a(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const f=n.slice(2,-1);return f==="!"||f==="!!"?(a(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&a("Verbatim tags must end with a >"),f)}const[,s,u]=n.match(/^(.*!)([^!]*)$/s);u||a(`The ${n} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(u)}catch(f){return a(String(f)),null}return s==="!"?n:(a(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[a,s]of Object.entries(this.tags))if(n.startsWith(s))return a+$k(n.substring(s.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let u;if(n&&s.length>0&&ut(n.contents)){const o={};wl(n.contents,(f,h)=>{ut(h)&&h.tag&&(o[h.tag]=!0)}),u=Object.keys(o)}else u=[];for(const[o,f]of s)o==="!!"&&f==="tag:yaml.org,2002:"||(!n||u.some(h=>h.startsWith(f)))&&a.push(`%TAG ${o} ${f}`);return a.join(`
361
- `)}}Nt.defaultYaml={explicit:!1,version:"1.2"};Nt.defaultTags={"!!":"tag:yaml.org,2002:"};function Sb(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const a=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(a)}return!0}function _b(i){const n=new Set;return wl(i,{Value(a,s){s.anchor&&n.add(s.anchor)}}),n}function kb(i,n){for(let a=1;;++a){const s=`${i}${a}`;if(!n.has(s))return s}}function Xk(i,n){const a=[],s=new Map;let u=null;return{onAnchor:o=>{a.push(o),u??(u=_b(i));const f=kb(n,u);return u.add(f),f},setAnchors:()=>{for(const o of a){const f=s.get(o);if(typeof f=="object"&&f.anchor&&(We(f.node)||rt(f.node)))f.node.anchor=f.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=o,h}}},sourceObjects:s}}function dl(i,n,a,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let u=0,o=s.length;u<o;++u){const f=s[u],h=dl(i,s,String(u),f);h===void 0?delete s[u]:h!==f&&(s[u]=h)}else if(s instanceof Map)for(const u of Array.from(s.keys())){const o=s.get(u),f=dl(i,s,u,o);f===void 0?s.delete(u):f!==o&&s.set(u,f)}else if(s instanceof Set)for(const u of Array.from(s)){const o=dl(i,s,u,u);o===void 0?s.delete(u):o!==u&&(s.delete(u),s.add(o))}else for(const[u,o]of Object.entries(s)){const f=dl(i,s,u,o);f===void 0?delete s[u]:f!==o&&(s[u]=f)}return i.call(n,a,s)}function pn(i,n,a){if(Array.isArray(i))return i.map((s,u)=>pn(s,String(u),a));if(i&&typeof i.toJSON=="function"){if(!a||!xb(i))return i.toJSON(n,a);const s={aliasCount:0,count:1,res:void 0};a.anchors.set(i,s),a.onCreate=o=>{s.res=o,delete a.onCreate};const u=i.toJSON(n,a);return a.onCreate&&a.onCreate(u),u}return typeof i=="bigint"&&!(a!=null&&a.keep)?Number(i):i}class bd{constructor(n){Object.defineProperty(this,mn,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:a,maxAliasCount:s,onAnchor:u,reviver:o}={}){if(!Iu(n))throw new TypeError("A document argument is required");const f={anchors:new Map,doc:n,keep:!0,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},h=pn(this,"",f);if(typeof u=="function")for(const{count:m,res:p}of f.anchors.values())u(p,m);return typeof o=="function"?dl(o,{"":h},"",h):h}}class vd extends bd{constructor(n){super(gd),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,a){let s;a!=null&&a.aliasResolveCache?s=a.aliasResolveCache:(s=[],wl(n,{Node:(o,f)=>{(ga(f)||xb(f))&&s.push(f)}}),a&&(a.aliasResolveCache=s));let u;for(const o of s){if(o===this)break;o.anchor===this.source&&(u=o)}return u}toJSON(n,a){if(!a)return{source:this.source};const{anchors:s,doc:u,maxAliasCount:o}=a,f=this.resolve(u,a);if(!f){const m=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(m)}let h=s.get(f);if(h||(pn(f,null,a),h=s.get(f)),(h==null?void 0:h.res)===void 0){const m="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(m)}if(o>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=_u(u,f,s)),h.count*h.aliasCount>o)){const m="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(m)}return h.res}toString(n,a,s){const u=`*${this.source}`;if(n){if(Sb(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(n.implicitKey)return`${u} `}return u}}function _u(i,n,a){if(ga(n)){const s=n.resolve(i),u=a&&s&&a.get(s);return u?u.count*u.aliasCount:0}else if(rt(n)){let s=0;for(const u of n.items){const o=_u(i,u,a);o>s&&(s=o)}return s}else if(ot(n)){const s=_u(i,n.key,a),u=_u(i,n.value,a);return Math.max(s,u)}return 1}const wb=i=>!i||typeof i!="function"&&typeof i!="object";class ke extends bd{constructor(n){super(Dn),this.value=n}toJSON(n,a){return a!=null&&a.keep?this.value:pn(this.value,n,a)}toString(){return String(this.value)}}ke.BLOCK_FOLDED="BLOCK_FOLDED";ke.BLOCK_LITERAL="BLOCK_LITERAL";ke.PLAIN="PLAIN";ke.QUOTE_DOUBLE="QUOTE_DOUBLE";ke.QUOTE_SINGLE="QUOTE_SINGLE";const Jk="tag:yaml.org,2002:";function Fk(i,n,a){if(n){const s=a.filter(o=>o.tag===n),u=s.find(o=>!o.format)??s[0];if(!u)throw new Error(`Tag ${n} not found`);return u}return a.find(s=>{var u;return((u=s.identify)==null?void 0:u.call(s,i))&&!s.format})}function qs(i,n,a){var b,_,v;if(Iu(i)&&(i=i.contents),ut(i))return i;if(ot(i)){const N=(_=(b=a.schema[Ui]).createNode)==null?void 0:_.call(b,a.schema,null,a);return N.items.push(i),N}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:s,onAnchor:u,onTagObj:o,schema:f,sourceObjects:h}=a;let m;if(s&&i&&typeof i=="object"){if(m=h.get(i),m)return m.anchor??(m.anchor=u(i)),new vd(m.anchor);m={anchor:null,node:null},h.set(i,m)}n!=null&&n.startsWith("!!")&&(n=Jk+n.slice(2));let p=Fk(i,n,f.tags);if(!p){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const N=new ke(i);return m&&(m.node=N),N}p=i instanceof Map?f[Ui]:Symbol.iterator in Object(i)?f[kl]:f[Ui]}o&&(o(p),delete a.onTagObj);const g=p!=null&&p.createNode?p.createNode(a.schema,i,a):typeof((v=p==null?void 0:p.nodeClass)==null?void 0:v.from)=="function"?p.nodeClass.from(a.schema,i,a):new ke(i);return n?g.tag=n:p.default||(g.tag=p.tag),m&&(m.node=g),g}function Ru(i,n,a){let s=a;for(let u=n.length-1;u>=0;--u){const o=n[u];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const f=[];f[o]=s,s=f}else s=new Map([[o,s]])}return qs(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const Os=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class Ab extends bd{constructor(n,a){super(n),Object.defineProperty(this,"schema",{value:a,configurable:!0,enumerable:!1,writable:!0})}clone(n){const a=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(a.schema=n),a.items=a.items.map(s=>ut(s)||ot(s)?s.clone(n):s),this.range&&(a.range=this.range.slice()),a}addIn(n,a){if(Os(n))this.add(a);else{const[s,...u]=n,o=this.get(s,!0);if(rt(o))o.addIn(u,a);else if(o===void 0&&this.schema)this.set(s,Ru(this.schema,u,a));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${u}`)}}deleteIn(n){const[a,...s]=n;if(s.length===0)return this.delete(a);const u=this.get(a,!0);if(rt(u))return u.deleteIn(s);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}getIn(n,a){const[s,...u]=n,o=this.get(s,!0);return u.length===0?!a&&We(o)?o.value:o:rt(o)?o.getIn(u,a):void 0}hasAllNullValues(n){return this.items.every(a=>{if(!ot(a))return!1;const s=a.value;return s==null||n&&We(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(n){const[a,...s]=n;if(s.length===0)return this.has(a);const u=this.get(a,!0);return rt(u)?u.hasIn(s):!1}setIn(n,a){const[s,...u]=n;if(u.length===0)this.set(s,a);else{const o=this.get(s,!0);if(rt(o))o.setIn(u,a);else if(o===void 0&&this.schema)this.set(s,Ru(this.schema,u,a));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${u}`)}}}const Wk=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function li(i,n){return/^\n+$/.test(i)?i.substring(1):n?i.replace(/^(?! *$)/gm,n):i}const ua=(i,n,a)=>i.endsWith(`
362
- `)?li(a,n):a.includes(`
363
- `)?`
364
- `+li(a,n):(i.endsWith(" ")?"":" ")+a,Tb="flow",ad="block",ku="quoted";function Yu(i,n,a="flow",{indentAtStart:s,lineWidth:u=80,minContentWidth:o=20,onFold:f,onOverflow:h}={}){if(!u||u<0)return i;u<o&&(o=0);const m=Math.max(1+o,1+u-n.length);if(i.length<=m)return i;const p=[],g={};let b=u-n.length;typeof s=="number"&&(s>u-Math.max(2,o)?p.push(0):b=u-s);let _,v,N=!1,w=-1,D=-1,C=-1;a===ad&&(w=xg(i,w,n.length),w!==-1&&(b=w+m));for(let M;M=i[w+=1];){if(a===ku&&M==="\\"){switch(D=w,i[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}C=w}if(M===`
365
- `)a===ad&&(w=xg(i,w,n.length)),b=w+n.length+m,_=void 0;else{if(M===" "&&v&&v!==" "&&v!==`
366
- `&&v!==" "){const Q=i[w+1];Q&&Q!==" "&&Q!==`
367
- `&&Q!==" "&&(_=w)}if(w>=b)if(_)p.push(_),b=_+m,_=void 0;else if(a===ku){for(;v===" "||v===" ";)v=M,M=i[w+=1],N=!0;const Q=w>C+1?w-2:D-1;if(g[Q])return i;p.push(Q),g[Q]=!0,b=Q+m,_=void 0}else N=!0}v=M}if(N&&h&&h(),p.length===0)return i;f&&f();let H=i.slice(0,p[0]);for(let M=0;M<p.length;++M){const Q=p[M],X=p[M+1]||i.length;Q===0?H=`
368
- ${n}${i.slice(0,X)}`:(a===ku&&g[Q]&&(H+=`${i[Q]}\\`),H+=`
369
- ${n}${i.slice(Q+1,X)}`)}return H}function xg(i,n,a){let s=n,u=n+1,o=i[u];for(;o===" "||o===" ";)if(n<u+a)o=i[++n];else{do o=i[++n];while(o&&o!==`
370
- `);s=n,u=n+1,o=i[u]}return s}const Vu=(i,n)=>({indentAtStart:n?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Gu=i=>/^(%|---|\.\.\.)/m.test(i);function Pk(i,n,a){if(!n||n<0)return!1;const s=n-a,u=i.length;if(u<=s)return!1;for(let o=0,f=0;o<u;++o)if(i[o]===`
371
- `){if(o-f>s)return!0;if(f=o+1,u-f<=s)return!1}return!0}function js(i,n){const a=JSON.stringify(i);if(n.options.doubleQuotedAsJSON)return a;const{implicitKey:s}=n,u=n.options.doubleQuotedMinMultiLineLength,o=n.indent||(Gu(i)?" ":"");let f="",h=0;for(let m=0,p=a[m];p;p=a[++m])if(p===" "&&a[m+1]==="\\"&&a[m+2]==="n"&&(f+=a.slice(h,m)+"\\ ",m+=1,h=m,p="\\"),p==="\\")switch(a[m+1]){case"u":{f+=a.slice(h,m);const g=a.substr(m+2,4);switch(g){case"0000":f+="\\0";break;case"0007":f+="\\a";break;case"000b":f+="\\v";break;case"001b":f+="\\e";break;case"0085":f+="\\N";break;case"00a0":f+="\\_";break;case"2028":f+="\\L";break;case"2029":f+="\\P";break;default:g.substr(0,2)==="00"?f+="\\x"+g.substr(2):f+=a.substr(m,6)}m+=5,h=m+1}break;case"n":if(s||a[m+2]==='"'||a.length<u)m+=1;else{for(f+=a.slice(h,m)+`
372
-
373
- `;a[m+2]==="\\"&&a[m+3]==="n"&&a[m+4]!=='"';)f+=`
374
- `,m+=2;f+=o,a[m+2]===" "&&(f+="\\"),m+=1,h=m+1}break;default:m+=1}return f=h?f+a.slice(h):a,s?f:Yu(f,o,ku,Vu(n,!1))}function ld(i,n){if(n.options.singleQuote===!1||n.implicitKey&&i.includes(`
375
- `)||/[ \t]\n|\n[ \t]/.test(i))return js(i,n);const a=n.indent||(Gu(i)?" ":""),s="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
376
- ${a}`)+"'";return n.implicitKey?s:Yu(s,a,Tb,Vu(n,!1))}function hl(i,n){const{singleQuote:a}=n.options;let s;if(a===!1)s=js;else{const u=i.includes('"'),o=i.includes("'");u&&!o?s=ld:o&&!u?s=js:s=a?ld:js}return s(i,n)}let sd;try{sd=new RegExp(`(^|(?<!
377
- ))
378
- +(?!
379
- |$)`,"g")}catch{sd=/\n+(?!\n|$)/g}function wu({comment:i,type:n,value:a},s,u,o){const{blockQuote:f,commentString:h,lineWidth:m}=s.options;if(!f||/\n[\t ]+$/.test(a))return hl(a,s);const p=s.indent||(s.forceBlockIndent||Gu(a)?" ":""),g=f==="literal"?!0:f==="folded"||n===ke.BLOCK_FOLDED?!1:n===ke.BLOCK_LITERAL?!0:!Pk(a,m,p.length);if(!a)return g?`|
380
- `:`>
381
- `;let b,_;for(_=a.length;_>0;--_){const X=a[_-1];if(X!==`
382
- `&&X!==" "&&X!==" ")break}let v=a.substring(_);const N=v.indexOf(`
383
- `);N===-1?b="-":a===v||N!==v.length-1?(b="+",o&&o()):b="",v&&(a=a.slice(0,-v.length),v[v.length-1]===`
384
- `&&(v=v.slice(0,-1)),v=v.replace(sd,`$&${p}`));let w=!1,D,C=-1;for(D=0;D<a.length;++D){const X=a[D];if(X===" ")w=!0;else if(X===`
385
- `)C=D;else break}let H=a.substring(0,C<D?C+1:D);H&&(a=a.substring(H.length),H=H.replace(/\n+/g,`$&${p}`));let Q=(w?p?"2":"1":"")+b;if(i&&(Q+=" "+h(i.replace(/ ?[\r\n]+/g," ")),u&&u()),!g){const X=a.replace(/\n+/g,`
386
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let B=!1;const K=Vu(s,!0);f!=="folded"&&n!==ke.BLOCK_FOLDED&&(K.onOverflow=()=>{B=!0});const $=Yu(`${H}${X}${v}`,p,ad,K);if(!B)return`>${Q}
387
- ${p}${$}`}return a=a.replace(/\n+/g,`$&${p}`),`|${Q}
388
- ${p}${H}${a}${v}`}function ew(i,n,a,s){const{type:u,value:o}=i,{actualString:f,implicitKey:h,indent:m,indentStep:p,inFlow:g}=n;if(h&&o.includes(`
389
- `)||g&&/[[\]{},]/.test(o))return hl(o,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return h||g||!o.includes(`
390
- `)?hl(o,n):wu(i,n,a,s);if(!h&&!g&&u!==ke.PLAIN&&o.includes(`
391
- `))return wu(i,n,a,s);if(Gu(o)){if(m==="")return n.forceBlockIndent=!0,wu(i,n,a,s);if(h&&m===p)return hl(o,n)}const b=o.replace(/\n+/g,`$&
392
- ${m}`);if(f){const _=w=>{var D;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((D=w.test)==null?void 0:D.test(b))},{compat:v,tags:N}=n.doc.schema;if(N.some(_)||v!=null&&v.some(_))return hl(o,n)}return h?b:Yu(b,m,Tb,Vu(n,!1))}function xd(i,n,a,s){const{implicitKey:u,inFlow:o}=n,f=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:h}=i;h!==ke.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(f.value)&&(h=ke.QUOTE_DOUBLE);const m=g=>{switch(g){case ke.BLOCK_FOLDED:case ke.BLOCK_LITERAL:return u||o?hl(f.value,n):wu(f,n,a,s);case ke.QUOTE_DOUBLE:return js(f.value,n);case ke.QUOTE_SINGLE:return ld(f.value,n);case ke.PLAIN:return ew(f,n,a,s);default:return null}};let p=m(h);if(p===null){const{defaultKeyType:g,defaultStringType:b}=n.options,_=u&&g||b;if(p=m(_),p===null)throw new Error(`Unsupported default string type ${_}`)}return p}function Eb(i,n){const a=Object.assign({blockQuote:!0,commentString:Wk,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,n);let s;switch(a.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:i,flowCollectionPadding:a.flowCollectionPadding?" ":"",indent:"",indentStep:typeof a.indent=="number"?" ".repeat(a.indent):" ",inFlow:s,options:a}}function tw(i,n){var u;if(n.tag){const o=i.filter(f=>f.tag===n.tag);if(o.length>0)return o.find(f=>f.format===n.format)??o[0]}let a,s;if(We(n)){s=n.value;let o=i.filter(f=>{var h;return(h=f.identify)==null?void 0:h.call(f,s)});if(o.length>1){const f=o.filter(h=>h.test);f.length>0&&(o=f)}a=o.find(f=>f.format===n.format)??o.find(f=>!f.format)}else s=n,a=i.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!a){const o=((u=s==null?void 0:s.constructor)==null?void 0:u.name)??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${o} value`)}return a}function nw(i,n,{anchors:a,doc:s}){if(!s.directives)return"";const u=[],o=(We(i)||rt(i))&&i.anchor;o&&Sb(o)&&(a.add(o),u.push(`&${o}`));const f=i.tag??(n.default?null:n.tag);return f&&u.push(s.directives.tagString(f)),u.join(" ")}function Sl(i,n,a,s){var m;if(ot(i))return i.toString(n,a,s);if(ga(i)){if(n.doc.directives)return i.toString(n);if((m=n.resolvedAliases)!=null&&m.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(i):n.resolvedAliases=new Set([i]),i=i.resolve(n.doc)}let u;const o=ut(i)?i:n.doc.createNode(i,{onTagObj:p=>u=p});u??(u=tw(n.doc.schema.tags,o));const f=nw(o,u,n);f.length>0&&(n.indentAtStart=(n.indentAtStart??0)+f.length+1);const h=typeof u.stringify=="function"?u.stringify(o,n,a,s):We(o)?xd(o,n,a,s):o.toString(n,a,s);return f?We(o)||h[0]==="{"||h[0]==="["?`${f} ${h}`:`${f}
393
- ${n.indent}${h}`:h}function iw({key:i,value:n},a,s,u){const{allNullValues:o,doc:f,indent:h,indentStep:m,options:{commentString:p,indentSeq:g,simpleKeys:b}}=a;let _=ut(i)&&i.comment||null;if(b){if(_)throw new Error("With simple keys, key nodes cannot have comments");if(rt(i)||!ut(i)&&typeof i=="object"){const K="With simple keys, collection cannot be used as a key value";throw new Error(K)}}let v=!b&&(!i||_&&n==null&&!a.inFlow||rt(i)||(We(i)?i.type===ke.BLOCK_FOLDED||i.type===ke.BLOCK_LITERAL:typeof i=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!v&&(b||!o),indent:h+m});let N=!1,w=!1,D=Sl(i,a,()=>N=!0,()=>w=!0);if(!v&&!a.inFlow&&D.length>1024){if(b)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(a.inFlow){if(o||n==null)return N&&s&&s(),D===""?"?":v?`? ${D}`:D}else if(o&&!b||n==null&&v)return D=`? ${D}`,_&&!N?D+=ua(D,a.indent,p(_)):w&&u&&u(),D;N&&(_=null),v?(_&&(D+=ua(D,a.indent,p(_))),D=`? ${D}
394
- ${h}:`):(D=`${D}:`,_&&(D+=ua(D,a.indent,p(_))));let C,H,M;ut(n)?(C=!!n.spaceBefore,H=n.commentBefore,M=n.comment):(C=!1,H=null,M=null,n&&typeof n=="object"&&(n=f.createNode(n))),a.implicitKey=!1,!v&&!_&&We(n)&&(a.indentAtStart=D.length+1),w=!1,!g&&m.length>=2&&!a.inFlow&&!v&&Ks(n)&&!n.flow&&!n.tag&&!n.anchor&&(a.indent=a.indent.substring(2));let Q=!1;const X=Sl(n,a,()=>Q=!0,()=>w=!0);let B=" ";if(_||C||H){if(B=C?`
395
- `:"",H){const K=p(H);B+=`
396
- ${li(K,a.indent)}`}X===""&&!a.inFlow?B===`
397
- `&&M&&(B=`
398
-
399
- `):B+=`
400
- ${a.indent}`}else if(!v&&rt(n)){const K=X[0],$=X.indexOf(`
401
- `),te=$!==-1,fe=a.inFlow??n.flow??n.items.length===0;if(te||!fe){let W=!1;if(te&&(K==="&"||K==="!")){let P=X.indexOf(" ");K==="&"&&P!==-1&&P<$&&X[P+1]==="!"&&(P=X.indexOf(" ",P+1)),(P===-1||$<P)&&(W=!0)}W||(B=`
402
- ${a.indent}`)}}else(X===""||X[0]===`
403
- `)&&(B="");return D+=B+X,a.inFlow?Q&&s&&s():M&&!Q?D+=ua(D,a.indent,p(M)):w&&u&&u(),D}function Cb(i,n){(i==="debug"||i==="warn")&&console.warn(n)}const mu="<<",ri={identify:i=>i===mu||typeof i=="symbol"&&i.description===mu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ke(Symbol(mu)),{addToJSMap:Ob}),stringify:()=>mu},aw=(i,n)=>(ri.identify(n)||We(n)&&(!n.type||n.type===ke.PLAIN)&&ri.identify(n.value))&&(i==null?void 0:i.doc.schema.tags.some(a=>a.tag===ri.tag&&a.default));function Ob(i,n,a){if(a=i&&ga(a)?a.resolve(i.doc):a,Ks(a))for(const s of a.items)Df(i,n,s);else if(Array.isArray(a))for(const s of a)Df(i,n,s);else Df(i,n,a)}function Df(i,n,a){const s=i&&ga(a)?a.resolve(i.doc):a;if(!Gs(s))throw new Error("Merge sources must be maps or map aliases");const u=s.toJSON(null,i,Map);for(const[o,f]of u)n instanceof Map?n.has(o)||n.set(o,f):n instanceof Set?n.add(o):Object.prototype.hasOwnProperty.call(n,o)||Object.defineProperty(n,o,{value:f,writable:!0,enumerable:!0,configurable:!0});return n}function Nb(i,n,{key:a,value:s}){if(ut(a)&&a.addToJSMap)a.addToJSMap(i,n,s);else if(aw(i,a))Ob(i,n,s);else{const u=pn(a,"",i);if(n instanceof Map)n.set(u,pn(s,u,i));else if(n instanceof Set)n.add(u);else{const o=lw(a,u,i),f=pn(s,o,i);o in n?Object.defineProperty(n,o,{value:f,writable:!0,enumerable:!0,configurable:!0}):n[o]=f}}return n}function lw(i,n,a){if(n===null)return"";if(typeof n!="object")return String(n);if(ut(i)&&(a!=null&&a.doc)){const s=Eb(a.doc,{});s.anchors=new Set;for(const o of a.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const u=i.toString(s);if(!a.mapKeyWarned){let o=JSON.stringify(u);o.length>40&&(o=o.substring(0,36)+'..."'),Cb(a.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),a.mapKeyWarned=!0}return u}return JSON.stringify(n)}function Sd(i,n,a){const s=qs(i,void 0,a),u=qs(n,void 0,a);return new zt(s,u)}class zt{constructor(n,a=null){Object.defineProperty(this,mn,{value:vb}),this.key=n,this.value=a}clone(n){let{key:a,value:s}=this;return ut(a)&&(a=a.clone(n)),ut(s)&&(s=s.clone(n)),new zt(a,s)}toJSON(n,a){const s=a!=null&&a.mapAsMap?new Map:{};return Nb(a,s,this)}toString(n,a,s){return n!=null&&n.doc?iw(this,n,a,s):JSON.stringify(this)}}function Mb(i,n,a){return(n.inFlow??i.flow?rw:sw)(i,n,a)}function sw({comment:i,items:n},a,{blockItemPrefix:s,flowChars:u,itemIndent:o,onChompKeep:f,onComment:h}){const{indent:m,options:{commentString:p}}=a,g=Object.assign({},a,{indent:o,type:null});let b=!1;const _=[];for(let N=0;N<n.length;++N){const w=n[N];let D=null;if(ut(w))!b&&w.spaceBefore&&_.push(""),Bu(a,_,w.commentBefore,b),w.comment&&(D=w.comment);else if(ot(w)){const H=ut(w.key)?w.key:null;H&&(!b&&H.spaceBefore&&_.push(""),Bu(a,_,H.commentBefore,b))}b=!1;let C=Sl(w,g,()=>D=null,()=>b=!0);D&&(C+=ua(C,o,p(D))),b&&D&&(b=!1),_.push(s+C)}let v;if(_.length===0)v=u.start+u.end;else{v=_[0];for(let N=1;N<_.length;++N){const w=_[N];v+=w?`
404
- ${m}${w}`:`
405
- `}}return i?(v+=`
406
- `+li(p(i),m),h&&h()):b&&f&&f(),v}function rw({items:i},n,{flowChars:a,itemIndent:s}){const{indent:u,indentStep:o,flowCollectionPadding:f,options:{commentString:h}}=n;s+=o;const m=Object.assign({},n,{indent:s,inFlow:!0,type:null});let p=!1,g=0;const b=[];for(let N=0;N<i.length;++N){const w=i[N];let D=null;if(ut(w))w.spaceBefore&&b.push(""),Bu(n,b,w.commentBefore,!1),w.comment&&(D=w.comment);else if(ot(w)){const H=ut(w.key)?w.key:null;H&&(H.spaceBefore&&b.push(""),Bu(n,b,H.commentBefore,!1),H.comment&&(p=!0));const M=ut(w.value)?w.value:null;M?(M.comment&&(D=M.comment),M.commentBefore&&(p=!0)):w.value==null&&(H!=null&&H.comment)&&(D=H.comment)}D&&(p=!0);let C=Sl(w,m,()=>D=null);N<i.length-1&&(C+=","),D&&(C+=ua(C,s,h(D))),!p&&(b.length>g||C.includes(`
407
- `))&&(p=!0),b.push(C),g=b.length}const{start:_,end:v}=a;if(b.length===0)return _+v;if(!p){const N=b.reduce((w,D)=>w+D.length+2,2);p=n.options.lineWidth>0&&N>n.options.lineWidth}if(p){let N=_;for(const w of b)N+=w?`
408
- ${o}${u}${w}`:`
409
- `;return`${N}
410
- ${u}${v}`}else return`${_}${f}${b.join(" ")}${f}${v}`}function Bu({indent:i,options:{commentString:n}},a,s,u){if(s&&u&&(s=s.replace(/^\n+/,"")),s){const o=li(n(s),i);a.push(o.trimStart())}}function oa(i,n){const a=We(n)?n.value:n;for(const s of i)if(ot(s)&&(s.key===n||s.key===a||We(s.key)&&s.key.value===a))return s}class hn extends Ab{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Ui,n),this.items=[]}static from(n,a,s){const{keepUndefined:u,replacer:o}=s,f=new this(n),h=(m,p)=>{if(typeof o=="function")p=o.call(a,m,p);else if(Array.isArray(o)&&!o.includes(m))return;(p!==void 0||u)&&f.items.push(Sd(m,p,s))};if(a instanceof Map)for(const[m,p]of a)h(m,p);else if(a&&typeof a=="object")for(const m of Object.keys(a))h(m,a[m]);return typeof n.sortMapEntries=="function"&&f.items.sort(n.sortMapEntries),f}add(n,a){var f;let s;ot(n)?s=n:!n||typeof n!="object"||!("key"in n)?s=new zt(n,n==null?void 0:n.value):s=new zt(n.key,n.value);const u=oa(this.items,s.key),o=(f=this.schema)==null?void 0:f.sortMapEntries;if(u){if(!a)throw new Error(`Key ${s.key} already set`);We(u.value)&&wb(s.value)?u.value.value=s.value:u.value=s.value}else if(o){const h=this.items.findIndex(m=>o(s,m)<0);h===-1?this.items.push(s):this.items.splice(h,0,s)}else this.items.push(s)}delete(n){const a=oa(this.items,n);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(n,a){const s=oa(this.items,n),u=s==null?void 0:s.value;return(!a&&We(u)?u.value:u)??void 0}has(n){return!!oa(this.items,n)}set(n,a){this.add(new zt(n,a),!0)}toJSON(n,a,s){const u=s?new s:a!=null&&a.mapAsMap?new Map:{};a!=null&&a.onCreate&&a.onCreate(u);for(const o of this.items)Nb(a,u,o);return u}toString(n,a,s){if(!n)return JSON.stringify(this);for(const u of this.items)if(!ot(u))throw new Error(`Map items must all be pairs; found ${JSON.stringify(u)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),Mb(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:s,onComment:a})}}const Al={collection:"map",default:!0,nodeClass:hn,tag:"tag:yaml.org,2002:map",resolve(i,n){return Gs(i)||n("Expected a mapping for this tag"),i},createNode:(i,n,a)=>hn.from(i,n,a)};class ya extends Ab{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(kl,n),this.items=[]}add(n){this.items.push(n)}delete(n){const a=yu(n);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(n,a){const s=yu(n);if(typeof s!="number")return;const u=this.items[s];return!a&&We(u)?u.value:u}has(n){const a=yu(n);return typeof a=="number"&&a<this.items.length}set(n,a){const s=yu(n);if(typeof s!="number")throw new Error(`Expected a valid index, not ${n}.`);const u=this.items[s];We(u)&&wb(a)?u.value=a:this.items[s]=a}toJSON(n,a){const s=[];a!=null&&a.onCreate&&a.onCreate(s);let u=0;for(const o of this.items)s.push(pn(o,String(u++),a));return s}toString(n,a,s){return n?Mb(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:s,onComment:a}):JSON.stringify(this)}static from(n,a,s){const{replacer:u}=s,o=new this(n);if(a&&Symbol.iterator in Object(a)){let f=0;for(let h of a){if(typeof u=="function"){const m=a instanceof Set?h:String(f++);h=u.call(a,m,h)}o.items.push(qs(h,void 0,s))}}return o}}function yu(i){let n=We(i)?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Tl={collection:"seq",default:!0,nodeClass:ya,tag:"tag:yaml.org,2002:seq",resolve(i,n){return Ks(i)||n("Expected a sequence for this tag"),i},createNode:(i,n,a)=>ya.from(i,n,a)},Ku={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,n,a,s){return n=Object.assign({actualString:!0},n),xd(i,n,a,s)}},Zu={identify:i=>i==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ke(null),stringify:({source:i},n)=>typeof i=="string"&&Zu.test.test(i)?i:n.options.nullStr},_d={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ke(i[0]==="t"||i[0]==="T"),stringify({source:i,value:n},a){if(i&&_d.test.test(i)){const s=i[0]==="t"||i[0]==="T";if(n===s)return i}return n?a.options.trueStr:a.options.falseStr}};function kn({format:i,minFractionDigits:n,tag:a,value:s}){if(typeof s=="bigint")return String(s);const u=typeof s=="number"?s:Number(s);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let o=Object.is(s,-0)?"-0":JSON.stringify(s);if(!i&&n&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let f=o.indexOf(".");f<0&&(f=o.length,o+=".");let h=n-(o.length-f-1);for(;h-- >0;)o+="0"}return o}const zb={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kn},Db={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():kn(i)}},jb={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const n=new ke(parseFloat(i)),a=i.indexOf(".");return a!==-1&&i[i.length-1]==="0"&&(n.minFractionDigits=i.length-a-1),n},stringify:kn},Qu=i=>typeof i=="bigint"||Number.isInteger(i),kd=(i,n,a,{intAsBigInt:s})=>s?BigInt(i):parseInt(i.substring(n),a);function Rb(i,n,a){const{value:s}=i;return Qu(s)&&s>=0?a+s.toString(n):kn(i)}const Bb={identify:i=>Qu(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,n,a)=>kd(i,2,8,a),stringify:i=>Rb(i,8,"0o")},Lb={identify:Qu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,n,a)=>kd(i,0,10,a),stringify:kn},qb={identify:i=>Qu(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,n,a)=>kd(i,2,16,a),stringify:i=>Rb(i,16,"0x")},uw=[Al,Tl,Ku,Zu,_d,Bb,Lb,qb,zb,Db,jb];function Sg(i){return typeof i=="bigint"||Number.isInteger(i)}const gu=({value:i})=>JSON.stringify(i),ow=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:gu},{identify:i=>i==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:gu},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:gu},{identify:Sg,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,n,{intAsBigInt:a})=>a?BigInt(i):parseInt(i,10),stringify:({value:i})=>Sg(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:gu}],cw={default:!0,tag:"",test:/^/,resolve(i,n){return n(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},fw=[Al,Tl].concat(ow,cw),wd={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,n){if(typeof atob=="function"){const a=atob(i.replace(/[\n\r]/g,"")),s=new Uint8Array(a.length);for(let u=0;u<a.length;++u)s[u]=a.charCodeAt(u);return s}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:n,value:a},s,u,o){if(!a)return"";const f=a;let h;if(typeof btoa=="function"){let m="";for(let p=0;p<f.length;++p)m+=String.fromCharCode(f[p]);h=btoa(m)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ke.BLOCK_LITERAL),n!==ke.QUOTE_DOUBLE){const m=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),p=Math.ceil(h.length/m),g=new Array(p);for(let b=0,_=0;b<p;++b,_+=m)g[b]=h.substr(_,m);h=g.join(n===ke.BLOCK_LITERAL?`
411
- `:" ")}return xd({comment:i,type:n,value:h},s,u,o)}};function Ub(i,n){if(Ks(i))for(let a=0;a<i.items.length;++a){let s=i.items[a];if(!ot(s)){if(Gs(s)){s.items.length>1&&n("Each pair must have its own sequence indicator");const u=s.items[0]||new zt(new ke(null));if(s.commentBefore&&(u.key.commentBefore=u.key.commentBefore?`${s.commentBefore}
412
- ${u.key.commentBefore}`:s.commentBefore),s.comment){const o=u.value??u.key;o.comment=o.comment?`${s.comment}
413
- ${o.comment}`:s.comment}s=u}i.items[a]=ot(s)?s:new zt(s)}}else n("Expected a sequence for this tag");return i}function Hb(i,n,a){const{replacer:s}=a,u=new ya(i);u.tag="tag:yaml.org,2002:pairs";let o=0;if(n&&Symbol.iterator in Object(n))for(let f of n){typeof s=="function"&&(f=s.call(n,String(o++),f));let h,m;if(Array.isArray(f))if(f.length===2)h=f[0],m=f[1];else throw new TypeError(`Expected [key, value] tuple: ${f}`);else if(f&&f instanceof Object){const p=Object.keys(f);if(p.length===1)h=p[0],m=f[h];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else h=f;u.items.push(Sd(h,m,a))}return u}const Ad={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ub,createNode:Hb};class gl extends ya{constructor(){super(),this.add=hn.prototype.add.bind(this),this.delete=hn.prototype.delete.bind(this),this.get=hn.prototype.get.bind(this),this.has=hn.prototype.has.bind(this),this.set=hn.prototype.set.bind(this),this.tag=gl.tag}toJSON(n,a){if(!a)return super.toJSON(n);const s=new Map;a!=null&&a.onCreate&&a.onCreate(s);for(const u of this.items){let o,f;if(ot(u)?(o=pn(u.key,"",a),f=pn(u.value,o,a)):o=pn(u,"",a),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,f)}return s}static from(n,a,s){const u=Hb(n,a,s),o=new this;return o.items=u.items,o}}gl.tag="tag:yaml.org,2002:omap";const Td={collection:"seq",identify:i=>i instanceof Map,nodeClass:gl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,n){const a=Ub(i,n),s=[];for(const{key:u}of a.items)We(u)&&(s.includes(u.value)?n(`Ordered maps must not include duplicate keys: ${u.value}`):s.push(u.value));return Object.assign(new gl,a)},createNode:(i,n,a)=>gl.from(i,n,a)};function Ib({value:i,source:n},a){return n&&(i?Yb:Vb).test.test(n)?n:i?a.options.trueStr:a.options.falseStr}const Yb={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ke(!0),stringify:Ib},Vb={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ke(!1),stringify:Ib},dw={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kn},hw={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():kn(i)}},pw={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const n=new ke(parseFloat(i.replace(/_/g,""))),a=i.indexOf(".");if(a!==-1){const s=i.substring(a+1).replace(/_/g,"");s[s.length-1]==="0"&&(n.minFractionDigits=s.length)}return n},stringify:kn},Zs=i=>typeof i=="bigint"||Number.isInteger(i);function $u(i,n,a,{intAsBigInt:s}){const u=i[0];if((u==="-"||u==="+")&&(n+=1),i=i.substring(n).replace(/_/g,""),s){switch(a){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const f=BigInt(i);return u==="-"?BigInt(-1)*f:f}const o=parseInt(i,a);return u==="-"?-1*o:o}function Ed(i,n,a){const{value:s}=i;if(Zs(s)){const u=s.toString(n);return s<0?"-"+a+u.substr(1):a+u}return kn(i)}const mw={identify:Zs,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,n,a)=>$u(i,2,2,a),stringify:i=>Ed(i,2,"0b")},yw={identify:Zs,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,n,a)=>$u(i,1,8,a),stringify:i=>Ed(i,8,"0")},gw={identify:Zs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,n,a)=>$u(i,0,10,a),stringify:kn},bw={identify:Zs,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,n,a)=>$u(i,2,16,a),stringify:i=>Ed(i,16,"0x")};class bl extends hn{constructor(n){super(n),this.tag=bl.tag}add(n){let a;ot(n)?a=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?a=new zt(n.key,null):a=new zt(n,null),oa(this.items,a.key)||this.items.push(a)}get(n,a){const s=oa(this.items,n);return!a&&ot(s)?We(s.key)?s.key.value:s.key:s}set(n,a){if(typeof a!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof a}`);const s=oa(this.items,n);s&&!a?this.items.splice(this.items.indexOf(s),1):!s&&a&&this.items.push(new zt(n))}toJSON(n,a){return super.toJSON(n,a,Set)}toString(n,a,s){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),a,s);throw new Error("Set items must all have null values")}static from(n,a,s){const{replacer:u}=s,o=new this(n);if(a&&Symbol.iterator in Object(a))for(let f of a)typeof u=="function"&&(f=u.call(a,f,f)),o.items.push(Sd(f,null,s));return o}}bl.tag="tag:yaml.org,2002:set";const Cd={collection:"map",identify:i=>i instanceof Set,nodeClass:bl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,n,a)=>bl.from(i,n,a),resolve(i,n){if(Gs(i)){if(i.hasAllNullValues(!0))return Object.assign(new bl,i);n("Set items must all have null values")}else n("Expected a mapping for this tag");return i}};function Od(i,n){const a=i[0],s=a==="-"||a==="+"?i.substring(1):i,u=f=>n?BigInt(f):Number(f),o=s.replace(/_/g,"").split(":").reduce((f,h)=>f*u(60)+u(h),u(0));return a==="-"?u(-1)*o:o}function Gb(i){let{value:n}=i,a=f=>f;if(typeof n=="bigint")a=f=>BigInt(f);else if(isNaN(n)||!isFinite(n))return kn(i);let s="";n<0&&(s="-",n*=a(-1));const u=a(60),o=[n%u];return n<60?o.unshift(0):(n=(n-o[0])/u,o.unshift(n%u),n>=60&&(n=(n-o[0])/u,o.unshift(n))),s+o.map(f=>String(f).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Kb={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,n,{intAsBigInt:a})=>Od(i,a),stringify:Gb},Zb={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Od(i,!1),stringify:Gb},Xu={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){const n=i.match(Xu.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,a,s,u,o,f,h]=n.map(Number),m=n[7]?Number((n[7]+"00").substr(1,3)):0;let p=Date.UTC(a,s-1,u,o||0,f||0,h||0,m);const g=n[8];if(g&&g!=="Z"){let b=Od(g,!1);Math.abs(b)<30&&(b*=60),p-=6e4*b}return new Date(p)},stringify:({value:i})=>(i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},_g=[Al,Tl,Ku,Zu,Yb,Vb,mw,yw,gw,bw,dw,hw,pw,wd,ri,Td,Ad,Cd,Kb,Zb,Xu],kg=new Map([["core",uw],["failsafe",[Al,Tl,Ku]],["json",fw],["yaml11",_g],["yaml-1.1",_g]]),wg={binary:wd,bool:_d,float:jb,floatExp:Db,floatNaN:zb,floatTime:Zb,int:Lb,intHex:qb,intOct:Bb,intTime:Kb,map:Al,merge:ri,null:Zu,omap:Td,pairs:Ad,seq:Tl,set:Cd,timestamp:Xu},vw={"tag:yaml.org,2002:binary":wd,"tag:yaml.org,2002:merge":ri,"tag:yaml.org,2002:omap":Td,"tag:yaml.org,2002:pairs":Ad,"tag:yaml.org,2002:set":Cd,"tag:yaml.org,2002:timestamp":Xu};function jf(i,n,a){const s=kg.get(n);if(s&&!i)return a&&!s.includes(ri)?s.concat(ri):s.slice();let u=s;if(!u)if(Array.isArray(i))u=[];else{const o=Array.from(kg.keys()).filter(f=>f!=="yaml11").map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${o} or define customTags array`)}if(Array.isArray(i))for(const o of i)u=u.concat(o);else typeof i=="function"&&(u=i(u.slice()));return a&&(u=u.concat(ri)),u.reduce((o,f)=>{const h=typeof f=="string"?wg[f]:f;if(!h){const m=JSON.stringify(f),p=Object.keys(wg).map(g=>JSON.stringify(g)).join(", ");throw new Error(`Unknown custom tag ${m}; use one of ${p}`)}return o.includes(h)||o.push(h),o},[])}const xw=(i,n)=>i.key<n.key?-1:i.key>n.key?1:0;class Nd{constructor({compat:n,customTags:a,merge:s,resolveKnownTags:u,schema:o,sortMapEntries:f,toStringDefaults:h}){this.compat=Array.isArray(n)?jf(n,"compat"):n?jf(null,n):null,this.name=typeof o=="string"&&o||"core",this.knownTags=u?vw:{},this.tags=jf(a,this.name,s),this.toStringOptions=h??null,Object.defineProperty(this,Ui,{value:Al}),Object.defineProperty(this,Dn,{value:Ku}),Object.defineProperty(this,kl,{value:Tl}),this.sortMapEntries=typeof f=="function"?f:f===!0?xw:null}clone(){const n=Object.create(Nd.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function Sw(i,n){var m;const a=[];let s=n.directives===!0;if(n.directives!==!1&&i.directives){const p=i.directives.toString(i);p?(a.push(p),s=!0):i.directives.docStart&&(s=!0)}s&&a.push("---");const u=Eb(i,n),{commentString:o}=u.options;if(i.commentBefore){a.length!==1&&a.unshift("");const p=o(i.commentBefore);a.unshift(li(p,""))}let f=!1,h=null;if(i.contents){if(ut(i.contents)){if(i.contents.spaceBefore&&s&&a.push(""),i.contents.commentBefore){const b=o(i.contents.commentBefore);a.push(li(b,""))}u.forceBlockIndent=!!i.comment,h=i.contents.comment}const p=h?void 0:()=>f=!0;let g=Sl(i.contents,u,()=>h=null,p);h&&(g+=ua(g,"",o(h))),(g[0]==="|"||g[0]===">")&&a[a.length-1]==="---"?a[a.length-1]=`--- ${g}`:a.push(g)}else a.push(Sl(i.contents,u));if((m=i.directives)!=null&&m.docEnd)if(i.comment){const p=o(i.comment);p.includes(`
414
- `)?(a.push("..."),a.push(li(p,""))):a.push(`... ${p}`)}else a.push("...");else{let p=i.comment;p&&f&&(p=p.replace(/^\n+/,"")),p&&((!f||h)&&a[a.length-1]!==""&&a.push(""),a.push(li(o(p),"")))}return a.join(`
415
- `)+`
416
- `}class Ju{constructor(n,a,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,mn,{value:id});let u=null;typeof a=="function"||Array.isArray(a)?u=a:s===void 0&&a&&(s=a,a=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:f}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(f=this.directives.yaml.version)):this.directives=new Nt({version:f}),this.setSchema(f,s),this.contents=n===void 0?null:this.createNode(n,u,s)}clone(){const n=Object.create(Ju.prototype,{[mn]:{value:id}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=ut(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){ul(this.contents)&&this.contents.add(n)}addIn(n,a){ul(this.contents)&&this.contents.addIn(n,a)}createAlias(n,a){if(!n.anchor){const s=_b(this);n.anchor=!a||s.has(a)?kb(a||"a",s):a}return new vd(n.anchor)}createNode(n,a,s){let u;if(typeof a=="function")n=a.call({"":n},"",n),u=a;else if(Array.isArray(a)){const D=H=>typeof H=="number"||H instanceof String||H instanceof Number,C=a.filter(D).map(String);C.length>0&&(a=a.concat(C)),u=a}else s===void 0&&a&&(s=a,a=void 0);const{aliasDuplicateObjects:o,anchorPrefix:f,flow:h,keepUndefined:m,onTagObj:p,tag:g}=s??{},{onAnchor:b,setAnchors:_,sourceObjects:v}=Xk(this,f||"a"),N={aliasDuplicateObjects:o??!0,keepUndefined:m??!1,onAnchor:b,onTagObj:p,replacer:u,schema:this.schema,sourceObjects:v},w=qs(n,g,N);return h&&rt(w)&&(w.flow=!0),_(),w}createPair(n,a,s={}){const u=this.createNode(n,null,s),o=this.createNode(a,null,s);return new zt(u,o)}delete(n){return ul(this.contents)?this.contents.delete(n):!1}deleteIn(n){return Os(n)?this.contents==null?!1:(this.contents=null,!0):ul(this.contents)?this.contents.deleteIn(n):!1}get(n,a){return rt(this.contents)?this.contents.get(n,a):void 0}getIn(n,a){return Os(n)?!a&&We(this.contents)?this.contents.value:this.contents:rt(this.contents)?this.contents.getIn(n,a):void 0}has(n){return rt(this.contents)?this.contents.has(n):!1}hasIn(n){return Os(n)?this.contents!==void 0:rt(this.contents)?this.contents.hasIn(n):!1}set(n,a){this.contents==null?this.contents=Ru(this.schema,[n],a):ul(this.contents)&&this.contents.set(n,a)}setIn(n,a){Os(n)?this.contents=a:this.contents==null?this.contents=Ru(this.schema,Array.from(n),a):ul(this.contents)&&this.contents.setIn(n,a)}setSchema(n,a={}){typeof n=="number"&&(n=String(n));let s;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Nt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new Nt({version:n}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const u=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${u}`)}}if(a.schema instanceof Object)this.schema=a.schema;else if(s)this.schema=new Nd(Object.assign(s,a));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:a,mapAsMap:s,maxAliasCount:u,onAnchor:o,reviver:f}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof u=="number"?u:100},m=pn(this.contents,a??"",h);if(typeof o=="function")for(const{count:p,res:g}of h.anchors.values())o(g,p);return typeof f=="function"?dl(f,{"":m},"",m):m}toJSON(n,a){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:a})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const a=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${a}`)}return Sw(this,n)}}function ul(i){if(rt(i))return!0;throw new Error("Expected a YAML collection as document contents")}class Qb extends Error{constructor(n,a,s,u){super(),this.name=n,this.code=s,this.message=u,this.pos=a}}class Ns extends Qb{constructor(n,a,s){super("YAMLParseError",n,a,s)}}class _w extends Qb{constructor(n,a,s){super("YAMLWarning",n,a,s)}}const Ag=(i,n)=>a=>{if(a.pos[0]===-1)return;a.linePos=a.pos.map(h=>n.linePos(h));const{line:s,col:u}=a.linePos[0];a.message+=` at line ${s}, column ${u}`;let o=u-1,f=i.substring(n.lineStarts[s-1],n.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&f.length>80){const h=Math.min(o-39,f.length-79);f="…"+f.substring(h),o-=h-1}if(f.length>80&&(f=f.substring(0,79)+"…"),s>1&&/^ *$/.test(f.substring(0,o))){let h=i.substring(n.lineStarts[s-2],n.lineStarts[s-1]);h.length>80&&(h=h.substring(0,79)+`…
417
- `),f=h+f}if(/[^ ]/.test(f)){let h=1;const m=a.linePos[1];(m==null?void 0:m.line)===s&&m.col>u&&(h=Math.max(1,Math.min(m.col-u,80-o)));const p=" ".repeat(o)+"^".repeat(h);a.message+=`:
418
-
419
- ${f}
420
- ${p}
421
- `}};function _l(i,{flow:n,indicator:a,next:s,offset:u,onError:o,parentIndent:f,startOnNewline:h}){let m=!1,p=h,g=h,b="",_="",v=!1,N=!1,w=null,D=null,C=null,H=null,M=null,Q=null,X=null;for(const $ of i)switch(N&&($.type!=="space"&&$.type!=="newline"&&$.type!=="comma"&&o($.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),N=!1),w&&(p&&$.type!=="comment"&&$.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),$.type){case"space":!n&&(a!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&$.source.includes(" ")&&(w=$),g=!0;break;case"comment":{g||o($,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const te=$.source.substring(1)||" ";b?b+=_+te:b=te,_="",p=!1;break}case"newline":p?b?b+=$.source:(!Q||a!=="seq-item-ind")&&(m=!0):_+=$.source,p=!0,v=!0,(D||C)&&(H=$),g=!0;break;case"anchor":D&&o($,"MULTIPLE_ANCHORS","A node can have at most one anchor"),$.source.endsWith(":")&&o($.offset+$.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),D=$,X??(X=$.offset),p=!1,g=!1,N=!0;break;case"tag":{C&&o($,"MULTIPLE_TAGS","A node can have at most one tag"),C=$,X??(X=$.offset),p=!1,g=!1,N=!0;break}case a:(D||C)&&o($,"BAD_PROP_ORDER",`Anchors and tags must be after the ${$.source} indicator`),Q&&o($,"UNEXPECTED_TOKEN",`Unexpected ${$.source} in ${n??"collection"}`),Q=$,p=a==="seq-item-ind"||a==="explicit-key-ind",g=!1;break;case"comma":if(n){M&&o($,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),M=$,p=!1,g=!1;break}default:o($,"UNEXPECTED_TOKEN",`Unexpected ${$.type} token`),p=!1,g=!1}const B=i[i.length-1],K=B?B.offset+B.source.length:u;return N&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(p&&w.indent<=f||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:M,found:Q,spaceBefore:m,comment:b,hasNewline:v,anchor:D,tag:C,newlineAfterProp:H,end:K,start:X??K}}function Us(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
422
- `))return!0;if(i.end){for(const n of i.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of i.items){for(const a of n.start)if(a.type==="newline")return!0;if(n.sep){for(const a of n.sep)if(a.type==="newline")return!0}if(Us(n.key)||Us(n.value))return!0}return!1;default:return!0}}function rd(i,n,a){if((n==null?void 0:n.type)==="flow-collection"){const s=n.end[0];s.indent===i&&(s.source==="]"||s.source==="}")&&Us(n)&&a(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function $b(i,n,a){const{uniqueKeys:s}=i.options;if(s===!1)return!1;const u=typeof s=="function"?s:(o,f)=>o===f||We(o)&&We(f)&&o.value===f.value;return n.some(o=>u(o.key,a))}const Tg="All mapping items must start at the same column";function kw({composeNode:i,composeEmptyNode:n},a,s,u,o){var g;const f=(o==null?void 0:o.nodeClass)??hn,h=new f(a.schema);a.atRoot&&(a.atRoot=!1);let m=s.offset,p=null;for(const b of s.items){const{start:_,key:v,sep:N,value:w}=b,D=_l(_,{indicator:"explicit-key-ind",next:v??(N==null?void 0:N[0]),offset:m,onError:u,parentIndent:s.indent,startOnNewline:!0}),C=!D.found;if(C){if(v&&(v.type==="block-seq"?u(m,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==s.indent&&u(m,"BAD_INDENT",Tg)),!D.anchor&&!D.tag&&!N){p=D.end,D.comment&&(h.comment?h.comment+=`
423
- `+D.comment:h.comment=D.comment);continue}(D.newlineAfterProp||Us(v))&&u(v??_[_.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((g=D.found)==null?void 0:g.indent)!==s.indent&&u(m,"BAD_INDENT",Tg);a.atKey=!0;const H=D.end,M=v?i(a,v,D,u):n(a,H,_,null,D,u);a.schema.compat&&rd(s.indent,v,u),a.atKey=!1,$b(a,h.items,M)&&u(H,"DUPLICATE_KEY","Map keys must be unique");const Q=_l(N??[],{indicator:"map-value-ind",next:w,offset:M.range[2],onError:u,parentIndent:s.indent,startOnNewline:!v||v.type==="block-scalar"});if(m=Q.end,Q.found){C&&((w==null?void 0:w.type)==="block-map"&&!Q.hasNewline&&u(m,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),a.options.strict&&D.start<Q.found.offset-1024&&u(M.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const X=w?i(a,w,Q,u):n(a,m,N,null,Q,u);a.schema.compat&&rd(s.indent,w,u),m=X.range[2];const B=new zt(M,X);a.options.keepSourceTokens&&(B.srcToken=b),h.items.push(B)}else{C&&u(M.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),Q.comment&&(M.comment?M.comment+=`
424
- `+Q.comment:M.comment=Q.comment);const X=new zt(M);a.options.keepSourceTokens&&(X.srcToken=b),h.items.push(X)}}return p&&p<m&&u(p,"IMPOSSIBLE","Map comment with trailing content"),h.range=[s.offset,m,p??m],h}function ww({composeNode:i,composeEmptyNode:n},a,s,u,o){const f=(o==null?void 0:o.nodeClass)??ya,h=new f(a.schema);a.atRoot&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let m=s.offset,p=null;for(const{start:g,value:b}of s.items){const _=_l(g,{indicator:"seq-item-ind",next:b,offset:m,onError:u,parentIndent:s.indent,startOnNewline:!0});if(!_.found)if(_.anchor||_.tag||b)(b==null?void 0:b.type)==="block-seq"?u(_.end,"BAD_INDENT","All sequence items must start at the same column"):u(m,"MISSING_CHAR","Sequence item without - indicator");else{p=_.end,_.comment&&(h.comment=_.comment);continue}const v=b?i(a,b,_,u):n(a,_.end,g,null,_,u);a.schema.compat&&rd(s.indent,b,u),m=v.range[2],h.items.push(v)}return h.range=[s.offset,m,p??m],h}function Qs(i,n,a,s){let u="";if(i){let o=!1,f="";for(const h of i){const{source:m,type:p}=h;switch(p){case"space":o=!0;break;case"comment":{a&&!o&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const g=m.substring(1)||" ";u?u+=f+g:u=g,f="";break}case"newline":u&&(f+=m),o=!0;break;default:s(h,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}n+=m.length}}return{comment:u,offset:n}}const Rf="Block collections are not allowed within flow collections",Bf=i=>i&&(i.type==="block-map"||i.type==="block-seq");function Aw({composeNode:i,composeEmptyNode:n},a,s,u,o){var D;const f=s.start.source==="{",h=f?"flow map":"flow sequence",m=(o==null?void 0:o.nodeClass)??(f?hn:ya),p=new m(a.schema);p.flow=!0;const g=a.atRoot;g&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let b=s.offset+s.start.source.length;for(let C=0;C<s.items.length;++C){const H=s.items[C],{start:M,key:Q,sep:X,value:B}=H,K=_l(M,{flow:h,indicator:"explicit-key-ind",next:Q??(X==null?void 0:X[0]),offset:b,onError:u,parentIndent:s.indent,startOnNewline:!1});if(!K.found){if(!K.anchor&&!K.tag&&!X&&!B){C===0&&K.comma?u(K.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):C<s.items.length-1&&u(K.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),K.comment&&(p.comment?p.comment+=`
425
- `+K.comment:p.comment=K.comment),b=K.end;continue}!f&&a.options.strict&&Us(Q)&&u(Q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(C===0)K.comma&&u(K.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(K.comma||u(K.start,"MISSING_CHAR",`Missing , between ${h} items`),K.comment){let $="";e:for(const te of M)switch(te.type){case"comma":case"space":break;case"comment":$=te.source.substring(1);break e;default:break e}if($){let te=p.items[p.items.length-1];ot(te)&&(te=te.value??te.key),te.comment?te.comment+=`
426
- `+$:te.comment=$,K.comment=K.comment.substring($.length+1)}}if(!f&&!X&&!K.found){const $=B?i(a,B,K,u):n(a,K.end,X,null,K,u);p.items.push($),b=$.range[2],Bf(B)&&u($.range,"BLOCK_IN_FLOW",Rf)}else{a.atKey=!0;const $=K.end,te=Q?i(a,Q,K,u):n(a,$,M,null,K,u);Bf(Q)&&u(te.range,"BLOCK_IN_FLOW",Rf),a.atKey=!1;const fe=_l(X??[],{flow:h,indicator:"map-value-ind",next:B,offset:te.range[2],onError:u,parentIndent:s.indent,startOnNewline:!1});if(fe.found){if(!f&&!K.found&&a.options.strict){if(X)for(const ye of X){if(ye===fe.found)break;if(ye.type==="newline"){u(ye,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}K.start<fe.found.offset-1024&&u(fe.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else B&&("source"in B&&((D=B.source)==null?void 0:D[0])===":"?u(B,"MISSING_CHAR",`Missing space after : in ${h}`):u(fe.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const W=B?i(a,B,fe,u):fe.found?n(a,fe.end,X,null,fe,u):null;W?Bf(B)&&u(W.range,"BLOCK_IN_FLOW",Rf):fe.comment&&(te.comment?te.comment+=`
427
- `+fe.comment:te.comment=fe.comment);const P=new zt(te,W);if(a.options.keepSourceTokens&&(P.srcToken=H),f){const ye=p;$b(a,ye.items,te)&&u($,"DUPLICATE_KEY","Map keys must be unique"),ye.items.push(P)}else{const ye=new hn(a.schema);ye.flow=!0,ye.items.push(P);const Ee=(W??te).range;ye.range=[te.range[0],Ee[1],Ee[2]],p.items.push(ye)}b=W?W.range[2]:fe.end}}const _=f?"}":"]",[v,...N]=s.end;let w=b;if((v==null?void 0:v.source)===_)w=v.offset+v.source.length;else{const C=h[0].toUpperCase()+h.substring(1),H=g?`${C} must end with a ${_}`:`${C} in block collection must be sufficiently indented and end with a ${_}`;u(b,g?"MISSING_CHAR":"BAD_INDENT",H),v&&v.source.length!==1&&N.unshift(v)}if(N.length>0){const C=Qs(N,w,a.options.strict,u);C.comment&&(p.comment?p.comment+=`
428
- `+C.comment:p.comment=C.comment),p.range=[s.offset,w,C.offset]}else p.range=[s.offset,w,w];return p}function Lf(i,n,a,s,u,o){const f=a.type==="block-map"?kw(i,n,a,s,o):a.type==="block-seq"?ww(i,n,a,s,o):Aw(i,n,a,s,o),h=f.constructor;return u==="!"||u===h.tagName?(f.tag=h.tagName,f):(u&&(f.tag=u),f)}function Tw(i,n,a,s,u){var _;const o=s.tag,f=o?n.directives.tagName(o.source,v=>u(o,"TAG_RESOLVE_FAILED",v)):null;if(a.type==="block-seq"){const{anchor:v,newlineAfterProp:N}=s,w=v&&o?v.offset>o.offset?v:o:v??o;w&&(!N||N.offset<w.offset)&&u(w,"MISSING_CHAR","Missing newline after block sequence props")}const h=a.type==="block-map"?"map":a.type==="block-seq"?"seq":a.start.source==="{"?"map":"seq";if(!o||!f||f==="!"||f===hn.tagName&&h==="map"||f===ya.tagName&&h==="seq")return Lf(i,n,a,u,f);let m=n.schema.tags.find(v=>v.tag===f&&v.collection===h);if(!m){const v=n.schema.knownTags[f];if((v==null?void 0:v.collection)===h)n.schema.tags.push(Object.assign({},v,{default:!1})),m=v;else return v?u(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${h} collection, but expects ${v.collection??"scalar"}`,!0):u(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),Lf(i,n,a,u,f)}const p=Lf(i,n,a,u,f,m),g=((_=m.resolve)==null?void 0:_.call(m,p,v=>u(o,"TAG_RESOLVE_FAILED",v),n.options))??p,b=ut(g)?g:new ke(g);return b.range=p.range,b.tag=f,m!=null&&m.format&&(b.format=m.format),b}function Ew(i,n,a){const s=n.offset,u=Cw(n,i.options.strict,a);if(!u)return{value:"",type:null,comment:"",range:[s,s,s]};const o=u.mode===">"?ke.BLOCK_FOLDED:ke.BLOCK_LITERAL,f=n.source?Ow(n.source):[];let h=f.length;for(let w=f.length-1;w>=0;--w){const D=f[w][1];if(D===""||D==="\r")h=w;else break}if(h===0){const w=u.chomp==="+"&&f.length>0?`
429
- `.repeat(Math.max(1,f.length-1)):"";let D=s+u.length;return n.source&&(D+=n.source.length),{value:w,type:o,comment:u.comment,range:[s,D,D]}}let m=n.indent+u.indent,p=n.offset+u.length,g=0;for(let w=0;w<h;++w){const[D,C]=f[w];if(C===""||C==="\r")u.indent===0&&D.length>m&&(m=D.length);else{D.length<m&&a(p+D.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),u.indent===0&&(m=D.length),g=w,m===0&&!i.atRoot&&a(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=D.length+C.length+1}for(let w=f.length-1;w>=h;--w)f[w][0].length>m&&(h=w+1);let b="",_="",v=!1;for(let w=0;w<g;++w)b+=f[w][0].slice(m)+`
430
- `;for(let w=g;w<h;++w){let[D,C]=f[w];p+=D.length+C.length+1;const H=C[C.length-1]==="\r";if(H&&(C=C.slice(0,-1)),C&&D.length<m){const Q=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;a(p-C.length-(H?2:1),"BAD_INDENT",Q),D=""}o===ke.BLOCK_LITERAL?(b+=_+D.slice(m)+C,_=`
431
- `):D.length>m||C[0]===" "?(_===" "?_=`
432
- `:!v&&_===`
433
- `&&(_=`
434
-
435
- `),b+=_+D.slice(m)+C,_=`
436
- `,v=!0):C===""?_===`
437
- `?b+=`
438
- `:_=`
439
- `:(b+=_+C,_=" ",v=!1)}switch(u.chomp){case"-":break;case"+":for(let w=h;w<f.length;++w)b+=`
440
- `+f[w][0].slice(m);b[b.length-1]!==`
441
- `&&(b+=`
442
- `);break;default:b+=`
443
- `}const N=s+u.length+n.source.length;return{value:b,type:o,comment:u.comment,range:[s,N,N]}}function Cw({offset:i,props:n},a,s){if(n[0].type!=="block-scalar-header")return s(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:u}=n[0],o=u[0];let f=0,h="",m=-1;for(let _=1;_<u.length;++_){const v=u[_];if(!h&&(v==="-"||v==="+"))h=v;else{const N=Number(v);!f&&N?f=N:m===-1&&(m=i+_)}}m!==-1&&s(m,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${u}`);let p=!1,g="",b=u.length;for(let _=1;_<n.length;++_){const v=n[_];switch(v.type){case"space":p=!0;case"newline":b+=v.source.length;break;case"comment":a&&!p&&s(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),b+=v.source.length,g=v.source.substring(1);break;case"error":s(v,"UNEXPECTED_TOKEN",v.message),b+=v.source.length;break;default:{const N=`Unexpected token in block scalar header: ${v.type}`;s(v,"UNEXPECTED_TOKEN",N);const w=v.source;w&&typeof w=="string"&&(b+=w.length)}}}return{mode:o,indent:f,chomp:h,comment:g,length:b}}function Ow(i){const n=i.split(/\n( *)/),a=n[0],s=a.match(/^( *)/),o=[s!=null&&s[1]?[s[1],a.slice(s[1].length)]:["",a]];for(let f=1;f<n.length;f+=2)o.push([n[f],n[f+1]]);return o}function Nw(i,n,a){const{offset:s,type:u,source:o,end:f}=i;let h,m;const p=(_,v,N)=>a(s+_,v,N);switch(u){case"scalar":h=ke.PLAIN,m=Mw(o,p);break;case"single-quoted-scalar":h=ke.QUOTE_SINGLE,m=zw(o,p);break;case"double-quoted-scalar":h=ke.QUOTE_DOUBLE,m=Dw(o,p);break;default:return a(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const g=s+o.length,b=Qs(f,g,n,a);return{value:m,type:h,comment:b.comment,range:[s,g,b.offset]}}function Mw(i,n){let a="";switch(i[0]){case" ":a="a tab character";break;case",":a="flow indicator character ,";break;case"%":a="directive indicator character %";break;case"|":case">":{a=`block scalar indicator ${i[0]}`;break}case"@":case"`":{a=`reserved character ${i[0]}`;break}}return a&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${a}`),Xb(i)}function zw(i,n){return(i[i.length-1]!=="'"||i.length===1)&&n(i.length,"MISSING_CHAR","Missing closing 'quote"),Xb(i.slice(1,-1)).replace(/''/g,"'")}function Xb(i){let n,a;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
444
- `,"sy"),a=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
445
- `,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,a=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=n.exec(i);if(!s)return i;let u=s[1],o=" ",f=n.lastIndex;for(a.lastIndex=f;s=a.exec(i);)s[1]===""?o===`
446
- `?u+=o:o=`
447
- `:(u+=o+s[1],o=" "),f=a.lastIndex;const h=/[ \t]*(.*)/sy;return h.lastIndex=f,s=h.exec(i),u+o+((s==null?void 0:s[1])??"")}function Dw(i,n){let a="";for(let s=1;s<i.length-1;++s){const u=i[s];if(!(u==="\r"&&i[s+1]===`
448
- `))if(u===`
449
- `){const{fold:o,offset:f}=jw(i,s);a+=o,s=f}else if(u==="\\"){let o=i[++s];const f=Rw[o];if(f)a+=f;else if(o===`
450
- `)for(o=i[s+1];o===" "||o===" ";)o=i[++s+1];else if(o==="\r"&&i[s+1]===`
451
- `)for(o=i[++s+1];o===" "||o===" ";)o=i[++s+1];else if(o==="x"||o==="u"||o==="U"){const h={x:2,u:4,U:8}[o];a+=Bw(i,s+1,h,n),s+=h}else{const h=i.substr(s-1,2);n(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),a+=h}}else if(u===" "||u===" "){const o=s;let f=i[s+1];for(;f===" "||f===" ";)f=i[++s+1];f!==`
452
- `&&!(f==="\r"&&i[s+2]===`
453
- `)&&(a+=s>o?i.slice(o,s+1):u)}else a+=u}return(i[i.length-1]!=='"'||i.length===1)&&n(i.length,"MISSING_CHAR",'Missing closing "quote'),a}function jw(i,n){let a="",s=i[n+1];for(;(s===" "||s===" "||s===`
454
- `||s==="\r")&&!(s==="\r"&&i[n+2]!==`
455
- `);)s===`
456
- `&&(a+=`
457
- `),n+=1,s=i[n+1];return a||(a=" "),{fold:a,offset:n}}const Rw={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
458
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Bw(i,n,a,s){const u=i.substr(n,a),f=u.length===a&&/^[0-9a-fA-F]+$/.test(u)?parseInt(u,16):NaN;if(isNaN(f)){const h=i.substr(n-2,a+2);return s(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(f)}function Jb(i,n,a,s){const{value:u,type:o,comment:f,range:h}=n.type==="block-scalar"?Ew(i,n,s):Nw(n,i.options.strict,s),m=a?i.directives.tagName(a.source,b=>s(a,"TAG_RESOLVE_FAILED",b)):null;let p;i.options.stringKeys&&i.atKey?p=i.schema[Dn]:m?p=Lw(i.schema,u,m,a,s):n.type==="scalar"?p=qw(i,u,n,s):p=i.schema[Dn];let g;try{const b=p.resolve(u,_=>s(a??n,"TAG_RESOLVE_FAILED",_),i.options);g=We(b)?b:new ke(b)}catch(b){const _=b instanceof Error?b.message:String(b);s(a??n,"TAG_RESOLVE_FAILED",_),g=new ke(u)}return g.range=h,g.source=u,o&&(g.type=o),m&&(g.tag=m),p.format&&(g.format=p.format),f&&(g.comment=f),g}function Lw(i,n,a,s,u){var h;if(a==="!")return i[Dn];const o=[];for(const m of i.tags)if(!m.collection&&m.tag===a)if(m.default&&m.test)o.push(m);else return m;for(const m of o)if((h=m.test)!=null&&h.test(n))return m;const f=i.knownTags[a];return f&&!f.collection?(i.tags.push(Object.assign({},f,{default:!1,test:void 0})),f):(u(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,a!=="tag:yaml.org,2002:str"),i[Dn])}function qw({atKey:i,directives:n,schema:a},s,u,o){const f=a.tags.find(h=>{var m;return(h.default===!0||i&&h.default==="key")&&((m=h.test)==null?void 0:m.test(s))})||a[Dn];if(a.compat){const h=a.compat.find(m=>{var p;return m.default&&((p=m.test)==null?void 0:p.test(s))})??a[Dn];if(f.tag!==h.tag){const m=n.tagString(f.tag),p=n.tagString(h.tag),g=`Value may be parsed as either ${m} or ${p}`;o(u,"TAG_RESOLVE_FAILED",g,!0)}}return f}function Uw(i,n,a){if(n){a??(a=n.length);for(let s=a-1;s>=0;--s){let u=n[s];switch(u.type){case"space":case"comment":case"newline":i-=u.source.length;continue}for(u=n[++s];(u==null?void 0:u.type)==="space";)i+=u.source.length,u=n[++s];break}}return i}const Hw={composeNode:Fb,composeEmptyNode:Md};function Fb(i,n,a,s){const u=i.atKey,{spaceBefore:o,comment:f,anchor:h,tag:m}=a;let p,g=!0;switch(n.type){case"alias":p=Iw(i,n,s),(h||m)&&s(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=Jb(i,n,m,s),h&&(p.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=Tw(Hw,i,n,a,s),h&&(p.anchor=h.source.substring(1));break;default:{const b=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;s(n,"UNEXPECTED_TOKEN",b),p=Md(i,n.offset,void 0,null,a,s),g=!1}}return h&&p.anchor===""&&s(h,"BAD_ALIAS","Anchor cannot be an empty string"),u&&i.options.stringKeys&&(!We(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&s(m??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),f&&(n.type==="scalar"&&n.source===""?p.comment=f:p.commentBefore=f),i.options.keepSourceTokens&&g&&(p.srcToken=n),p}function Md(i,n,a,s,{spaceBefore:u,comment:o,anchor:f,tag:h,end:m},p){const g={type:"scalar",offset:Uw(n,a,s),indent:-1,source:""},b=Jb(i,g,h,p);return f&&(b.anchor=f.source.substring(1),b.anchor===""&&p(f,"BAD_ALIAS","Anchor cannot be an empty string")),u&&(b.spaceBefore=!0),o&&(b.comment=o,b.range[2]=m),b}function Iw({options:i},{offset:n,source:a,end:s},u){const o=new vd(a.substring(1));o.source===""&&u(n,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&u(n+a.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const f=n+a.length,h=Qs(s,f,i.strict,u);return o.range=[n,f,h.offset],h.comment&&(o.comment=h.comment),o}function Yw(i,n,{offset:a,start:s,value:u,end:o},f){const h=Object.assign({_directives:n},i),m=new Ju(void 0,h),p={atKey:!1,atRoot:!0,directives:m.directives,options:m.options,schema:m.schema},g=_l(s,{indicator:"doc-start",next:u??(o==null?void 0:o[0]),offset:a,onError:f,parentIndent:0,startOnNewline:!0});g.found&&(m.directives.docStart=!0,u&&(u.type==="block-map"||u.type==="block-seq")&&!g.hasNewline&&f(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),m.contents=u?Fb(p,u,g,f):Md(p,g.end,s,null,g,f);const b=m.contents.range[2],_=Qs(o,b,!1,f);return _.comment&&(m.comment=_.comment),m.range=[a,b,_.offset],m}function As(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:n,source:a}=i;return[n,n+(typeof a=="string"?a.length:1)]}function Eg(i){var u;let n="",a=!1,s=!1;for(let o=0;o<i.length;++o){const f=i[o];switch(f[0]){case"#":n+=(n===""?"":s?`
459
-
460
- `:`
461
- `)+(f.substring(1)||" "),a=!0,s=!1;break;case"%":((u=i[o+1])==null?void 0:u[0])!=="#"&&(o+=1),a=!1;break;default:a||(s=!0),a=!1}}return{comment:n,afterEmptyLine:s}}class Vw{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(a,s,u,o)=>{const f=As(a);o?this.warnings.push(new _w(f,s,u)):this.errors.push(new Ns(f,s,u))},this.directives=new Nt({version:n.version||"1.2"}),this.options=n}decorate(n,a){const{comment:s,afterEmptyLine:u}=Eg(this.prelude);if(s){const o=n.contents;if(a)n.comment=n.comment?`${n.comment}
462
- ${s}`:s;else if(u||n.directives.docStart||!o)n.commentBefore=s;else if(rt(o)&&!o.flow&&o.items.length>0){let f=o.items[0];ot(f)&&(f=f.key);const h=f.commentBefore;f.commentBefore=h?`${s}
463
- ${h}`:s}else{const f=o.commentBefore;o.commentBefore=f?`${s}
464
- ${f}`:s}}a?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Eg(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,a=!1,s=-1){for(const u of n)yield*this.next(u);yield*this.end(a,s)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(a,s,u)=>{const o=As(n);o[0]+=a,this.onError(o,"BAD_DIRECTIVE",s,u)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const a=Yw(this.options,this.directives,n,this.onError);this.atDirectives&&!a.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(a,!1),this.doc&&(yield this.doc),this.doc=a,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const a=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,s=new Ns(As(n),"UNEXPECTED_TOKEN",a);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new Ns(As(n),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const a=Qs(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),a.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
465
- ${a.comment}`:a.comment}this.doc.range[2]=a.offset;break}default:this.errors.push(new Ns(As(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,a=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const s=Object.assign({_directives:this.directives},this.options),u=new Ju(void 0,s);this.atDirectives&&this.onError(a,"MISSING_CHAR","Missing directives-end indicator line"),u.range=[0,a,a],this.decorate(u,!1),yield u}}}const Wb="\uFEFF",Pb="",e0="",ud="";function Gw(i){switch(i){case Wb:return"byte-order-mark";case Pb:return"doc-mode";case e0:return"flow-error-end";case ud:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
466
- `:case`\r
467
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Sn(i){switch(i){case void 0:case" ":case`
468
- `:case"\r":case" ":return!0;default:return!1}}const Cg=new Set("0123456789ABCDEFabcdef"),Kw=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),bu=new Set(",[]{}"),Zw=new Set(` ,[]{}
469
- \r `),qf=i=>!i||Zw.has(i);class Qw{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,a=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!a;let s=this.next??"stream";for(;s&&(a||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let n=this.pos,a=this.buffer[n];for(;a===" "||a===" ";)a=this.buffer[++n];return!a||a==="#"||a===`
470
- `?!0:a==="\r"?this.buffer[n+1]===`
471
- `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let a=this.buffer[n];if(this.indentNext>0){let s=0;for(;a===" ";)a=this.buffer[++s+n];if(a==="\r"){const u=this.buffer[s+n+1];if(u===`
472
- `||!u&&!this.atEnd)return n+s+1}return a===`
473
- `||s>=this.indentNext||!a&&!this.atEnd?n+s:-1}if(a==="-"||a==="."){const s=this.buffer.substr(n,3);if((s==="---"||s==="...")&&Sn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
474
- `,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Wb&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let a=n.length,s=n.indexOf("#");for(;s!==-1;){const o=n[s-1];if(o===" "||o===" "){a=s-1;break}else s=n.indexOf("#",s+1)}for(;;){const o=n[a-1];if(o===" "||o===" ")a-=1;else break}const u=(yield*this.pushCount(a))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-u),this.pushNewline(),"stream"}if(this.atLineEnd()){const a=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-a),yield*this.pushNewline(),"stream"}return yield Pb,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const a=this.peek(3);if((a==="---"||a==="...")&&Sn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,a==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Sn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,a]=this.peek(2);if(!a&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&Sn(a)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let a=yield*this.pushIndicators();switch(n[a]){case"#":yield*this.pushCount(n.length-a);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(qf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return a+=yield*this.parseBlockScalarHeader(),a+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-a),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,a,s=-1;do n=yield*this.pushNewline(),n>0?(a=yield*this.pushSpaces(!1),this.indentValue=s=a):a=0,a+=yield*this.pushSpaces(!0);while(n+a>0);const u=this.getLine();if(u===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&u[0]!=="#"||s===0&&(u.startsWith("---")||u.startsWith("..."))&&Sn(u[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(u[0]==="]"||u[0]==="}")))return this.flowLevel=0,yield e0,yield*this.parseLineStart();let o=0;for(;u[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),u[o]){case void 0:return"flow";case"#":return yield*this.pushCount(u.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(qf),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const f=this.charAt(1);if(this.flowKey||Sn(f)||f===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let a=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;a!==-1&&this.buffer[a+1]==="'";)a=this.buffer.indexOf("'",a+2);else for(;a!==-1;){let o=0;for(;this.buffer[a-1-o]==="\\";)o+=1;if(o%2===0)break;a=this.buffer.indexOf('"',a+1)}const s=this.buffer.substring(0,a);let u=s.indexOf(`
475
- `,this.pos);if(u!==-1){for(;u!==-1;){const o=this.continueScalar(u+1);if(o===-1)break;u=s.indexOf(`
476
- `,o)}u!==-1&&(a=u-(s[u-1]==="\r"?2:1))}if(a===-1){if(!this.atEnd)return this.setNext("quoted-scalar");a=this.buffer.length}return yield*this.pushToIndex(a+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const a=this.buffer[++n];if(a==="+")this.blockScalarKeep=!0;else if(a>"0"&&a<="9")this.blockScalarIndent=Number(a)-1;else if(a!=="-")break}return yield*this.pushUntil(a=>Sn(a)||a==="#")}*parseBlockScalar(){let n=this.pos-1,a=0,s;e:for(let o=this.pos;s=this.buffer[o];++o)switch(s){case" ":a+=1;break;case`
477
- `:n=o,a=0;break;case"\r":{const f=this.buffer[o+1];if(!f&&!this.atEnd)return this.setNext("block-scalar");if(f===`
478
- `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(a>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=a:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(n+1);if(o===-1)break;n=this.buffer.indexOf(`
479
- `,o)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let u=n+1;for(s=this.buffer[u];s===" ";)s=this.buffer[++u];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
480
- `;)s=this.buffer[++u];n=u-1}else if(!this.blockScalarKeep)do{let o=n-1,f=this.buffer[o];f==="\r"&&(f=this.buffer[--o]);const h=o;for(;f===" ";)f=this.buffer[--o];if(f===`
481
- `&&o>=this.pos&&o+1+a>h)n=o;else break}while(!0);return yield ud,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let a=this.pos-1,s=this.pos-1,u;for(;u=this.buffer[++s];)if(u===":"){const o=this.buffer[s+1];if(Sn(o)||n&&bu.has(o))break;a=s}else if(Sn(u)){let o=this.buffer[s+1];if(u==="\r"&&(o===`
482
- `?(s+=1,u=`
483
- `,o=this.buffer[s+1]):a=s),o==="#"||n&&bu.has(o))break;if(u===`
484
- `){const f=this.continueScalar(s+1);if(f===-1)break;s=Math.max(s,f-2)}}else{if(n&&bu.has(u))break;a=s}return!u&&!this.atEnd?this.setNext("plain-scalar"):(yield ud,yield*this.pushToIndex(a+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,a){const s=this.buffer.slice(this.pos,n);return s?(yield s,this.pos+=s.length,s.length):(a&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(qf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,a=this.charAt(1);if(Sn(a)||n&&bu.has(a))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,a=this.buffer[n];for(;!Sn(a)&&a!==">";)a=this.buffer[++n];return yield*this.pushToIndex(a===">"?n+1:n,!1)}else{let n=this.pos+1,a=this.buffer[n];for(;a;)if(Kw.has(a))a=this.buffer[++n];else if(a==="%"&&Cg.has(this.buffer[n+1])&&Cg.has(this.buffer[n+2]))a=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
485
- `?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
486
- `?yield*this.pushCount(2):0}*pushSpaces(n){let a=this.pos-1,s;do s=this.buffer[++a];while(s===" "||n&&s===" ");const u=a-this.pos;return u>0&&(yield this.buffer.substr(this.pos,u),this.pos=a),u}*pushUntil(n){let a=this.pos,s=this.buffer[a];for(;!n(s);)s=this.buffer[++a];return yield*this.pushToIndex(a,!1)}}class $w{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let a=0,s=this.lineStarts.length;for(;a<s;){const o=a+s>>1;this.lineStarts[o]<n?a=o+1:s=o}if(this.lineStarts[a]===n)return{line:a+1,col:1};if(a===0)return{line:0,col:n};const u=this.lineStarts[a-1];return{line:a,col:n-u+1}}}}function Li(i,n){for(let a=0;a<i.length;++a)if(i[a].type===n)return!0;return!1}function Og(i){for(let n=0;n<i.length;++n)switch(i[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function t0(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function vu(i){switch(i.type){case"document":return i.start;case"block-map":{const n=i.items[i.items.length-1];return n.sep??n.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function ol(i){var a;if(i.length===0)return[];let n=i.length;e:for(;--n>=0;)switch(i[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((a=i[++n])==null?void 0:a.type)==="space";);return i.splice(n,i.length)}function Ng(i){if(i.start.type==="flow-seq-start")for(const n of i.items)n.sep&&!n.value&&!Li(n.start,"explicit-key-ind")&&!Li(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,t0(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class Xw{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Qw,this.onNewLine=n}*parse(n,a=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(n,a))yield*this.next(s);a||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const a=Gw(n);if(a)if(a==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=a,yield*this.step(),a){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const s=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&(n==null?void 0:n.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const a=n??this.stack.pop();if(!a)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield a;else{const s=this.peek(1);switch(a.type==="block-scalar"?a.indent="indent"in s?s.indent:0:a.type==="flow-collection"&&s.type==="document"&&(a.indent=0),a.type==="flow-collection"&&Ng(a),s.type){case"document":s.value=a;break;case"block-scalar":s.props.push(a);break;case"block-map":{const u=s.items[s.items.length-1];if(u.value){s.items.push({start:[],key:a,sep:[]}),this.onKeyLine=!0;return}else if(u.sep)u.value=a;else{Object.assign(u,{key:a,sep:[]}),this.onKeyLine=!u.explicitKey;return}break}case"block-seq":{const u=s.items[s.items.length-1];u.value?s.items.push({start:[],value:a}):u.value=a;break}case"flow-collection":{const u=s.items[s.items.length-1];!u||u.value?s.items.push({start:[],key:a,sep:[]}):u.sep?u.value=a:Object.assign(u,{key:a,sep:[]});return}default:yield*this.pop(),yield*this.pop(a)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(a.type==="block-map"||a.type==="block-seq")){const u=a.items[a.items.length-1];u&&!u.sep&&!u.value&&u.start.length>0&&Og(u.start)===-1&&(a.indent===0||u.start.every(o=>o.type!=="comment"||o.indent<a.indent))&&(s.type==="document"?s.end=u.start:s.items.push({start:u.start}),a.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{Og(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const a=this.startBlockValue(n);a?this.stack.push(a):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const a=vu(this.peek(2)),s=ol(a);let u;n.end?(u=n.end,u.push(this.sourceToken),delete n.end):u=[this.sourceToken];const o={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:s,key:n,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let a=this.source.indexOf(`
487
- `)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
488
- `,a)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){var s;const a=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,a.value){const u="end"in a.value?a.value.end:void 0,o=Array.isArray(u)?u[u.length-1]:void 0;(o==null?void 0:o.type)==="comment"?u==null||u.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else if(a.sep)a.sep.push(this.sourceToken);else{if(this.atIndentedComment(a.start,n.indent)){const u=n.items[n.items.length-2],o=(s=u==null?void 0:u.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const u=!this.onKeyLine&&this.indent===n.indent,o=u&&(a.sep||a.explicitKey)&&this.type!=="seq-item-ind";let f=[];if(o&&a.sep&&!a.value){const h=[];for(let m=0;m<a.sep.length;++m){const p=a.sep[m];switch(p.type){case"newline":h.push(m);break;case"space":break;case"comment":p.indent>n.indent&&(h.length=0);break;default:h.length=0}}h.length>=2&&(f=a.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":o||a.value?(f.push(this.sourceToken),n.items.push({start:f}),this.onKeyLine=!0):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"explicit-key-ind":!a.sep&&!a.explicitKey?(a.start.push(this.sourceToken),a.explicitKey=!0):o||a.value?(f.push(this.sourceToken),n.items.push({start:f,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(a.explicitKey)if(a.sep)if(a.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Li(a.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]});else if(t0(a.key)&&!Li(a.sep,"newline")){const h=ol(a.start),m=a.key,p=a.sep;p.push(this.sourceToken),delete a.key,delete a.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:m,sep:p}]})}else f.length>0?a.sep=a.sep.concat(f,this.sourceToken):a.sep.push(this.sourceToken);else if(Li(a.start,"newline"))Object.assign(a,{key:null,sep:[this.sourceToken]});else{const h=ol(a.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else a.sep?a.value||o?n.items.push({start:f,key:null,sep:[this.sourceToken]}):Li(a.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);o||a.value?(n.items.push({start:f,key:h,sep:[]}),this.onKeyLine=!0):a.sep?this.stack.push(h):(Object.assign(a,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(n);if(h){if(h.type==="block-seq"){if(!a.explicitKey&&a.sep&&!Li(a.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else u&&n.items.push({start:f});this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){var s;const a=n.items[n.items.length-1];switch(this.type){case"newline":if(a.value){const u="end"in a.value?a.value.end:void 0,o=Array.isArray(u)?u[u.length-1]:void 0;(o==null?void 0:o.type)==="comment"?u==null||u.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(a.start,n.indent)){const u=n.items[n.items.length-2],o=(s=u==null?void 0:u.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return;case"anchor":case"tag":if(a.value||this.indent<=n.indent)break;a.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;a.value||Li(a.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return}if(this.indent>n.indent){const u=this.startBlockValue(n);if(u){this.stack.push(u);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const a=n.items[n.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while((s==null?void 0:s.type)==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!a||a.sep?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return;case"map-value-ind":!a||a.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!a||a.value?n.items.push({start:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);!a||a.value?n.items.push({start:[],key:u,sep:[]}):a.sep?this.stack.push(u):Object.assign(a,{key:u,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const s=this.startBlockValue(n);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===n.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const u=vu(s),o=ol(u);Ng(n);const f=n.end.splice(1,n.end.length);f.push(this.sourceToken);const h={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:o,key:n,sep:f}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=h}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let a=this.source.indexOf(`
489
- `)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
490
- `,a)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const a=vu(n),s=ol(a);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const a=vu(n),s=ol(a);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,a){return this.type!=="comment"||this.indent<=a?!1:n.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Jw(i){const n=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||n&&new $w||null,prettyErrors:n}}function Fw(i,n={}){const{lineCounter:a,prettyErrors:s}=Jw(n),u=new Xw(a==null?void 0:a.addNewLine),o=new Vw(n);let f=null;for(const h of o.compose(u.parse(i),!0,i.length))if(!f)f=h;else if(f.options.logLevel!=="silent"){f.errors.push(new Ns(h.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&a&&(f.errors.forEach(Ag(i,a)),f.warnings.forEach(Ag(i,a))),f}function Ww(i,n,a){let s;const u=Fw(i,a);if(!u)return null;if(u.warnings.forEach(o=>Cb(u.options.logLevel,o)),u.errors.length>0){if(u.options.logLevel!=="silent")throw u.errors[0];u.errors=[]}return u.toJS(Object.assign({reviver:s},a))}class pl extends Error{constructor(a,s,u){super(a);sl(this,"code");sl(this,"position");this.name="MdmaParseError",this.code=s,this.position=u}}const ml={YAML_PARSE_ERROR:"mdma/yaml-parse-error",SCHEMA_VALIDATION_ERROR:"mdma/schema-validation-error",UNKNOWN_COMPONENT_TYPE:"mdma/unknown-component-type",DUPLICATE_COMPONENT_ID:"mdma/duplicate-component-id",INVALID_BINDING:"mdma/invalid-binding",UNRESOLVED_BINDING:"mdma/unresolved-binding"};function Pw(i){const n=i.split(`
491
- `);let a=!1,s=0;for(let u=0;u<n.length;u++){const o=n[u];if(a){const p=o.search(/\S/);if(p>=0&&p<=s)a=!1;else continue}if(/^\s*[\w-]+:\s*[|>]\s*$/.test(o)){a=!0,s=o.search(/\S/);continue}const f=o.match(/^(\s*)([\w-]+):\s+(.+)$/);if(!f)continue;const[,h,,m]=f;if(!/^["']/.test(m)&&!/^[[\]{]/.test(m)&&!/^(true|false|null|~)$/i.test(m)&&!/^-?\d+(\.\d+)?$/.test(m)&&!(h&&/^\s*-/.test(o))&&m.includes(": ")){const p=m.replace(/\\/g,"\\\\").replace(/"/g,'\\"');n[u]=o.replace(/:\s+.+$/,`: "${p}"`)}}return n.join(`
492
- `)}function e2(i,n){try{const a=Ww(Pw(i));return typeof a!="object"||a===null||Array.isArray(a)?{ok:!1,error:new pl("MDMA block must contain a YAML mapping (object)",ml.YAML_PARSE_ERROR,n)}:{ok:!0,data:a}}catch(a){return{ok:!1,error:new pl(`YAML parse error: ${a instanceof Error?a.message:String(a)}`,ml.YAML_PARSE_ERROR,n)}}}function t2(i,n,a){const s=i.type;if(typeof s!="string")return{ok:!1,errors:[new pl('MDMA component must have a "type" string field',ml.SCHEMA_VALIDATION_ERROR,a)]};const u=n==null?void 0:n.get(s);if(u){const f=u.safeParse(i);return f.success?{ok:!0,component:f.data}:{ok:!1,errors:f.error.issues.map(h=>new pl(`${h.path.join(".")}: ${h.message}`,ml.SCHEMA_VALIDATION_ERROR,a))}}if(!wx.has(s))return{ok:!1,errors:[new pl(`Unknown component type: "${s}"`,ml.UNKNOWN_COMPONENT_TYPE,a)]};const o=kx.safeParse(i);return o.success?{ok:!0,component:o.data}:{ok:!1,errors:o.error.issues.map(f=>new pl(`${f.path.join(".")}: ${f.message}`,ml.SCHEMA_VALIDATION_ERROR,a))}}function n2(i,n){return{type:"mdmaBlock",rawYaml:i.value,component:n,position:i.position}}function i2(i,n,a={}){const s=new Set;return Yk(i,"code",(u,o,f)=>{if(u.lang!==qg)return;const h=e2(u.value,u.position);if(!h.ok){if(console.warn("[mdma] YAML parse error:",h.error.message),n.message(h.error.message,u.position),a.failFast)throw h.error;return}const m=t2(h.data,a.customSchemas,u.position);if(!m.ok){console.warn(`[mdma] Validation failed for component type="${h.data.type}" id="${h.data.id??"?"}":`,m.errors.map(b=>b.message).join("; "));for(const b of m.errors)n.message(b.message,u.position);if(a.failFast)throw m.errors[0];return}const p=m.component.id;if(s.has(p)){const b=`Duplicate component ID: "${p}"`;if(n.message(b,u.position),a.failFast)throw new Error(b)}s.add(p);const g=n2(u,m.component);return f&&typeof o=="number"&&(f.children[o]=g),bb}),i}const a2=(i={})=>(n,a)=>i2(n,a,{customSchemas:i.customSchemas,failFast:i.failFast});function l2(){const i=new Map,n=new Set;return{on(a,s){let u=i.get(a);return u||(u=new Set,i.set(a,u)),u.add(s),()=>{u==null||u.delete(s)}},onAny(a){return n.add(a),()=>{n.delete(a)}},emit(a){const s=i.get(a.type);if(s)for(const u of s)u(a);for(const u of n)u(a)}}}function s2(i){const n=[];return{append(a){const s={timestamp:new Date().toISOString(),sessionId:i.sessionId,documentId:i.documentId,eventType:a.eventType,componentId:a.componentId,payload:a.payload,redacted:a.redacted??!1,actor:a.actor};return n.push(s),s},entries(){return n},forComponent(a){return n.filter(s=>s.componentId===a)},size(){return n.length}}}function r2(i,n){const a=n.split(".");let s=i;for(const u of a){if(s==null||typeof s!="object")return;s=s[u]}return s}function u2(i){const n=i.match(/^\{\{([a-zA-Z_][a-zA-Z0-9_.]*)\}\}$/);return n?n[1]:null}function Ts(i,n){if(typeof i=="string"){const a=u2(i);if(a)return r2(n,a)}return i}function o2(i){const n=typeof i=="string"?i:JSON.stringify(i);let a=0;for(let s=0;s<n.length;s++){const u=n.charCodeAt(s);a=(a<<5)-a+u|0}return`redacted:${(a>>>0).toString(16).padStart(8,"0")}`}function c2(i,n,a){const s=a.sensitiveComponents.has(n);if(!s&&!f2(i,a.sensitiveFields))return{payload:i,redacted:!1};const u={};for(const[o,f]of Object.entries(i))s||a.sensitiveFields.has(o)?u[o]=o2(f):u[o]=f;return{payload:u,redacted:!0}}function f2(i,n){for(const a of Object.keys(i))if(n.has(a))return!0;return!1}class d2 extends Error{constructor(a,s){super(a);sl(this,"rule");this.name="PolicyViolationError",this.rule=s}}class h2{constructor(n,a){sl(this,"policy");sl(this,"environment");this.policy=n,this.environment=a}evaluate(n){const a=this.policy.rules.filter(s=>s.action===n&&s.environments.includes(this.environment));if(a.length>0){const s=a[0];return{allowed:s.effect==="allow",rule:s,reason:s.reason}}return{allowed:this.policy.defaultEffect==="allow",reason:`Default policy: ${this.policy.defaultEffect}`}}enforce(n){const a=this.evaluate(n);if(!a.allowed)throw new d2(a.reason??`Action "${n}" denied by policy`,a.rule)}get currentEnvironment(){return this.environment}}function p2(){return{version:1,rules:[{action:"send_email",environments:["preview","test"],effect:"deny",reason:"Email sending is blocked in non-production environments"},{action:"webhook_call",environments:["preview"],effect:"deny",reason:"External webhook calls are blocked in preview"}],defaultEffect:"allow"}}function m2(i,n={}){const a=n.sessionId??crypto.randomUUID(),s=n.documentId??`doc-${Date.now()}`,u=n.environment??"preview",o=new h2(n.policy??p2(),u),f=l2(),h=s2({sessionId:a,documentId:s}),m={bindings:{},components:new Map},p={sensitiveComponents:new Set,sensitiveFields:new Set};for(const N of i.children)if(Uf(N)){const w=N.component,D={id:w.id,type:w.type,values:{},errors:[],touched:!1,visible:Ts(w.visible,m.bindings)!==!1,disabled:Ts(w.disabled,m.bindings)===!0};if(w.sensitive&&p.sensitiveComponents.add(w.id),w.type==="form")for(const C of w.fields)C.sensitive&&p.sensitiveFields.add(C.name),C.defaultValue!==void 0&&(D.values[C.name]=C.defaultValue,m.bindings[C.name]=C.defaultValue);m.components.set(w.id,D)}const g=new Set;function b(){for(const N of g)N(m)}function _(N){const w={FIELD_CHANGED:"field_changed",ACTION_TRIGGERED:"action_triggered",COMPONENT_RENDERED:"component_rendered",APPROVAL_GRANTED:"approval_granted",APPROVAL_DENIED:"approval_denied",INTEGRATION_CALLED:"integration_called"},D={...N};D.type=void 0,D.componentId=void 0;let C=p;N.type==="FIELD_CHANGED"&&p.sensitiveFields.has(N.field)&&(C={...p,sensitiveFields:new Set([...p.sensitiveFields,"value"])});const{payload:H,redacted:M}=c2(D,N.componentId,C);h.append({eventType:w[N.type],componentId:N.componentId,payload:H,redacted:M,actor:"actor"in N?N.actor:void 0})}return{getState(){return m},getBindings(){return m.bindings},getComponentState(N){return m.components.get(N)},resolveBinding(N){return Ts(N,m.bindings)},dispatch(N){switch(_(N),f.emit(N),N.type){case"FIELD_CHANGED":{const w=m.components.get(N.componentId);w&&(w.values={...w.values,[N.field]:N.value},w.touched=!0,m.bindings[N.field]=N.value);break}case"COMPONENT_RENDERED":break;case"APPROVAL_GRANTED":{const w=m.components.get(N.componentId);w&&(w.values={...w.values,status:"approved",approvedBy:N.actor},m.bindings[`${N.componentId}.status`]="approved");break}case"APPROVAL_DENIED":{const w=m.components.get(N.componentId);w&&(w.values={...w.values,status:"denied",deniedBy:N.actor,deniedReason:N.reason},m.bindings[`${N.componentId}.status`]="denied");break}}b()},subscribe(N){return g.add(N),()=>{g.delete(N)}},getEventLog(){return h},getEventBus(){return f},getPolicyEngine(){return o},updateAst(N){const w=new Set;for(const D of N.children)if(Uf(D))w.add(D.component.id);else if(y2(D)){const C=g2(D.value);C&&w.add(C)}for(const D of m.components.keys())w.has(D)||(m.components.delete(D),p.sensitiveComponents.delete(D));for(const D of N.children){if(!Uf(D))continue;const C=D.component;if(m.components.has(C.id))continue;const H={id:C.id,type:C.type,values:{},errors:[],touched:!1,visible:Ts(C.visible,m.bindings)!==!1,disabled:Ts(C.disabled,m.bindings)===!0};if(C.sensitive&&p.sensitiveComponents.add(C.id),C.type==="form")for(const M of C.fields)M.sensitive&&p.sensitiveFields.add(M.name),M.defaultValue!==void 0&&(H.values[M.name]=M.defaultValue,M.name in m.bindings||(m.bindings[M.name]=M.defaultValue));m.components.set(C.id,H)}b()}}}function Uf(i){return typeof i=="object"&&i!==null&&"type"in i&&i.type==="mdmaBlock"}function y2(i){return typeof i=="object"&&i!==null&&"type"in i&&i.type==="code"&&"lang"in i&&i.lang==="mdma"}function g2(i){if(!i)return null;const n=i.match(/^\s*id:\s*(\S+)/m);return n?n[1]:null}const Mg=wS().use(Dk).use(a2,{});async function b2(i,n){const a=Mg.parse(i),s=await Mg.run(a);return n?(n.updateAst(s),{ast:s,store:n}):{ast:s,store:m2(s)}}const v2=200;function x2({customPrompt:i,llmConfig:n}){const[a,s]=re.useState([]),[u,o]=re.useState(""),[f,h]=re.useState(!1),[m,p]=re.useState(null),g=re.useRef(null),b=re.useRef(0),_=re.useRef(null),v=re.useRef(a);v.current=a,re.useEffect(()=>{var M;(M=_.current)==null||M.scrollIntoView({behavior:"smooth"})},[a]);const N=re.useCallback(async(M,Q)=>{var X;try{const B=((X=v.current.find(te=>te.id===Q))==null?void 0:X.store)??void 0,{ast:K,store:$}=await b2(M,B);s(te=>te.map(fe=>fe.id===Q?{...fe,ast:K,store:$}:fe))}catch{}},[]),w=re.useCallback(async()=>{const M=u.trim();if(!M||f)return;o(""),p(null),h(!0);const Q={id:++b.current,role:"user",content:M,ast:null,store:null},X={id:++b.current,role:"assistant",content:"",ast:null,store:null},B=v.current;s([...B,Q,X]);const $=[{role:"system",content:Q1({customPrompt:i||void 0})},...B.map(W=>({role:W.role,content:W.content})),{role:"user",content:`${M}
493
-
494
- Respond with an MDMA Markdown document. Do not wrap it in code fences.`}];g.current=new AbortController;const te=X.id;let fe=0;try{let W="";try{for await(const P of jg(n,$,g.current.signal)){W+=P;const ye=W;s(be=>be.map(q=>q.id===te?{...q,content:ye}:q));const Ee=Date.now();Ee-fe>=v2&&(fe=Ee,N(ye,te))}}catch(P){if(g.current.signal.aborted)throw P;W=await Rg(n,$,g.current.signal),s(ye=>ye.map(Ee=>Ee.id===te?{...Ee,content:W}:Ee))}await N(W,te)}catch(W){W instanceof DOMException&&W.name==="AbortError"||p(W instanceof Error?W.message:String(W))}finally{h(!1),g.current=null}},[u,f,i,n,N]),D=re.useCallback(()=>{var M;(M=g.current)==null||M.abort()},[]),C=re.useCallback(()=>{var M;(M=g.current)==null||M.abort(),s([]),p(null),o(""),b.current=0},[]),H=n.apiKey.length>0||n.baseUrl.includes("localhost");return S.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[S.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center",paddingBottom:"8px",borderBottom:"1px solid #222"},children:[S.jsx("h3",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#e0e0e0"},children:"Preview Chat"}),i?S.jsx("span",{style:{fontSize:"11px",color:"#22c55e"},children:"customPrompt loaded"}):S.jsx("span",{style:{fontSize:"11px",color:"#f59e0b"},children:"Generate a prompt first"}),S.jsx("div",{style:{flex:1}}),a.length>0&&S.jsx("button",{type:"button",onClick:C,style:S2,children:"Clear"})]}),S.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"8px 0",display:"flex",flexDirection:"column",gap:"12px"},children:[a.length===0&&S.jsx("div",{style:{color:"#555",fontSize:"13px",textAlign:"center",padding:"40px 20px"},children:i?S.jsx(S.Fragment,{children:"Test your generated prompt here. Ask the LLM to create an interactive document and see MDMA components render live."}):S.jsxs(S.Fragment,{children:["Switch to the ",S.jsx("strong",{children:"Chat"})," tab and generate a prompt first, then come back here to test it."]})}),a.map(M=>S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[S.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:M.role==="user"?"#6366f1":"#22c55e"},children:M.role==="user"?"You":"MDMA AI"}),M.role==="user"?S.jsx("div",{style:_2,children:M.content}):M.ast&&M.store?S.jsx("div",{style:Hf,children:S.jsx(iS,{ast:M.ast,store:M.store})}):M.content?S.jsxs("div",{style:Hf,children:[S.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"12px",color:"#bbb"},children:M.content}),S.jsx("span",{style:{fontSize:"11px",color:"#6366f1"},children:"Parsing..."})]}):S.jsx("div",{style:Hf,children:S.jsx("span",{style:{fontSize:"12px",color:"#666"},children:"Generating..."})})]},M.id)),m&&S.jsx("div",{style:{fontSize:"12px",color:"#ef4444",padding:"4px 8px"},children:m}),S.jsx("div",{ref:_})]}),S.jsxs("div",{style:{display:"flex",gap:"8px",paddingTop:"8px",borderTop:"1px solid #222"},children:[S.jsx("textarea",{value:u,onChange:M=>o(M.target.value),onKeyDown:M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),!f&&H&&w())},placeholder:"Describe the interactive document you need...",rows:2,disabled:!H||!i,style:{flex:1,padding:"8px 10px",border:"1px solid #333",borderRadius:"6px",background:"#1a1a1a",color:"#e0e0e0",fontSize:"13px",fontFamily:"inherit",resize:"none",outline:"none",opacity:H&&i?1:.5}}),f?S.jsx("button",{type:"button",onClick:D,style:{...zg,background:"#7f1d1d",borderColor:"#ef4444"},children:"Stop"}):S.jsx("button",{type:"button",onClick:w,disabled:!H||!i||!u.trim(),style:{...zg,opacity:H&&i?1:.5},children:"Send"})]})]})}const S2={border:"none",background:"none",color:"#6366f1",cursor:"pointer",fontSize:"12px",padding:0},_2={padding:"8px 12px",borderRadius:"8px",background:"#1e1b4b",color:"#c7d2fe",fontSize:"13px",lineHeight:1.5,alignSelf:"flex-end",maxWidth:"80%"},Hf={padding:"12px 16px",borderRadius:"8px",background:"#1a1a1a",border:"1px solid #222",fontSize:"13px",lineHeight:1.5,maxWidth:"100%",overflow:"auto"},zg={padding:"8px 16px",border:"1px solid #6366f1",borderRadius:"6px",background:"#1e1b4b",color:"#a5b4fc",fontSize:"13px",fontWeight:600,cursor:"pointer",alignSelf:"flex-end"},k2=`You are an expert MDMA prompt engineer. Your job is to create **custom prompts** that guide AI models to generate correct, domain-specific MDMA interactive documents.
495
-
496
- ## Context
497
-
498
- MDMA (Markdown Document with Mounted Applications) extends Markdown with interactive components defined in fenced \`mdma\` code blocks. **MDMA components use YAML syntax inside the fenced blocks — never JSON.** Users install MDMA libraries in their apps and use \`buildSystemPrompt({ customPrompt })\` to configure their AI chat. The \`buildSystemPrompt\` function automatically prepends the full MDMA specification (all component types, binding syntax, authoring rules). Your output is the \`customPrompt\` that layers on top.
499
-
500
- **Your output will be concatenated AFTER the full MDMA spec.** Therefore you MUST NOT:
501
- - Repeat the MDMA component schemas (they're already in the spec)
502
- - Repeat the base authoring rules (unique IDs, sensitive flags, etc.)
503
- - Include the self-check checklist (already provided)
504
-
505
- **You MUST:**
506
- - Define the domain context and purpose
507
- - Specify which components to use and when
508
- - Define **trigger rules** — exactly when the AI should generate MDMA components (e.g., specific user phrases, conversation milestones, or contextual conditions)
509
- - Provide domain-specific examples showing realistic content
510
- - Define business rules, validation constraints, and workflow logic
511
- - Specify which fields should be marked as sensitive
512
- - Define the expected document structure and flow
513
-
514
- ## What You Receive
515
-
516
- The user will provide a configuration describing their needs:
517
- - **Domain**: The business domain (e.g., finance, healthcare, engineering)
518
- - **Description**: What the flow/document should accomplish
519
- - **Selected components**: Which of the 9 MDMA types to use
520
- - **Component configurations**: Field definitions, options, roles, etc.
521
- - **Business rules**: Free-text constraints and requirements
522
- - **Trigger rules**: When the AI should generate MDMA components (user phrases, conversation moments)
523
-
524
- ## Output Format
525
-
526
- Generate a clean, well-structured custom prompt in plain text. Structure it as:
527
-
528
- 1. **Role & Domain** — Set the domain context ("You are assisting with [domain] workflows...")
529
- 2. **When to Generate** — Define the trigger rules: specific keywords/phrases the user might say, or conversation conditions that should activate MDMA component generation. Be explicit — the AI needs clear signals for when to respond with interactive components vs. plain text.
530
- 3. **Document Purpose** — What the generated document should achieve
531
- 4. **Component Instructions** — For each selected component, provide:
532
- - When to include it
533
- - What content/fields it should have
534
- - Domain-specific field names and labels
535
- - Which fields are sensitive (PII)
536
- 4. **Workflow Logic** — How components relate to each other (bindings, action triggers, approval flows)
537
- 5. **Domain Examples** — 1-2 concrete examples showing what a generated MDMA document section should look like. Examples MUST use **YAML syntax** inside fenced \`mdma\` code blocks (never JSON).
538
- 6. **Constraints** — Things the AI must or must not do in this domain
539
-
540
- ## Example
541
-
542
- Given a configuration for a KYC (Know Your Customer) flow in finance with form, approval-gate, and tasklist components, you would generate:
543
-
544
- ---
545
-
546
- You are assisting with KYC (Know Your Customer) verification workflows in the financial services domain.
547
-
548
- ### Document Purpose
549
- Generate interactive KYC case review documents that collect applicant information, enforce compliance checks, and require dual approval before account activation.
550
-
551
- ### Components to Use
552
-
553
- **Form — Applicant Information**
554
- - Include fields: full name, date of birth, nationality, government ID number, ID type (passport/driver's license/national ID), residential address, email, phone
555
- - Mark as sensitive: government ID number, date of birth, residential address, email, phone
556
- - All fields required except phone
557
- - Use a select field for ID type with standard document options
558
-
559
- **Approval Gate — Compliance Review**
560
- - Require 2 approvers with roles: compliance-officer, senior-analyst
561
- - Require a reason on denial
562
- - Title should reflect the review stage (e.g., "KYC Compliance Approval")
563
-
564
- **Tasklist — Verification Checklist**
565
- - Items: identity document verified, address proof verified, PEP screening completed, sanctions list checked, source of funds verified
566
- - All items required
567
-
568
- ### Workflow
569
- - The approval gate should follow the form (approvers review submitted data)
570
- - The tasklist tracks verification steps that must be completed before approval
571
- - Include a callout with variant "warning" if the case involves a PEP (Politically Exposed Person)
572
-
573
- ### Domain Example
574
-
575
- Here is an example of a correctly structured MDMA document section for a KYC review:
576
-
577
- \`\`\`\`
578
- ## KYC Case Review
579
-
580
- Please complete the applicant information below:
581
-
582
- \`\`\`mdma
583
- type: form
584
- id: kyc-applicant-form
585
- fields:
586
- - name: full_name
587
- type: text
588
- label: Full Legal Name
589
- required: true
590
- - name: date_of_birth
591
- type: date
592
- label: Date of Birth
593
- required: true
594
- sensitive: true
595
- - name: nationality
596
- type: text
597
- label: Nationality
598
- required: true
599
- - name: id_type
600
- type: select
601
- label: ID Document Type
602
- required: true
603
- options:
604
- - Passport
605
- - Driver's License
606
- - National ID
607
- - name: id_number
608
- type: text
609
- label: Government ID Number
610
- required: true
611
- sensitive: true
612
- \`\`\`
613
-
614
- \`\`\`mdma
615
- type: approval-gate
616
- id: kyc-compliance-approval
617
- title: KYC Compliance Approval
618
- roles:
619
- - compliance-officer
620
- - senior-analyst
621
- requiredApprovers: 2
622
- requireReason: true
623
- \`\`\`
624
- \`\`\`\`
625
-
626
- ### Constraints
627
- - Always include a thinking block analyzing the case complexity
628
- - Never display raw ID numbers in the document text
629
- - Use formal, compliance-appropriate language
630
-
631
- ---
632
-
633
- ## Important Rules
634
-
635
- 1. **Be specific** — Use real field names, labels, and options relevant to the domain. Don't use generic placeholders.
636
- 2. **Be practical** — Include only components the user selected. Don't suggest extras unless asked.
637
- 3. **Be complete** — Cover all selected components with detailed instructions.
638
- 4. **Be concise** — The prompt should be focused and actionable, not a tutorial.
639
- 5. **Respect the architecture** — Your output is a \`customPrompt\`, not a standalone system prompt. Never include MDMA spec details that are already in the base prompt.
640
- 6. **Use YAML, never JSON** — All domain examples with fenced \`mdma\` code blocks MUST use YAML syntax. MDMA components are always defined in YAML. Never use JSON objects like \`{"type": "form", ...}\` in examples.
641
- `;function w2(i,n){var u,o,f;const a=n.filter(h=>h.enabled),s=["## User Configuration","",`**Flow Name:** ${i.name||"(not set)"}`,`**Domain:** ${i.domain||"(not set)"}`,`**Description:** ${i.description||"(not set)"}`];i.businessRules&&s.push(`**Business Rules:** ${i.businessRules}`),i.triggerMode==="immediate"?s.push("**When to Display Components:** Immediately when the conversation starts — always respond with MDMA components in the first message."):i.triggerMode==="keyword"&&i.trigger?s.push(`**When to Display Components:** When the user says one of these keywords or phrases: ${i.trigger}. Only generate MDMA components when triggered by these phrases, otherwise respond with plain text.`):i.triggerMode==="contextual"&&i.trigger&&s.push(`**When to Display Components:** ${i.trigger}`),s.push("","**Selected Components:**","");for(const h of a){if(s.push(`### ${h.type}`),h.type==="form"&&((u=h.form)!=null&&u.fields.length)){s.push("Fields:");for(const m of h.form.fields)s.push(`- ${m.name} (${m.type}, label: "${m.label}", required: ${m.required}, sensitive: ${m.sensitive})`)}if(h.type==="approval-gate"&&h.approvalGate){const m=h.approvalGate;s.push(`Roles: ${m.roles.join(", ")||"(none)"}`),s.push(`Required approvers: ${m.requiredApprovers}`),s.push(`Require reason on denial: ${m.requireReason}`)}if(h.type==="tasklist"&&((o=h.tasklist)!=null&&o.items.length)){s.push("Items:");for(const m of h.tasklist.items)s.push(`- ${m}`)}if(h.type==="table"&&((f=h.table)!=null&&f.columns.length)){s.push("Columns:");for(const m of h.table.columns)s.push(`- ${m.key}: "${m.header}"`)}s.push("")}return s.join(`
642
- `)}const A2=[{type:"form",enabled:!1,form:{fields:[]}},{type:"button",enabled:!1},{type:"tasklist",enabled:!1,tasklist:{items:[]}},{type:"table",enabled:!1,table:{columns:[]}},{type:"callout",enabled:!1},{type:"approval-gate",enabled:!1,approvalGate:{roles:[],requiredApprovers:1,requireReason:!1}},{type:"webhook",enabled:!1},{type:"chart",enabled:!1},{type:"thinking",enabled:!0}];function T2(i){const[n,a]=re.useState({name:"",domain:"",description:"",businessRules:"",triggerMode:"keyword",trigger:""}),[s,u]=re.useState(A2.map(M=>({...M}))),[o,f]=re.useState([]),[h,m]=re.useState(""),[p,g]=re.useState(!1),[b,_]=re.useState(null),v=re.useRef(null),N=re.useCallback(async M=>{_(null),g(!0),v.current=new AbortController;const Q=w2(n,s),X=[...o,{role:"user",content:M?`${M}
643
-
644
- ${Q}`:`Generate a custom prompt based on this configuration:
645
-
646
- ${Q}`}];f(X);const B=[{role:"system",content:k2},...X];try{let K="";try{for await(const $ of jg(i,B,v.current.signal))K+=$,m(K)}catch{K=await Rg(i,B,v.current.signal),m(K)}f($=>[...$,{role:"assistant",content:K}])}catch(K){K instanceof Error&&K.name!=="AbortError"&&_(K.message)}finally{g(!1)}},[n,s,o,i]),w=re.useCallback(()=>{var M;(M=v.current)==null||M.abort()},[]),D=re.useCallback(()=>{f([]),m(""),_(null)},[]),C=re.useCallback(M=>{u(Q=>Q.map(X=>X.type===M?{...X,enabled:!X.enabled}:X))},[]),H=re.useCallback((M,Q)=>{u(X=>X.map(B=>B.type===M?{...B,...Q}:B))},[]);return{domain:n,setDomain:a,components:s,setComponents:u,toggleComponent:C,updateComponent:H,messages:o,generatedPrompt:h,isGenerating:p,error:b,generate:N,stop:w,reset:D}}const E2=[{type:"form",enabled:!1,form:{fields:[]}},{type:"button",enabled:!1},{type:"tasklist",enabled:!1,tasklist:{items:[]}},{type:"table",enabled:!1,table:{columns:[]}},{type:"callout",enabled:!1},{type:"approval-gate",enabled:!1,approvalGate:{roles:[],requiredApprovers:1,requireReason:!1}},{type:"webhook",enabled:!1},{type:"chart",enabled:!1},{type:"thinking",enabled:!0}];function Es(i){return E2.map(n=>n.type==="form"?{...n,enabled:!0,form:{fields:i}}:{...n})}const Dg=[{domain:{name:"kyc-verification",domain:"finance",description:"KYC case review flow that collects applicant identity data, runs compliance checks, and requires dual approval before account activation.",businessRules:"Government ID and date of birth must be marked sensitive. Require 2 approvers with roles: compliance-officer, senior-analyst. PEP screening and sanctions list checks are mandatory before approval.",triggerMode:"keyword",trigger:"start KYC review, new customer verification, verify identity"},components:Es([{name:"full_name",type:"text",label:"Full Legal Name",required:!0,sensitive:!1},{name:"date_of_birth",type:"date",label:"Date of Birth",required:!0,sensitive:!0},{name:"nationality",type:"text",label:"Nationality",required:!0,sensitive:!1},{name:"id_type",type:"select",label:"ID Document Type",required:!0,sensitive:!1},{name:"id_number",type:"text",label:"Government ID Number",required:!0,sensitive:!0},{name:"address",type:"textarea",label:"Residential Address",required:!0,sensitive:!0},{name:"email",type:"email",label:"Email Address",required:!0,sensitive:!0},{name:"phone",type:"text",label:"Phone Number",required:!1,sensitive:!0}])},{domain:{name:"incident-triage",domain:"engineering",description:"Production incident triage workflow that captures severity, affected services, and timeline, then routes through an on-call approval gate before executing remediation steps.",businessRules:"Severity P1/P2 incidents require VP-level approval. All incidents must have a root cause analysis tasklist completed within 48 hours. Slack and PagerDuty webhooks must fire on escalation.",triggerMode:"keyword",trigger:"incident, outage, service down, production issue"},components:Es([{name:"incident_title",type:"text",label:"Incident Title",required:!0,sensitive:!1},{name:"severity",type:"select",label:"Severity Level",required:!0,sensitive:!1},{name:"affected_services",type:"textarea",label:"Affected Services",required:!0,sensitive:!1},{name:"start_time",type:"date",label:"Incident Start Time",required:!0,sensitive:!1},{name:"reporter_email",type:"email",label:"Reporter Email",required:!0,sensitive:!0},{name:"customer_impact",type:"textarea",label:"Customer Impact Description",required:!0,sensitive:!1},{name:"estimated_users",type:"number",label:"Estimated Users Affected",required:!1,sensitive:!1}])},{domain:{name:"patient-intake",domain:"healthcare",description:"Patient intake and clinical assessment form that gathers demographics, insurance info, medical history, and current symptoms before routing to the appropriate care team.",businessRules:"All patient data fields (SSN, DOB, insurance ID, medical record number) must be sensitive. HIPAA compliance required. Physician approval gate needed before treatment plan activation. Allergies and medications are required fields.",triggerMode:"immediate",trigger:""},components:Es([{name:"patient_name",type:"text",label:"Patient Full Name",required:!0,sensitive:!0},{name:"date_of_birth",type:"date",label:"Date of Birth",required:!0,sensitive:!0},{name:"ssn",type:"text",label:"Social Security Number",required:!0,sensitive:!0},{name:"insurance_id",type:"text",label:"Insurance ID",required:!0,sensitive:!0},{name:"allergies",type:"textarea",label:"Known Allergies",required:!0,sensitive:!1},{name:"medications",type:"textarea",label:"Current Medications",required:!0,sensitive:!1},{name:"symptoms",type:"textarea",label:"Current Symptoms",required:!0,sensitive:!1},{name:"emergency_contact",type:"text",label:"Emergency Contact Phone",required:!0,sensitive:!0}])},{domain:{name:"customer-escalation",domain:"customer-ops",description:"Customer escalation workflow for high-priority support tickets. Captures customer details, issue history, and sentiment, then triggers internal review and resolution tracking.",businessRules:"Customer email and phone are PII. Escalations open > 24 hours require manager approval. Resolution must include a customer satisfaction follow-up task. CRM webhook fires on status change.",triggerMode:"contextual",trigger:"After 3 failed resolution attempts in the conversation, or when the customer expresses frustration and asks for a supervisor."},components:Es([{name:"customer_name",type:"text",label:"Customer Name",required:!0,sensitive:!1},{name:"customer_email",type:"email",label:"Customer Email",required:!0,sensitive:!0},{name:"customer_phone",type:"text",label:"Customer Phone",required:!1,sensitive:!0},{name:"ticket_id",type:"text",label:"Original Ticket ID",required:!0,sensitive:!1},{name:"priority",type:"select",label:"Escalation Priority",required:!0,sensitive:!1},{name:"issue_summary",type:"textarea",label:"Issue Summary",required:!0,sensitive:!1},{name:"previous_attempts",type:"number",label:"Previous Resolution Attempts",required:!1,sensitive:!1}])},{domain:{name:"vendor-onboarding",domain:"procurement",description:"New vendor onboarding flow that collects company info, tax documents, banking details, and compliance certifications before activating the vendor in the payment system.",businessRules:"Bank account number and tax ID are sensitive. Require legal review approval and finance approval (2 gates). W-9 or W-8BEN verification must be completed. Contracts over $50k need VP sign-off.",triggerMode:"keyword",trigger:"add new vendor, onboard supplier, register vendor"},components:Es([{name:"company_name",type:"text",label:"Company Legal Name",required:!0,sensitive:!1},{name:"tax_id",type:"text",label:"Tax ID / EIN",required:!0,sensitive:!0},{name:"contact_email",type:"email",label:"Primary Contact Email",required:!0,sensitive:!0},{name:"contact_name",type:"text",label:"Primary Contact Name",required:!0,sensitive:!1},{name:"bank_account",type:"text",label:"Bank Account Number",required:!0,sensitive:!0},{name:"routing_number",type:"text",label:"Bank Routing Number",required:!0,sensitive:!0},{name:"contract_value",type:"number",label:"Annual Contract Value ($)",required:!0,sensitive:!1},{name:"address",type:"textarea",label:"Business Address",required:!0,sensitive:!1}])}];function C2(){const i=Math.floor(Math.random()*Dg.length);return Dg[i]}function O2(){const[i,n]=re.useState(()=>{const M=localStorage.getItem("mdma-builder-llm-config");return M?JSON.parse(M):I1}),a=M=>{n(M),localStorage.setItem("mdma-builder-llm-config",JSON.stringify(M))},{domain:s,setDomain:u,components:o,setComponents:f,toggleComponent:h,updateComponent:m,messages:p,generatedPrompt:g,isGenerating:b,error:_,generate:v,stop:N,reset:w}=T2(i),[D,C]=re.useState("chat"),H=()=>{const M=C2();u(M.domain),f(M.components)};return S.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0a0a0a",color:"#e0e0e0",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[S.jsxs("header",{style:{padding:"12px 20px",borderBottom:"1px solid #222",display:"flex",alignItems:"center",gap:"12px"},children:[S.jsxs("h1",{style:{margin:0,fontSize:"18px",fontWeight:700},children:[S.jsx("span",{style:{color:"#6366f1"},children:"MDMA"})," Prompt Builder"]}),S.jsx("span",{style:{fontSize:"12px",color:"#666"},children:"Generate custom prompts for your MDMA-powered chat"})]}),S.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[S.jsxs("aside",{style:{width:"340px",borderRight:"1px solid #222",overflowY:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"20px",flexShrink:0},children:[S.jsx(N1,{domain:s,onChange:u,onSample:H}),S.jsx(j1,{components:o,onToggle:h}),S.jsx(R1,{components:o,onUpdate:m})]}),S.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[S.jsxs("div",{style:{display:"flex",borderBottom:"1px solid #222",padding:"0 16px"},children:[S.jsx("button",{type:"button",onClick:()=>C("chat"),style:{...If,...D==="chat"?Yf:{}},children:"Chat"}),S.jsxs("button",{type:"button",onClick:()=>C("output"),style:{...If,...D==="output"?Yf:{}},children:["Output",g&&S.jsx("span",{style:{marginLeft:"6px",width:"6px",height:"6px",borderRadius:"50%",background:"#22c55e",display:"inline-block"}})]}),S.jsxs("button",{type:"button",onClick:()=>C("preview"),style:{...If,...D==="preview"?Yf:{}},children:["Preview",g&&S.jsx("span",{style:{marginLeft:"6px",width:"6px",height:"6px",borderRadius:"50%",background:"#6366f1",display:"inline-block"}})]})]}),S.jsx("div",{style:{flex:1,padding:"16px",overflow:"hidden",display:"flex",flexDirection:"column"},children:D==="chat"?S.jsx(G1,{messages:p,isGenerating:b,error:_,onGenerate:v,onStop:N,onReset:w,config:i,onConfigChange:a}):D==="output"?S.jsx(Z1,{prompt:g,isGenerating:b}):S.jsx(x2,{customPrompt:g,llmConfig:i})})]})]})]})}const If={padding:"10px 16px",border:"none",borderBottom:"2px solid transparent",background:"none",color:"#888",fontSize:"13px",fontWeight:500,cursor:"pointer"},Yf={color:"#e0e0e0",borderBottomColor:"#6366f1"};C1.createRoot(document.getElementById("root")).render(S.jsx(re.StrictMode,{children:S.jsx(O2,{})}));